/******/
(function() { // webpackBootstrap
    /******/
    var __webpack_modules__ = ({

        /***/
        "../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js":
            /*!**************************************************************************************!*\
              !*** ../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***!
              \**************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = void 0;
                var _memoize = _interopRequireDefault(__webpack_require__( /*! @emotion/memoize */ "../../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23

                var index = (0, _memoize.default)(function(prop) {
                        return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
                            /* o */
                            && prop.charCodeAt(1) === 110
                            /* n */
                            && prop.charCodeAt(2) < 91;
                    }
                    /* Z+1 */
                );
                var _default = exports["default"] = index;

                /***/
            }),

        /***/
        "../../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = void 0;

                function memoize(fn) {
                    var cache = {};
                    return function(arg) {
                        if (cache[arg] === undefined) cache[arg] = fn(arg);
                        return cache[arg];
                    };
                }
                var _default = exports["default"] = memoize;

                /***/
            }),

        /***/
        "../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js ***!
              \****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.computePosition = exports.autoPlacement = exports.arrow = void 0;
                exports.detectOverflow = detectOverflow;
                exports.offset = exports.limitShift = exports.inline = exports.hide = exports.flip = void 0;
                exports.rectToClientRect = rectToClientRect;
                exports.size = exports.shift = void 0;

                function getAlignment(placement) {
                    return placement.split('-')[1];
                }

                function getLengthFromAxis(axis) {
                    return axis === 'y' ? 'height' : 'width';
                }

                function getSide(placement) {
                    return placement.split('-')[0];
                }

                function getMainAxisFromPlacement(placement) {
                    return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
                }

                function computeCoordsFromPlacement(_ref, placement, rtl) {
                    let {
                        reference,
                        floating
                    } = _ref;
                    const commonX = reference.x + reference.width / 2 - floating.width / 2;
                    const commonY = reference.y + reference.height / 2 - floating.height / 2;
                    const mainAxis = getMainAxisFromPlacement(placement);
                    const length = getLengthFromAxis(mainAxis);
                    const commonAlign = reference[length] / 2 - floating[length] / 2;
                    const side = getSide(placement);
                    const isVertical = mainAxis === 'x';
                    let coords;
                    switch (side) {
                        case 'top':
                            coords = {
                                x: commonX,
                                y: reference.y - floating.height
                            };
                            break;
                        case 'bottom':
                            coords = {
                                x: commonX,
                                y: reference.y + reference.height
                            };
                            break;
                        case 'right':
                            coords = {
                                x: reference.x + reference.width,
                                y: commonY
                            };
                            break;
                        case 'left':
                            coords = {
                                x: reference.x - floating.width,
                                y: commonY
                            };
                            break;
                        default:
                            coords = {
                                x: reference.x,
                                y: reference.y
                            };
                    }
                    switch (getAlignment(placement)) {
                        case 'start':
                            coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
                            break;
                        case 'end':
                            coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
                            break;
                    }
                    return coords;
                }

                /**
                 * Computes the `x` and `y` coordinates that will place the floating element
                 * next to a reference element when it is given a certain positioning strategy.
                 *
                 * This export does not have any `platform` interface logic. You will need to
                 * write one for the platform you are using Floating UI with.
                 */
                const computePosition = async (reference, floating, config) => {
                    const {
                        placement = 'bottom',
                            strategy = 'absolute',
                            middleware = [],
                            platform
                    } = config;
                    const validMiddleware = middleware.filter(Boolean);
                    const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
                    let rects = await platform.getElementRects({
                        reference,
                        floating,
                        strategy
                    });
                    let {
                        x,
                        y
                    } = computeCoordsFromPlacement(rects, placement, rtl);
                    let statefulPlacement = placement;
                    let middlewareData = {};
                    let resetCount = 0;
                    for (let i = 0; i < validMiddleware.length; i++) {
                        const {
                            name,
                            fn
                        } = validMiddleware[i];
                        const {
                            x: nextX,
                            y: nextY,
                            data,
                            reset
                        } = await fn({
                            x,
                            y,
                            initialPlacement: placement,
                            placement: statefulPlacement,
                            strategy,
                            middlewareData,
                            rects,
                            platform,
                            elements: {
                                reference,
                                floating
                            }
                        });
                        x = nextX != null ? nextX : x;
                        y = nextY != null ? nextY : y;
                        middlewareData = {
                            ...middlewareData,
                            [name]: {
                                ...middlewareData[name],
                                ...data
                            }
                        };
                        if (reset && resetCount <= 50) {
                            resetCount++;
                            if (typeof reset === 'object') {
                                if (reset.placement) {
                                    statefulPlacement = reset.placement;
                                }
                                if (reset.rects) {
                                    rects = reset.rects === true ? await platform.getElementRects({
                                        reference,
                                        floating,
                                        strategy
                                    }) : reset.rects;
                                }
                                ({
                                    x,
                                    y
                                } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
                            }
                            i = -1;
                            continue;
                        }
                    }
                    return {
                        x,
                        y,
                        placement: statefulPlacement,
                        strategy,
                        middlewareData
                    };
                };
                exports.computePosition = computePosition;

                function evaluate(value, param) {
                    return typeof value === 'function' ? value(param) : value;
                }

                function expandPaddingObject(padding) {
                    return {
                        top: 0,
                        right: 0,
                        bottom: 0,
                        left: 0,
                        ...padding
                    };
                }

                function getSideObjectFromPadding(padding) {
                    return typeof padding !== 'number' ? expandPaddingObject(padding) : {
                        top: padding,
                        right: padding,
                        bottom: padding,
                        left: padding
                    };
                }

                function rectToClientRect(rect) {
                    return {
                        ...rect,
                        top: rect.y,
                        left: rect.x,
                        right: rect.x + rect.width,
                        bottom: rect.y + rect.height
                    };
                }

                /**
                 * Resolves with an object of overflow side offsets that determine how much the
                 * element is overflowing a given clipping boundary on each side.
                 * - positive = overflowing the boundary by that number of pixels
                 * - negative = how many pixels left before it will overflow
                 * - 0 = lies flush with the boundary
                 * @see https://floating-ui.com/docs/detectOverflow
                 */
                async function detectOverflow(state, options) {
                    var _await$platform$isEle;
                    if (options === void 0) {
                        options = {};
                    }
                    const {
                        x,
                        y,
                        platform,
                        rects,
                        elements,
                        strategy
                    } = state;
                    const {
                        boundary = 'clippingAncestors',
                            rootBoundary = 'viewport',
                            elementContext = 'floating',
                            altBoundary = false,
                            padding = 0
                    } = evaluate(options, state);
                    const paddingObject = getSideObjectFromPadding(padding);
                    const altContext = elementContext === 'floating' ? 'reference' : 'floating';
                    const element = elements[altBoundary ? altContext : elementContext];
                    const clippingClientRect = rectToClientRect(await platform.getClippingRect({
                        element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
                        boundary,
                        rootBoundary,
                        strategy
                    }));
                    const rect = elementContext === 'floating' ? {
                        ...rects.floating,
                        x,
                        y
                    } : rects.reference;
                    const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
                    const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
                        x: 1,
                        y: 1
                    } : {
                        x: 1,
                        y: 1
                    };
                    const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
                        rect,
                        offsetParent,
                        strategy
                    }) : rect);
                    return {
                        top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
                        bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
                        left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
                        right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
                    };
                }
                const min = Math.min;
                const max = Math.max;

                function within(min$1, value, max$1) {
                    return max(min$1, min(value, max$1));
                }

                /**
                 * Provides data to position an inner element of the floating element so that it
                 * appears centered to the reference element.
                 * @see https://floating-ui.com/docs/arrow
                 */
                const arrow = options => ({
                    name: 'arrow',
                    options,
                    async fn(state) {
                        const {
                            x,
                            y,
                            placement,
                            rects,
                            platform,
                            elements
                        } = state;
                        // Since `element` is required, we don't Partial<> the type.
                        const {
                            element,
                            padding = 0
                        } = evaluate(options, state) || {};
                        if (element == null) {
                            return {};
                        }
                        const paddingObject = getSideObjectFromPadding(padding);
                        const coords = {
                            x,
                            y
                        };
                        const axis = getMainAxisFromPlacement(placement);
                        const length = getLengthFromAxis(axis);
                        const arrowDimensions = await platform.getDimensions(element);
                        const isYAxis = axis === 'y';
                        const minProp = isYAxis ? 'top' : 'left';
                        const maxProp = isYAxis ? 'bottom' : 'right';
                        const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
                        const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
                        const startDiff = coords[axis] - rects.reference[axis];
                        const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
                        let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;

                        // DOM platform can return `window` as the `offsetParent`.
                        if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
                            clientSize = elements.floating[clientProp] || rects.floating[length];
                        }
                        const centerToReference = endDiff / 2 - startDiff / 2;

                        // If the padding is large enough that it causes the arrow to no longer be
                        // centered, modify the padding so that it is centered.
                        const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
                        const minPadding = min(paddingObject[minProp], largestPossiblePadding);
                        const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);

                        // Make sure the arrow doesn't overflow the floating element if the center
                        // point is outside the floating element's bounds.
                        const min$1 = minPadding;
                        const max = clientSize - arrowDimensions[length] - maxPadding;
                        const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
                        const offset = within(min$1, center, max);

                        // If the reference is small enough that the arrow's padding causes it to
                        // to point to nothing for an aligned placement, adjust the offset of the
                        // floating element itself. This stops `shift()` from taking action, but can
                        // be worked around by calling it again after the `arrow()` if desired.
                        const shouldAddOffset = getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
                        const alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;
                        return {
                            [axis]: coords[axis] - alignmentOffset,
                            data: {
                                [axis]: offset,
                                centerOffset: center - offset
                            }
                        };
                    }
                });
                exports.arrow = arrow;
                const sides = ['top', 'right', 'bottom', 'left'];
                const allPlacements = /*#__PURE__*/ sides.reduce((acc, side) => acc.concat(side, side + "-start", side + "-end"), []);
                const oppositeSideMap = {
                    left: 'right',
                    right: 'left',
                    bottom: 'top',
                    top: 'bottom'
                };

                function getOppositePlacement(placement) {
                    return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
                }

                function getAlignmentSides(placement, rects, rtl) {
                    if (rtl === void 0) {
                        rtl = false;
                    }
                    const alignment = getAlignment(placement);
                    const mainAxis = getMainAxisFromPlacement(placement);
                    const length = getLengthFromAxis(mainAxis);
                    let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
                    if (rects.reference[length] > rects.floating[length]) {
                        mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
                    }
                    return {
                        main: mainAlignmentSide,
                        cross: getOppositePlacement(mainAlignmentSide)
                    };
                }
                const oppositeAlignmentMap = {
                    start: 'end',
                    end: 'start'
                };

                function getOppositeAlignmentPlacement(placement) {
                    return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
                }

                function getPlacementList(alignment, autoAlignment, allowedPlacements) {
                    const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
                    return allowedPlacementsSortedByAlignment.filter(placement => {
                        if (alignment) {
                            return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
                        }
                        return true;
                    });
                }
                /**
                 * Optimizes the visibility of the floating element by choosing the placement
                 * that has the most space available automatically, without needing to specify a
                 * preferred placement. Alternative to `flip`.
                 * @see https://floating-ui.com/docs/autoPlacement
                 */
                const autoPlacement = function(options) {
                    if (options === void 0) {
                        options = {};
                    }
                    return {
                        name: 'autoPlacement',
                        options,
                        async fn(state) {
                            var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
                            const {
                                rects,
                                middlewareData,
                                placement,
                                platform,
                                elements
                            } = state;
                            const {
                                crossAxis = false,
                                    alignment,
                                    allowedPlacements = allPlacements,
                                    autoAlignment = true,
                                    ...detectOverflowOptions
                            } = evaluate(options, state);
                            const placements = alignment !== undefined || allowedPlacements === allPlacements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
                            const overflow = await detectOverflow(state, detectOverflowOptions);
                            const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
                            const currentPlacement = placements[currentIndex];
                            if (currentPlacement == null) {
                                return {};
                            }
                            const {
                                main,
                                cross
                            } = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));

                            // Make `computeCoords` start from the right place.
                            if (placement !== currentPlacement) {
                                return {
                                    reset: {
                                        placement: placements[0]
                                    }
                                };
                            }
                            const currentOverflows = [overflow[getSide(currentPlacement)], overflow[main], overflow[cross]];
                            const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
                                placement: currentPlacement,
                                overflows: currentOverflows
                            }];
                            const nextPlacement = placements[currentIndex + 1];

                            // There are more placements to check.
                            if (nextPlacement) {
                                return {
                                    data: {
                                        index: currentIndex + 1,
                                        overflows: allOverflows
                                    },
                                    reset: {
                                        placement: nextPlacement
                                    }
                                };
                            }
                            const placementsSortedByMostSpace = allOverflows.map(d => {
                                const alignment = getAlignment(d.placement);
                                return [d.placement, alignment && crossAxis ?
                                    // Check along the mainAxis and main crossAxis side.
                                    d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
                                    // Check only the mainAxis.
                                    d.overflows[0], d.overflows
                                ];
                            }).sort((a, b) => a[1] - b[1]);
                            const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
                                // Aligned placements should not check their opposite crossAxis
                                // side.
                                getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
                            const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
                            if (resetPlacement !== placement) {
                                return {
                                    data: {
                                        index: currentIndex + 1,
                                        overflows: allOverflows
                                    },
                                    reset: {
                                        placement: resetPlacement
                                    }
                                };
                            }
                            return {};
                        }
                    };
                };
                exports.autoPlacement = autoPlacement;

                function getExpandedPlacements(placement) {
                    const oppositePlacement = getOppositePlacement(placement);
                    return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
                }

                function getSideList(side, isStart, rtl) {
                    const lr = ['left', 'right'];
                    const rl = ['right', 'left'];
                    const tb = ['top', 'bottom'];
                    const bt = ['bottom', 'top'];
                    switch (side) {
                        case 'top':
                        case 'bottom':
                            if (rtl) return isStart ? rl : lr;
                            return isStart ? lr : rl;
                        case 'left':
                        case 'right':
                            return isStart ? tb : bt;
                        default:
                            return [];
                    }
                }

                function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
                    const alignment = getAlignment(placement);
                    let list = getSideList(getSide(placement), direction === 'start', rtl);
                    if (alignment) {
                        list = list.map(side => side + "-" + alignment);
                        if (flipAlignment) {
                            list = list.concat(list.map(getOppositeAlignmentPlacement));
                        }
                    }
                    return list;
                }

                /**
                 * Optimizes the visibility of the floating element by flipping the `placement`
                 * in order to keep it in view when the preferred placement(s) will overflow the
                 * clipping boundary. Alternative to `autoPlacement`.
                 * @see https://floating-ui.com/docs/flip
                 */
                const flip = function(options) {
                    if (options === void 0) {
                        options = {};
                    }
                    return {
                        name: 'flip',
                        options,
                        async fn(state) {
                            var _middlewareData$flip;
                            const {
                                placement,
                                middlewareData,
                                rects,
                                initialPlacement,
                                platform,
                                elements
                            } = state;
                            const {
                                mainAxis: checkMainAxis = true,
                                crossAxis: checkCrossAxis = true,
                                fallbackPlacements: specifiedFallbackPlacements,
                                fallbackStrategy = 'bestFit',
                                fallbackAxisSideDirection = 'none',
                                flipAlignment = true,
                                ...detectOverflowOptions
                            } = evaluate(options, state);
                            const side = getSide(placement);
                            const isBasePlacement = getSide(initialPlacement) === initialPlacement;
                            const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
                            const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
                            if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
                                fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
                            }
                            const placements = [initialPlacement, ...fallbackPlacements];
                            const overflow = await detectOverflow(state, detectOverflowOptions);
                            const overflows = [];
                            let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
                            if (checkMainAxis) {
                                overflows.push(overflow[side]);
                            }
                            if (checkCrossAxis) {
                                const {
                                    main,
                                    cross
                                } = getAlignmentSides(placement, rects, rtl);
                                overflows.push(overflow[main], overflow[cross]);
                            }
                            overflowsData = [...overflowsData, {
                                placement,
                                overflows
                            }];

                            // One or more sides is overflowing.
                            if (!overflows.every(side => side <= 0)) {
                                var _middlewareData$flip2, _overflowsData$filter;
                                const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
                                const nextPlacement = placements[nextIndex];
                                if (nextPlacement) {
                                    // Try next placement and re-run the lifecycle.
                                    return {
                                        data: {
                                            index: nextIndex,
                                            overflows: overflowsData
                                        },
                                        reset: {
                                            placement: nextPlacement
                                        }
                                    };
                                }

                                // First, find the candidates that fit on the mainAxis side of overflow,
                                // then find the placement that fits the best on the main crossAxis side.
                                let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;

                                // Otherwise fallback.
                                if (!resetPlacement) {
                                    switch (fallbackStrategy) {
                                        case 'bestFit': {
                                            var _overflowsData$map$so;
                                            const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
                                            if (placement) {
                                                resetPlacement = placement;
                                            }
                                            break;
                                        }
                                        case 'initialPlacement':
                                            resetPlacement = initialPlacement;
                                            break;
                                    }
                                }
                                if (placement !== resetPlacement) {
                                    return {
                                        reset: {
                                            placement: resetPlacement
                                        }
                                    };
                                }
                            }
                            return {};
                        }
                    };
                };
                exports.flip = flip;

                function getSideOffsets(overflow, rect) {
                    return {
                        top: overflow.top - rect.height,
                        right: overflow.right - rect.width,
                        bottom: overflow.bottom - rect.height,
                        left: overflow.left - rect.width
                    };
                }

                function isAnySideFullyClipped(overflow) {
                    return sides.some(side => overflow[side] >= 0);
                }
                /**
                 * Provides data to hide the floating element in applicable situations, such as
                 * when it is not in the same clipping context as the reference element.
                 * @see https://floating-ui.com/docs/hide
                 */
                const hide = function(options) {
                    if (options === void 0) {
                        options = {};
                    }
                    return {
                        name: 'hide',
                        options,
                        async fn(state) {
                            const {
                                rects
                            } = state;
                            const {
                                strategy = 'referenceHidden',
                                    ...detectOverflowOptions
                            } = evaluate(options, state);
                            switch (strategy) {
                                case 'referenceHidden': {
                                    const overflow = await detectOverflow(state, {
                                        ...detectOverflowOptions,
                                        elementContext: 'reference'
                                    });
                                    const offsets = getSideOffsets(overflow, rects.reference);
                                    return {
                                        data: {
                                            referenceHiddenOffsets: offsets,
                                            referenceHidden: isAnySideFullyClipped(offsets)
                                        }
                                    };
                                }
                                case 'escaped': {
                                    const overflow = await detectOverflow(state, {
                                        ...detectOverflowOptions,
                                        altBoundary: true
                                    });
                                    const offsets = getSideOffsets(overflow, rects.floating);
                                    return {
                                        data: {
                                            escapedOffsets: offsets,
                                            escaped: isAnySideFullyClipped(offsets)
                                        }
                                    };
                                }
                                default: {
                                    return {};
                                }
                            }
                        }
                    };
                };
                exports.hide = hide;

                function getBoundingRect(rects) {
                    const minX = min(...rects.map(rect => rect.left));
                    const minY = min(...rects.map(rect => rect.top));
                    const maxX = max(...rects.map(rect => rect.right));
                    const maxY = max(...rects.map(rect => rect.bottom));
                    return {
                        x: minX,
                        y: minY,
                        width: maxX - minX,
                        height: maxY - minY
                    };
                }

                function getRectsByLine(rects) {
                    const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
                    const groups = [];
                    let prevRect = null;
                    for (let i = 0; i < sortedRects.length; i++) {
                        const rect = sortedRects[i];
                        if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
                            groups.push([rect]);
                        } else {
                            groups[groups.length - 1].push(rect);
                        }
                        prevRect = rect;
                    }
                    return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
                }
                /**
                 * Provides improved positioning for inline reference elements that can span
                 * over multiple lines, such as hyperlinks or range selections.
                 * @see https://floating-ui.com/docs/inline
                 */
                const inline = function(options) {
                    if (options === void 0) {
                        options = {};
                    }
                    return {
                        name: 'inline',
                        options,
                        async fn(state) {
                            const {
                                placement,
                                elements,
                                rects,
                                platform,
                                strategy
                            } = state;
                            // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
                            // ClientRect's bounds, despite the event listener being triggered. A
                            // padding of 2 seems to handle this issue.
                            const {
                                padding = 2,
                                    x,
                                    y
                            } = evaluate(options, state);
                            const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
                            const clientRects = getRectsByLine(nativeClientRects);
                            const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
                            const paddingObject = getSideObjectFromPadding(padding);

                            function getBoundingClientRect() {
                                // There are two rects and they are disjoined.
                                if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
                                    // Find the first rect in which the point is fully inside.
                                    return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
                                }

                                // There are 2 or more connected rects.
                                if (clientRects.length >= 2) {
                                    if (getMainAxisFromPlacement(placement) === 'x') {
                                        const firstRect = clientRects[0];
                                        const lastRect = clientRects[clientRects.length - 1];
                                        const isTop = getSide(placement) === 'top';
                                        const top = firstRect.top;
                                        const bottom = lastRect.bottom;
                                        const left = isTop ? firstRect.left : lastRect.left;
                                        const right = isTop ? firstRect.right : lastRect.right;
                                        const width = right - left;
                                        const height = bottom - top;
                                        return {
                                            top,
                                            bottom,
                                            left,
                                            right,
                                            width,
                                            height,
                                            x: left,
                                            y: top
                                        };
                                    }
                                    const isLeftSide = getSide(placement) === 'left';
                                    const maxRight = max(...clientRects.map(rect => rect.right));
                                    const minLeft = min(...clientRects.map(rect => rect.left));
                                    const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
                                    const top = measureRects[0].top;
                                    const bottom = measureRects[measureRects.length - 1].bottom;
                                    const left = minLeft;
                                    const right = maxRight;
                                    const width = right - left;
                                    const height = bottom - top;
                                    return {
                                        top,
                                        bottom,
                                        left,
                                        right,
                                        width,
                                        height,
                                        x: left,
                                        y: top
                                    };
                                }
                                return fallback;
                            }
                            const resetRects = await platform.getElementRects({
                                reference: {
                                    getBoundingClientRect
                                },
                                floating: elements.floating,
                                strategy
                            });
                            if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
                                return {
                                    reset: {
                                        rects: resetRects
                                    }
                                };
                            }
                            return {};
                        }
                    };
                };
                exports.inline = inline;
                async function convertValueToCoords(state, options) {
                    const {
                        placement,
                        platform,
                        elements
                    } = state;
                    const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
                    const side = getSide(placement);
                    const alignment = getAlignment(placement);
                    const isVertical = getMainAxisFromPlacement(placement) === 'x';
                    const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
                    const crossAxisMulti = rtl && isVertical ? -1 : 1;
                    const rawValue = evaluate(options, state);

                    // eslint-disable-next-line prefer-const
                    let {
                        mainAxis,
                        crossAxis,
                        alignmentAxis
                    } = typeof rawValue === 'number' ? {
                        mainAxis: rawValue,
                        crossAxis: 0,
                        alignmentAxis: null
                    } : {
                        mainAxis: 0,
                        crossAxis: 0,
                        alignmentAxis: null,
                        ...rawValue
                    };
                    if (alignment && typeof alignmentAxis === 'number') {
                        crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
                    }
                    return isVertical ? {
                        x: crossAxis * crossAxisMulti,
                        y: mainAxis * mainAxisMulti
                    } : {
                        x: mainAxis * mainAxisMulti,
                        y: crossAxis * crossAxisMulti
                    };
                }

                /**
                 * Modifies the placement by translating the floating element along the
                 * specified axes.
                 * A number (shorthand for `mainAxis` or distance), or an axes configuration
                 * object may be passed.
                 * @see https://floating-ui.com/docs/offset
                 */
                const offset = function(options) {
                    if (options === void 0) {
                        options = 0;
                    }
                    return {
                        name: 'offset',
                        options,
                        async fn(state) {
                            const {
                                x,
                                y
                            } = state;
                            const diffCoords = await convertValueToCoords(state, options);
                            return {
                                x: x + diffCoords.x,
                                y: y + diffCoords.y,
                                data: diffCoords
                            };
                        }
                    };
                };
                exports.offset = offset;

                function getCrossAxis(axis) {
                    return axis === 'x' ? 'y' : 'x';
                }

                /**
                 * Optimizes the visibility of the floating element by shifting it in order to
                 * keep it in view when it will overflow the clipping boundary.
                 * @see https://floating-ui.com/docs/shift
                 */
                const shift = function(options) {
                    if (options === void 0) {
                        options = {};
                    }
                    return {
                        name: 'shift',
                        options,
                        async fn(state) {
                            const {
                                x,
                                y,
                                placement
                            } = state;
                            const {
                                mainAxis: checkMainAxis = true,
                                crossAxis: checkCrossAxis = false,
                                limiter = {
                                    fn: _ref => {
                                        let {
                                            x,
                                            y
                                        } = _ref;
                                        return {
                                            x,
                                            y
                                        };
                                    }
                                },
                                ...detectOverflowOptions
                            } = evaluate(options, state);
                            const coords = {
                                x,
                                y
                            };
                            const overflow = await detectOverflow(state, detectOverflowOptions);
                            const mainAxis = getMainAxisFromPlacement(getSide(placement));
                            const crossAxis = getCrossAxis(mainAxis);
                            let mainAxisCoord = coords[mainAxis];
                            let crossAxisCoord = coords[crossAxis];
                            if (checkMainAxis) {
                                const minSide = mainAxis === 'y' ? 'top' : 'left';
                                const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
                                const min = mainAxisCoord + overflow[minSide];
                                const max = mainAxisCoord - overflow[maxSide];
                                mainAxisCoord = within(min, mainAxisCoord, max);
                            }
                            if (checkCrossAxis) {
                                const minSide = crossAxis === 'y' ? 'top' : 'left';
                                const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
                                const min = crossAxisCoord + overflow[minSide];
                                const max = crossAxisCoord - overflow[maxSide];
                                crossAxisCoord = within(min, crossAxisCoord, max);
                            }
                            const limitedCoords = limiter.fn({
                                ...state,
                                [mainAxis]: mainAxisCoord,
                                [crossAxis]: crossAxisCoord
                            });
                            return {
                                ...limitedCoords,
                                data: {
                                    x: limitedCoords.x - x,
                                    y: limitedCoords.y - y
                                }
                            };
                        }
                    };
                };
                /**
                 * Built-in `limiter` that will stop `shift()` at a certain point.
                 */
                exports.shift = shift;
                const limitShift = function(options) {
                    if (options === void 0) {
                        options = {};
                    }
                    return {
                        options,
                        fn(state) {
                            const {
                                x,
                                y,
                                placement,
                                rects,
                                middlewareData
                            } = state;
                            const {
                                offset = 0,
                                    mainAxis: checkMainAxis = true,
                                    crossAxis: checkCrossAxis = true
                            } = evaluate(options, state);
                            const coords = {
                                x,
                                y
                            };
                            const mainAxis = getMainAxisFromPlacement(placement);
                            const crossAxis = getCrossAxis(mainAxis);
                            let mainAxisCoord = coords[mainAxis];
                            let crossAxisCoord = coords[crossAxis];
                            const rawOffset = evaluate(offset, state);
                            const computedOffset = typeof rawOffset === 'number' ? {
                                mainAxis: rawOffset,
                                crossAxis: 0
                            } : {
                                mainAxis: 0,
                                crossAxis: 0,
                                ...rawOffset
                            };
                            if (checkMainAxis) {
                                const len = mainAxis === 'y' ? 'height' : 'width';
                                const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
                                const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
                                if (mainAxisCoord < limitMin) {
                                    mainAxisCoord = limitMin;
                                } else if (mainAxisCoord > limitMax) {
                                    mainAxisCoord = limitMax;
                                }
                            }
                            if (checkCrossAxis) {
                                var _middlewareData$offse, _middlewareData$offse2;
                                const len = mainAxis === 'y' ? 'width' : 'height';
                                const isOriginSide = ['top', 'left'].includes(getSide(placement));
                                const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
                                const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
                                if (crossAxisCoord < limitMin) {
                                    crossAxisCoord = limitMin;
                                } else if (crossAxisCoord > limitMax) {
                                    crossAxisCoord = limitMax;
                                }
                            }
                            return {
                                [mainAxis]: mainAxisCoord,
                                [crossAxis]: crossAxisCoord
                            };
                        }
                    };
                };

                /**
                 * Provides data that allows you to change the size of the floating element —
                 * for instance, prevent it from overflowing the clipping boundary or match the
                 * width of the reference element.
                 * @see https://floating-ui.com/docs/size
                 */
                exports.limitShift = limitShift;
                const size = function(options) {
                    if (options === void 0) {
                        options = {};
                    }
                    return {
                        name: 'size',
                        options,
                        async fn(state) {
                            const {
                                placement,
                                rects,
                                platform,
                                elements
                            } = state;
                            const {
                                apply = () => {},
                                    ...detectOverflowOptions
                            } = evaluate(options, state);
                            const overflow = await detectOverflow(state, detectOverflowOptions);
                            const side = getSide(placement);
                            const alignment = getAlignment(placement);
                            const axis = getMainAxisFromPlacement(placement);
                            const isXAxis = axis === 'x';
                            const {
                                width,
                                height
                            } = rects.floating;
                            let heightSide;
                            let widthSide;
                            if (side === 'top' || side === 'bottom') {
                                heightSide = side;
                                widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
                            } else {
                                widthSide = side;
                                heightSide = alignment === 'end' ? 'top' : 'bottom';
                            }
                            const overflowAvailableHeight = height - overflow[heightSide];
                            const overflowAvailableWidth = width - overflow[widthSide];
                            const noShift = !state.middlewareData.shift;
                            let availableHeight = overflowAvailableHeight;
                            let availableWidth = overflowAvailableWidth;
                            if (isXAxis) {
                                const maximumClippingWidth = width - overflow.left - overflow.right;
                                availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
                            } else {
                                const maximumClippingHeight = height - overflow.top - overflow.bottom;
                                availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
                            }
                            if (noShift && !alignment) {
                                const xMin = max(overflow.left, 0);
                                const xMax = max(overflow.right, 0);
                                const yMin = max(overflow.top, 0);
                                const yMax = max(overflow.bottom, 0);
                                if (isXAxis) {
                                    availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
                                } else {
                                    availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
                                }
                            }
                            await apply({
                                ...state,
                                availableWidth,
                                availableHeight
                            });
                            const nextDimensions = await platform.getDimensions(elements.floating);
                            if (width !== nextDimensions.width || height !== nextDimensions.height) {
                                return {
                                    reset: {
                                        rects: true
                                    }
                                };
                            }
                            return {};
                        }
                    };
                };
                exports.size = size;

                /***/
            }),

        /***/
        "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "arrow", ({
                    enumerable: true,
                    get: function() {
                        return _core.arrow;
                    }
                }));
                Object.defineProperty(exports, "autoPlacement", ({
                    enumerable: true,
                    get: function() {
                        return _core.autoPlacement;
                    }
                }));
                exports.autoUpdate = autoUpdate;
                exports.computePosition = void 0;
                Object.defineProperty(exports, "detectOverflow", ({
                    enumerable: true,
                    get: function() {
                        return _core.detectOverflow;
                    }
                }));
                Object.defineProperty(exports, "flip", ({
                    enumerable: true,
                    get: function() {
                        return _core.flip;
                    }
                }));
                exports.getOverflowAncestors = getOverflowAncestors;
                Object.defineProperty(exports, "hide", ({
                    enumerable: true,
                    get: function() {
                        return _core.hide;
                    }
                }));
                Object.defineProperty(exports, "inline", ({
                    enumerable: true,
                    get: function() {
                        return _core.inline;
                    }
                }));
                Object.defineProperty(exports, "limitShift", ({
                    enumerable: true,
                    get: function() {
                        return _core.limitShift;
                    }
                }));
                Object.defineProperty(exports, "offset", ({
                    enumerable: true,
                    get: function() {
                        return _core.offset;
                    }
                }));
                exports.platform = void 0;
                Object.defineProperty(exports, "shift", ({
                    enumerable: true,
                    get: function() {
                        return _core.shift;
                    }
                }));
                Object.defineProperty(exports, "size", ({
                    enumerable: true,
                    get: function() {
                        return _core.size;
                    }
                }));
                var _core = __webpack_require__( /*! @floating-ui/core */ "../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js");

                function getWindow(node) {
                    var _node$ownerDocument;
                    return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
                }

                function getComputedStyle$1(element) {
                    return getWindow(element).getComputedStyle(element);
                }

                function isNode(value) {
                    return value instanceof getWindow(value).Node;
                }

                function getNodeName(node) {
                    return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
                }

                function isHTMLElement(value) {
                    return value instanceof getWindow(value).HTMLElement;
                }

                function isElement(value) {
                    return value instanceof getWindow(value).Element;
                }

                function isShadowRoot(node) {
                    // Browsers without `ShadowRoot` support.
                    if (typeof ShadowRoot === 'undefined') {
                        return false;
                    }
                    const OwnElement = getWindow(node).ShadowRoot;
                    return node instanceof OwnElement || node instanceof ShadowRoot;
                }

                function isOverflowElement(element) {
                    const {
                        overflow,
                        overflowX,
                        overflowY,
                        display
                    } = getComputedStyle$1(element);
                    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
                }

                function isTableElement(element) {
                    return ['table', 'td', 'th'].includes(getNodeName(element));
                }

                function isContainingBlock(element) {
                    const safari = isSafari();
                    const css = getComputedStyle$1(element);

                    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
                    return css.transform !== 'none' || css.perspective !== 'none' || !safari && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !safari && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
                }

                function isSafari() {
                    if (typeof CSS === 'undefined' || !CSS.supports) return false;
                    return CSS.supports('-webkit-backdrop-filter', 'none');
                }

                function isLastTraversableNode(node) {
                    return ['html', 'body', '#document'].includes(getNodeName(node));
                }
                const min = Math.min;
                const max = Math.max;
                const round = Math.round;

                function getCssDimensions(element) {
                    const css = getComputedStyle$1(element);
                    // In testing environments, the `width` and `height` properties are empty
                    // strings for SVG elements, returning NaN. Fallback to `0` in this case.
                    let width = parseFloat(css.width) || 0;
                    let height = parseFloat(css.height) || 0;
                    const hasOffset = isHTMLElement(element);
                    const offsetWidth = hasOffset ? element.offsetWidth : width;
                    const offsetHeight = hasOffset ? element.offsetHeight : height;
                    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
                    if (shouldFallback) {
                        width = offsetWidth;
                        height = offsetHeight;
                    }
                    return {
                        width,
                        height,
                        fallback: shouldFallback
                    };
                }

                function unwrapElement(element) {
                    return !isElement(element) ? element.contextElement : element;
                }
                const FALLBACK_SCALE = {
                    x: 1,
                    y: 1
                };

                function getScale(element) {
                    const domElement = unwrapElement(element);
                    if (!isHTMLElement(domElement)) {
                        return FALLBACK_SCALE;
                    }
                    const rect = domElement.getBoundingClientRect();
                    const {
                        width,
                        height,
                        fallback
                    } = getCssDimensions(domElement);
                    let x = (fallback ? round(rect.width) : rect.width) / width;
                    let y = (fallback ? round(rect.height) : rect.height) / height;

                    // 0, NaN, or Infinity should always fallback to 1.

                    if (!x || !Number.isFinite(x)) {
                        x = 1;
                    }
                    if (!y || !Number.isFinite(y)) {
                        y = 1;
                    }
                    return {
                        x,
                        y
                    };
                }
                const noOffsets = {
                    x: 0,
                    y: 0
                };

                function getVisualOffsets(element, isFixed, floatingOffsetParent) {
                    var _win$visualViewport, _win$visualViewport2;
                    if (isFixed === void 0) {
                        isFixed = true;
                    }
                    if (!isSafari()) {
                        return noOffsets;
                    }
                    const win = element ? getWindow(element) : window;
                    if (!floatingOffsetParent || isFixed && floatingOffsetParent !== win) {
                        return noOffsets;
                    }
                    return {
                        x: ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0,
                        y: ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0
                    };
                }

                function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
                    if (includeScale === void 0) {
                        includeScale = false;
                    }
                    if (isFixedStrategy === void 0) {
                        isFixedStrategy = false;
                    }
                    const clientRect = element.getBoundingClientRect();
                    const domElement = unwrapElement(element);
                    let scale = FALLBACK_SCALE;
                    if (includeScale) {
                        if (offsetParent) {
                            if (isElement(offsetParent)) {
                                scale = getScale(offsetParent);
                            }
                        } else {
                            scale = getScale(element);
                        }
                    }
                    const visualOffsets = getVisualOffsets(domElement, isFixedStrategy, offsetParent);
                    let x = (clientRect.left + visualOffsets.x) / scale.x;
                    let y = (clientRect.top + visualOffsets.y) / scale.y;
                    let width = clientRect.width / scale.x;
                    let height = clientRect.height / scale.y;
                    if (domElement) {
                        const win = getWindow(domElement);
                        const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
                        let currentIFrame = win.frameElement;
                        while (currentIFrame && offsetParent && offsetWin !== win) {
                            const iframeScale = getScale(currentIFrame);
                            const iframeRect = currentIFrame.getBoundingClientRect();
                            const css = getComputedStyle(currentIFrame);
                            iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
                            iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
                            x *= iframeScale.x;
                            y *= iframeScale.y;
                            width *= iframeScale.x;
                            height *= iframeScale.y;
                            x += iframeRect.x;
                            y += iframeRect.y;
                            currentIFrame = getWindow(currentIFrame).frameElement;
                        }
                    }
                    return (0, _core.rectToClientRect)({
                        width,
                        height,
                        x,
                        y
                    });
                }

                function getDocumentElement(node) {
                    return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
                }

                function getNodeScroll(element) {
                    if (isElement(element)) {
                        return {
                            scrollLeft: element.scrollLeft,
                            scrollTop: element.scrollTop
                        };
                    }
                    return {
                        scrollLeft: element.pageXOffset,
                        scrollTop: element.pageYOffset
                    };
                }

                function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
                    let {
                        rect,
                        offsetParent,
                        strategy
                    } = _ref;
                    const isOffsetParentAnElement = isHTMLElement(offsetParent);
                    const documentElement = getDocumentElement(offsetParent);
                    if (offsetParent === documentElement) {
                        return rect;
                    }
                    let scroll = {
                        scrollLeft: 0,
                        scrollTop: 0
                    };
                    let scale = {
                        x: 1,
                        y: 1
                    };
                    const offsets = {
                        x: 0,
                        y: 0
                    };
                    if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
                        if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
                            scroll = getNodeScroll(offsetParent);
                        }
                        if (isHTMLElement(offsetParent)) {
                            const offsetRect = getBoundingClientRect(offsetParent);
                            scale = getScale(offsetParent);
                            offsets.x = offsetRect.x + offsetParent.clientLeft;
                            offsets.y = offsetRect.y + offsetParent.clientTop;
                        }
                    }
                    return {
                        width: rect.width * scale.x,
                        height: rect.height * scale.y,
                        x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
                        y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
                    };
                }

                function getWindowScrollBarX(element) {
                    // If <html> has a CSS width greater than the viewport, then this will be
                    // incorrect for RTL.
                    return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
                }

                // Gets the entire size of the scrollable document area, even extending outside
                // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
                function getDocumentRect(element) {
                    const html = getDocumentElement(element);
                    const scroll = getNodeScroll(element);
                    const body = element.ownerDocument.body;
                    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
                    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
                    let x = -scroll.scrollLeft + getWindowScrollBarX(element);
                    const y = -scroll.scrollTop;
                    if (getComputedStyle$1(body).direction === 'rtl') {
                        x += max(html.clientWidth, body.clientWidth) - width;
                    }
                    return {
                        width,
                        height,
                        x,
                        y
                    };
                }

                function getParentNode(node) {
                    if (getNodeName(node) === 'html') {
                        return node;
                    }
                    const result =
                        // Step into the shadow DOM of the parent of a slotted node.
                        node.assignedSlot ||
                        // DOM Element detected.
                        node.parentNode ||
                        // ShadowRoot detected.
                        isShadowRoot(node) && node.host ||
                        // Fallback.
                        getDocumentElement(node);
                    return isShadowRoot(result) ? result.host : result;
                }

                function getNearestOverflowAncestor(node) {
                    const parentNode = getParentNode(node);
                    if (isLastTraversableNode(parentNode)) {
                        // `getParentNode` will never return a `Document` due to the fallback
                        // check, so it's either the <html> or <body> element.
                        return parentNode.ownerDocument.body;
                    }
                    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
                        return parentNode;
                    }
                    return getNearestOverflowAncestor(parentNode);
                }

                function getOverflowAncestors(node, list) {
                    var _node$ownerDocument;
                    if (list === void 0) {
                        list = [];
                    }
                    const scrollableAncestor = getNearestOverflowAncestor(node);
                    const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
                    const win = getWindow(scrollableAncestor);
                    if (isBody) {
                        return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
                    }
                    return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
                }

                function getViewportRect(element, strategy) {
                    const win = getWindow(element);
                    const html = getDocumentElement(element);
                    const visualViewport = win.visualViewport;
                    let width = html.clientWidth;
                    let height = html.clientHeight;
                    let x = 0;
                    let y = 0;
                    if (visualViewport) {
                        width = visualViewport.width;
                        height = visualViewport.height;
                        const visualViewportBased = isSafari();
                        if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
                            x = visualViewport.offsetLeft;
                            y = visualViewport.offsetTop;
                        }
                    }
                    return {
                        width,
                        height,
                        x,
                        y
                    };
                }

                // Returns the inner client rect, subtracting scrollbars if present.
                function getInnerBoundingClientRect(element, strategy) {
                    const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
                    const top = clientRect.top + element.clientTop;
                    const left = clientRect.left + element.clientLeft;
                    const scale = isHTMLElement(element) ? getScale(element) : {
                        x: 1,
                        y: 1
                    };
                    const width = element.clientWidth * scale.x;
                    const height = element.clientHeight * scale.y;
                    const x = left * scale.x;
                    const y = top * scale.y;
                    return {
                        width,
                        height,
                        x,
                        y
                    };
                }

                function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
                    let rect;
                    if (clippingAncestor === 'viewport') {
                        rect = getViewportRect(element, strategy);
                    } else if (clippingAncestor === 'document') {
                        rect = getDocumentRect(getDocumentElement(element));
                    } else if (isElement(clippingAncestor)) {
                        rect = getInnerBoundingClientRect(clippingAncestor, strategy);
                    } else {
                        const visualOffsets = getVisualOffsets(element);
                        rect = {
                            ...clippingAncestor,
                            x: clippingAncestor.x - visualOffsets.x,
                            y: clippingAncestor.y - visualOffsets.y
                        };
                    }
                    return (0, _core.rectToClientRect)(rect);
                }

                function hasFixedPositionAncestor(element, stopNode) {
                    const parentNode = getParentNode(element);
                    if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
                        return false;
                    }
                    return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
                }

                // A "clipping ancestor" is an `overflow` element with the characteristic of
                // clipping (or hiding) child elements. This returns all clipping ancestors
                // of the given element up the tree.
                function getClippingElementAncestors(element, cache) {
                    const cachedResult = cache.get(element);
                    if (cachedResult) {
                        return cachedResult;
                    }
                    let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
                    let currentContainingBlockComputedStyle = null;
                    const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
                    let currentNode = elementIsFixed ? getParentNode(element) : element;

                    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
                    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
                        const computedStyle = getComputedStyle$1(currentNode);
                        const currentNodeIsContaining = isContainingBlock(currentNode);
                        if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
                            currentContainingBlockComputedStyle = null;
                        }
                        const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
                        if (shouldDropCurrentNode) {
                            // Drop non-containing blocks.
                            result = result.filter(ancestor => ancestor !== currentNode);
                        } else {
                            // Record last containing block for next iteration.
                            currentContainingBlockComputedStyle = computedStyle;
                        }
                        currentNode = getParentNode(currentNode);
                    }
                    cache.set(element, result);
                    return result;
                }

                // Gets the maximum area that the element is visible in due to any number of
                // clipping ancestors.
                function getClippingRect(_ref) {
                    let {
                        element,
                        boundary,
                        rootBoundary,
                        strategy
                    } = _ref;
                    const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
                    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
                    const firstClippingAncestor = clippingAncestors[0];
                    const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
                        const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
                        accRect.top = max(rect.top, accRect.top);
                        accRect.right = min(rect.right, accRect.right);
                        accRect.bottom = min(rect.bottom, accRect.bottom);
                        accRect.left = max(rect.left, accRect.left);
                        return accRect;
                    }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
                    return {
                        width: clippingRect.right - clippingRect.left,
                        height: clippingRect.bottom - clippingRect.top,
                        x: clippingRect.left,
                        y: clippingRect.top
                    };
                }

                function getDimensions(element) {
                    return getCssDimensions(element);
                }

                function getTrueOffsetParent(element, polyfill) {
                    if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
                        return null;
                    }
                    if (polyfill) {
                        return polyfill(element);
                    }
                    return element.offsetParent;
                }

                function getContainingBlock(element) {
                    let currentNode = getParentNode(element);
                    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
                        if (isContainingBlock(currentNode)) {
                            return currentNode;
                        } else {
                            currentNode = getParentNode(currentNode);
                        }
                    }
                    return null;
                }

                // Gets the closest ancestor positioned element. Handles some edge cases,
                // such as table ancestors and cross browser bugs.
                function getOffsetParent(element, polyfill) {
                    const window = getWindow(element);
                    if (!isHTMLElement(element)) {
                        return window;
                    }
                    let offsetParent = getTrueOffsetParent(element, polyfill);
                    while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
                        offsetParent = getTrueOffsetParent(offsetParent, polyfill);
                    }
                    if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
                        return window;
                    }
                    return offsetParent || getContainingBlock(element) || window;
                }

                function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
                    const isOffsetParentAnElement = isHTMLElement(offsetParent);
                    const documentElement = getDocumentElement(offsetParent);
                    const isFixed = strategy === 'fixed';
                    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
                    let scroll = {
                        scrollLeft: 0,
                        scrollTop: 0
                    };
                    const offsets = {
                        x: 0,
                        y: 0
                    };
                    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
                        if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
                            scroll = getNodeScroll(offsetParent);
                        }
                        if (isHTMLElement(offsetParent)) {
                            const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
                            offsets.x = offsetRect.x + offsetParent.clientLeft;
                            offsets.y = offsetRect.y + offsetParent.clientTop;
                        } else if (documentElement) {
                            offsets.x = getWindowScrollBarX(documentElement);
                        }
                    }
                    return {
                        x: rect.left + scroll.scrollLeft - offsets.x,
                        y: rect.top + scroll.scrollTop - offsets.y,
                        width: rect.width,
                        height: rect.height
                    };
                }
                const platform = exports.platform = {
                    getClippingRect,
                    convertOffsetParentRelativeRectToViewportRelativeRect,
                    isElement,
                    getDimensions,
                    getOffsetParent,
                    getDocumentElement,
                    getScale,
                    async getElementRects(_ref) {
                        let {
                            reference,
                            floating,
                            strategy
                        } = _ref;
                        const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
                        const getDimensionsFn = this.getDimensions;
                        return {
                            reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
                            floating: {
                                x: 0,
                                y: 0,
                                ...(await getDimensionsFn(floating))
                            }
                        };
                    },
                    getClientRects: element => Array.from(element.getClientRects()),
                    isRTL: element => getComputedStyle$1(element).direction === 'rtl'
                };

                /**
                 * Automatically updates the position of the floating element when necessary.
                 * Should only be called when the floating element is mounted on the DOM or
                 * visible on the screen.
                 * @returns cleanup function that should be invoked when the floating element is
                 * removed from the DOM or hidden from the screen.
                 * @see https://floating-ui.com/docs/autoUpdate
                 */
                function autoUpdate(reference, floating, update, options) {
                    if (options === void 0) {
                        options = {};
                    }
                    const {
                        ancestorScroll = true,
                            ancestorResize = true,
                            elementResize = true,
                            animationFrame = false
                    } = options;
                    const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : reference.contextElement ? getOverflowAncestors(reference.contextElement) : []), ...getOverflowAncestors(floating)] : [];
                    ancestors.forEach(ancestor => {
                        // ignores Window, checks for [object VisualViewport]
                        const isVisualViewport = !isElement(ancestor) && ancestor.toString().includes('V');
                        if (ancestorScroll && (animationFrame ? isVisualViewport : true)) {
                            ancestor.addEventListener('scroll', update, {
                                passive: true
                            });
                        }
                        ancestorResize && ancestor.addEventListener('resize', update);
                    });
                    let observer = null;
                    if (elementResize) {
                        observer = new ResizeObserver(() => {
                            update();
                        });
                        isElement(reference) && !animationFrame && observer.observe(reference);
                        if (!isElement(reference) && reference.contextElement && !animationFrame) {
                            observer.observe(reference.contextElement);
                        }
                        observer.observe(floating);
                    }
                    let frameId;
                    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
                    if (animationFrame) {
                        frameLoop();
                    }

                    function frameLoop() {
                        const nextRefRect = getBoundingClientRect(reference);
                        if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
                            update();
                        }
                        prevRefRect = nextRefRect;
                        frameId = requestAnimationFrame(frameLoop);
                    }
                    update();
                    return () => {
                        var _observer;
                        ancestors.forEach(ancestor => {
                            ancestorScroll && ancestor.removeEventListener('scroll', update);
                            ancestorResize && ancestor.removeEventListener('resize', update);
                        });
                        (_observer = observer) == null ? void 0 : _observer.disconnect();
                        observer = null;
                        if (animationFrame) {
                            cancelAnimationFrame(frameId);
                        }
                    };
                }

                /**
                 * Computes the `x` and `y` coordinates that will place the floating element
                 * next to a reference element when it is given a certain CSS positioning
                 * strategy.
                 */
                const computePosition = (reference, floating, options) => {
                    // This caches the expensive `getClippingElementAncestors` function so that
                    // multiple lifecycle resets re-use the same result. It only lives for a
                    // single call. If other functions become expensive, we can add them as well.
                    const cache = new Map();
                    const mergedOptions = {
                        platform,
                        ...options
                    };
                    const platformWithCache = {
                        ...mergedOptions.platform,
                        _c: cache
                    };
                    return (0, _core.computePosition)(reference, floating, {
                        ...mergedOptions,
                        platform: platformWithCache
                    });
                };
                exports.computePosition = computePosition;

                /***/
            }),

        /***/
        "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js":
            /*!**************************************************************************************!*\
              !*** ../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js ***!
              \**************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.arrow = void 0;
                Object.defineProperty(exports, "autoPlacement", ({
                    enumerable: true,
                    get: function() {
                        return _dom.autoPlacement;
                    }
                }));
                Object.defineProperty(exports, "autoUpdate", ({
                    enumerable: true,
                    get: function() {
                        return _dom.autoUpdate;
                    }
                }));
                Object.defineProperty(exports, "computePosition", ({
                    enumerable: true,
                    get: function() {
                        return _dom.computePosition;
                    }
                }));
                Object.defineProperty(exports, "detectOverflow", ({
                    enumerable: true,
                    get: function() {
                        return _dom.detectOverflow;
                    }
                }));
                Object.defineProperty(exports, "flip", ({
                    enumerable: true,
                    get: function() {
                        return _dom.flip;
                    }
                }));
                Object.defineProperty(exports, "getOverflowAncestors", ({
                    enumerable: true,
                    get: function() {
                        return _dom.getOverflowAncestors;
                    }
                }));
                Object.defineProperty(exports, "hide", ({
                    enumerable: true,
                    get: function() {
                        return _dom.hide;
                    }
                }));
                Object.defineProperty(exports, "inline", ({
                    enumerable: true,
                    get: function() {
                        return _dom.inline;
                    }
                }));
                Object.defineProperty(exports, "limitShift", ({
                    enumerable: true,
                    get: function() {
                        return _dom.limitShift;
                    }
                }));
                Object.defineProperty(exports, "offset", ({
                    enumerable: true,
                    get: function() {
                        return _dom.offset;
                    }
                }));
                Object.defineProperty(exports, "platform", ({
                    enumerable: true,
                    get: function() {
                        return _dom.platform;
                    }
                }));
                Object.defineProperty(exports, "shift", ({
                    enumerable: true,
                    get: function() {
                        return _dom.shift;
                    }
                }));
                Object.defineProperty(exports, "size", ({
                    enumerable: true,
                    get: function() {
                        return _dom.size;
                    }
                }));
                exports.useFloating = useFloating;
                var _dom = __webpack_require__( /*! @floating-ui/dom */ "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js");
                var _react = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));
                var React = _react;
                var ReactDOM = _interopRequireWildcard(__webpack_require__( /*! react-dom */ "react-dom"));

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                /**
                 * Provides data to position an inner element of the floating element so that it
                 * appears centered to the reference element.
                 * This wraps the core `arrow` middleware to allow React refs as the element.
                 * @see https://floating-ui.com/docs/arrow
                 */
                const arrow = options => {
                    function isRef(value) {
                        return {}.hasOwnProperty.call(value, 'current');
                    }
                    return {
                        name: 'arrow',
                        options,
                        fn(state) {
                            const {
                                element,
                                padding
                            } = typeof options === 'function' ? options(state) : options;
                            if (element && isRef(element)) {
                                if (element.current != null) {
                                    return (0, _dom.arrow)({
                                        element: element.current,
                                        padding
                                    }).fn(state);
                                }
                                return {};
                            } else if (element) {
                                return (0, _dom.arrow)({
                                    element,
                                    padding
                                }).fn(state);
                            }
                            return {};
                        }
                    };
                };
                exports.arrow = arrow;
                var index = typeof document !== 'undefined' ? _react.useLayoutEffect : _react.useEffect;

                // Fork of `fast-deep-equal` that only does the comparisons we need and compares
                // functions
                function deepEqual(a, b) {
                    if (a === b) {
                        return true;
                    }
                    if (typeof a !== typeof b) {
                        return false;
                    }
                    if (typeof a === 'function' && a.toString() === b.toString()) {
                        return true;
                    }
                    let length, i, keys;
                    if (a && b && typeof a == 'object') {
                        if (Array.isArray(a)) {
                            length = a.length;
                            if (length != b.length) return false;
                            for (i = length; i-- !== 0;) {
                                if (!deepEqual(a[i], b[i])) {
                                    return false;
                                }
                            }
                            return true;
                        }
                        keys = Object.keys(a);
                        length = keys.length;
                        if (length !== Object.keys(b).length) {
                            return false;
                        }
                        for (i = length; i-- !== 0;) {
                            if (!{}.hasOwnProperty.call(b, keys[i])) {
                                return false;
                            }
                        }
                        for (i = length; i-- !== 0;) {
                            const key = keys[i];
                            if (key === '_owner' && a.$$typeof) {
                                continue;
                            }
                            if (!deepEqual(a[key], b[key])) {
                                return false;
                            }
                        }
                        return true;
                    }
                    return a !== a && b !== b;
                }

                function getDPR(element) {
                    if (typeof window === 'undefined') {
                        return 1;
                    }
                    const win = element.ownerDocument.defaultView || window;
                    return win.devicePixelRatio || 1;
                }

                function roundByDPR(element, value) {
                    const dpr = getDPR(element);
                    return Math.round(value * dpr) / dpr;
                }

                function useLatestRef(value) {
                    const ref = React.useRef(value);
                    index(() => {
                        ref.current = value;
                    });
                    return ref;
                }

                /**
                 * Provides data to position a floating element.
                 * @see https://floating-ui.com/docs/react
                 */
                function useFloating(options) {
                    if (options === void 0) {
                        options = {};
                    }
                    const {
                        placement = 'bottom',
                            strategy = 'absolute',
                            middleware = [],
                            platform,
                            elements: {
                                reference: externalReference,
                                floating: externalFloating
                            } = {},
                            transform = true,
                            whileElementsMounted,
                            open
                    } = options;
                    const [data, setData] = React.useState({
                        x: 0,
                        y: 0,
                        strategy,
                        placement,
                        middlewareData: {},
                        isPositioned: false
                    });
                    const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
                    if (!deepEqual(latestMiddleware, middleware)) {
                        setLatestMiddleware(middleware);
                    }
                    const [_reference, _setReference] = React.useState(null);
                    const [_floating, _setFloating] = React.useState(null);
                    const setReference = React.useCallback(node => {
                        if (node != referenceRef.current) {
                            referenceRef.current = node;
                            _setReference(node);
                        }
                    }, [_setReference]);
                    const setFloating = React.useCallback(node => {
                        if (node !== floatingRef.current) {
                            floatingRef.current = node;
                            _setFloating(node);
                        }
                    }, [_setFloating]);
                    const referenceEl = externalReference || _reference;
                    const floatingEl = externalFloating || _floating;
                    const referenceRef = React.useRef(null);
                    const floatingRef = React.useRef(null);
                    const dataRef = React.useRef(data);
                    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
                    const platformRef = useLatestRef(platform);
                    const update = React.useCallback(() => {
                        if (!referenceRef.current || !floatingRef.current) {
                            return;
                        }
                        const config = {
                            placement,
                            strategy,
                            middleware: latestMiddleware
                        };
                        if (platformRef.current) {
                            config.platform = platformRef.current;
                        }
                        (0, _dom.computePosition)(referenceRef.current, floatingRef.current, config).then(data => {
                            const fullData = {
                                ...data,
                                isPositioned: true
                            };
                            if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
                                dataRef.current = fullData;
                                ReactDOM.flushSync(() => {
                                    setData(fullData);
                                });
                            }
                        });
                    }, [latestMiddleware, placement, strategy, platformRef]);
                    index(() => {
                        if (open === false && dataRef.current.isPositioned) {
                            dataRef.current.isPositioned = false;
                            setData(data => ({
                                ...data,
                                isPositioned: false
                            }));
                        }
                    }, [open]);
                    const isMountedRef = React.useRef(false);
                    index(() => {
                        isMountedRef.current = true;
                        return () => {
                            isMountedRef.current = false;
                        };
                    }, []);
                    index(() => {
                        if (referenceEl) referenceRef.current = referenceEl;
                        if (floatingEl) floatingRef.current = floatingEl;
                        if (referenceEl && floatingEl) {
                            if (whileElementsMountedRef.current) {
                                return whileElementsMountedRef.current(referenceEl, floatingEl, update);
                            } else {
                                update();
                            }
                        }
                    }, [referenceEl, floatingEl, update, whileElementsMountedRef]);
                    const refs = React.useMemo(() => ({
                        reference: referenceRef,
                        floating: floatingRef,
                        setReference,
                        setFloating
                    }), [setReference, setFloating]);
                    const elements = React.useMemo(() => ({
                        reference: referenceEl,
                        floating: floatingEl
                    }), [referenceEl, floatingEl]);
                    const floatingStyles = React.useMemo(() => {
                        const initialStyles = {
                            position: strategy,
                            left: 0,
                            top: 0
                        };
                        if (!elements.floating) {
                            return initialStyles;
                        }
                        const x = roundByDPR(elements.floating, data.x);
                        const y = roundByDPR(elements.floating, data.y);
                        if (transform) {
                            return {
                                ...initialStyles,
                                transform: "translate(" + x + "px, " + y + "px)",
                                ...(getDPR(elements.floating) >= 1.5 && {
                                    willChange: 'transform'
                                })
                            };
                        }
                        return {
                            position: strategy,
                            left: x,
                            top: y
                        };
                    }, [strategy, transform, elements.floating, data.x, data.y]);
                    return React.useMemo(() => ({
                        ...data,
                        update,
                        refs,
                        elements,
                        floatingStyles
                    }), [data, update, refs, elements, floatingStyles]);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/animation/dist/Animation.es.js":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/@motionone/animation/dist/Animation.es.js ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.Animation = void 0;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _easingEs = __webpack_require__( /*! ./utils/easing.es.js */ "../../../node_modules/@motionone/animation/dist/utils/easing.es.js");
                class Animation {
                    constructor(output, keyframes = [0, 1], {
                        easing,
                        duration: initialDuration = _utils.defaults.duration,
                        delay = _utils.defaults.delay,
                        endDelay = _utils.defaults.endDelay,
                        repeat = _utils.defaults.repeat,
                        offset,
                        direction = "normal"
                    } = {}) {
                        this.startTime = null;
                        this.rate = 1;
                        this.t = 0;
                        this.cancelTimestamp = null;
                        this.easing = _utils.noopReturn;
                        this.duration = 0;
                        this.totalDuration = 0;
                        this.repeat = 0;
                        this.playState = "idle";
                        this.finished = new Promise((resolve, reject) => {
                            this.resolve = resolve;
                            this.reject = reject;
                        });
                        easing = easing || _utils.defaults.easing;
                        if ((0, _utils.isEasingGenerator)(easing)) {
                            const custom = easing.createAnimation(keyframes);
                            easing = custom.easing;
                            keyframes = custom.keyframes || keyframes;
                            initialDuration = custom.duration || initialDuration;
                        }
                        this.repeat = repeat;
                        this.easing = (0, _utils.isEasingList)(easing) ? _utils.noopReturn : (0, _easingEs.getEasingFunction)(easing);
                        this.updateDuration(initialDuration);
                        const interpolate$1 = (0, _utils.interpolate)(keyframes, offset, (0, _utils.isEasingList)(easing) ? easing.map(_easingEs.getEasingFunction) : _utils.noopReturn);
                        this.tick = timestamp => {
                            var _a;
                            // TODO: Temporary fix for OptionsResolver typing
                            delay = delay;
                            let t = 0;
                            if (this.pauseTime !== undefined) {
                                t = this.pauseTime;
                            } else {
                                t = (timestamp - this.startTime) * this.rate;
                            }
                            this.t = t;
                            // Convert to seconds
                            t /= 1000;
                            // Rebase on delay
                            t = Math.max(t - delay, 0);
                            /**
                             * If this animation has finished, set the current time
                             * to the total duration.
                             */
                            if (this.playState === "finished" && this.pauseTime === undefined) {
                                t = this.totalDuration;
                            }
                            /**
                             * Get the current progress (0-1) of the animation. If t is >
                             * than duration we'll get values like 2.5 (midway through the
                             * third iteration)
                             */
                            const progress = t / this.duration;
                            // TODO progress += iterationStart
                            /**
                             * Get the current iteration (0 indexed). For instance the floor of
                             * 2.5 is 2.
                             */
                            let currentIteration = Math.floor(progress);
                            /**
                             * Get the current progress of the iteration by taking the remainder
                             * so 2.5 is 0.5 through iteration 2
                             */
                            let iterationProgress = progress % 1.0;
                            if (!iterationProgress && progress >= 1) {
                                iterationProgress = 1;
                            }
                            /**
                             * If iteration progress is 1 we count that as the end
                             * of the previous iteration.
                             */
                            iterationProgress === 1 && currentIteration--;
                            /**
                             * Reverse progress if we're not running in "normal" direction
                             */
                            const iterationIsOdd = currentIteration % 2;
                            if (direction === "reverse" || direction === "alternate" && iterationIsOdd || direction === "alternate-reverse" && !iterationIsOdd) {
                                iterationProgress = 1 - iterationProgress;
                            }
                            const p = t >= this.totalDuration ? 1 : Math.min(iterationProgress, 1);
                            const latest = interpolate$1(this.easing(p));
                            output(latest);
                            const isAnimationFinished = this.pauseTime === undefined && (this.playState === "finished" || t >= this.totalDuration + endDelay);
                            if (isAnimationFinished) {
                                this.playState = "finished";
                                (_a = this.resolve) === null || _a === void 0 ? void 0 : _a.call(this, latest);
                            } else if (this.playState !== "idle") {
                                this.frameRequestId = requestAnimationFrame(this.tick);
                            }
                        };
                        this.play();
                    }
                    play() {
                        const now = performance.now();
                        this.playState = "running";
                        if (this.pauseTime !== undefined) {
                            this.startTime = now - this.pauseTime;
                        } else if (!this.startTime) {
                            this.startTime = now;
                        }
                        this.cancelTimestamp = this.startTime;
                        this.pauseTime = undefined;
                        this.frameRequestId = requestAnimationFrame(this.tick);
                    }
                    pause() {
                        this.playState = "paused";
                        this.pauseTime = this.t;
                    }
                    finish() {
                        this.playState = "finished";
                        this.tick(0);
                    }
                    stop() {
                        var _a;
                        this.playState = "idle";
                        if (this.frameRequestId !== undefined) {
                            cancelAnimationFrame(this.frameRequestId);
                        }
                        (_a = this.reject) === null || _a === void 0 ? void 0 : _a.call(this, false);
                    }
                    cancel() {
                        this.stop();
                        this.tick(this.cancelTimestamp);
                    }
                    reverse() {
                        this.rate *= -1;
                    }
                    commitStyles() {}
                    updateDuration(duration) {
                        this.duration = duration;
                        this.totalDuration = duration * (this.repeat + 1);
                    }
                    get currentTime() {
                        return this.t;
                    }
                    set currentTime(t) {
                        if (this.pauseTime !== undefined || this.rate === 0) {
                            this.pauseTime = t;
                        } else {
                            this.startTime = performance.now() - t / this.rate;
                        }
                    }
                    get playbackRate() {
                        return this.rate;
                    }
                    set playbackRate(rate) {
                        this.rate = rate;
                    }
                }
                exports.Animation = Animation;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/animation/dist/index.es.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/@motionone/animation/dist/index.es.js ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "Animation", ({
                    enumerable: true,
                    get: function() {
                        return _AnimationEs.Animation;
                    }
                }));
                Object.defineProperty(exports, "getEasingFunction", ({
                    enumerable: true,
                    get: function() {
                        return _easingEs.getEasingFunction;
                    }
                }));
                var _AnimationEs = __webpack_require__( /*! ./Animation.es.js */ "../../../node_modules/@motionone/animation/dist/Animation.es.js");
                var _easingEs = __webpack_require__( /*! ./utils/easing.es.js */ "../../../node_modules/@motionone/animation/dist/utils/easing.es.js");

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/animation/dist/utils/easing.es.js":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/@motionone/animation/dist/utils/easing.es.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getEasingFunction = getEasingFunction;
                var _easing = __webpack_require__( /*! @motionone/easing */ "../../../node_modules/@motionone/easing/dist/index.es.js");
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                const namedEasings = {
                    ease: (0, _easing.cubicBezier)(0.25, 0.1, 0.25, 1.0),
                    "ease-in": (0, _easing.cubicBezier)(0.42, 0.0, 1.0, 1.0),
                    "ease-in-out": (0, _easing.cubicBezier)(0.42, 0.0, 0.58, 1.0),
                    "ease-out": (0, _easing.cubicBezier)(0.0, 0.0, 0.58, 1.0)
                };
                const functionArgsRegex = /\((.*?)\)/;

                function getEasingFunction(definition) {
                    // If already an easing function, return
                    if ((0, _utils.isFunction)(definition)) return definition;
                    // If an easing curve definition, return bezier function
                    if ((0, _utils.isCubicBezier)(definition)) return (0, _easing.cubicBezier)(...definition);
                    // If we have a predefined easing function, return
                    if (namedEasings[definition]) return namedEasings[definition];
                    // If this is a steps function, attempt to create easing curve
                    if (definition.startsWith("steps")) {
                        const args = functionArgsRegex.exec(definition);
                        if (args) {
                            const argsArray = args[1].split(",");
                            return (0, _easing.steps)(parseFloat(argsArray[0]), argsArray[1].trim());
                        }
                    }
                    return _utils.noopReturn;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.animateStyle = animateStyle;
                var _dataEs = __webpack_require__( /*! ./data.es.js */ "../../../node_modules/@motionone/dom/dist/animate/data.es.js");
                var _cssVarEs = __webpack_require__( /*! ./utils/css-var.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/css-var.es.js");
                var _animation = __webpack_require__( /*! @motionone/animation */ "../../../node_modules/@motionone/animation/dist/index.es.js");
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _transformsEs = __webpack_require__( /*! ./utils/transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
                var _easingEs = __webpack_require__( /*! ./utils/easing.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/easing.es.js");
                var _featureDetectionEs = __webpack_require__( /*! ./utils/feature-detection.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js");
                var _keyframesEs = __webpack_require__( /*! ./utils/keyframes.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js");
                var _styleEs = __webpack_require__( /*! ./style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/style.es.js");
                var _getStyleNameEs = __webpack_require__( /*! ./utils/get-style-name.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js");
                var _stopAnimationEs = __webpack_require__( /*! ./utils/stop-animation.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js");

                function getDevToolsRecord() {
                    return window.__MOTION_DEV_TOOLS_RECORD;
                }

                function animateStyle(element, key, keyframesDefinition, options = {}) {
                    const record = getDevToolsRecord();
                    const isRecording = options.record !== false && record;
                    let animation;
                    let {
                        duration = _utils.defaults.duration,
                            delay = _utils.defaults.delay,
                            endDelay = _utils.defaults.endDelay,
                            repeat = _utils.defaults.repeat,
                            easing = _utils.defaults.easing,
                            direction,
                            offset,
                            allowWebkitAcceleration = false
                    } = options;
                    const data = (0, _dataEs.getAnimationData)(element);
                    let canAnimateNatively = _featureDetectionEs.supports.waapi();
                    const valueIsTransform = (0, _transformsEs.isTransform)(key);
                    /**
                     * If this is an individual transform, we need to map its
                     * key to a CSS variable and update the element's transform style
                     */
                    valueIsTransform && (0, _transformsEs.addTransformToElement)(element, key);
                    const name = (0, _getStyleNameEs.getStyleName)(key);
                    const motionValue = (0, _dataEs.getMotionValue)(data.values, name);
                    /**
                     * Get definition of value, this will be used to convert numerical
                     * keyframes into the default value type.
                     */
                    const definition = _transformsEs.transformDefinitions.get(name);
                    /**
                     * Stop the current animation, if any. Because this will trigger
                     * commitStyles (DOM writes) and we might later trigger DOM reads,
                     * this is fired now and we return a factory function to create
                     * the actual animation that can get called in batch,
                     */
                    (0, _stopAnimationEs.stopAnimation)(motionValue.animation, !((0, _utils.isEasingGenerator)(easing) && motionValue.generator) && options.record !== false);
                    /**
                     * Batchable factory function containing all DOM reads.
                     */
                    return () => {
                        const readInitialValue = () => {
                            var _a, _b;
                            return (_b = (_a = _styleEs.style.get(element, name)) !== null && _a !== void 0 ? _a : definition === null || definition === void 0 ? void 0 : definition.initialValue) !== null && _b !== void 0 ? _b : 0;
                        };
                        /**
                         * Replace null values with the previous keyframe value, or read
                         * it from the DOM if it's the first keyframe.
                         */
                        let keyframes = (0, _keyframesEs.hydrateKeyframes)((0, _keyframesEs.keyframesList)(keyframesDefinition), readInitialValue);
                        if ((0, _utils.isEasingGenerator)(easing)) {
                            const custom = easing.createAnimation(keyframes, readInitialValue, valueIsTransform, name, motionValue);
                            easing = custom.easing;
                            if (custom.keyframes !== undefined) keyframes = custom.keyframes;
                            if (custom.duration !== undefined) duration = custom.duration;
                        }
                        /**
                         * If this is a CSS variable we need to register it with the browser
                         * before it can be animated natively. We also set it with setProperty
                         * rather than directly onto the element.style object.
                         */
                        if ((0, _cssVarEs.isCssVar)(name)) {
                            if (_featureDetectionEs.supports.cssRegisterProperty()) {
                                (0, _cssVarEs.registerCssVariable)(name);
                            } else {
                                canAnimateNatively = false;
                            }
                        }
                        /**
                         * If we can animate this value with WAAPI, do so. Currently this only
                         * feature detects CSS.registerProperty but could check WAAPI too.
                         */
                        if (canAnimateNatively) {
                            /**
                             * Convert numbers to default value types. Currently this only supports
                             * transforms but it could also support other value types.
                             */
                            if (definition) {
                                keyframes = keyframes.map(value => (0, _utils.isNumber)(value) ? definition.toDefaultUnit(value) : value);
                            }
                            /**
                             * If this browser doesn't support partial/implicit keyframes we need to
                             * explicitly provide one.
                             */
                            if (keyframes.length === 1 && (!_featureDetectionEs.supports.partialKeyframes() || isRecording)) {
                                keyframes.unshift(readInitialValue());
                            }
                            const animationOptions = {
                                delay: _utils.time.ms(delay),
                                duration: _utils.time.ms(duration),
                                endDelay: _utils.time.ms(endDelay),
                                easing: !(0, _utils.isEasingList)(easing) ? (0, _easingEs.convertEasing)(easing) : undefined,
                                direction,
                                iterations: repeat + 1,
                                fill: "both"
                            };
                            animation = element.animate({
                                [name]: keyframes,
                                offset,
                                easing: (0, _utils.isEasingList)(easing) ? easing.map(_easingEs.convertEasing) : undefined
                            }, animationOptions);
                            /**
                             * Polyfill finished Promise in browsers that don't support it
                             */
                            if (!animation.finished) {
                                animation.finished = new Promise((resolve, reject) => {
                                    animation.onfinish = resolve;
                                    animation.oncancel = reject;
                                });
                            }
                            const target = keyframes[keyframes.length - 1];
                            animation.finished.then(() => {
                                // Apply styles to target
                                _styleEs.style.set(element, name, target);
                                // Ensure fill modes don't persist
                                animation.cancel();
                            }).catch(_utils.noop);
                            /**
                             * This forces Webkit to run animations on the main thread by exploiting
                             * this condition:
                             * https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp?rev=281238#L1099
                             *
                             * This fixes Webkit's timing bugs, like accelerated animations falling
                             * out of sync with main thread animations and massive delays in starting
                             * accelerated animations in WKWebView.
                             */
                            if (!allowWebkitAcceleration) animation.playbackRate = 1.000001;
                            /**
                             * If we can't animate the value natively then we can fallback to the numbers-only
                             * polyfill for transforms.
                             */
                        } else if (valueIsTransform) {
                            /**
                             * If any keyframe is a string (because we measured it from the DOM), we need to convert
                             * it into a number before passing to the Animation polyfill.
                             */
                            keyframes = keyframes.map(value => typeof value === "string" ? parseFloat(value) : value);
                            /**
                             * If we only have a single keyframe, we need to create an initial keyframe by reading
                             * the current value from the DOM.
                             */
                            if (keyframes.length === 1) {
                                keyframes.unshift(parseFloat(readInitialValue()));
                            }
                            const render = latest => {
                                if (definition) latest = definition.toDefaultUnit(latest);
                                _styleEs.style.set(element, name, latest);
                            };
                            animation = new _animation.Animation(render, keyframes, Object.assign(Object.assign({}, options), {
                                duration,
                                easing
                            }));
                        } else {
                            const target = keyframes[keyframes.length - 1];
                            _styleEs.style.set(element, name, definition && (0, _utils.isNumber)(target) ? definition.toDefaultUnit(target) : target);
                        }
                        if (isRecording) {
                            record(element, key, keyframes, {
                                duration,
                                delay: delay,
                                easing,
                                repeat,
                                offset
                            }, "motion-one");
                        }
                        motionValue.setAnimation(animation);
                        return animation;
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/data.es.js":
            /*!********************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/data.es.js ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getAnimationData = getAnimationData;
                exports.getMotionValue = getMotionValue;
                var _types = __webpack_require__( /*! @motionone/types */ "../../../node_modules/@motionone/types/dist/index.es.js");
                const data = new WeakMap();

                function getAnimationData(element) {
                    if (!data.has(element)) {
                        data.set(element, {
                            transforms: [],
                            values: new Map()
                        });
                    }
                    return data.get(element);
                }

                function getMotionValue(motionValues, name) {
                    if (!motionValues.has(name)) {
                        motionValues.set(name, new _types.MotionValue());
                    }
                    return motionValues.get(name);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/index.es.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/index.es.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.animate = animate;
                var _animateStyleEs = __webpack_require__( /*! ./animate-style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js");
                var _optionsEs = __webpack_require__( /*! ./utils/options.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js");
                var _resolveElementsEs = __webpack_require__( /*! ../utils/resolve-elements.es.js */ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js");
                var _controlsEs = __webpack_require__( /*! ./utils/controls.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js");
                var _staggerEs = __webpack_require__( /*! ../utils/stagger.es.js */ "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js");

                function animate(elements, keyframes, options = {}) {
                    elements = (0, _resolveElementsEs.resolveElements)(elements);
                    const numElements = elements.length;
                    /**
                     * Create and start new animations
                     */
                    const animationFactories = [];
                    for (let i = 0; i < numElements; i++) {
                        const element = elements[i];
                        for (const key in keyframes) {
                            const valueOptions = (0, _optionsEs.getOptions)(options, key);
                            valueOptions.delay = (0, _staggerEs.resolveOption)(valueOptions.delay, i, numElements);
                            const animation = (0, _animateStyleEs.animateStyle)(element, key, keyframes[key], valueOptions);
                            animationFactories.push(animation);
                        }
                    }
                    return (0, _controlsEs.withControls)(animationFactories, options,
                        /**
                         * TODO:
                         * If easing is set to spring or glide, duration will be dynamically
                         * generated. Ideally we would dynamically generate this from
                         * animation.effect.getComputedTiming().duration but this isn't
                         * supported in iOS13 or our number polyfill. Perhaps it's possible
                         * to Proxy animations returned from animateStyle that has duration
                         * as a getter.
                         */
                        options.duration);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/style.es.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/style.es.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.style = void 0;
                var _cssVarEs = __webpack_require__( /*! ./utils/css-var.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/css-var.es.js");
                var _getStyleNameEs = __webpack_require__( /*! ./utils/get-style-name.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js");
                var _transformsEs = __webpack_require__( /*! ./utils/transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
                const style = exports.style = {
                    get: (element, name) => {
                        name = (0, _getStyleNameEs.getStyleName)(name);
                        let value = (0, _cssVarEs.isCssVar)(name) ? element.style.getPropertyValue(name) : getComputedStyle(element)[name];
                        if (!value && value !== 0) {
                            const definition = _transformsEs.transformDefinitions.get(name);
                            if (definition) value = definition.initialValue;
                        }
                        return value;
                    },
                    set: (element, name, value) => {
                        name = (0, _getStyleNameEs.getStyleName)(name);
                        if ((0, _cssVarEs.isCssVar)(name)) {
                            element.style.setProperty(name, value);
                        } else {
                            element.style[name] = value;
                        }
                    }
                };

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js ***!
              \******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.withControls = exports.controls = void 0;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _stopAnimationEs = __webpack_require__( /*! ./stop-animation.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js");
                const createAnimation = factory => factory();
                const withControls = (animationFactory, options, duration = _utils.defaults.duration) => {
                    return new Proxy({
                        animations: animationFactory.map(createAnimation).filter(Boolean),
                        duration,
                        options
                    }, controls);
                };
                /**
                 * TODO:
                 * Currently this returns the first animation, ideally it would return
                 * the first active animation.
                 */
                exports.withControls = withControls;
                const getActiveAnimation = state => state.animations[0];
                const controls = exports.controls = {
                    get: (target, key) => {
                        const activeAnimation = getActiveAnimation(target);
                        switch (key) {
                            case "duration":
                                return target.duration;
                            case "currentTime":
                                return _utils.time.s((activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) || 0);
                            case "playbackRate":
                            case "playState":
                                return activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key];
                            case "finished":
                                if (!target.finished) {
                                    target.finished = Promise.all(target.animations.map(selectFinished)).catch(_utils.noop);
                                }
                                return target.finished;
                            case "stop":
                                return () => {
                                    target.animations.forEach(animation => (0, _stopAnimationEs.stopAnimation)(animation));
                                };
                            case "forEachNative":
                                /**
                                 * This is for internal use only, fire a callback for each
                                 * underlying animation.
                                 */
                                return callback => {
                                    target.animations.forEach(animation => callback(animation, target));
                                };
                            default:
                                return typeof(activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) === "undefined" ? undefined : () => target.animations.forEach(animation => animation[key]());
                        }
                    },
                    set: (target, key, value) => {
                        switch (key) {
                            case "currentTime":
                                value = _utils.time.ms(value);
                            case "currentTime":
                            case "playbackRate":
                                for (let i = 0; i < target.animations.length; i++) {
                                    target.animations[i][key] = value;
                                }
                                return true;
                        }
                        return false;
                    }
                };
                const selectFinished = animation => animation.finished;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/css-var.es.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/css-var.es.js ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isCssVar = void 0;
                exports.registerCssVariable = registerCssVariable;
                exports.registeredProperties = void 0;
                var _transformsEs = __webpack_require__( /*! ./transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
                const isCssVar = name => name.startsWith("--");
                exports.isCssVar = isCssVar;
                const registeredProperties = exports.registeredProperties = new Set();

                function registerCssVariable(name) {
                    if (registeredProperties.has(name)) return;
                    registeredProperties.add(name);
                    try {
                        const {
                            syntax,
                            initialValue
                        } = _transformsEs.transformDefinitions.has(name) ? _transformsEs.transformDefinitions.get(name) : {};
                        CSS.registerProperty({
                            name,
                            inherits: false,
                            syntax,
                            initialValue
                        });
                    } catch (e) {}
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/easing.es.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/easing.es.js ***!
              \****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.cubicBezierAsString = exports.convertEasing = void 0;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                const convertEasing = easing => (0, _utils.isCubicBezier)(easing) ? cubicBezierAsString(easing) : easing;
                exports.convertEasing = convertEasing;
                const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;
                exports.cubicBezierAsString = cubicBezierAsString;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js":
            /*!***************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js ***!
              \***************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.supports = void 0;
                const testAnimation = keyframes => document.createElement("div").animate(keyframes, {
                    duration: 0.001
                });
                const featureTests = {
                    cssRegisterProperty: () => typeof CSS !== "undefined" && Object.hasOwnProperty.call(CSS, "registerProperty"),
                    waapi: () => Object.hasOwnProperty.call(Element.prototype, "animate"),
                    partialKeyframes: () => {
                        try {
                            testAnimation({
                                opacity: [1]
                            });
                        } catch (e) {
                            return false;
                        }
                        return true;
                    },
                    finished: () => Boolean(testAnimation({
                        opacity: [0, 1]
                    }).finished)
                };
                const results = {};
                const supports = exports.supports = {};
                for (const key in featureTests) {
                    supports[key] = () => {
                        if (results[key] === undefined) results[key] = featureTests[key]();
                        return results[key];
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js":
            /*!************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js ***!
              \************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getStyleName = getStyleName;
                var _transformsEs = __webpack_require__( /*! ./transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");

                function getStyleName(key) {
                    if (_transformsEs.transformAlias[key]) key = _transformsEs.transformAlias[key];
                    return (0, _transformsEs.isTransform)(key) ? (0, _transformsEs.asTransformCssVar)(key) : key;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js":
            /*!*******************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js ***!
              \*******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.hydrateKeyframes = hydrateKeyframes;
                exports.keyframesList = void 0;

                function hydrateKeyframes(keyframes, readInitialValue) {
                    for (let i = 0; i < keyframes.length; i++) {
                        if (keyframes[i] === null) {
                            keyframes[i] = i ? keyframes[i - 1] : readInitialValue();
                        }
                    }
                    return keyframes;
                }
                const keyframesList = keyframes => Array.isArray(keyframes) ? keyframes : [keyframes];
                exports.keyframesList = keyframesList;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getOptions = void 0;
                const getOptions = (options, key) =>
                    /**
                     * TODO: Make test for this
                     * Always return a new object otherwise delay is overwritten by results of stagger
                     * and this results in no stagger
                     */
                    options[key] ? Object.assign(Object.assign({}, options), options[key]) : Object.assign({}, options);
                exports.getOptions = getOptions;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js":
            /*!************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js ***!
              \************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.stopAnimation = stopAnimation;

                function stopAnimation(animation, needsCommit = true) {
                    if (!animation || animation.playState === "finished") return;
                    // Suppress error thrown by WAAPI
                    try {
                        if (animation.stop) {
                            animation.stop();
                        } else {
                            needsCommit && animation.commitStyles();
                            animation.cancel();
                        }
                    } catch (e) {}
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/style-object.es.js":
            /*!**********************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/style-object.es.js ***!
              \**********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createStyles = createStyles;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _transformsEs = __webpack_require__( /*! ./transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");

                function createStyles(keyframes) {
                    const initialKeyframes = {};
                    const transformKeys = [];
                    for (let key in keyframes) {
                        const value = keyframes[key];
                        if ((0, _transformsEs.isTransform)(key)) {
                            if (_transformsEs.transformAlias[key]) key = _transformsEs.transformAlias[key];
                            transformKeys.push(key);
                            key = (0, _transformsEs.asTransformCssVar)(key);
                        }
                        let initialKeyframe = Array.isArray(value) ? value[0] : value;
                        /**
                         * If this is a number and we have a default value type, convert the number
                         * to this type.
                         */
                        const definition = _transformsEs.transformDefinitions.get(key);
                        if (definition) {
                            initialKeyframe = (0, _utils.isNumber)(value) ? definition.toDefaultUnit(value) : value;
                        }
                        initialKeyframes[key] = initialKeyframe;
                    }
                    if (transformKeys.length) {
                        initialKeyframes.transform = (0, _transformsEs.buildTransformTemplate)(transformKeys);
                    }
                    return initialKeyframes;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/style-string.es.js":
            /*!**********************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/style-string.es.js ***!
              \**********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createStyleString = createStyleString;
                var _styleObjectEs = __webpack_require__( /*! ./style-object.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/style-object.es.js");
                const camelLetterToPipeLetter = letter => `-${letter.toLowerCase()}`;
                const camelToPipeCase = str => str.replace(/[A-Z]/g, camelLetterToPipeLetter);

                function createStyleString(target = {}) {
                    const styles = (0, _styleObjectEs.createStyles)(target);
                    let style = "";
                    for (const key in styles) {
                        style += key.startsWith("--") ? key : camelToPipeCase(key);
                        style += `: ${styles[key]}; `;
                    }
                    return style;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js":
            /*!********************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js ***!
              \********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.transformDefinitions = exports.transformAlias = exports.isTransform = exports.compareTransformOrder = exports.buildTransformTemplate = exports.axes = exports.asTransformCssVar = exports.addTransformToElement = void 0;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _dataEs = __webpack_require__( /*! ../data.es.js */ "../../../node_modules/@motionone/dom/dist/animate/data.es.js");
                /**
                 * A list of all transformable axes. We'll use this list to generated a version
                 * of each axes for each transform.
                 */
                const axes = exports.axes = ["", "X", "Y", "Z"];
                /**
                 * An ordered array of each transformable value. By default, transform values
                 * will be sorted to this order.
                 */
                const order = ["translate", "scale", "rotate", "skew"];
                const transformAlias = exports.transformAlias = {
                    x: "translateX",
                    y: "translateY",
                    z: "translateZ"
                };
                const rotation = {
                    syntax: "<angle>",
                    initialValue: "0deg",
                    toDefaultUnit: v => v + "deg"
                };
                const baseTransformProperties = {
                    translate: {
                        syntax: "<length-percentage>",
                        initialValue: "0px",
                        toDefaultUnit: v => v + "px"
                    },
                    rotate: rotation,
                    scale: {
                        syntax: "<number>",
                        initialValue: 1,
                        toDefaultUnit: _utils.noopReturn
                    },
                    skew: rotation
                };
                const transformDefinitions = exports.transformDefinitions = new Map();
                const asTransformCssVar = name => `--motion-${name}`;
                /**
                 * Generate a list of every possible transform key
                 */
                exports.asTransformCssVar = asTransformCssVar;
                const transforms = ["x", "y", "z"];
                order.forEach(name => {
                    axes.forEach(axis => {
                        transforms.push(name + axis);
                        transformDefinitions.set(asTransformCssVar(name + axis), baseTransformProperties[name]);
                    });
                });
                /**
                 * A function to use with Array.sort to sort transform keys by their default order.
                 */
                const compareTransformOrder = (a, b) => transforms.indexOf(a) - transforms.indexOf(b);
                /**
                 * Provide a quick way to check if a string is the name of a transform
                 */
                exports.compareTransformOrder = compareTransformOrder;
                const transformLookup = new Set(transforms);
                const isTransform = name => transformLookup.has(name);
                exports.isTransform = isTransform;
                const addTransformToElement = (element, name) => {
                    // Map x to translateX etc
                    if (transformAlias[name]) name = transformAlias[name];
                    const {
                        transforms
                    } = (0, _dataEs.getAnimationData)(element);
                    (0, _utils.addUniqueItem)(transforms, name);
                    /**
                     * TODO: An optimisation here could be to cache the transform in element data
                     * and only update if this has changed.
                     */
                    element.style.transform = buildTransformTemplate(transforms);
                };
                exports.addTransformToElement = addTransformToElement;
                const buildTransformTemplate = transforms => transforms.sort(compareTransformOrder).reduce(transformListToString, "").trim();
                exports.buildTransformTemplate = buildTransformTemplate;
                const transformListToString = (template, name) => `${template} ${name}(var(${asTransformCssVar(name)}))`;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js":
            /*!**************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js ***!
              \**************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createGeneratorEasing = createGeneratorEasing;
                var _generators = __webpack_require__( /*! @motionone/generators */ "../../../node_modules/@motionone/generators/dist/index.es.js");

                function createGeneratorEasing(createGenerator) {
                    const keyframesCache = new WeakMap();
                    return (options = {}) => {
                        const generatorCache = new Map();
                        const getGenerator = (from = 0, to = 100, velocity = 0, isScale = false) => {
                            const key = `${from}-${to}-${velocity}-${isScale}`;
                            if (!generatorCache.has(key)) {
                                generatorCache.set(key, createGenerator(Object.assign({
                                    from,
                                    to,
                                    velocity,
                                    restSpeed: isScale ? 0.05 : 2,
                                    restDistance: isScale ? 0.01 : 0.5
                                }, options)));
                            }
                            return generatorCache.get(key);
                        };
                        const getKeyframes = generator => {
                            if (!keyframesCache.has(generator)) {
                                keyframesCache.set(generator, (0, _generators.pregenerateKeyframes)(generator));
                            }
                            return keyframesCache.get(generator);
                        };
                        return {
                            createAnimation: (keyframes, getOrigin, canUseGenerator, name, motionValue) => {
                                var _a, _b;
                                let settings;
                                const numKeyframes = keyframes.length;
                                let shouldUseGenerator = canUseGenerator && numKeyframes <= 2 && keyframes.every(isNumberOrNull);
                                if (shouldUseGenerator) {
                                    const target = keyframes[numKeyframes - 1];
                                    const unresolvedOrigin = numKeyframes === 1 ? null : keyframes[0];
                                    let velocity = 0;
                                    let origin = 0;
                                    const prevGenerator = motionValue === null || motionValue === void 0 ? void 0 : motionValue.generator;
                                    if (prevGenerator) {
                                        /**
                                         * If we have a generator for this value we can use it to resolve
                                         * the animations's current value and velocity.
                                         */
                                        const {
                                            animation,
                                            generatorStartTime
                                        } = motionValue;
                                        const startTime = (animation === null || animation === void 0 ? void 0 : animation.startTime) || generatorStartTime || 0;
                                        const currentTime = (animation === null || animation === void 0 ? void 0 : animation.currentTime) || performance.now() - startTime;
                                        const prevGeneratorCurrent = prevGenerator(currentTime).current;
                                        origin = (_a = unresolvedOrigin) !== null && _a !== void 0 ? _a : prevGeneratorCurrent;
                                        if (numKeyframes === 1 || numKeyframes === 2 && keyframes[0] === null) {
                                            velocity = (0, _generators.calcGeneratorVelocity)(t => prevGenerator(t).current, currentTime, prevGeneratorCurrent);
                                        }
                                    } else {
                                        origin = (_b = unresolvedOrigin) !== null && _b !== void 0 ? _b : parseFloat(getOrigin());
                                    }
                                    const generator = getGenerator(origin, target, velocity, name === null || name === void 0 ? void 0 : name.includes("scale"));
                                    const keyframesMetadata = getKeyframes(generator);
                                    settings = Object.assign(Object.assign({}, keyframesMetadata), {
                                        easing: "linear"
                                    });
                                    // TODO Add test for this
                                    if (motionValue) {
                                        motionValue.generator = generator;
                                        motionValue.generatorStartTime = performance.now();
                                    }
                                } else {
                                    const keyframesMetadata = getKeyframes(getGenerator(0, 100));
                                    settings = {
                                        easing: "ease",
                                        duration: keyframesMetadata.overshootDuration
                                    };
                                }
                                return settings;
                            }
                        };
                    };
                }
                const isNumberOrNull = value => typeof value !== "string";

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/easing/glide/index.es.js":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/easing/glide/index.es.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.glide = void 0;
                var _generators = __webpack_require__( /*! @motionone/generators */ "../../../node_modules/@motionone/generators/dist/index.es.js");
                var _createGeneratorEasingEs = __webpack_require__( /*! ../create-generator-easing.es.js */ "../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js");
                const glide = exports.glide = (0, _createGeneratorEasingEs.createGeneratorEasing)(_generators.glide);

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/easing/spring/index.es.js":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/easing/spring/index.es.js ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.spring = void 0;
                var _generators = __webpack_require__( /*! @motionone/generators */ "../../../node_modules/@motionone/generators/dist/index.es.js");
                var _createGeneratorEasingEs = __webpack_require__( /*! ../create-generator-easing.es.js */ "../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js");
                const spring = exports.spring = (0, _createGeneratorEasingEs.createGeneratorEasing)(_generators.spring);

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/in-view.es.js":
            /*!************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/in-view.es.js ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.inView = inView;
                var _resolveElementsEs = __webpack_require__( /*! ../utils/resolve-elements.es.js */ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js");
                const thresholds = {
                    any: 0,
                    all: 1
                };

                function inView(elementOrSelector, onStart, {
                    root,
                    margin: rootMargin,
                    amount = "any"
                } = {}) {
                    /**
                     * If this browser doesn't support IntersectionObserver, return a dummy stop function.
                     * Default triggering of onStart is tricky - it could be used for starting/stopping
                     * videos, lazy loading content etc. We could provide an option to enable a fallback, or
                     * provide a fallback callback option.
                     */
                    if (typeof IntersectionObserver === "undefined") {
                        return () => {};
                    }
                    const elements = (0, _resolveElementsEs.resolveElements)(elementOrSelector);
                    const activeIntersections = new WeakMap();
                    const onIntersectionChange = entries => {
                        entries.forEach(entry => {
                            const onEnd = activeIntersections.get(entry.target);
                            /**
                             * If there's no change to the intersection, we don't need to
                             * do anything here.
                             */
                            if (entry.isIntersecting === Boolean(onEnd)) return;
                            if (entry.isIntersecting) {
                                const newOnEnd = onStart(entry);
                                if (typeof newOnEnd === "function") {
                                    activeIntersections.set(entry.target, newOnEnd);
                                } else {
                                    observer.unobserve(entry.target);
                                }
                            } else if (onEnd) {
                                onEnd(entry);
                                activeIntersections.delete(entry.target);
                            }
                        });
                    };
                    const observer = new IntersectionObserver(onIntersectionChange, {
                        root,
                        rootMargin,
                        threshold: typeof amount === "number" ? amount : thresholds[amount]
                    });
                    elements.forEach(element => observer.observe(element));
                    return () => observer.disconnect();
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/resize/handle-element.es.js":
            /*!**************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/resize/handle-element.es.js ***!
              \**************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.resizeElement = resizeElement;
                var _resolveElementsEs = __webpack_require__( /*! ../../utils/resolve-elements.es.js */ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js");
                const resizeHandlers = new WeakMap();
                let observer;

                function getElementSize(target, borderBoxSize) {
                    if (borderBoxSize) {
                        const {
                            inlineSize,
                            blockSize
                        } = borderBoxSize[0];
                        return {
                            width: inlineSize,
                            height: blockSize
                        };
                    } else if (target instanceof SVGElement && "getBBox" in target) {
                        return target.getBBox();
                    } else {
                        return {
                            width: target.offsetWidth,
                            height: target.offsetHeight
                        };
                    }
                }

                function notifyTarget({
                    target,
                    contentRect,
                    borderBoxSize
                }) {
                    var _a;
                    (_a = resizeHandlers.get(target)) === null || _a === void 0 ? void 0 : _a.forEach(handler => {
                        handler({
                            target,
                            contentSize: contentRect,
                            get size() {
                                return getElementSize(target, borderBoxSize);
                            }
                        });
                    });
                }

                function notifyAll(entries) {
                    entries.forEach(notifyTarget);
                }

                function createResizeObserver() {
                    if (typeof ResizeObserver === "undefined") return;
                    observer = new ResizeObserver(notifyAll);
                }

                function resizeElement(target, handler) {
                    if (!observer) createResizeObserver();
                    const elements = (0, _resolveElementsEs.resolveElements)(target);
                    elements.forEach(element => {
                        let elementHandlers = resizeHandlers.get(element);
                        if (!elementHandlers) {
                            elementHandlers = new Set();
                            resizeHandlers.set(element, elementHandlers);
                        }
                        elementHandlers.add(handler);
                        observer === null || observer === void 0 ? void 0 : observer.observe(element);
                    });
                    return () => {
                        elements.forEach(element => {
                            const elementHandlers = resizeHandlers.get(element);
                            elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.delete(handler);
                            if (!(elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.size)) {
                                observer === null || observer === void 0 ? void 0 : observer.unobserve(element);
                            }
                        });
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/resize/handle-window.es.js":
            /*!*************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/resize/handle-window.es.js ***!
              \*************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.resizeWindow = resizeWindow;
                const windowCallbacks = new Set();
                let windowResizeHandler;

                function createWindowResizeHandler() {
                    windowResizeHandler = () => {
                        const size = {
                            width: window.innerWidth,
                            height: window.innerHeight
                        };
                        const info = {
                            target: window,
                            size,
                            contentSize: size
                        };
                        windowCallbacks.forEach(callback => callback(info));
                    };
                    window.addEventListener("resize", windowResizeHandler);
                }

                function resizeWindow(callback) {
                    windowCallbacks.add(callback);
                    if (!windowResizeHandler) createWindowResizeHandler();
                    return () => {
                        windowCallbacks.delete(callback);
                        if (!windowCallbacks.size && windowResizeHandler) {
                            windowResizeHandler = undefined;
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/resize/index.es.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/resize/index.es.js ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.resize = resize;
                var _handleElementEs = __webpack_require__( /*! ./handle-element.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/resize/handle-element.es.js");
                var _handleWindowEs = __webpack_require__( /*! ./handle-window.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/resize/handle-window.es.js");

                function resize(a, b) {
                    return typeof a === "function" ? (0, _handleWindowEs.resizeWindow)(a) : (0, _handleElementEs.resizeElement)(a, b);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/scroll/index.es.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/index.es.js ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.scroll = scroll;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var _indexEs = __webpack_require__( /*! ../resize/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/resize/index.es.js");
                var _infoEs = __webpack_require__( /*! ./info.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js");
                var _onScrollHandlerEs = __webpack_require__( /*! ./on-scroll-handler.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/on-scroll-handler.es.js");
                const scrollListeners = new WeakMap();
                const resizeListeners = new WeakMap();
                const onScrollHandlers = new WeakMap();
                const getEventTarget = element => element === document.documentElement ? window : element;

                function scroll(onScroll, _a = {}) {
                    var {
                        container = document.documentElement
                    } = _a,
                    options = (0, _tslib.__rest)(_a, ["container"]);
                    let containerHandlers = onScrollHandlers.get(container);
                    /**
                     * Get the onScroll handlers for this container.
                     * If one isn't found, create a new one.
                     */
                    if (!containerHandlers) {
                        containerHandlers = new Set();
                        onScrollHandlers.set(container, containerHandlers);
                    }
                    /**
                     * Create a new onScroll handler for the provided callback.
                     */
                    const info = (0, _infoEs.createScrollInfo)();
                    const containerHandler = (0, _onScrollHandlerEs.createOnScrollHandler)(container, onScroll, info, options);
                    containerHandlers.add(containerHandler);
                    /**
                     * Check if there's a scroll event listener for this container.
                     * If not, create one.
                     */
                    if (!scrollListeners.has(container)) {
                        const listener = () => {
                            const time = performance.now();
                            for (const handler of containerHandlers) handler.measure();
                            for (const handler of containerHandlers) handler.update(time);
                            for (const handler of containerHandlers) handler.notify();
                        };
                        scrollListeners.set(container, listener);
                        const target = getEventTarget(container);
                        window.addEventListener("resize", listener, {
                            passive: true
                        });
                        if (container !== document.documentElement) {
                            resizeListeners.set(container, (0, _indexEs.resize)(container, listener));
                        }
                        target.addEventListener("scroll", listener, {
                            passive: true
                        });
                    }
                    const listener = scrollListeners.get(container);
                    const onLoadProcesss = requestAnimationFrame(listener);
                    return () => {
                        var _a;
                        if (typeof onScroll !== "function") onScroll.stop();
                        cancelAnimationFrame(onLoadProcesss);
                        /**
                         * Check if we even have any handlers for this container.
                         */
                        const containerHandlers = onScrollHandlers.get(container);
                        if (!containerHandlers) return;
                        containerHandlers.delete(containerHandler);
                        if (containerHandlers.size) return;
                        /**
                         * If no more handlers, remove the scroll listener too.
                         */
                        const listener = scrollListeners.get(container);
                        scrollListeners.delete(container);
                        if (listener) {
                            getEventTarget(container).removeEventListener("scroll", listener);
                            (_a = resizeListeners.get(container)) === null || _a === void 0 ? void 0 : _a();
                            window.removeEventListener("resize", listener);
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js ***!
              \****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createScrollInfo = void 0;
                exports.updateScrollInfo = updateScrollInfo;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                /**
                 * A time in milliseconds, beyond which we consider the scroll velocity to be 0.
                 */
                const maxElapsed = 50;
                const createAxisInfo = () => ({
                    current: 0,
                    offset: [],
                    progress: 0,
                    scrollLength: 0,
                    targetOffset: 0,
                    targetLength: 0,
                    containerLength: 0,
                    velocity: 0
                });
                const createScrollInfo = () => ({
                    time: 0,
                    x: createAxisInfo(),
                    y: createAxisInfo()
                });
                exports.createScrollInfo = createScrollInfo;
                const keys = {
                    x: {
                        length: "Width",
                        position: "Left"
                    },
                    y: {
                        length: "Height",
                        position: "Top"
                    }
                };

                function updateAxisInfo(element, axisName, info, time) {
                    const axis = info[axisName];
                    const {
                        length,
                        position
                    } = keys[axisName];
                    const prev = axis.current;
                    const prevTime = info.time;
                    axis.current = element["scroll" + position];
                    axis.scrollLength = element["scroll" + length] - element["client" + length];
                    axis.offset.length = 0;
                    axis.offset[0] = 0;
                    axis.offset[1] = axis.scrollLength;
                    axis.progress = (0, _utils.progress)(0, axis.scrollLength, axis.current);
                    const elapsed = time - prevTime;
                    axis.velocity = elapsed > maxElapsed ? 0 : (0, _utils.velocityPerSecond)(axis.current - prev, elapsed);
                }

                function updateScrollInfo(element, info, time) {
                    updateAxisInfo(element, "x", info, time);
                    updateAxisInfo(element, "y", info, time);
                    info.time = time;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/edge.es.js":
            /*!************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/edge.es.js ***!
              \************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.namedEdges = void 0;
                exports.resolveEdge = resolveEdge;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                const namedEdges = exports.namedEdges = {
                    start: 0,
                    center: 0.5,
                    end: 1
                };

                function resolveEdge(edge, length, inset = 0) {
                    let delta = 0;
                    /**
                     * If we have this edge defined as a preset, replace the definition
                     * with the numerical value.
                     */
                    if (namedEdges[edge] !== undefined) {
                        edge = namedEdges[edge];
                    }
                    /**
                     * Handle unit values
                     */
                    if ((0, _utils.isString)(edge)) {
                        const asNumber = parseFloat(edge);
                        if (edge.endsWith("px")) {
                            delta = asNumber;
                        } else if (edge.endsWith("%")) {
                            edge = asNumber / 100;
                        } else if (edge.endsWith("vw")) {
                            delta = asNumber / 100 * document.documentElement.clientWidth;
                        } else if (edge.endsWith("vh")) {
                            delta = asNumber / 100 * document.documentElement.clientHeight;
                        } else {
                            edge = asNumber;
                        }
                    }
                    /**
                     * If the edge is defined as a number, handle as a progress value.
                     */
                    if ((0, _utils.isNumber)(edge)) {
                        delta = length * edge;
                    }
                    return inset + delta;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/index.es.js":
            /*!*************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/index.es.js ***!
              \*************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.resolveOffsets = resolveOffsets;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _insetEs = __webpack_require__( /*! ./inset.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/inset.es.js");
                var _presetsEs = __webpack_require__( /*! ./presets.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/presets.es.js");
                var _offsetEs = __webpack_require__( /*! ./offset.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/offset.es.js");
                const point = {
                    x: 0,
                    y: 0
                };

                function resolveOffsets(container, info, options) {
                    let {
                        offset: offsetDefinition = _presetsEs.ScrollOffset.All
                    } = options;
                    const {
                        target = container,
                            axis = "y"
                    } = options;
                    const lengthLabel = axis === "y" ? "height" : "width";
                    const inset = target !== container ? (0, _insetEs.calcInset)(target, container) : point;
                    /**
                     * Measure the target and container. If they're the same thing then we
                     * use the container's scrollWidth/Height as the target, from there
                     * all other calculations can remain the same.
                     */
                    const targetSize = target === container ? {
                        width: container.scrollWidth,
                        height: container.scrollHeight
                    } : {
                        width: target.clientWidth,
                        height: target.clientHeight
                    };
                    const containerSize = {
                        width: container.clientWidth,
                        height: container.clientHeight
                    };
                    /**
                     * Reset the length of the resolved offset array rather than creating a new one.
                     * TODO: More reusable data structures for targetSize/containerSize would also be good.
                     */
                    info[axis].offset.length = 0;
                    /**
                     * Populate the offset array by resolving the user's offset definition into
                     * a list of pixel scroll offets.
                     */
                    let hasChanged = !info[axis].interpolate;
                    const numOffsets = offsetDefinition.length;
                    for (let i = 0; i < numOffsets; i++) {
                        const offset = (0, _offsetEs.resolveOffset)(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]);
                        if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) {
                            hasChanged = true;
                        }
                        info[axis].offset[i] = offset;
                    }
                    /**
                     * If the pixel scroll offsets have changed, create a new interpolator function
                     * to map scroll value into a progress.
                     */
                    if (hasChanged) {
                        info[axis].interpolate = (0, _utils.interpolate)((0, _utils.defaultOffset)(numOffsets), info[axis].offset);
                        info[axis].interpolatorOffsets = [...info[axis].offset];
                    }
                    info[axis].progress = info[axis].interpolate(info[axis].current);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/inset.es.js":
            /*!*************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/inset.es.js ***!
              \*************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.calcInset = calcInset;

                function calcInset(element, container) {
                    let inset = {
                        x: 0,
                        y: 0
                    };
                    let current = element;
                    while (current && current !== container) {
                        if (current instanceof HTMLElement) {
                            inset.x += current.offsetLeft;
                            inset.y += current.offsetTop;
                            current = current.offsetParent;
                        } else if (current instanceof SVGGraphicsElement && "getBBox" in current) {
                            const {
                                top,
                                left
                            } = current.getBBox();
                            inset.x += left;
                            inset.y += top;
                            /**
                             * Assign the next parent element as the <svg /> tag.
                             */
                            while (current && current.tagName !== "svg") {
                                current = current.parentNode;
                            }
                        }
                    }
                    return inset;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/offset.es.js":
            /*!**************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/offset.es.js ***!
              \**************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.resolveOffset = resolveOffset;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _edgeEs = __webpack_require__( /*! ./edge.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/edge.es.js");
                const defaultOffset = [0, 0];

                function resolveOffset(offset, containerLength, targetLength, targetInset) {
                    let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset;
                    let targetPoint = 0;
                    let containerPoint = 0;
                    if ((0, _utils.isNumber)(offset)) {
                        /**
                         * If we're provided offset: [0, 0.5, 1] then each number x should become
                         * [x, x], so we default to the behaviour of mapping 0 => 0 of both target
                         * and container etc.
                         */
                        offsetDefinition = [offset, offset];
                    } else if ((0, _utils.isString)(offset)) {
                        offset = offset.trim();
                        if (offset.includes(" ")) {
                            offsetDefinition = offset.split(" ");
                        } else {
                            /**
                             * If we're provided a definition like "100px" then we want to apply
                             * that only to the top of the target point, leaving the container at 0.
                             * Whereas a named offset like "end" should be applied to both.
                             */
                            offsetDefinition = [offset, _edgeEs.namedEdges[offset] ? offset : `0`];
                        }
                    }
                    targetPoint = (0, _edgeEs.resolveEdge)(offsetDefinition[0], targetLength, targetInset);
                    containerPoint = (0, _edgeEs.resolveEdge)(offsetDefinition[1], containerLength);
                    return targetPoint - containerPoint;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/presets.es.js":
            /*!***************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/presets.es.js ***!
              \***************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.ScrollOffset = void 0;
                const ScrollOffset = exports.ScrollOffset = {
                    Enter: [
                        [0, 1],
                        [1, 1]
                    ],
                    Exit: [
                        [0, 0],
                        [1, 0]
                    ],
                    Any: [
                        [1, 0],
                        [0, 1]
                    ],
                    All: [
                        [0, 0],
                        [1, 1]
                    ]
                };

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/gestures/scroll/on-scroll-handler.es.js":
            /*!*****************************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/on-scroll-handler.es.js ***!
              \*****************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createOnScrollHandler = createOnScrollHandler;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _infoEs = __webpack_require__( /*! ./info.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js");
                var _indexEs = __webpack_require__( /*! ./offsets/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/index.es.js");

                function measure(container, target = container, info) {
                    /**
                     * Find inset of target within scrollable container
                     */
                    info.x.targetOffset = 0;
                    info.y.targetOffset = 0;
                    if (target !== container) {
                        let node = target;
                        while (node && node != container) {
                            info.x.targetOffset += node.offsetLeft;
                            info.y.targetOffset += node.offsetTop;
                            node = node.offsetParent;
                        }
                    }
                    info.x.targetLength = target === container ? target.scrollWidth : target.clientWidth;
                    info.y.targetLength = target === container ? target.scrollHeight : target.clientHeight;
                    info.x.containerLength = container.clientWidth;
                    info.y.containerLength = container.clientHeight;
                }

                function createOnScrollHandler(element, onScroll, info, options = {}) {
                    const axis = options.axis || "y";
                    return {
                        measure: () => measure(element, options.target, info),
                        update: time => {
                            (0, _infoEs.updateScrollInfo)(element, info, time);
                            if (options.offset || options.target) {
                                (0, _indexEs.resolveOffsets)(element, info, options);
                            }
                        },
                        notify: typeof onScroll === "function" ? () => onScroll(info) : scrubAnimation(onScroll, info[axis])
                    };
                }

                function scrubAnimation(controls, axisInfo) {
                    controls.pause();
                    controls.forEachNative((animation, {
                        easing
                    }) => {
                        var _a, _b;
                        if (animation.updateDuration) {
                            if (!easing) animation.easing = _utils.noopReturn;
                            animation.updateDuration(1);
                        } else {
                            const timingOptions = {
                                duration: 1000
                            };
                            if (!easing) timingOptions.easing = "linear";
                            (_b = (_a = animation.effect) === null || _a === void 0 ? void 0 : _a.updateTiming) === null || _b === void 0 ? void 0 : _b.call(_a, timingOptions);
                        }
                    });
                    return () => {
                        controls.currentTime = axisInfo.progress;
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/index.es.js":
            /*!*************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/index.es.js ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "ScrollOffset", ({
                    enumerable: true,
                    get: function() {
                        return _presetsEs.ScrollOffset;
                    }
                }));
                Object.defineProperty(exports, "animate", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs.animate;
                    }
                }));
                Object.defineProperty(exports, "animateStyle", ({
                    enumerable: true,
                    get: function() {
                        return _animateStyleEs.animateStyle;
                    }
                }));
                Object.defineProperty(exports, "createMotionState", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs7.createMotionState;
                    }
                }));
                Object.defineProperty(exports, "createStyleString", ({
                    enumerable: true,
                    get: function() {
                        return _styleStringEs.createStyleString;
                    }
                }));
                Object.defineProperty(exports, "createStyles", ({
                    enumerable: true,
                    get: function() {
                        return _styleObjectEs.createStyles;
                    }
                }));
                Object.defineProperty(exports, "getAnimationData", ({
                    enumerable: true,
                    get: function() {
                        return _dataEs.getAnimationData;
                    }
                }));
                Object.defineProperty(exports, "getStyleName", ({
                    enumerable: true,
                    get: function() {
                        return _getStyleNameEs.getStyleName;
                    }
                }));
                Object.defineProperty(exports, "glide", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs4.glide;
                    }
                }));
                Object.defineProperty(exports, "inView", ({
                    enumerable: true,
                    get: function() {
                        return _inViewEs.inView;
                    }
                }));
                Object.defineProperty(exports, "mountedStates", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs7.mountedStates;
                    }
                }));
                Object.defineProperty(exports, "resize", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs5.resize;
                    }
                }));
                Object.defineProperty(exports, "scroll", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs6.scroll;
                    }
                }));
                Object.defineProperty(exports, "spring", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs3.spring;
                    }
                }));
                Object.defineProperty(exports, "stagger", ({
                    enumerable: true,
                    get: function() {
                        return _staggerEs.stagger;
                    }
                }));
                Object.defineProperty(exports, "style", ({
                    enumerable: true,
                    get: function() {
                        return _styleEs.style;
                    }
                }));
                Object.defineProperty(exports, "timeline", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs2.timeline;
                    }
                }));
                Object.defineProperty(exports, "withControls", ({
                    enumerable: true,
                    get: function() {
                        return _controlsEs.withControls;
                    }
                }));
                var _indexEs = __webpack_require__( /*! ./animate/index.es.js */ "../../../node_modules/@motionone/dom/dist/animate/index.es.js");
                var _animateStyleEs = __webpack_require__( /*! ./animate/animate-style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js");
                var _indexEs2 = __webpack_require__( /*! ./timeline/index.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/index.es.js");
                var _staggerEs = __webpack_require__( /*! ./utils/stagger.es.js */ "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js");
                var _indexEs3 = __webpack_require__( /*! ./easing/spring/index.es.js */ "../../../node_modules/@motionone/dom/dist/easing/spring/index.es.js");
                var _indexEs4 = __webpack_require__( /*! ./easing/glide/index.es.js */ "../../../node_modules/@motionone/dom/dist/easing/glide/index.es.js");
                var _styleEs = __webpack_require__( /*! ./animate/style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/style.es.js");
                var _inViewEs = __webpack_require__( /*! ./gestures/in-view.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/in-view.es.js");
                var _indexEs5 = __webpack_require__( /*! ./gestures/resize/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/resize/index.es.js");
                var _indexEs6 = __webpack_require__( /*! ./gestures/scroll/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/index.es.js");
                var _presetsEs = __webpack_require__( /*! ./gestures/scroll/offsets/presets.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/presets.es.js");
                var _controlsEs = __webpack_require__( /*! ./animate/utils/controls.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js");
                var _dataEs = __webpack_require__( /*! ./animate/data.es.js */ "../../../node_modules/@motionone/dom/dist/animate/data.es.js");
                var _getStyleNameEs = __webpack_require__( /*! ./animate/utils/get-style-name.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js");
                var _indexEs7 = __webpack_require__( /*! ./state/index.es.js */ "../../../node_modules/@motionone/dom/dist/state/index.es.js");
                var _styleObjectEs = __webpack_require__( /*! ./animate/utils/style-object.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/style-object.es.js");
                var _styleStringEs = __webpack_require__( /*! ./animate/utils/style-string.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/style-string.es.js");

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/state/gestures/hover.es.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/state/gestures/hover.es.js ***!
              \****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.hover = void 0;
                var _eventsEs = __webpack_require__( /*! ../utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js");
                const mouseEvent = (element, name, action) => event => {
                    if (event.pointerType && event.pointerType !== "mouse") return;
                    action();
                    (0, _eventsEs.dispatchPointerEvent)(element, name, event);
                };
                const hover = exports.hover = {
                    isActive: options => Boolean(options.hover),
                    subscribe: (element, {
                        enable,
                        disable
                    }) => {
                        const onEnter = mouseEvent(element, "hoverstart", enable);
                        const onLeave = mouseEvent(element, "hoverend", disable);
                        element.addEventListener("pointerenter", onEnter);
                        element.addEventListener("pointerleave", onLeave);
                        return () => {
                            element.removeEventListener("pointerenter", onEnter);
                            element.removeEventListener("pointerleave", onLeave);
                        };
                    }
                };

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/state/gestures/in-view.es.js":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/state/gestures/in-view.es.js ***!
              \******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.inView = void 0;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var _eventsEs = __webpack_require__( /*! ../utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js");
                var _inViewEs = __webpack_require__( /*! ../../gestures/in-view.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/in-view.es.js");
                const inView = exports.inView = {
                    isActive: options => Boolean(options.inView),
                    subscribe: (element, {
                        enable,
                        disable
                    }, {
                        inViewOptions = {}
                    }) => {
                        const {
                            once
                        } = inViewOptions,
                        viewOptions = (0, _tslib.__rest)(inViewOptions, ["once"]);
                        return (0, _inViewEs.inView)(element, enterEntry => {
                            enable();
                            (0, _eventsEs.dispatchViewEvent)(element, "viewenter", enterEntry);
                            if (!once) {
                                return leaveEntry => {
                                    disable();
                                    (0, _eventsEs.dispatchViewEvent)(element, "viewleave", leaveEntry);
                                };
                            }
                        }, viewOptions);
                    }
                };

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/state/gestures/press.es.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/state/gestures/press.es.js ***!
              \****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.press = void 0;
                var _eventsEs = __webpack_require__( /*! ../utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js");
                const press = exports.press = {
                    isActive: options => Boolean(options.press),
                    subscribe: (element, {
                        enable,
                        disable
                    }) => {
                        const onPointerUp = event => {
                            disable();
                            (0, _eventsEs.dispatchPointerEvent)(element, "pressend", event);
                            window.removeEventListener("pointerup", onPointerUp);
                        };
                        const onPointerDown = event => {
                            enable();
                            (0, _eventsEs.dispatchPointerEvent)(element, "pressstart", event);
                            window.addEventListener("pointerup", onPointerUp);
                        };
                        element.addEventListener("pointerdown", onPointerDown);
                        return () => {
                            element.removeEventListener("pointerdown", onPointerDown);
                            window.removeEventListener("pointerup", onPointerUp);
                        };
                    }
                };

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/state/index.es.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/state/index.es.js ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createMotionState = createMotionState;
                exports.mountedStates = void 0;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var _heyListen = __webpack_require__( /*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js");
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _animateStyleEs = __webpack_require__( /*! ../animate/animate-style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js");
                var _styleEs = __webpack_require__( /*! ../animate/style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/style.es.js");
                var _optionsEs = __webpack_require__( /*! ../animate/utils/options.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js");
                var _hasChangedEs = __webpack_require__( /*! ./utils/has-changed.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/has-changed.es.js");
                var _resolveVariantEs = __webpack_require__( /*! ./utils/resolve-variant.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/resolve-variant.es.js");
                var _scheduleEs = __webpack_require__( /*! ./utils/schedule.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/schedule.es.js");
                var _inViewEs = __webpack_require__( /*! ./gestures/in-view.es.js */ "../../../node_modules/@motionone/dom/dist/state/gestures/in-view.es.js");
                var _hoverEs = __webpack_require__( /*! ./gestures/hover.es.js */ "../../../node_modules/@motionone/dom/dist/state/gestures/hover.es.js");
                var _pressEs = __webpack_require__( /*! ./gestures/press.es.js */ "../../../node_modules/@motionone/dom/dist/state/gestures/press.es.js");
                var _eventsEs = __webpack_require__( /*! ./utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js");
                const gestures = {
                    inView: _inViewEs.inView,
                    hover: _hoverEs.hover,
                    press: _pressEs.press
                };
                /**
                 * A list of state types, in priority order. If a value is defined in
                 * a righter-most type, it will override any definition in a lefter-most.
                 */
                const stateTypes = ["initial", "animate", ...Object.keys(gestures), "exit"];
                /**
                 * A global store of all generated motion states. This can be used to lookup
                 * a motion state for a given Element.
                 */
                const mountedStates = exports.mountedStates = new WeakMap();

                function createMotionState(options = {}, parent) {
                    /**
                     * The element represented by the motion state. This is an empty reference
                     * when we create the state to support SSR and allow for later mounting
                     * in view libraries.
                     *
                     * @ts-ignore
                     */
                    let element;
                    /**
                     * Calculate a depth that we can use to order motion states by tree depth.
                     */
                    let depth = parent ? parent.getDepth() + 1 : 0;
                    /**
                     * Track which states are currently active.
                     */
                    const activeStates = {
                        initial: true,
                        animate: true
                    };
                    /**
                     * A map of functions that, when called, will remove event listeners for
                     * a given gesture.
                     */
                    const gestureSubscriptions = {};
                    /**
                     * Initialise a context to share through motion states. This
                     * will be populated by variant names (if any).
                     */
                    const context = {};
                    for (const name of stateTypes) {
                        context[name] = typeof options[name] === "string" ? options[name] : parent === null || parent === void 0 ? void 0 : parent.getContext()[name];
                    }
                    /**
                     * If initial is set to false we use the animate prop as the initial
                     * animation state.
                     */
                    const initialVariantSource = options.initial === false ? "animate" : "initial";
                    /**
                     * Destructure an initial target out from the resolved initial variant.
                     */
                    let _a = (0, _resolveVariantEs.resolveVariant)(options[initialVariantSource] || context[initialVariantSource], options.variants) || {},
                        target = (0, _tslib.__rest)(_a, ["transition"]);
                    /**
                     * The base target is a cached map of values that we'll use to animate
                     * back to if a value is removed from all active state types. This
                     * is usually the initial value as read from the DOM, for instance if
                     * it hasn't been defined in initial.
                     */
                    const baseTarget = Object.assign({}, target);
                    /**
                     * A generator that will be processed by the global animation scheduler.
                     * This yeilds when it switches from reading the DOM to writing to it
                     * to prevent layout thrashing.
                     */
                    function* animateUpdates() {
                        var _a, _b;
                        const prevTarget = target;
                        target = {};
                        const animationOptions = {};
                        for (const name of stateTypes) {
                            if (!activeStates[name]) continue;
                            const variant = (0, _resolveVariantEs.resolveVariant)(options[name]);
                            if (!variant) continue;
                            for (const key in variant) {
                                if (key === "transition") continue;
                                target[key] = variant[key];
                                animationOptions[key] = (0, _optionsEs.getOptions)((_b = (_a = variant.transition) !== null && _a !== void 0 ? _a : options.transition) !== null && _b !== void 0 ? _b : {}, key);
                            }
                        }
                        const allTargetKeys = new Set([...Object.keys(target), ...Object.keys(prevTarget)]);
                        const animationFactories = [];
                        allTargetKeys.forEach(key => {
                            var _a;
                            if (target[key] === undefined) {
                                target[key] = baseTarget[key];
                            }
                            if ((0, _hasChangedEs.hasChanged)(prevTarget[key], target[key])) {
                                (_a = baseTarget[key]) !== null && _a !== void 0 ? _a : baseTarget[key] = _styleEs.style.get(element, key);
                                animationFactories.push((0, _animateStyleEs.animateStyle)(element, key, target[key], animationOptions[key]));
                            }
                        });
                        // Wait for all animation states to read from the DOM
                        yield;
                        const animations = animationFactories.map(factory => factory()).filter(Boolean);
                        if (!animations.length) return;
                        const animationTarget = target;
                        element.dispatchEvent((0, _eventsEs.motionEvent)("motionstart", animationTarget));
                        Promise.all(animations.map(animation => animation.finished)).then(() => {
                            element.dispatchEvent((0, _eventsEs.motionEvent)("motioncomplete", animationTarget));
                        }).catch(_utils.noop);
                    }
                    const setGesture = (name, isActive) => () => {
                        activeStates[name] = isActive;
                        (0, _scheduleEs.scheduleAnimation)(state);
                    };
                    const updateGestureSubscriptions = () => {
                        for (const name in gestures) {
                            const isGestureActive = gestures[name].isActive(options);
                            const remove = gestureSubscriptions[name];
                            if (isGestureActive && !remove) {
                                gestureSubscriptions[name] = gestures[name].subscribe(element, {
                                    enable: setGesture(name, true),
                                    disable: setGesture(name, false)
                                }, options);
                            } else if (!isGestureActive && remove) {
                                remove();
                                delete gestureSubscriptions[name];
                            }
                        }
                    };
                    const state = {
                        update: newOptions => {
                            if (!element) return;
                            options = newOptions;
                            updateGestureSubscriptions();
                            (0, _scheduleEs.scheduleAnimation)(state);
                        },
                        setActive: (name, isActive) => {
                            if (!element) return;
                            activeStates[name] = isActive;
                            (0, _scheduleEs.scheduleAnimation)(state);
                        },
                        animateUpdates,
                        getDepth: () => depth,
                        getTarget: () => target,
                        getOptions: () => options,
                        getContext: () => context,
                        mount: newElement => {
                            (0, _heyListen.invariant)(Boolean(newElement), "Animation state must be mounted with valid Element");
                            element = newElement;
                            mountedStates.set(element, state);
                            updateGestureSubscriptions();
                            return () => {
                                mountedStates.delete(element);
                                (0, _scheduleEs.unscheduleAnimation)(state);
                                for (const key in gestureSubscriptions) {
                                    gestureSubscriptions[key]();
                                }
                            };
                        },
                        isMounted: () => Boolean(element)
                    };
                    return state;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/state/utils/events.es.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.dispatchPointerEvent = dispatchPointerEvent;
                exports.dispatchViewEvent = dispatchViewEvent;
                exports.motionEvent = void 0;
                const motionEvent = (name, target) => new CustomEvent(name, {
                    detail: {
                        target
                    }
                });
                exports.motionEvent = motionEvent;

                function dispatchPointerEvent(element, name, event) {
                    element.dispatchEvent(new CustomEvent(name, {
                        detail: {
                            originalEvent: event
                        }
                    }));
                }

                function dispatchViewEvent(element, name, entry) {
                    element.dispatchEvent(new CustomEvent(name, {
                        detail: {
                            originalEntry: entry
                        }
                    }));
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/state/utils/has-changed.es.js":
            /*!*******************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/state/utils/has-changed.es.js ***!
              \*******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.hasChanged = hasChanged;
                exports.shallowCompare = shallowCompare;

                function hasChanged(a, b) {
                    if (typeof a !== typeof b) return true;
                    if (Array.isArray(a) && Array.isArray(b)) return !shallowCompare(a, b);
                    return a !== b;
                }

                function shallowCompare(next, prev) {
                    const prevLength = prev.length;
                    if (prevLength !== next.length) return false;
                    for (let i = 0; i < prevLength; i++) {
                        if (prev[i] !== next[i]) return false;
                    }
                    return true;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/state/utils/is-variant.es.js":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/state/utils/is-variant.es.js ***!
              \******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isVariant = isVariant;

                function isVariant(definition) {
                    return typeof definition === "object";
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/state/utils/resolve-variant.es.js":
            /*!***********************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/state/utils/resolve-variant.es.js ***!
              \***********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.resolveVariant = resolveVariant;
                var _isVariantEs = __webpack_require__( /*! ./is-variant.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/is-variant.es.js");

                function resolveVariant(definition, variants) {
                    if ((0, _isVariantEs.isVariant)(definition)) {
                        return definition;
                    } else if (definition && variants) {
                        return variants[definition];
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/state/utils/schedule.es.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/state/utils/schedule.es.js ***!
              \****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.scheduleAnimation = scheduleAnimation;
                exports.unscheduleAnimation = unscheduleAnimation;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                let scheduled = undefined;

                function processScheduledAnimations() {
                    if (!scheduled) return;
                    const generators = scheduled.sort(compareByDepth).map(fireAnimateUpdates);
                    generators.forEach(fireNext);
                    generators.forEach(fireNext);
                    scheduled = undefined;
                }

                function scheduleAnimation(state) {
                    if (!scheduled) {
                        scheduled = [state];
                        requestAnimationFrame(processScheduledAnimations);
                    } else {
                        (0, _utils.addUniqueItem)(scheduled, state);
                    }
                }

                function unscheduleAnimation(state) {
                    scheduled && (0, _utils.removeItem)(scheduled, state);
                }
                const compareByDepth = (a, b) => a.getDepth() - b.getDepth();
                const fireAnimateUpdates = state => state.animateUpdates();
                const fireNext = iterator => iterator.next();

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/timeline/index.es.js":
            /*!**********************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/timeline/index.es.js ***!
              \**********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createAnimationsFromTimeline = createAnimationsFromTimeline;
                exports.timeline = timeline;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var _heyListen = __webpack_require__( /*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js");
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _staggerEs = __webpack_require__( /*! ../utils/stagger.es.js */ "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js");
                var _animateStyleEs = __webpack_require__( /*! ../animate/animate-style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js");
                var _controlsEs = __webpack_require__( /*! ../animate/utils/controls.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js");
                var _keyframesEs = __webpack_require__( /*! ../animate/utils/keyframes.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js");
                var _optionsEs = __webpack_require__( /*! ../animate/utils/options.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js");
                var _resolveElementsEs = __webpack_require__( /*! ../utils/resolve-elements.es.js */ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js");
                var _transformsEs = __webpack_require__( /*! ../animate/utils/transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
                var _calcTimeEs = __webpack_require__( /*! ./utils/calc-time.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/utils/calc-time.es.js");
                var _editEs = __webpack_require__( /*! ./utils/edit.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/utils/edit.es.js");
                var _sortEs = __webpack_require__( /*! ./utils/sort.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/utils/sort.es.js");

                function timeline(definition, options = {}) {
                    var _a;
                    const animationDefinitions = createAnimationsFromTimeline(definition, options);
                    /**
                     * Create and start animations
                     */
                    const animationFactories = animationDefinitions.map(definition => (0, _animateStyleEs.animateStyle)(...definition)).filter(Boolean);
                    return (0, _controlsEs.withControls)(animationFactories, options,
                        // Get the duration from the first animation definition
                        (_a = animationDefinitions[0]) === null || _a === void 0 ? void 0 : _a[3].duration);
                }

                function createAnimationsFromTimeline(definition, _a = {}) {
                    var {
                        defaultOptions = {}
                    } = _a,
                    timelineOptions = (0, _tslib.__rest)(_a, ["defaultOptions"]);
                    const animationDefinitions = [];
                    const elementSequences = new Map();
                    const elementCache = {};
                    const timeLabels = new Map();
                    let prevTime = 0;
                    let currentTime = 0;
                    let totalDuration = 0;
                    /**
                     * Build the timeline by mapping over the definition array and converting
                     * the definitions into keyframes and offsets with absolute time values.
                     * These will later get converted into relative offsets in a second pass.
                     */
                    for (let i = 0; i < definition.length; i++) {
                        const segment = definition[i];
                        /**
                         * If this is a timeline label, mark it and skip the rest of this iteration.
                         */
                        if ((0, _utils.isString)(segment)) {
                            timeLabels.set(segment, currentTime);
                            continue;
                        } else if (!Array.isArray(segment)) {
                            timeLabels.set(segment.name, (0, _calcTimeEs.calcNextTime)(currentTime, segment.at, prevTime, timeLabels));
                            continue;
                        }
                        const [elementDefinition, keyframes, options = {}] = segment;
                        /**
                         * If a relative or absolute time value has been specified we need to resolve
                         * it in relation to the currentTime.
                         */
                        if (options.at !== undefined) {
                            currentTime = (0, _calcTimeEs.calcNextTime)(currentTime, options.at, prevTime, timeLabels);
                        }
                        /**
                         * Keep track of the maximum duration in this definition. This will be
                         * applied to currentTime once the definition has been parsed.
                         */
                        let maxDuration = 0;
                        /**
                         * Find all the elements specified in the definition and parse value
                         * keyframes from their timeline definitions.
                         */
                        const elements = (0, _resolveElementsEs.resolveElements)(elementDefinition, elementCache);
                        const numElements = elements.length;
                        for (let elementIndex = 0; elementIndex < numElements; elementIndex++) {
                            const element = elements[elementIndex];
                            const elementSequence = getElementSequence(element, elementSequences);
                            for (const key in keyframes) {
                                const valueSequence = getValueSequence(key, elementSequence);
                                let valueKeyframes = (0, _keyframesEs.keyframesList)(keyframes[key]);
                                const valueOptions = (0, _optionsEs.getOptions)(options, key);
                                let {
                                    duration = defaultOptions.duration || _utils.defaults.duration,
                                        easing = defaultOptions.easing || _utils.defaults.easing
                                } = valueOptions;
                                if ((0, _utils.isEasingGenerator)(easing)) {
                                    const valueIsTransform = (0, _transformsEs.isTransform)(key);
                                    (0, _heyListen.invariant)(valueKeyframes.length === 2 || !valueIsTransform, "spring must be provided 2 keyframes within timeline");
                                    const custom = easing.createAnimation(valueKeyframes,
                                        // TODO We currently only support explicit keyframes
                                        // so this doesn't currently read from the DOM
                                        () => "0", valueIsTransform);
                                    easing = custom.easing;
                                    if (custom.keyframes !== undefined) valueKeyframes = custom.keyframes;
                                    if (custom.duration !== undefined) duration = custom.duration;
                                }
                                const delay = (0, _staggerEs.resolveOption)(options.delay, elementIndex, numElements) || 0;
                                const startTime = currentTime + delay;
                                const targetTime = startTime + duration;
                                /**
                                 *
                                 */
                                let {
                                    offset = (0, _utils.defaultOffset)(valueKeyframes.length)
                                } = valueOptions;
                                /**
                                 * If there's only one offset of 0, fill in a second with length 1
                                 *
                                 * TODO: Ensure there's a test that covers this removal
                                 */
                                if (offset.length === 1 && offset[0] === 0) {
                                    offset[1] = 1;
                                }
                                /**
                                 * Fill out if offset if fewer offsets than keyframes
                                 */
                                const remainder = length - valueKeyframes.length;
                                remainder > 0 && (0, _utils.fillOffset)(offset, remainder);
                                /**
                                 * If only one value has been set, ie [1], push a null to the start of
                                 * the keyframe array. This will let us mark a keyframe at this point
                                 * that will later be hydrated with the previous value.
                                 */
                                valueKeyframes.length === 1 && valueKeyframes.unshift(null);
                                /**
                                 * Add keyframes, mapping offsets to absolute time.
                                 */
                                (0, _editEs.addKeyframes)(valueSequence, valueKeyframes, easing, offset, startTime, targetTime);
                                maxDuration = Math.max(delay + duration, maxDuration);
                                totalDuration = Math.max(targetTime, totalDuration);
                            }
                        }
                        prevTime = currentTime;
                        currentTime += maxDuration;
                    }
                    /**
                     * For every element and value combination create a new animation.
                     */
                    elementSequences.forEach((valueSequences, element) => {
                        for (const key in valueSequences) {
                            const valueSequence = valueSequences[key];
                            /**
                             * Arrange all the keyframes in ascending time order.
                             */
                            valueSequence.sort(_sortEs.compareByTime);
                            const keyframes = [];
                            const valueOffset = [];
                            const valueEasing = [];
                            /**
                             * For each keyframe, translate absolute times into
                             * relative offsets based on the total duration of the timeline.
                             */
                            for (let i = 0; i < valueSequence.length; i++) {
                                const {
                                    at,
                                    value,
                                    easing
                                } = valueSequence[i];
                                keyframes.push(value);
                                valueOffset.push((0, _utils.progress)(0, totalDuration, at));
                                valueEasing.push(easing || _utils.defaults.easing);
                            }
                            /**
                             * If the first keyframe doesn't land on offset: 0
                             * provide one by duplicating the initial keyframe. This ensures
                             * it snaps to the first keyframe when the animation starts.
                             */
                            if (valueOffset[0] !== 0) {
                                valueOffset.unshift(0);
                                keyframes.unshift(keyframes[0]);
                                valueEasing.unshift("linear");
                            }
                            /**
                             * If the last keyframe doesn't land on offset: 1
                             * provide one with a null wildcard value. This will ensure it
                             * stays static until the end of the animation.
                             */
                            if (valueOffset[valueOffset.length - 1] !== 1) {
                                valueOffset.push(1);
                                keyframes.push(null);
                            }
                            animationDefinitions.push([element, key, keyframes, Object.assign(Object.assign(Object.assign({}, defaultOptions), {
                                duration: totalDuration,
                                easing: valueEasing,
                                offset: valueOffset
                            }), timelineOptions)]);
                        }
                    });
                    return animationDefinitions;
                }

                function getElementSequence(element, sequences) {
                    !sequences.has(element) && sequences.set(element, {});
                    return sequences.get(element);
                }

                function getValueSequence(name, sequences) {
                    if (!sequences[name]) sequences[name] = [];
                    return sequences[name];
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/timeline/utils/calc-time.es.js":
            /*!********************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/timeline/utils/calc-time.es.js ***!
              \********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.calcNextTime = calcNextTime;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");

                function calcNextTime(current, next, prev, labels) {
                    var _a;
                    if ((0, _utils.isNumber)(next)) {
                        return next;
                    } else if (next.startsWith("-") || next.startsWith("+")) {
                        return Math.max(0, current + parseFloat(next));
                    } else if (next === "<") {
                        return prev;
                    } else {
                        return (_a = labels.get(next)) !== null && _a !== void 0 ? _a : current;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/timeline/utils/edit.es.js":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/timeline/utils/edit.es.js ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.addKeyframes = addKeyframes;
                exports.eraseKeyframes = eraseKeyframes;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");

                function eraseKeyframes(sequence, startTime, endTime) {
                    for (let i = 0; i < sequence.length; i++) {
                        const keyframe = sequence[i];
                        if (keyframe.at > startTime && keyframe.at < endTime) {
                            (0, _utils.removeItem)(sequence, keyframe);
                            // If we remove this item we have to push the pointer back one
                            i--;
                        }
                    }
                }

                function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {
                    /**
                     * Erase every existing value between currentTime and targetTime,
                     * this will essentially splice this timeline into any currently
                     * defined ones.
                     */
                    eraseKeyframes(sequence, startTime, endTime);
                    for (let i = 0; i < keyframes.length; i++) {
                        sequence.push({
                            value: keyframes[i],
                            at: (0, _utils.mix)(startTime, endTime, offset[i]),
                            easing: (0, _utils.getEasingForSegment)(easing, i)
                        });
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/timeline/utils/sort.es.js":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/timeline/utils/sort.es.js ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.compareByTime = compareByTime;

                function compareByTime(a, b) {
                    if (a.at === b.at) {
                        return a.value === null ? 1 : -1;
                    } else {
                        return a.at - b.at;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js ***!
              \******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.resolveElements = resolveElements;

                function resolveElements(elements, selectorCache) {
                    var _a;
                    if (typeof elements === "string") {
                        if (selectorCache) {
                            (_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : selectorCache[elements] = document.querySelectorAll(elements);
                            elements = selectorCache[elements];
                        } else {
                            elements = document.querySelectorAll(elements);
                        }
                    } else if (elements instanceof Element) {
                        elements = [elements];
                    }
                    /**
                     * Return an empty array
                     */
                    return Array.from(elements || []);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/@motionone/dom/dist/utils/stagger.es.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getFromIndex = getFromIndex;
                exports.resolveOption = resolveOption;
                exports.stagger = stagger;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _animation = __webpack_require__( /*! @motionone/animation */ "../../../node_modules/@motionone/animation/dist/index.es.js");

                function stagger(duration = 0.1, {
                    start = 0,
                    from = 0,
                    easing
                } = {}) {
                    return (i, total) => {
                        const fromIndex = (0, _utils.isNumber)(from) ? from : getFromIndex(from, total);
                        const distance = Math.abs(fromIndex - i);
                        let delay = duration * distance;
                        if (easing) {
                            const maxDelay = total * duration;
                            const easingFunction = (0, _animation.getEasingFunction)(easing);
                            delay = easingFunction(delay / maxDelay) * maxDelay;
                        }
                        return start + delay;
                    };
                }

                function getFromIndex(from, total) {
                    if (from === "first") {
                        return 0;
                    } else {
                        const lastIndex = total - 1;
                        return from === "last" ? lastIndex : lastIndex / 2;
                    }
                }

                function resolveOption(option, i, total) {
                    return typeof option === "function" ? option(i, total) : option;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/easing/dist/cubic-bezier.es.js":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/@motionone/easing/dist/cubic-bezier.es.js ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.cubicBezier = cubicBezier;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                /*
                  Bezier function generator

                  This has been modified from Gaëtan Renaudeau's BezierEasing
                  https://github.com/gre/bezier-easing/blob/master/src/index.js
                  https://github.com/gre/bezier-easing/blob/master/LICENSE
                  
                  I've removed the newtonRaphsonIterate algo because in benchmarking it
                  wasn't noticiably faster than binarySubdivision, indeed removing it
                  usually improved times, depending on the curve.

                  I also removed the lookup table, as for the added bundle size and loop we're
                  only cutting ~4 or so subdivision iterations. I bumped the max iterations up
                  to 12 to compensate and this still tended to be faster for no perceivable
                  loss in accuracy.

                  Usage
                    const easeOut = cubicBezier(.17,.67,.83,.67);
                    const x = easeOut(0.5); // returns 0.627...
                */
                // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
                const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * t;
                const subdivisionPrecision = 0.0000001;
                const subdivisionMaxIterations = 12;

                function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
                    let currentX;
                    let currentT;
                    let i = 0;
                    do {
                        currentT = lowerBound + (upperBound - lowerBound) / 2.0;
                        currentX = calcBezier(currentT, mX1, mX2) - x;
                        if (currentX > 0.0) {
                            upperBound = currentT;
                        } else {
                            lowerBound = currentT;
                        }
                    } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
                    return currentT;
                }

                function cubicBezier(mX1, mY1, mX2, mY2) {
                    // If this is a linear gradient, return linear easing
                    if (mX1 === mY1 && mX2 === mY2) return _utils.noopReturn;
                    const getTForX = aX => binarySubdivide(aX, 0, 1, mX1, mX2);
                    // If animation is at start/end, return t without easing
                    return t => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/easing/dist/index.es.js":
            /*!****************************************************************!*\
              !*** ../../../node_modules/@motionone/easing/dist/index.es.js ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "cubicBezier", ({
                    enumerable: true,
                    get: function() {
                        return _cubicBezierEs.cubicBezier;
                    }
                }));
                Object.defineProperty(exports, "steps", ({
                    enumerable: true,
                    get: function() {
                        return _stepsEs.steps;
                    }
                }));
                var _cubicBezierEs = __webpack_require__( /*! ./cubic-bezier.es.js */ "../../../node_modules/@motionone/easing/dist/cubic-bezier.es.js");
                var _stepsEs = __webpack_require__( /*! ./steps.es.js */ "../../../node_modules/@motionone/easing/dist/steps.es.js");

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/easing/dist/steps.es.js":
            /*!****************************************************************!*\
              !*** ../../../node_modules/@motionone/easing/dist/steps.es.js ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.steps = void 0;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                const steps = (steps, direction = "end") => progress => {
                    progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 0.001);
                    const expanded = progress * steps;
                    const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
                    return (0, _utils.clamp)(0, 1, rounded / steps);
                };
                exports.steps = steps;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/generators/dist/glide/index.es.js":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/@motionone/generators/dist/glide/index.es.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.glide = void 0;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _velocityEs = __webpack_require__( /*! ../utils/velocity.es.js */ "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js");
                var _indexEs = __webpack_require__( /*! ../spring/index.es.js */ "../../../node_modules/@motionone/generators/dist/spring/index.es.js");
                const glide = ({
                    from = 0,
                    velocity = 0.0,
                    power = 0.8,
                    decay = 0.325,
                    bounceDamping,
                    bounceStiffness,
                    changeTarget,
                    min,
                    max,
                    restDistance = 0.5,
                    restSpeed
                }) => {
                    decay = _utils.time.ms(decay);
                    const state = {
                        hasReachedTarget: false,
                        done: false,
                        current: from,
                        target: from
                    };
                    const isOutOfBounds = v => min !== undefined && v < min || max !== undefined && v > max;
                    const nearestBoundary = v => {
                        if (min === undefined) return max;
                        if (max === undefined) return min;
                        return Math.abs(min - v) < Math.abs(max - v) ? min : max;
                    };
                    let amplitude = power * velocity;
                    const ideal = from + amplitude;
                    const target = changeTarget === undefined ? ideal : changeTarget(ideal);
                    state.target = target;
                    /**
                     * If the target has changed we need to re-calculate the amplitude, otherwise
                     * the animation will start from the wrong position.
                     */
                    if (target !== ideal) amplitude = target - from;
                    const calcDelta = t => -amplitude * Math.exp(-t / decay);
                    const calcLatest = t => target + calcDelta(t);
                    const applyFriction = t => {
                        const delta = calcDelta(t);
                        const latest = calcLatest(t);
                        state.done = Math.abs(delta) <= restDistance;
                        state.current = state.done ? target : latest;
                    };
                    /**
                     * Ideally this would resolve for t in a stateless way, we could
                     * do that by always precalculating the animation but as we know
                     * this will be done anyway we can assume that spring will
                     * be discovered during that.
                     */
                    let timeReachedBoundary;
                    let spring$1;
                    const checkCatchBoundary = t => {
                        if (!isOutOfBounds(state.current)) return;
                        timeReachedBoundary = t;
                        spring$1 = (0, _indexEs.spring)({
                            from: state.current,
                            to: nearestBoundary(state.current),
                            velocity: (0, _velocityEs.calcGeneratorVelocity)(calcLatest, t, state.current),
                            damping: bounceDamping,
                            stiffness: bounceStiffness,
                            restDistance,
                            restSpeed
                        });
                    };
                    checkCatchBoundary(0);
                    return t => {
                        /**
                         * We need to resolve the friction to figure out if we need a
                         * spring but we don't want to do this twice per frame. So here
                         * we flag if we updated for this frame and later if we did
                         * we can skip doing it again.
                         */
                        let hasUpdatedFrame = false;
                        if (!spring$1 && timeReachedBoundary === undefined) {
                            hasUpdatedFrame = true;
                            applyFriction(t);
                            checkCatchBoundary(t);
                        }
                        /**
                         * If we have a spring and the provided t is beyond the moment the friction
                         * animation crossed the min/max boundary, use the spring.
                         */
                        if (timeReachedBoundary !== undefined && t > timeReachedBoundary) {
                            state.hasReachedTarget = true;
                            return spring$1(t - timeReachedBoundary);
                        } else {
                            state.hasReachedTarget = false;
                            !hasUpdatedFrame && applyFriction(t);
                            return state;
                        }
                    };
                };
                exports.glide = glide;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/generators/dist/index.es.js":
            /*!********************************************************************!*\
              !*** ../../../node_modules/@motionone/generators/dist/index.es.js ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "calcGeneratorVelocity", ({
                    enumerable: true,
                    get: function() {
                        return _velocityEs.calcGeneratorVelocity;
                    }
                }));
                Object.defineProperty(exports, "glide", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs.glide;
                    }
                }));
                Object.defineProperty(exports, "pregenerateKeyframes", ({
                    enumerable: true,
                    get: function() {
                        return _pregenerateKeyframesEs.pregenerateKeyframes;
                    }
                }));
                Object.defineProperty(exports, "spring", ({
                    enumerable: true,
                    get: function() {
                        return _indexEs2.spring;
                    }
                }));
                var _indexEs = __webpack_require__( /*! ./glide/index.es.js */ "../../../node_modules/@motionone/generators/dist/glide/index.es.js");
                var _indexEs2 = __webpack_require__( /*! ./spring/index.es.js */ "../../../node_modules/@motionone/generators/dist/spring/index.es.js");
                var _pregenerateKeyframesEs = __webpack_require__( /*! ./utils/pregenerate-keyframes.es.js */ "../../../node_modules/@motionone/generators/dist/utils/pregenerate-keyframes.es.js");
                var _velocityEs = __webpack_require__( /*! ./utils/velocity.es.js */ "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js");

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/generators/dist/spring/defaults.es.js":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/@motionone/generators/dist/spring/defaults.es.js ***!
              \******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.defaults = void 0;
                const defaults = exports.defaults = {
                    stiffness: 100.0,
                    damping: 10.0,
                    mass: 1.0
                };

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/generators/dist/spring/index.es.js":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/@motionone/generators/dist/spring/index.es.js ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.spring = void 0;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                var _defaultsEs = __webpack_require__( /*! ./defaults.es.js */ "../../../node_modules/@motionone/generators/dist/spring/defaults.es.js");
                var _utilsEs = __webpack_require__( /*! ./utils.es.js */ "../../../node_modules/@motionone/generators/dist/spring/utils.es.js");
                var _hasReachedTargetEs = __webpack_require__( /*! ../utils/has-reached-target.es.js */ "../../../node_modules/@motionone/generators/dist/utils/has-reached-target.es.js");
                var _velocityEs = __webpack_require__( /*! ../utils/velocity.es.js */ "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js");
                const spring = ({
                    stiffness = _defaultsEs.defaults.stiffness,
                    damping = _defaultsEs.defaults.damping,
                    mass = _defaultsEs.defaults.mass,
                    from = 0,
                    to = 1,
                    velocity = 0.0,
                    restSpeed = 2,
                    restDistance = 0.5
                } = {}) => {
                    velocity = velocity ? _utils.time.s(velocity) : 0.0;
                    const state = {
                        done: false,
                        hasReachedTarget: false,
                        current: from,
                        target: to
                    };
                    const initialDelta = to - from;
                    const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;
                    const dampingRatio = (0, _utilsEs.calcDampingRatio)(stiffness, damping, mass);
                    let resolveSpring;
                    if (dampingRatio < 1) {
                        const angularFreq = undampedAngularFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
                        // Underdamped spring (bouncy)
                        resolveSpring = t => to - Math.exp(-dampingRatio * undampedAngularFreq * t) * ((-velocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));
                    } else {
                        // Critically damped spring
                        resolveSpring = t => {
                            return to - Math.exp(-undampedAngularFreq * t) * (initialDelta + (-velocity + undampedAngularFreq * initialDelta) * t);
                        };
                    }
                    return t => {
                        state.current = resolveSpring(t);
                        const currentVelocity = t === 0 ? velocity : (0, _velocityEs.calcGeneratorVelocity)(resolveSpring, t, state.current);
                        const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
                        const isBelowDisplacementThreshold = Math.abs(to - state.current) <= restDistance;
                        state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold;
                        state.hasReachedTarget = (0, _hasReachedTargetEs.hasReachedTarget)(from, to, state.current);
                        return state;
                    };
                };
                exports.spring = spring;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/generators/dist/spring/utils.es.js":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/@motionone/generators/dist/spring/utils.es.js ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.calcDampingRatio = void 0;
                var _defaultsEs = __webpack_require__( /*! ./defaults.es.js */ "../../../node_modules/@motionone/generators/dist/spring/defaults.es.js");
                const calcDampingRatio = (stiffness = _defaultsEs.defaults.stiffness, damping = _defaultsEs.defaults.damping, mass = _defaultsEs.defaults.mass) => damping / (2 * Math.sqrt(stiffness * mass));
                exports.calcDampingRatio = calcDampingRatio;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/generators/dist/utils/has-reached-target.es.js":
            /*!***************************************************************************************!*\
              !*** ../../../node_modules/@motionone/generators/dist/utils/has-reached-target.es.js ***!
              \***************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.hasReachedTarget = hasReachedTarget;

                function hasReachedTarget(origin, target, current) {
                    return origin < target && current >= target || origin > target && current <= target;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/generators/dist/utils/pregenerate-keyframes.es.js":
            /*!******************************************************************************************!*\
              !*** ../../../node_modules/@motionone/generators/dist/utils/pregenerate-keyframes.es.js ***!
              \******************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.pregenerateKeyframes = pregenerateKeyframes;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                const timeStep = 10;
                const maxDuration = 10000;

                function pregenerateKeyframes(generator, toUnit = _utils.noopReturn) {
                    let overshootDuration = undefined;
                    let timestamp = timeStep;
                    let state = generator(0);
                    const keyframes = [toUnit(state.current)];
                    while (!state.done && timestamp < maxDuration) {
                        state = generator(timestamp);
                        keyframes.push(toUnit(state.done ? state.target : state.current));
                        if (overshootDuration === undefined && state.hasReachedTarget) {
                            overshootDuration = timestamp;
                        }
                        timestamp += timeStep;
                    }
                    const duration = timestamp - timeStep;
                    /**
                     * If generating an animation that didn't actually move,
                     * generate a second keyframe so we have an origin and target.
                     */
                    if (keyframes.length === 1) keyframes.push(state.current);
                    return {
                        keyframes,
                        duration: duration / 1000,
                        overshootDuration: (overshootDuration !== null && overshootDuration !== void 0 ? overshootDuration : duration) / 1000
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/@motionone/generators/dist/utils/velocity.es.js ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.calcGeneratorVelocity = calcGeneratorVelocity;
                var _utils = __webpack_require__( /*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
                const sampleT = 5; // ms
                function calcGeneratorVelocity(resolveValue, t, current) {
                    const prevT = Math.max(t - sampleT, 0);
                    return (0, _utils.velocityPerSecond)(current - resolveValue(prevT), t - prevT);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/types/dist/MotionValue.es.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/@motionone/types/dist/MotionValue.es.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.MotionValue = void 0;
                /**
                 * The MotionValue tracks the state of a single animatable
                 * value. Currently, updatedAt and current are unused. The
                 * long term idea is to use this to minimise the number
                 * of DOM reads, and to abstract the DOM interactions here.
                 */
                class MotionValue {
                    setAnimation(animation) {
                        this.animation = animation;
                        animation === null || animation === void 0 ? void 0 : animation.finished.then(() => this.clearAnimation()).catch(() => {});
                    }
                    clearAnimation() {
                        this.animation = this.generator = undefined;
                    }
                }
                exports.MotionValue = MotionValue;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/types/dist/index.es.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/@motionone/types/dist/index.es.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "MotionValue", ({
                    enumerable: true,
                    get: function() {
                        return _MotionValueEs.MotionValue;
                    }
                }));
                var _MotionValueEs = __webpack_require__( /*! ./MotionValue.es.js */ "../../../node_modules/@motionone/types/dist/MotionValue.es.js");

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/array.es.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/array.es.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.addUniqueItem = addUniqueItem;
                exports.removeItem = removeItem;

                function addUniqueItem(array, item) {
                    array.indexOf(item) === -1 && array.push(item);
                }

                function removeItem(arr, item) {
                    const index = arr.indexOf(item);
                    index > -1 && arr.splice(index, 1);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/clamp.es.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/clamp.es.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.clamp = void 0;
                const clamp = (min, max, v) => Math.min(Math.max(v, min), max);
                exports.clamp = clamp;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/defaults.es.js":
            /*!******************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/defaults.es.js ***!
              \******************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.defaults = void 0;
                const defaults = exports.defaults = {
                    duration: 0.3,
                    delay: 0,
                    endDelay: 0,
                    repeat: 0,
                    easing: "ease"
                };

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/easing.es.js":
            /*!****************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/easing.es.js ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getEasingForSegment = getEasingForSegment;
                var _isEasingListEs = __webpack_require__( /*! ./is-easing-list.es.js */ "../../../node_modules/@motionone/utils/dist/is-easing-list.es.js");
                var _wrapEs = __webpack_require__( /*! ./wrap.es.js */ "../../../node_modules/@motionone/utils/dist/wrap.es.js");

                function getEasingForSegment(easing, i) {
                    return (0, _isEasingListEs.isEasingList)(easing) ? easing[(0, _wrapEs.wrap)(0, easing.length, i)] : easing;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/index.es.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/index.es.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "addUniqueItem", ({
                    enumerable: true,
                    get: function() {
                        return _arrayEs.addUniqueItem;
                    }
                }));
                Object.defineProperty(exports, "clamp", ({
                    enumerable: true,
                    get: function() {
                        return _clampEs.clamp;
                    }
                }));
                Object.defineProperty(exports, "defaultOffset", ({
                    enumerable: true,
                    get: function() {
                        return _offsetEs.defaultOffset;
                    }
                }));
                Object.defineProperty(exports, "defaults", ({
                    enumerable: true,
                    get: function() {
                        return _defaultsEs.defaults;
                    }
                }));
                Object.defineProperty(exports, "fillOffset", ({
                    enumerable: true,
                    get: function() {
                        return _offsetEs.fillOffset;
                    }
                }));
                Object.defineProperty(exports, "getEasingForSegment", ({
                    enumerable: true,
                    get: function() {
                        return _easingEs.getEasingForSegment;
                    }
                }));
                Object.defineProperty(exports, "interpolate", ({
                    enumerable: true,
                    get: function() {
                        return _interpolateEs.interpolate;
                    }
                }));
                Object.defineProperty(exports, "isCubicBezier", ({
                    enumerable: true,
                    get: function() {
                        return _isCubicBezierEs.isCubicBezier;
                    }
                }));
                Object.defineProperty(exports, "isEasingGenerator", ({
                    enumerable: true,
                    get: function() {
                        return _isEasingGeneratorEs.isEasingGenerator;
                    }
                }));
                Object.defineProperty(exports, "isEasingList", ({
                    enumerable: true,
                    get: function() {
                        return _isEasingListEs.isEasingList;
                    }
                }));
                Object.defineProperty(exports, "isFunction", ({
                    enumerable: true,
                    get: function() {
                        return _isFunctionEs.isFunction;
                    }
                }));
                Object.defineProperty(exports, "isNumber", ({
                    enumerable: true,
                    get: function() {
                        return _isNumberEs.isNumber;
                    }
                }));
                Object.defineProperty(exports, "isString", ({
                    enumerable: true,
                    get: function() {
                        return _isStringEs.isString;
                    }
                }));
                Object.defineProperty(exports, "mix", ({
                    enumerable: true,
                    get: function() {
                        return _mixEs.mix;
                    }
                }));
                Object.defineProperty(exports, "noop", ({
                    enumerable: true,
                    get: function() {
                        return _noopEs.noop;
                    }
                }));
                Object.defineProperty(exports, "noopReturn", ({
                    enumerable: true,
                    get: function() {
                        return _noopEs.noopReturn;
                    }
                }));
                Object.defineProperty(exports, "progress", ({
                    enumerable: true,
                    get: function() {
                        return _progressEs.progress;
                    }
                }));
                Object.defineProperty(exports, "removeItem", ({
                    enumerable: true,
                    get: function() {
                        return _arrayEs.removeItem;
                    }
                }));
                Object.defineProperty(exports, "time", ({
                    enumerable: true,
                    get: function() {
                        return _timeEs.time;
                    }
                }));
                Object.defineProperty(exports, "velocityPerSecond", ({
                    enumerable: true,
                    get: function() {
                        return _velocityEs.velocityPerSecond;
                    }
                }));
                Object.defineProperty(exports, "wrap", ({
                    enumerable: true,
                    get: function() {
                        return _wrapEs.wrap;
                    }
                }));
                var _arrayEs = __webpack_require__( /*! ./array.es.js */ "../../../node_modules/@motionone/utils/dist/array.es.js");
                var _clampEs = __webpack_require__( /*! ./clamp.es.js */ "../../../node_modules/@motionone/utils/dist/clamp.es.js");
                var _defaultsEs = __webpack_require__( /*! ./defaults.es.js */ "../../../node_modules/@motionone/utils/dist/defaults.es.js");
                var _easingEs = __webpack_require__( /*! ./easing.es.js */ "../../../node_modules/@motionone/utils/dist/easing.es.js");
                var _interpolateEs = __webpack_require__( /*! ./interpolate.es.js */ "../../../node_modules/@motionone/utils/dist/interpolate.es.js");
                var _isCubicBezierEs = __webpack_require__( /*! ./is-cubic-bezier.es.js */ "../../../node_modules/@motionone/utils/dist/is-cubic-bezier.es.js");
                var _isEasingGeneratorEs = __webpack_require__( /*! ./is-easing-generator.es.js */ "../../../node_modules/@motionone/utils/dist/is-easing-generator.es.js");
                var _isEasingListEs = __webpack_require__( /*! ./is-easing-list.es.js */ "../../../node_modules/@motionone/utils/dist/is-easing-list.es.js");
                var _isFunctionEs = __webpack_require__( /*! ./is-function.es.js */ "../../../node_modules/@motionone/utils/dist/is-function.es.js");
                var _isNumberEs = __webpack_require__( /*! ./is-number.es.js */ "../../../node_modules/@motionone/utils/dist/is-number.es.js");
                var _isStringEs = __webpack_require__( /*! ./is-string.es.js */ "../../../node_modules/@motionone/utils/dist/is-string.es.js");
                var _mixEs = __webpack_require__( /*! ./mix.es.js */ "../../../node_modules/@motionone/utils/dist/mix.es.js");
                var _noopEs = __webpack_require__( /*! ./noop.es.js */ "../../../node_modules/@motionone/utils/dist/noop.es.js");
                var _offsetEs = __webpack_require__( /*! ./offset.es.js */ "../../../node_modules/@motionone/utils/dist/offset.es.js");
                var _progressEs = __webpack_require__( /*! ./progress.es.js */ "../../../node_modules/@motionone/utils/dist/progress.es.js");
                var _timeEs = __webpack_require__( /*! ./time.es.js */ "../../../node_modules/@motionone/utils/dist/time.es.js");
                var _velocityEs = __webpack_require__( /*! ./velocity.es.js */ "../../../node_modules/@motionone/utils/dist/velocity.es.js");
                var _wrapEs = __webpack_require__( /*! ./wrap.es.js */ "../../../node_modules/@motionone/utils/dist/wrap.es.js");

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/interpolate.es.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/interpolate.es.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.interpolate = interpolate;
                var _mixEs = __webpack_require__( /*! ./mix.es.js */ "../../../node_modules/@motionone/utils/dist/mix.es.js");
                var _noopEs = __webpack_require__( /*! ./noop.es.js */ "../../../node_modules/@motionone/utils/dist/noop.es.js");
                var _offsetEs = __webpack_require__( /*! ./offset.es.js */ "../../../node_modules/@motionone/utils/dist/offset.es.js");
                var _progressEs = __webpack_require__( /*! ./progress.es.js */ "../../../node_modules/@motionone/utils/dist/progress.es.js");
                var _easingEs = __webpack_require__( /*! ./easing.es.js */ "../../../node_modules/@motionone/utils/dist/easing.es.js");
                var _clampEs = __webpack_require__( /*! ./clamp.es.js */ "../../../node_modules/@motionone/utils/dist/clamp.es.js");

                function interpolate(output, input = (0, _offsetEs.defaultOffset)(output.length), easing = _noopEs.noopReturn) {
                    const length = output.length;
                    /**
                     * If the input length is lower than the output we
                     * fill the input to match. This currently assumes the input
                     * is an animation progress value so is a good candidate for
                     * moving outside the function.
                     */
                    const remainder = length - input.length;
                    remainder > 0 && (0, _offsetEs.fillOffset)(input, remainder);
                    return t => {
                        let i = 0;
                        for (; i < length - 2; i++) {
                            if (t < input[i + 1]) break;
                        }
                        let progressInRange = (0, _clampEs.clamp)(0, 1, (0, _progressEs.progress)(input[i], input[i + 1], t));
                        const segmentEasing = (0, _easingEs.getEasingForSegment)(easing, i);
                        progressInRange = segmentEasing(progressInRange);
                        return (0, _mixEs.mix)(output[i], output[i + 1], progressInRange);
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/is-cubic-bezier.es.js":
            /*!*************************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/is-cubic-bezier.es.js ***!
              \*************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isCubicBezier = void 0;
                var _isNumberEs = __webpack_require__( /*! ./is-number.es.js */ "../../../node_modules/@motionone/utils/dist/is-number.es.js");
                const isCubicBezier = easing => Array.isArray(easing) && (0, _isNumberEs.isNumber)(easing[0]);
                exports.isCubicBezier = isCubicBezier;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/is-easing-generator.es.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/is-easing-generator.es.js ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isEasingGenerator = void 0;
                const isEasingGenerator = easing => typeof easing === "object" && Boolean(easing.createAnimation);
                exports.isEasingGenerator = isEasingGenerator;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/is-easing-list.es.js":
            /*!************************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/is-easing-list.es.js ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isEasingList = void 0;
                var _isNumberEs = __webpack_require__( /*! ./is-number.es.js */ "../../../node_modules/@motionone/utils/dist/is-number.es.js");
                const isEasingList = easing => Array.isArray(easing) && !(0, _isNumberEs.isNumber)(easing[0]);
                exports.isEasingList = isEasingList;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/is-function.es.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/is-function.es.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isFunction = void 0;
                const isFunction = value => typeof value === "function";
                exports.isFunction = isFunction;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/is-number.es.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/is-number.es.js ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isNumber = void 0;
                const isNumber = value => typeof value === "number";
                exports.isNumber = isNumber;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/is-string.es.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/is-string.es.js ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isString = void 0;
                const isString = value => typeof value === "string";
                exports.isString = isString;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/mix.es.js":
            /*!*************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/mix.es.js ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.mix = void 0;
                const mix = (min, max, progress) => -progress * min + progress * max + min;
                exports.mix = mix;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/noop.es.js":
            /*!**************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/noop.es.js ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.noopReturn = exports.noop = void 0;
                const noop = () => {};
                exports.noop = noop;
                const noopReturn = v => v;
                exports.noopReturn = noopReturn;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/offset.es.js":
            /*!****************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/offset.es.js ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.defaultOffset = defaultOffset;
                exports.fillOffset = fillOffset;
                var _mixEs = __webpack_require__( /*! ./mix.es.js */ "../../../node_modules/@motionone/utils/dist/mix.es.js");
                var _progressEs = __webpack_require__( /*! ./progress.es.js */ "../../../node_modules/@motionone/utils/dist/progress.es.js");

                function fillOffset(offset, remaining) {
                    const min = offset[offset.length - 1];
                    for (let i = 1; i <= remaining; i++) {
                        const offsetProgress = (0, _progressEs.progress)(0, remaining, i);
                        offset.push((0, _mixEs.mix)(min, 1, offsetProgress));
                    }
                }

                function defaultOffset(length) {
                    const offset = [0];
                    fillOffset(offset, length - 1);
                    return offset;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/progress.es.js":
            /*!******************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/progress.es.js ***!
              \******************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.progress = void 0;
                const progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);
                exports.progress = progress;

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/time.es.js":
            /*!**************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/time.es.js ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.time = void 0;
                const time = exports.time = {
                    ms: seconds => seconds * 1000,
                    s: milliseconds => milliseconds / 1000
                };

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/velocity.es.js":
            /*!******************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/velocity.es.js ***!
              \******************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.velocityPerSecond = velocityPerSecond;
                /*
                  Convert velocity into velocity per second

                  @param [number]: Unit per frame
                  @param [number]: Frame duration in ms
                */
                function velocityPerSecond(velocity, frameDuration) {
                    return frameDuration ? velocity * (1000 / frameDuration) : 0;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@motionone/utils/dist/wrap.es.js":
            /*!**************************************************************!*\
              !*** ../../../node_modules/@motionone/utils/dist/wrap.es.js ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.wrap = void 0;
                const wrap = (min, max, v) => {
                    const rangeSize = max - min;
                    return ((v - min) % rangeSize + rangeSize) % rangeSize + min;
                };
                exports.wrap = wrap;

                /***/
            }),

        /***/
        "../../../node_modules/@n1ru4l/push-pull-async-iterable-iterator/index.js":
            /*!********************************************************************************!*\
              !*** ../../../node_modules/@n1ru4l/push-pull-async-iterable-iterator/index.js ***!
              \********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));

                function createDeferred() {
                    const d = {};
                    d.promise = new Promise((resolve, reject) => {
                        d.resolve = resolve;
                        d.reject = reject;
                    });
                    return d;
                }
                const SYMBOL_FINISHED = Symbol();
                const SYMBOL_NEW_VALUE = Symbol();
                /**
                 * makePushPullAsyncIterableIterator
                 *
                 * The iterable will publish values until return or throw is called.
                 * Afterwards it is in the completed state and cannot be used for publishing any further values.
                 * It will handle back-pressure and keep pushed values until they are consumed by a source.
                 */
                function makePushPullAsyncIterableIterator() {
                    let isRunning = true;
                    const values = [];
                    let newValueD = createDeferred();
                    const finishedD = createDeferred();
                    const asyncIterableIterator = async function* PushPullAsyncIterableIterator() {
                        while (true) {
                            if (values.length > 0) {
                                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                                yield values.shift();
                            } else {
                                const result = await Promise.race([newValueD.promise, finishedD.promise]);
                                if (result === SYMBOL_FINISHED) {
                                    break;
                                }
                                if (result !== SYMBOL_NEW_VALUE) {
                                    throw result;
                                }
                            }
                        }
                    }();

                    function pushValue(value) {
                        if (isRunning === false) {
                            // TODO: Should this throw?
                            return;
                        }
                        values.push(value);
                        newValueD.resolve(SYMBOL_NEW_VALUE);
                        newValueD = createDeferred();
                    }
                    // We monkey patch the original generator for clean-up
                    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                    const originalReturn = asyncIterableIterator.return.bind(asyncIterableIterator);
                    asyncIterableIterator.return = (
                        // eslint-disable-next-line @typescript-eslint/no-explicit-any
                        ...args) => {
                        isRunning = false;
                        finishedD.resolve(SYMBOL_FINISHED);
                        return originalReturn(...args);
                    };
                    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                    const originalThrow = asyncIterableIterator.throw.bind(asyncIterableIterator);
                    asyncIterableIterator.throw = err => {
                        isRunning = false;
                        finishedD.resolve(err);
                        return originalThrow(err);
                    };
                    return {
                        pushValue,
                        asyncIterableIterator
                    };
                }
                const makeAsyncIterableIteratorFromSink = make => {
                    const {
                        pushValue,
                        asyncIterableIterator
                    } = makePushPullAsyncIterableIterator();
                    const dispose = make({
                        next: value => {
                            pushValue(value);
                        },
                        complete: () => {
                            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                            asyncIterableIterator.return();
                        },
                        error: err => {
                            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                            asyncIterableIterator.throw(err);
                        }
                    });
                    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                    const originalReturn = asyncIterableIterator.return;
                    let returnValue = undefined;
                    asyncIterableIterator.return = () => {
                        if (returnValue === undefined) {
                            dispose();
                            returnValue = originalReturn();
                        }
                        return returnValue;
                    };
                    return asyncIterableIterator;
                };

                function applyAsyncIterableIteratorToSink(asyncIterableIterator, sink) {
                    const run = async () => {
                        try {
                            for await (const value of asyncIterableIterator) {
                                sink.next(value);
                            }
                            sink.complete();
                        } catch (err) {
                            sink.error(err);
                        }
                    };
                    run();
                    return () => {
                        var _a;
                        (_a = asyncIterableIterator.return) === null || _a === void 0 ? void 0 : _a.call(asyncIterableIterator);
                    };
                }

                function isAsyncIterable(input) {
                    return typeof input === "object" && input !== null && (
                        // The AsyncGenerator check is for Safari on iOS which currently does not have
                        // Symbol.asyncIterator implemented
                        // That means every custom AsyncIterable must be built using a AsyncGeneratorFunction (async function * () {})
                        // eslint-disable-next-line @typescript-eslint/no-explicit-any
                        input[Symbol.toStringTag] === "AsyncGenerator" || Symbol.asyncIterator && Symbol.asyncIterator in input);
                }
                exports.applyAsyncIterableIteratorToSink = applyAsyncIterableIteratorToSink;
                exports.isAsyncIterable = isAsyncIterable;
                exports.makeAsyncIterableIteratorFromSink = makeAsyncIterableIteratorFromSink;
                exports.makePushPullAsyncIterableIterator = makePushPullAsyncIterableIterator;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/primitive/dist/index.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/@radix-ui/primitive/dist/index.js ***!
              \***************************************************************/
            /***/
            (function(module) {

                "use strict";


                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "composeEventHandlers", () => $1a6a90a521dcd173$export$b9ecd428b558ff10);

                function $1a6a90a521dcd173$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, {
                    checkForDefaultPrevented = true
                } = {}) {
                    return function handleEvent(event) {
                        originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
                        if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-arrow/dist/index.js":
            /*!*****************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-arrow/dist/index.js ***!
              \*****************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $eQpDd$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $eQpDd$react = __webpack_require__( /*! react */ "react");
                var $eQpDd$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "Arrow", () => $09f4ad68a9251bc3$export$21b07c8f274aebd5);
                $parcel$export(module.exports, "Root", () => $09f4ad68a9251bc3$export$be92b6f5f03c0fe9);

                /* -------------------------------------------------------------------------------------------------
                 * Arrow
                 * -----------------------------------------------------------------------------------------------*/
                const $09f4ad68a9251bc3$var$NAME = 'Arrow';
                const $09f4ad68a9251bc3$export$21b07c8f274aebd5 = /*#__PURE__*/ $eQpDd$react.forwardRef((props, forwardedRef) => {
                    const {
                        children: children,
                        width = 10,
                        height = 5,
                        ...arrowProps
                    } = props;
                    return /*#__PURE__*/ $eQpDd$react.createElement($eQpDd$radixuireactprimitive.Primitive.svg, $parcel$interopDefault($eQpDd$babelruntimehelpersextends)({}, arrowProps, {
                        ref: forwardedRef,
                        width: width,
                        height: height,
                        viewBox: "0 0 30 10",
                        preserveAspectRatio: "none"
                    }), props.asChild ? children : /*#__PURE__*/ $eQpDd$react.createElement("polygon", {
                        points: "0,0 30,0 15,10"
                    }));
                });
                /*#__PURE__*/
                Object.assign($09f4ad68a9251bc3$export$21b07c8f274aebd5, {
                    displayName: $09f4ad68a9251bc3$var$NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                const $09f4ad68a9251bc3$export$be92b6f5f03c0fe9 = $09f4ad68a9251bc3$export$21b07c8f274aebd5;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-collection/dist/index.js":
            /*!**********************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-collection/dist/index.js ***!
              \**********************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $hnlpS$react = __webpack_require__( /*! react */ "react");
                var $hnlpS$radixuireactcontext = __webpack_require__( /*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
                var $hnlpS$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $hnlpS$radixuireactslot = __webpack_require__( /*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "createCollection", () => $1a96635ec239608b$export$c74125a8e3af6bb2);

                // We have resorted to returning slots directly rather than exposing primitives that can then
                // be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.
                // This is because we encountered issues with generic types that cannot be statically analysed
                // due to creating them dynamically via createCollection.
                function $1a96635ec239608b$export$c74125a8e3af6bb2(name) {
                    /* -----------------------------------------------------------------------------------------------
                     * CollectionProvider
                     * ---------------------------------------------------------------------------------------------*/
                    const PROVIDER_NAME = name + 'CollectionProvider';
                    const [createCollectionContext, createCollectionScope] = $hnlpS$radixuireactcontext.createContextScope(PROVIDER_NAME);
                    const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
                        collectionRef: {
                            current: null
                        },
                        itemMap: new Map()
                    });
                    const CollectionProvider = props => {
                        const {
                            scope: scope,
                            children: children
                        } = props;
                        const ref = $parcel$interopDefault($hnlpS$react).useRef(null);
                        const itemMap = $parcel$interopDefault($hnlpS$react).useRef(new Map()).current;
                        return /*#__PURE__*/ $parcel$interopDefault($hnlpS$react).createElement(CollectionProviderImpl, {
                            scope: scope,
                            itemMap: itemMap,
                            collectionRef: ref
                        }, children);
                    };
                    /*#__PURE__*/
                    Object.assign(CollectionProvider, {
                        displayName: PROVIDER_NAME
                    });
                    /* -----------------------------------------------------------------------------------------------
                     * CollectionSlot
                     * ---------------------------------------------------------------------------------------------*/
                    const COLLECTION_SLOT_NAME = name + 'CollectionSlot';
                    const CollectionSlot = /*#__PURE__*/ $parcel$interopDefault($hnlpS$react).forwardRef((props, forwardedRef) => {
                        const {
                            scope: scope,
                            children: children
                        } = props;
                        const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
                        const composedRefs = $hnlpS$radixuireactcomposerefs.useComposedRefs(forwardedRef, context.collectionRef);
                        return /*#__PURE__*/ $parcel$interopDefault($hnlpS$react).createElement($hnlpS$radixuireactslot.Slot, {
                            ref: composedRefs
                        }, children);
                    });
                    /*#__PURE__*/
                    Object.assign(CollectionSlot, {
                        displayName: COLLECTION_SLOT_NAME
                    });
                    /* -----------------------------------------------------------------------------------------------
                     * CollectionItem
                     * ---------------------------------------------------------------------------------------------*/
                    const ITEM_SLOT_NAME = name + 'CollectionItemSlot';
                    const ITEM_DATA_ATTR = 'data-radix-collection-item';
                    const CollectionItemSlot = /*#__PURE__*/ $parcel$interopDefault($hnlpS$react).forwardRef((props, forwardedRef) => {
                        const {
                            scope: scope,
                            children: children,
                            ...itemData
                        } = props;
                        const ref = $parcel$interopDefault($hnlpS$react).useRef(null);
                        const composedRefs = $hnlpS$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
                        const context = useCollectionContext(ITEM_SLOT_NAME, scope);
                        $parcel$interopDefault($hnlpS$react).useEffect(() => {
                            context.itemMap.set(ref, {
                                ref: ref,
                                ...itemData
                            });
                            return () => void context.itemMap.delete(ref);
                        });
                        return /*#__PURE__*/ $parcel$interopDefault($hnlpS$react).createElement($hnlpS$radixuireactslot.Slot, {
                            [ITEM_DATA_ATTR]: '',
                            ref: composedRefs
                        }, children);
                    });
                    /*#__PURE__*/
                    Object.assign(CollectionItemSlot, {
                        displayName: ITEM_SLOT_NAME
                    });
                    /* -----------------------------------------------------------------------------------------------
                     * useCollection
                     * ---------------------------------------------------------------------------------------------*/
                    function useCollection(scope) {
                        const context = useCollectionContext(name + 'CollectionConsumer', scope);
                        const getItems = $parcel$interopDefault($hnlpS$react).useCallback(() => {
                            const collectionNode = context.collectionRef.current;
                            if (!collectionNode) return [];
                            const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
                            const items = Array.from(context.itemMap.values());
                            const orderedItems = items.sort((a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current));
                            return orderedItems;
                        }, [context.collectionRef, context.itemMap]);
                        return getItems;
                    }
                    return [{
                        Provider: CollectionProvider,
                        Slot: CollectionSlot,
                        ItemSlot: CollectionItemSlot
                    }, useCollection, createCollectionScope];
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js":
            /*!************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-compose-refs/dist/index.js ***!
              \************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $dJwbH$react = __webpack_require__( /*! react */ "react");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "composeRefs", () => $9c2aaba23466b352$export$43e446d32b3d21af);
                $parcel$export(module.exports, "useComposedRefs", () => $9c2aaba23466b352$export$c7b2cbe3552a0d05);

                /**
                 * Set a given ref to a given value
                 * This utility takes care of different types of refs: callback refs and RefObject(s)
                 */
                function $9c2aaba23466b352$var$setRef(ref, value) {
                    if (typeof ref === 'function') ref(value);
                    else if (ref !== null && ref !== undefined) ref.current = value;
                }
                /**
                 * A utility to compose multiple refs together
                 * Accepts callback refs and RefObject(s)
                 */
                function $9c2aaba23466b352$export$43e446d32b3d21af(...refs) {
                    return node => refs.forEach(ref => $9c2aaba23466b352$var$setRef(ref, node));
                }
                /**
                 * A custom hook that composes multiple refs
                 * Accepts callback refs and RefObject(s)
                 */
                function $9c2aaba23466b352$export$c7b2cbe3552a0d05(...refs) {
                    // eslint-disable-next-line react-hooks/exhaustive-deps
                    return $dJwbH$react.useCallback($9c2aaba23466b352$export$43e446d32b3d21af(...refs), refs);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-context/dist/index.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-context/dist/index.js ***!
              \*******************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $4O1Ne$react = __webpack_require__( /*! react */ "react");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "createContext", () => $dec3cc0142d4f286$export$fd42f52fd3ae1109);
                $parcel$export(module.exports, "createContextScope", () => $dec3cc0142d4f286$export$50c7b4e9d9f19c1);

                function $dec3cc0142d4f286$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
                    const Context = /*#__PURE__*/ $4O1Ne$react.createContext(defaultContext);

                    function Provider(props) {
                        const {
                            children: children,
                            ...context
                        } = props; // Only re-memoize when prop values change
                        // eslint-disable-next-line react-hooks/exhaustive-deps
                        const value = $4O1Ne$react.useMemo(() => context, Object.values(context));
                        return /*#__PURE__*/ $4O1Ne$react.createElement(Context.Provider, {
                            value: value
                        }, children);
                    }

                    function useContext(consumerName) {
                        const context = $4O1Ne$react.useContext(Context);
                        if (context) return context;
                        if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
                        throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
                    }
                    Provider.displayName = rootComponentName + 'Provider';
                    return [Provider, useContext];
                }
                /* -------------------------------------------------------------------------------------------------
                 * createContextScope
                 * -----------------------------------------------------------------------------------------------*/
                function $dec3cc0142d4f286$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
                    let defaultContexts = [];
                    /* -----------------------------------------------------------------------------------------------
                     * createContext
                     * ---------------------------------------------------------------------------------------------*/
                    function $dec3cc0142d4f286$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
                        const BaseContext = /*#__PURE__*/ $4O1Ne$react.createContext(defaultContext);
                        const index = defaultContexts.length;
                        defaultContexts = [...defaultContexts, defaultContext];

                        function Provider(props) {
                            const {
                                scope: scope,
                                children: children,
                                ...context
                            } = props;
                            const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change
                            // eslint-disable-next-line react-hooks/exhaustive-deps
                            const value = $4O1Ne$react.useMemo(() => context, Object.values(context));
                            return /*#__PURE__*/ $4O1Ne$react.createElement(Context.Provider, {
                                value: value
                            }, children);
                        }

                        function useContext(consumerName, scope) {
                            const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
                            const context = $4O1Ne$react.useContext(Context);
                            if (context) return context;
                            if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
                            throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
                        }
                        Provider.displayName = rootComponentName + 'Provider';
                        return [Provider, useContext];
                    }
                    /* -----------------------------------------------------------------------------------------------
                     * createScope
                     * ---------------------------------------------------------------------------------------------*/
                    const createScope = () => {
                        const scopeContexts = defaultContexts.map(defaultContext => {
                            return /*#__PURE__*/ $4O1Ne$react.createContext(defaultContext);
                        });
                        return function useScope(scope) {
                            const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
                            return $4O1Ne$react.useMemo(() => ({
                                [`__scope${scopeName}`]: {
                                    ...scope,
                                    [scopeName]: contexts
                                }
                            }), [scope, contexts]);
                        };
                    };
                    createScope.scopeName = scopeName;
                    return [$dec3cc0142d4f286$export$fd42f52fd3ae1109, $dec3cc0142d4f286$var$composeContextScopes(createScope, ...createContextScopeDeps)];
                }
                /* -------------------------------------------------------------------------------------------------
                 * composeContextScopes
                 * -----------------------------------------------------------------------------------------------*/
                function $dec3cc0142d4f286$var$composeContextScopes(...scopes) {
                    const baseScope = scopes[0];
                    if (scopes.length === 1) return baseScope;
                    const createScope1 = () => {
                        const scopeHooks = scopes.map(createScope => ({
                            useScope: createScope(),
                            scopeName: createScope.scopeName
                        }));
                        return function useComposedScopes(overrideScopes) {
                            const nextScopes1 = scopeHooks.reduce((nextScopes, {
                                useScope: useScope,
                                scopeName: scopeName
                            }) => {
                                // We are calling a hook inside a callback which React warns against to avoid inconsistent
                                // renders, however, scoping doesn't have render side effects so we ignore the rule.
                                // eslint-disable-next-line react-hooks/rules-of-hooks
                                const scopeProps = useScope(overrideScopes);
                                const currentScope = scopeProps[`__scope${scopeName}`];
                                return {
                                    ...nextScopes,
                                    ...currentScope
                                };
                            }, {});
                            return $4O1Ne$react.useMemo(() => ({
                                [`__scope${baseScope.scopeName}`]: nextScopes1
                            }), [nextScopes1]);
                        };
                    };
                    createScope1.scopeName = baseScope.scopeName;
                    return createScope1;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-dialog/dist/index.js":
            /*!******************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-dialog/dist/index.js ***!
              \******************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $aJCrN$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $aJCrN$react = __webpack_require__( /*! react */ "react");
                var $aJCrN$radixuiprimitive = __webpack_require__( /*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
                var $aJCrN$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $aJCrN$radixuireactcontext = __webpack_require__( /*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
                var $aJCrN$radixuireactid = __webpack_require__( /*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");
                var $aJCrN$radixuireactusecontrollablestate = __webpack_require__( /*! @radix-ui/react-use-controllable-state */ "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js");
                var $aJCrN$radixuireactdismissablelayer = __webpack_require__( /*! @radix-ui/react-dismissable-layer */ "../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js");
                var $aJCrN$radixuireactfocusscope = __webpack_require__( /*! @radix-ui/react-focus-scope */ "../../../node_modules/@radix-ui/react-focus-scope/dist/index.js");
                var $aJCrN$radixuireactportal = __webpack_require__( /*! @radix-ui/react-portal */ "../../../node_modules/@radix-ui/react-portal/dist/index.js");
                var $aJCrN$radixuireactpresence = __webpack_require__( /*! @radix-ui/react-presence */ "../../../node_modules/@radix-ui/react-presence/dist/index.js");
                var $aJCrN$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
                var $aJCrN$radixuireactfocusguards = __webpack_require__( /*! @radix-ui/react-focus-guards */ "../../../node_modules/@radix-ui/react-focus-guards/dist/index.js");
                var $aJCrN$reactremovescroll = __webpack_require__( /*! react-remove-scroll */ "../../../node_modules/react-remove-scroll/dist/es2015/index.js");
                var $aJCrN$ariahidden = __webpack_require__( /*! aria-hidden */ "../../../node_modules/aria-hidden/dist/es2015/index.js");
                var $aJCrN$radixuireactslot = __webpack_require__( /*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "createDialogScope", () => $f4833395aa1bca1a$export$cc702773b8ea3e41);
                $parcel$export(module.exports, "Dialog", () => $f4833395aa1bca1a$export$3ddf2d174ce01153);
                $parcel$export(module.exports, "DialogTrigger", () => $f4833395aa1bca1a$export$2e1e1122cf0cba88);
                $parcel$export(module.exports, "DialogPortal", () => $f4833395aa1bca1a$export$dad7c95542bacce0);
                $parcel$export(module.exports, "DialogOverlay", () => $f4833395aa1bca1a$export$bd1d06c79be19e17);
                $parcel$export(module.exports, "DialogContent", () => $f4833395aa1bca1a$export$b6d9565de1e068cf);
                $parcel$export(module.exports, "DialogTitle", () => $f4833395aa1bca1a$export$16f7638e4a34b909);
                $parcel$export(module.exports, "DialogDescription", () => $f4833395aa1bca1a$export$94e94c2ec2c954d5);
                $parcel$export(module.exports, "DialogClose", () => $f4833395aa1bca1a$export$fba2fb7cd781b7ac);
                $parcel$export(module.exports, "Root", () => $f4833395aa1bca1a$export$be92b6f5f03c0fe9);
                $parcel$export(module.exports, "Trigger", () => $f4833395aa1bca1a$export$41fb9f06171c75f4);
                $parcel$export(module.exports, "Portal", () => $f4833395aa1bca1a$export$602eac185826482c);
                $parcel$export(module.exports, "Overlay", () => $f4833395aa1bca1a$export$c6fdb837b070b4ff);
                $parcel$export(module.exports, "Content", () => $f4833395aa1bca1a$export$7c6e2c02157bb7d2);
                $parcel$export(module.exports, "Title", () => $f4833395aa1bca1a$export$f99233281efd08a0);
                $parcel$export(module.exports, "Description", () => $f4833395aa1bca1a$export$393edc798c47379d);
                $parcel$export(module.exports, "Close", () => $f4833395aa1bca1a$export$f39c2d165cd861fe);
                $parcel$export(module.exports, "WarningProvider", () => $f4833395aa1bca1a$export$69b62a49393917d6);

                /* -------------------------------------------------------------------------------------------------
                 * Dialog
                 * -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$DIALOG_NAME = 'Dialog';
                const [$f4833395aa1bca1a$var$createDialogContext, $f4833395aa1bca1a$export$cc702773b8ea3e41] = $aJCrN$radixuireactcontext.createContextScope($f4833395aa1bca1a$var$DIALOG_NAME);
                const [$f4833395aa1bca1a$var$DialogProvider, $f4833395aa1bca1a$var$useDialogContext] = $f4833395aa1bca1a$var$createDialogContext($f4833395aa1bca1a$var$DIALOG_NAME);
                const $f4833395aa1bca1a$export$3ddf2d174ce01153 = props => {
                    const {
                        __scopeDialog: __scopeDialog,
                        children: children,
                        open: openProp,
                        defaultOpen: defaultOpen,
                        onOpenChange: onOpenChange,
                        modal = true
                    } = props;
                    const triggerRef = $aJCrN$react.useRef(null);
                    const contentRef = $aJCrN$react.useRef(null);
                    const [open = false, setOpen] = $aJCrN$radixuireactusecontrollablestate.useControllableState({
                        prop: openProp,
                        defaultProp: defaultOpen,
                        onChange: onOpenChange
                    });
                    return /*#__PURE__*/ $aJCrN$react.createElement($f4833395aa1bca1a$var$DialogProvider, {
                        scope: __scopeDialog,
                        triggerRef: triggerRef,
                        contentRef: contentRef,
                        contentId: $aJCrN$radixuireactid.useId(),
                        titleId: $aJCrN$radixuireactid.useId(),
                        descriptionId: $aJCrN$radixuireactid.useId(),
                        open: open,
                        onOpenChange: setOpen,
                        onOpenToggle: $aJCrN$react.useCallback(() => setOpen(prevOpen => !prevOpen), [setOpen]),
                        modal: modal
                    }, children);
                };
                /*#__PURE__*/
                Object.assign($f4833395aa1bca1a$export$3ddf2d174ce01153, {
                    displayName: $f4833395aa1bca1a$var$DIALOG_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DialogTrigger
                 * -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$TRIGGER_NAME = 'DialogTrigger';
                const $f4833395aa1bca1a$export$2e1e1122cf0cba88 = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDialog: __scopeDialog,
                        ...triggerProps
                    } = props;
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$TRIGGER_NAME, __scopeDialog);
                    const composedTriggerRef = $aJCrN$radixuireactcomposerefs.useComposedRefs(forwardedRef, context.triggerRef);
                    return /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.button, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
                        type: "button",
                        "aria-haspopup": "dialog",
                        "aria-expanded": context.open,
                        "aria-controls": context.contentId,
                        "data-state": $f4833395aa1bca1a$var$getState(context.open)
                    }, triggerProps, {
                        ref: composedTriggerRef,
                        onClick: $aJCrN$radixuiprimitive.composeEventHandlers(props.onClick, context.onOpenToggle)
                    }));
                });
                /*#__PURE__*/
                Object.assign($f4833395aa1bca1a$export$2e1e1122cf0cba88, {
                    displayName: $f4833395aa1bca1a$var$TRIGGER_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DialogPortal
                 * -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$PORTAL_NAME = 'DialogPortal';
                const [$f4833395aa1bca1a$var$PortalProvider, $f4833395aa1bca1a$var$usePortalContext] = $f4833395aa1bca1a$var$createDialogContext($f4833395aa1bca1a$var$PORTAL_NAME, {
                    forceMount: undefined
                });
                const $f4833395aa1bca1a$export$dad7c95542bacce0 = props => {
                    const {
                        __scopeDialog: __scopeDialog,
                        forceMount: forceMount,
                        children: children,
                        container: container
                    } = props;
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$PORTAL_NAME, __scopeDialog);
                    return /*#__PURE__*/ $aJCrN$react.createElement($f4833395aa1bca1a$var$PortalProvider, {
                        scope: __scopeDialog,
                        forceMount: forceMount
                    }, $aJCrN$react.Children.map(children, child => /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactpresence.Presence, {
                        present: forceMount || context.open
                    }, /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactportal.Portal, {
                        asChild: true,
                        container: container
                    }, child))));
                };
                /*#__PURE__*/
                Object.assign($f4833395aa1bca1a$export$dad7c95542bacce0, {
                    displayName: $f4833395aa1bca1a$var$PORTAL_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DialogOverlay
                 * -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$OVERLAY_NAME = 'DialogOverlay';
                const $f4833395aa1bca1a$export$bd1d06c79be19e17 = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const portalContext = $f4833395aa1bca1a$var$usePortalContext($f4833395aa1bca1a$var$OVERLAY_NAME, props.__scopeDialog);
                    const {
                        forceMount = portalContext.forceMount,
                            ...overlayProps
                    } = props;
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$OVERLAY_NAME, props.__scopeDialog);
                    return context.modal ? /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactpresence.Presence, {
                        present: forceMount || context.open
                    }, /*#__PURE__*/ $aJCrN$react.createElement($f4833395aa1bca1a$var$DialogOverlayImpl, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, overlayProps, {
                        ref: forwardedRef
                    }))) : null;
                });
                /*#__PURE__*/
                Object.assign($f4833395aa1bca1a$export$bd1d06c79be19e17, {
                    displayName: $f4833395aa1bca1a$var$OVERLAY_NAME
                });
                const $f4833395aa1bca1a$var$DialogOverlayImpl = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDialog: __scopeDialog,
                        ...overlayProps
                    } = props;
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$OVERLAY_NAME, __scopeDialog);
                    return /*#__PURE__*/ ( // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
                        // ie. when `Overlay` and `Content` are siblings
                        $aJCrN$react.createElement($aJCrN$reactremovescroll.RemoveScroll, {
                            as: $aJCrN$radixuireactslot.Slot,
                            allowPinchZoom: true,
                            shards: [context.contentRef]
                        }, /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.div, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
                            "data-state": $f4833395aa1bca1a$var$getState(context.open)
                        }, overlayProps, {
                            ref: forwardedRef // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
                                ,

                            style: {
                                pointerEvents: 'auto',
                                ...overlayProps.style
                            }
                        })))
                    );
                });
                /* -------------------------------------------------------------------------------------------------
                 * DialogContent
                 * -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$CONTENT_NAME = 'DialogContent';
                const $f4833395aa1bca1a$export$b6d9565de1e068cf = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const portalContext = $f4833395aa1bca1a$var$usePortalContext($f4833395aa1bca1a$var$CONTENT_NAME, props.__scopeDialog);
                    const {
                        forceMount = portalContext.forceMount,
                            ...contentProps
                    } = props;
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CONTENT_NAME, props.__scopeDialog);
                    return /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactpresence.Presence, {
                        present: forceMount || context.open
                    }, context.modal ? /*#__PURE__*/ $aJCrN$react.createElement($f4833395aa1bca1a$var$DialogContentModal, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, contentProps, {
                        ref: forwardedRef
                    })) : /*#__PURE__*/ $aJCrN$react.createElement($f4833395aa1bca1a$var$DialogContentNonModal, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, contentProps, {
                        ref: forwardedRef
                    })));
                });
                /*#__PURE__*/
                Object.assign($f4833395aa1bca1a$export$b6d9565de1e068cf, {
                    displayName: $f4833395aa1bca1a$var$CONTENT_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$DialogContentModal = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CONTENT_NAME, props.__scopeDialog);
                    const contentRef = $aJCrN$react.useRef(null);
                    const composedRefs = $aJCrN$radixuireactcomposerefs.useComposedRefs(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
                    $aJCrN$react.useEffect(() => {
                        const content = contentRef.current;
                        if (content) return $aJCrN$ariahidden.hideOthers(content);
                    }, []);
                    return /*#__PURE__*/ $aJCrN$react.createElement($f4833395aa1bca1a$var$DialogContentImpl, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, props, {
                        ref: composedRefs // we make sure focus isn't trapped once `DialogContent` has been closed
                            ,

                        trapFocus: context.open,
                        disableOutsidePointerEvents: true,
                        onCloseAutoFocus: $aJCrN$radixuiprimitive.composeEventHandlers(props.onCloseAutoFocus, event => {
                            var _context$triggerRef$c;
                            event.preventDefault();
                            (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
                        }),
                        onPointerDownOutside: $aJCrN$radixuiprimitive.composeEventHandlers(props.onPointerDownOutside, event => {
                                const originalEvent = event.detail.originalEvent;
                                const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
                                const isRightClick = originalEvent.button === 2 || ctrlLeftClick; // If the event is a right-click, we shouldn't close because
                                // it is effectively as if we right-clicked the `Overlay`.
                                if (isRightClick) event.preventDefault();
                            }) // When focus is trapped, a `focusout` event may still happen.
                            ,

                        onFocusOutside: $aJCrN$radixuiprimitive.composeEventHandlers(props.onFocusOutside, event => event.preventDefault())
                    }));
                });
                /* -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$DialogContentNonModal = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CONTENT_NAME, props.__scopeDialog);
                    const hasInteractedOutsideRef = $aJCrN$react.useRef(false);
                    const hasPointerDownOutsideRef = $aJCrN$react.useRef(false);
                    return /*#__PURE__*/ $aJCrN$react.createElement($f4833395aa1bca1a$var$DialogContentImpl, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, props, {
                        ref: forwardedRef,
                        trapFocus: false,
                        disableOutsidePointerEvents: false,
                        onCloseAutoFocus: event => {
                            var _props$onCloseAutoFoc;
                            (_props$onCloseAutoFoc = props.onCloseAutoFocus) === null || _props$onCloseAutoFoc === void 0 || _props$onCloseAutoFoc.call(props, event);
                            if (!event.defaultPrevented) {
                                var _context$triggerRef$c2;
                                if (!hasInteractedOutsideRef.current)(_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus
                                event.preventDefault();
                            }
                            hasInteractedOutsideRef.current = false;
                            hasPointerDownOutsideRef.current = false;
                        },
                        onInteractOutside: event => {
                            var _props$onInteractOuts, _context$triggerRef$c3;
                            (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);
                            if (!event.defaultPrevented) {
                                hasInteractedOutsideRef.current = true;
                                if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true;
                            } // Prevent dismissing when clicking the trigger.
                            // As the trigger is already setup to close, without doing so would
                            // cause it to close and immediately open.
                            const target = event.target;
                            const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target);
                            if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked
                            // we will get the pointer down outside event on the trigger, but then a subsequent
                            // focus outside event on the container, we ignore any focus outside event when we've
                            // already had a pointer down outside event.
                            if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault();
                        }
                    }));
                });
                /* -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$DialogContentImpl = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDialog: __scopeDialog,
                        trapFocus: trapFocus,
                        onOpenAutoFocus: onOpenAutoFocus,
                        onCloseAutoFocus: onCloseAutoFocus,
                        ...contentProps
                    } = props;
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CONTENT_NAME, __scopeDialog);
                    const contentRef = $aJCrN$react.useRef(null);
                    const composedRefs = $aJCrN$radixuireactcomposerefs.useComposedRefs(forwardedRef, contentRef); // Make sure the whole tree has focus guards as our `Dialog` will be
                    // the last element in the DOM (beacuse of the `Portal`)
                    $aJCrN$radixuireactfocusguards.useFocusGuards();
                    return /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$react.Fragment, null, /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactfocusscope.FocusScope, {
                        asChild: true,
                        loop: true,
                        trapped: trapFocus,
                        onMountAutoFocus: onOpenAutoFocus,
                        onUnmountAutoFocus: onCloseAutoFocus
                    }, /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactdismissablelayer.DismissableLayer, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
                        role: "dialog",
                        id: context.contentId,
                        "aria-describedby": context.descriptionId,
                        "aria-labelledby": context.titleId,
                        "data-state": $f4833395aa1bca1a$var$getState(context.open)
                    }, contentProps, {
                        ref: composedRefs,
                        onDismiss: () => context.onOpenChange(false)
                    }))), false);
                });
                /* -------------------------------------------------------------------------------------------------
                 * DialogTitle
                 * -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$TITLE_NAME = 'DialogTitle';
                const $f4833395aa1bca1a$export$16f7638e4a34b909 = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDialog: __scopeDialog,
                        ...titleProps
                    } = props;
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$TITLE_NAME, __scopeDialog);
                    return /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.h2, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
                        id: context.titleId
                    }, titleProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($f4833395aa1bca1a$export$16f7638e4a34b909, {
                    displayName: $f4833395aa1bca1a$var$TITLE_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DialogDescription
                 * -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$DESCRIPTION_NAME = 'DialogDescription';
                const $f4833395aa1bca1a$export$94e94c2ec2c954d5 = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDialog: __scopeDialog,
                        ...descriptionProps
                    } = props;
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$DESCRIPTION_NAME, __scopeDialog);
                    return /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.p, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
                        id: context.descriptionId
                    }, descriptionProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($f4833395aa1bca1a$export$94e94c2ec2c954d5, {
                    displayName: $f4833395aa1bca1a$var$DESCRIPTION_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DialogClose
                 * -----------------------------------------------------------------------------------------------*/
                const $f4833395aa1bca1a$var$CLOSE_NAME = 'DialogClose';
                const $f4833395aa1bca1a$export$fba2fb7cd781b7ac = /*#__PURE__*/ $aJCrN$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDialog: __scopeDialog,
                        ...closeProps
                    } = props;
                    const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CLOSE_NAME, __scopeDialog);
                    return /*#__PURE__*/ $aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.button, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
                        type: "button"
                    }, closeProps, {
                        ref: forwardedRef,
                        onClick: $aJCrN$radixuiprimitive.composeEventHandlers(props.onClick, () => context.onOpenChange(false))
                    }));
                });
                /*#__PURE__*/
                Object.assign($f4833395aa1bca1a$export$fba2fb7cd781b7ac, {
                    displayName: $f4833395aa1bca1a$var$CLOSE_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                function $f4833395aa1bca1a$var$getState(open) {
                    return open ? 'open' : 'closed';
                }
                const $f4833395aa1bca1a$var$TITLE_WARNING_NAME = 'DialogTitleWarning';
                const [$f4833395aa1bca1a$export$69b62a49393917d6, $f4833395aa1bca1a$var$useWarningContext] = $aJCrN$radixuireactcontext.createContext($f4833395aa1bca1a$var$TITLE_WARNING_NAME, {
                    contentName: $f4833395aa1bca1a$var$CONTENT_NAME,
                    titleName: $f4833395aa1bca1a$var$TITLE_NAME,
                    docsSlug: 'dialog'
                });
                const $f4833395aa1bca1a$var$TitleWarning = ({
                    titleId: titleId
                }) => {
                    const titleWarningContext = $f4833395aa1bca1a$var$useWarningContext($f4833395aa1bca1a$var$TITLE_WARNING_NAME);
                    const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
                    $aJCrN$react.useEffect(() => {
                        if (titleId) {
                            const hasTitle = document.getElementById(titleId);
                            if (!hasTitle) throw new Error(MESSAGE);
                        }
                    }, [MESSAGE, titleId]);
                    return null;
                };
                const $f4833395aa1bca1a$var$DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';
                const $f4833395aa1bca1a$var$DescriptionWarning = ({
                    contentRef: contentRef,
                    descriptionId: descriptionId
                }) => {
                    const descriptionWarningContext = $f4833395aa1bca1a$var$useWarningContext($f4833395aa1bca1a$var$DESCRIPTION_WARNING_NAME);
                    const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
                    $aJCrN$react.useEffect(() => {
                        var _contentRef$current;
                        const describedById = (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.getAttribute('aria-describedby'); // if we have an id and the user hasn't set aria-describedby={undefined}
                        if (descriptionId && describedById) {
                            const hasDescription = document.getElementById(descriptionId);
                            if (!hasDescription) console.warn(MESSAGE);
                        }
                    }, [MESSAGE, contentRef, descriptionId]);
                    return null;
                };
                const $f4833395aa1bca1a$export$be92b6f5f03c0fe9 = $f4833395aa1bca1a$export$3ddf2d174ce01153;
                const $f4833395aa1bca1a$export$41fb9f06171c75f4 = $f4833395aa1bca1a$export$2e1e1122cf0cba88;
                const $f4833395aa1bca1a$export$602eac185826482c = $f4833395aa1bca1a$export$dad7c95542bacce0;
                const $f4833395aa1bca1a$export$c6fdb837b070b4ff = $f4833395aa1bca1a$export$bd1d06c79be19e17;
                const $f4833395aa1bca1a$export$7c6e2c02157bb7d2 = $f4833395aa1bca1a$export$b6d9565de1e068cf;
                const $f4833395aa1bca1a$export$f99233281efd08a0 = $f4833395aa1bca1a$export$16f7638e4a34b909;
                const $f4833395aa1bca1a$export$393edc798c47379d = $f4833395aa1bca1a$export$94e94c2ec2c954d5;
                const $f4833395aa1bca1a$export$f39c2d165cd861fe = $f4833395aa1bca1a$export$fba2fb7cd781b7ac;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-direction/dist/index.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-direction/dist/index.js ***!
              \*********************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $9g4ps$react = __webpack_require__( /*! react */ "react");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "useDirection", () => $cc45c1b701a63adc$export$b39126d51d94e6f3);
                $parcel$export(module.exports, "Provider", () => $cc45c1b701a63adc$export$2881499e37b75b9a);
                $parcel$export(module.exports, "DirectionProvider", () => $cc45c1b701a63adc$export$c760c09fdd558351);
                const $cc45c1b701a63adc$var$DirectionContext = /*#__PURE__*/ $9g4ps$react.createContext(undefined);
                /* -------------------------------------------------------------------------------------------------
                 * Direction
                 * -----------------------------------------------------------------------------------------------*/
                const $cc45c1b701a63adc$export$c760c09fdd558351 = props => {
                    const {
                        dir: dir,
                        children: children
                    } = props;
                    return /*#__PURE__*/ $9g4ps$react.createElement($cc45c1b701a63adc$var$DirectionContext.Provider, {
                        value: dir
                    }, children);
                };
                /* -----------------------------------------------------------------------------------------------*/
                function $cc45c1b701a63adc$export$b39126d51d94e6f3(localDir) {
                    const globalDir = $9g4ps$react.useContext($cc45c1b701a63adc$var$DirectionContext);
                    return localDir || globalDir || 'ltr';
                }
                const $cc45c1b701a63adc$export$2881499e37b75b9a = $cc45c1b701a63adc$export$c760c09fdd558351;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js ***!
              \*****************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $g2vWm$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $g2vWm$react = __webpack_require__( /*! react */ "react");
                var $g2vWm$radixuiprimitive = __webpack_require__( /*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
                var $g2vWm$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
                var $g2vWm$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $g2vWm$radixuireactusecallbackref = __webpack_require__( /*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
                var $g2vWm$radixuireactuseescapekeydown = __webpack_require__( /*! @radix-ui/react-use-escape-keydown */ "../../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "DismissableLayer", () => $d715e0554b679f1f$export$177fb62ff3ec1f22);
                $parcel$export(module.exports, "DismissableLayerBranch", () => $d715e0554b679f1f$export$4d5eb2109db14228);
                $parcel$export(module.exports, "Root", () => $d715e0554b679f1f$export$be92b6f5f03c0fe9);
                $parcel$export(module.exports, "Branch", () => $d715e0554b679f1f$export$aecb2ddcb55c95be);

                /* -------------------------------------------------------------------------------------------------
                 * DismissableLayer
                 * -----------------------------------------------------------------------------------------------*/
                const $d715e0554b679f1f$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';
                const $d715e0554b679f1f$var$CONTEXT_UPDATE = 'dismissableLayer.update';
                const $d715e0554b679f1f$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
                const $d715e0554b679f1f$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
                let $d715e0554b679f1f$var$originalBodyPointerEvents;
                const $d715e0554b679f1f$var$DismissableLayerContext = /*#__PURE__*/ $g2vWm$react.createContext({
                    layers: new Set(),
                    layersWithOutsidePointerEventsDisabled: new Set(),
                    branches: new Set()
                });
                const $d715e0554b679f1f$export$177fb62ff3ec1f22 = /*#__PURE__*/ $g2vWm$react.forwardRef((props, forwardedRef) => {
                    var _node$ownerDocument;
                    const {
                        disableOutsidePointerEvents = false,
                            onEscapeKeyDown: onEscapeKeyDown,
                            onPointerDownOutside: onPointerDownOutside,
                            onFocusOutside: onFocusOutside,
                            onInteractOutside: onInteractOutside,
                            onDismiss: onDismiss,
                            ...layerProps
                    } = props;
                    const context = $g2vWm$react.useContext($d715e0554b679f1f$var$DismissableLayerContext);
                    const [node1, setNode] = $g2vWm$react.useState(null);
                    const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
                    const [, force] = $g2vWm$react.useState({});
                    const composedRefs = $g2vWm$radixuireactcomposerefs.useComposedRefs(forwardedRef, node => setNode(node));
                    const layers = Array.from(context.layers);
                    const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); // prettier-ignore
                    const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
                    const index = node1 ? layers.indexOf(node1) : -1;
                    const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
                    const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
                    const pointerDownOutside = $d715e0554b679f1f$var$usePointerDownOutside(event => {
                        const target = event.target;
                        const isPointerDownOnBranch = [...context.branches].some(branch => branch.contains(target));
                        if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
                        onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
                        onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
                        if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
                    }, ownerDocument);
                    const focusOutside = $d715e0554b679f1f$var$useFocusOutside(event => {
                        const target = event.target;
                        const isFocusInBranch = [...context.branches].some(branch => branch.contains(target));
                        if (isFocusInBranch) return;
                        onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
                        onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
                        if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
                    }, ownerDocument);
                    $g2vWm$radixuireactuseescapekeydown.useEscapeKeydown(event => {
                        const isHighestLayer = index === context.layers.size - 1;
                        if (!isHighestLayer) return;
                        onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
                        if (!event.defaultPrevented && onDismiss) {
                            event.preventDefault();
                            onDismiss();
                        }
                    }, ownerDocument);
                    $g2vWm$react.useEffect(() => {
                        if (!node1) return;
                        if (disableOutsidePointerEvents) {
                            if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
                                $d715e0554b679f1f$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
                                ownerDocument.body.style.pointerEvents = 'none';
                            }
                            context.layersWithOutsidePointerEventsDisabled.add(node1);
                        }
                        context.layers.add(node1);
                        $d715e0554b679f1f$var$dispatchUpdate();
                        return () => {
                            if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $d715e0554b679f1f$var$originalBodyPointerEvents;
                        };
                    }, [node1, ownerDocument, disableOutsidePointerEvents, context]);
                    /**
                     * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
                     * because a change to `disableOutsidePointerEvents` would remove this layer from the stack
                     * and add it to the end again so the layering order wouldn't be _creation order_.
                     * We only want them to be removed from context stacks when unmounted.
                     */
                    $g2vWm$react.useEffect(() => {
                        return () => {
                            if (!node1) return;
                            context.layers.delete(node1);
                            context.layersWithOutsidePointerEventsDisabled.delete(node1);
                            $d715e0554b679f1f$var$dispatchUpdate();
                        };
                    }, [node1, context]);
                    $g2vWm$react.useEffect(() => {
                        const handleUpdate = () => force({});
                        document.addEventListener($d715e0554b679f1f$var$CONTEXT_UPDATE, handleUpdate);
                        return () => document.removeEventListener($d715e0554b679f1f$var$CONTEXT_UPDATE, handleUpdate);
                    }, []);
                    return /*#__PURE__*/ $g2vWm$react.createElement($g2vWm$radixuireactprimitive.Primitive.div, $parcel$interopDefault($g2vWm$babelruntimehelpersextends)({}, layerProps, {
                        ref: composedRefs,
                        style: {
                            pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
                            ...props.style
                        },
                        onFocusCapture: $g2vWm$radixuiprimitive.composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
                        onBlurCapture: $g2vWm$radixuiprimitive.composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
                        onPointerDownCapture: $g2vWm$radixuiprimitive.composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
                    }));
                });
                /*#__PURE__*/
                Object.assign($d715e0554b679f1f$export$177fb62ff3ec1f22, {
                    displayName: $d715e0554b679f1f$var$DISMISSABLE_LAYER_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DismissableLayerBranch
                 * -----------------------------------------------------------------------------------------------*/
                const $d715e0554b679f1f$var$BRANCH_NAME = 'DismissableLayerBranch';
                const $d715e0554b679f1f$export$4d5eb2109db14228 = /*#__PURE__*/ $g2vWm$react.forwardRef((props, forwardedRef) => {
                    const context = $g2vWm$react.useContext($d715e0554b679f1f$var$DismissableLayerContext);
                    const ref = $g2vWm$react.useRef(null);
                    const composedRefs = $g2vWm$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
                    $g2vWm$react.useEffect(() => {
                        const node = ref.current;
                        if (node) {
                            context.branches.add(node);
                            return () => {
                                context.branches.delete(node);
                            };
                        }
                    }, [context.branches]);
                    return /*#__PURE__*/ $g2vWm$react.createElement($g2vWm$radixuireactprimitive.Primitive.div, $parcel$interopDefault($g2vWm$babelruntimehelpersextends)({}, props, {
                        ref: composedRefs
                    }));
                });
                /*#__PURE__*/
                Object.assign($d715e0554b679f1f$export$4d5eb2109db14228, {
                    displayName: $d715e0554b679f1f$var$BRANCH_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                /**
                 * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
                 * to mimic layer dismissing behaviour present in OS.
                 * Returns props to pass to the node we want to check for outside events.
                 */
                function $d715e0554b679f1f$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
                    const handlePointerDownOutside = $g2vWm$radixuireactusecallbackref.useCallbackRef(onPointerDownOutside);
                    const isPointerInsideReactTreeRef = $g2vWm$react.useRef(false);
                    const handleClickRef = $g2vWm$react.useRef(() => {});
                    $g2vWm$react.useEffect(() => {
                        const handlePointerDown = event => {
                            if (event.target && !isPointerInsideReactTreeRef.current) {
                                const eventDetail = {
                                    originalEvent: event
                                };

                                function handleAndDispatchPointerDownOutsideEvent() {
                                    $d715e0554b679f1f$var$handleAndDispatchCustomEvent($d715e0554b679f1f$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
                                        discrete: true
                                    });
                                }
                                /**
                                 * On touch devices, we need to wait for a click event because browsers implement
                                 * a ~350ms delay between the time the user stops touching the display and when the
                                 * browser executres events. We need to ensure we don't reactivate pointer-events within
                                 * this timeframe otherwise the browser may execute events that should have been prevented.
                                 *
                                 * Additionally, this also lets us deal automatically with cancellations when a click event
                                 * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
                                 *
                                 * This is why we also continuously remove the previous listener, because we cannot be
                                 * certain that it was raised, and therefore cleaned-up.
                                 */
                                if (event.pointerType === 'touch') {
                                    ownerDocument.removeEventListener('click', handleClickRef.current);
                                    handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
                                    ownerDocument.addEventListener('click', handleClickRef.current, {
                                        once: true
                                    });
                                } else handleAndDispatchPointerDownOutsideEvent();
                            }
                            isPointerInsideReactTreeRef.current = false;
                        };
                        /**
                         * if this hook executes in a component that mounts via a `pointerdown` event, the event
                         * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
                         * this by delaying the event listener registration on the document.
                         * This is not React specific, but rather how the DOM works, ie:
                         * ```
                         * button.addEventListener('pointerdown', () => {
                         *   console.log('I will log');
                         *   document.addEventListener('pointerdown', () => {
                         *     console.log('I will also log');
                         *   })
                         * });
                         */
                        const timerId = window.setTimeout(() => {
                            ownerDocument.addEventListener('pointerdown', handlePointerDown);
                        }, 0);
                        return () => {
                            window.clearTimeout(timerId);
                            ownerDocument.removeEventListener('pointerdown', handlePointerDown);
                            ownerDocument.removeEventListener('click', handleClickRef.current);
                        };
                    }, [ownerDocument, handlePointerDownOutside]);
                    return {
                        // ensures we check React component tree (not just DOM tree)
                        onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
                    };
                }
                /**
                 * Listens for when focus happens outside a react subtree.
                 * Returns props to pass to the root (node) of the subtree we want to check.
                 */
                function $d715e0554b679f1f$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
                    const handleFocusOutside = $g2vWm$radixuireactusecallbackref.useCallbackRef(onFocusOutside);
                    const isFocusInsideReactTreeRef = $g2vWm$react.useRef(false);
                    $g2vWm$react.useEffect(() => {
                        const handleFocus = event => {
                            if (event.target && !isFocusInsideReactTreeRef.current) {
                                const eventDetail = {
                                    originalEvent: event
                                };
                                $d715e0554b679f1f$var$handleAndDispatchCustomEvent($d715e0554b679f1f$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
                                    discrete: false
                                });
                            }
                        };
                        ownerDocument.addEventListener('focusin', handleFocus);
                        return () => ownerDocument.removeEventListener('focusin', handleFocus);
                    }, [ownerDocument, handleFocusOutside]);
                    return {
                        onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
                        onBlurCapture: () => isFocusInsideReactTreeRef.current = false
                    };
                }

                function $d715e0554b679f1f$var$dispatchUpdate() {
                    const event = new CustomEvent($d715e0554b679f1f$var$CONTEXT_UPDATE);
                    document.dispatchEvent(event);
                }

                function $d715e0554b679f1f$var$handleAndDispatchCustomEvent(name, handler, detail, {
                    discrete: discrete
                }) {
                    const target = detail.originalEvent.target;
                    const event = new CustomEvent(name, {
                        bubbles: false,
                        cancelable: true,
                        detail: detail
                    });
                    if (handler) target.addEventListener(name, handler, {
                        once: true
                    });
                    if (discrete) $g2vWm$radixuireactprimitive.dispatchDiscreteCustomEvent(target, event);
                    else target.dispatchEvent(event);
                }
                const $d715e0554b679f1f$export$be92b6f5f03c0fe9 = $d715e0554b679f1f$export$177fb62ff3ec1f22;
                const $d715e0554b679f1f$export$aecb2ddcb55c95be = $d715e0554b679f1f$export$4d5eb2109db14228;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js":
            /*!*************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js ***!
              \*************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $7dQ7Q$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $7dQ7Q$react = __webpack_require__( /*! react */ "react");
                var $7dQ7Q$radixuiprimitive = __webpack_require__( /*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
                var $7dQ7Q$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $7dQ7Q$radixuireactcontext = __webpack_require__( /*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
                var $7dQ7Q$radixuireactusecontrollablestate = __webpack_require__( /*! @radix-ui/react-use-controllable-state */ "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js");
                var $7dQ7Q$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
                var $7dQ7Q$radixuireactmenu = __webpack_require__( /*! @radix-ui/react-menu */ "../../../node_modules/@radix-ui/react-menu/dist/index.js");
                var $7dQ7Q$radixuireactid = __webpack_require__( /*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "createDropdownMenuScope", () => $d1bf075a6b218014$export$c0623cd925aeb687);
                $parcel$export(module.exports, "DropdownMenu", () => $d1bf075a6b218014$export$e44a253a59704894);
                $parcel$export(module.exports, "DropdownMenuTrigger", () => $d1bf075a6b218014$export$d2469213b3befba9);
                $parcel$export(module.exports, "DropdownMenuPortal", () => $d1bf075a6b218014$export$cd369b4d4d54efc9);
                $parcel$export(module.exports, "DropdownMenuContent", () => $d1bf075a6b218014$export$6e76d93a37c01248);
                $parcel$export(module.exports, "DropdownMenuGroup", () => $d1bf075a6b218014$export$246bebaba3a2f70e);
                $parcel$export(module.exports, "DropdownMenuLabel", () => $d1bf075a6b218014$export$76e48c5b57f24495);
                $parcel$export(module.exports, "DropdownMenuItem", () => $d1bf075a6b218014$export$ed97964d1871885d);
                $parcel$export(module.exports, "DropdownMenuCheckboxItem", () => $d1bf075a6b218014$export$53a69729da201fa9);
                $parcel$export(module.exports, "DropdownMenuRadioGroup", () => $d1bf075a6b218014$export$3323ad73d55f587e);
                $parcel$export(module.exports, "DropdownMenuRadioItem", () => $d1bf075a6b218014$export$e4f69b41b1637536);
                $parcel$export(module.exports, "DropdownMenuItemIndicator", () => $d1bf075a6b218014$export$42355ae145153fb6);
                $parcel$export(module.exports, "DropdownMenuSeparator", () => $d1bf075a6b218014$export$da160178fd3bc7e9);
                $parcel$export(module.exports, "DropdownMenuArrow", () => $d1bf075a6b218014$export$34b8980744021ec5);
                $parcel$export(module.exports, "DropdownMenuSub", () => $d1bf075a6b218014$export$2f307d81a64f5442);
                $parcel$export(module.exports, "DropdownMenuSubTrigger", () => $d1bf075a6b218014$export$21dcb7ec56f874cf);
                $parcel$export(module.exports, "DropdownMenuSubContent", () => $d1bf075a6b218014$export$f34ec8bc2482cc5f);
                $parcel$export(module.exports, "Root", () => $d1bf075a6b218014$export$be92b6f5f03c0fe9);
                $parcel$export(module.exports, "Trigger", () => $d1bf075a6b218014$export$41fb9f06171c75f4);
                $parcel$export(module.exports, "Portal", () => $d1bf075a6b218014$export$602eac185826482c);
                $parcel$export(module.exports, "Content", () => $d1bf075a6b218014$export$7c6e2c02157bb7d2);
                $parcel$export(module.exports, "Group", () => $d1bf075a6b218014$export$eb2fcfdbd7ba97d4);
                $parcel$export(module.exports, "Label", () => $d1bf075a6b218014$export$b04be29aa201d4f5);
                $parcel$export(module.exports, "Item", () => $d1bf075a6b218014$export$6d08773d2e66f8f2);
                $parcel$export(module.exports, "CheckboxItem", () => $d1bf075a6b218014$export$16ce288f89fa631c);
                $parcel$export(module.exports, "RadioGroup", () => $d1bf075a6b218014$export$a98f0dcb43a68a25);
                $parcel$export(module.exports, "RadioItem", () => $d1bf075a6b218014$export$371ab307eab489c0);
                $parcel$export(module.exports, "ItemIndicator", () => $d1bf075a6b218014$export$c3468e2714d175fa);
                $parcel$export(module.exports, "Separator", () => $d1bf075a6b218014$export$1ff3c3f08ae963c0);
                $parcel$export(module.exports, "Arrow", () => $d1bf075a6b218014$export$21b07c8f274aebd5);
                $parcel$export(module.exports, "Sub", () => $d1bf075a6b218014$export$d7a01e11500dfb6f);
                $parcel$export(module.exports, "SubTrigger", () => $d1bf075a6b218014$export$2ea8a7a591ac5eac);
                $parcel$export(module.exports, "SubContent", () => $d1bf075a6b218014$export$6d4de93b380beddf);

                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenu
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$DROPDOWN_MENU_NAME = 'DropdownMenu';
                const [$d1bf075a6b218014$var$createDropdownMenuContext, $d1bf075a6b218014$export$c0623cd925aeb687] = $7dQ7Q$radixuireactcontext.createContextScope($d1bf075a6b218014$var$DROPDOWN_MENU_NAME, [$7dQ7Q$radixuireactmenu.createMenuScope]);
                const $d1bf075a6b218014$var$useMenuScope = $7dQ7Q$radixuireactmenu.createMenuScope();
                const [$d1bf075a6b218014$var$DropdownMenuProvider, $d1bf075a6b218014$var$useDropdownMenuContext] = $d1bf075a6b218014$var$createDropdownMenuContext($d1bf075a6b218014$var$DROPDOWN_MENU_NAME);
                const $d1bf075a6b218014$export$e44a253a59704894 = props => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        children: children,
                        dir: dir,
                        open: openProp,
                        defaultOpen: defaultOpen,
                        onOpenChange: onOpenChange,
                        modal = true
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    const triggerRef = $7dQ7Q$react.useRef(null);
                    const [open = false, setOpen] = $7dQ7Q$radixuireactusecontrollablestate.useControllableState({
                        prop: openProp,
                        defaultProp: defaultOpen,
                        onChange: onOpenChange
                    });
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($d1bf075a6b218014$var$DropdownMenuProvider, {
                        scope: __scopeDropdownMenu,
                        triggerId: $7dQ7Q$radixuireactid.useId(),
                        triggerRef: triggerRef,
                        contentId: $7dQ7Q$radixuireactid.useId(),
                        open: open,
                        onOpenChange: setOpen,
                        onOpenToggle: $7dQ7Q$react.useCallback(() => setOpen(prevOpen => !prevOpen), [setOpen]),
                        modal: modal
                    }, /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Root, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, {
                        open: open,
                        onOpenChange: setOpen,
                        dir: dir,
                        modal: modal
                    }), children));
                };
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$e44a253a59704894, {
                    displayName: $d1bf075a6b218014$var$DROPDOWN_MENU_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuTrigger
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$TRIGGER_NAME = 'DropdownMenuTrigger';
                const $d1bf075a6b218014$export$d2469213b3befba9 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        disabled = false,
                        ...triggerProps
                    } = props;
                    const context = $d1bf075a6b218014$var$useDropdownMenuContext($d1bf075a6b218014$var$TRIGGER_NAME, __scopeDropdownMenu);
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Anchor, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({
                        asChild: true
                    }, menuScope), /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactprimitive.Primitive.button, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({
                        type: "button",
                        id: context.triggerId,
                        "aria-haspopup": "menu",
                        "aria-expanded": context.open,
                        "aria-controls": context.open ? context.contentId : undefined,
                        "data-state": context.open ? 'open' : 'closed',
                        "data-disabled": disabled ? '' : undefined,
                        disabled: disabled
                    }, triggerProps, {
                        ref: $7dQ7Q$radixuireactcomposerefs.composeRefs(forwardedRef, context.triggerRef),
                        onPointerDown: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onPointerDown, event => {
                            // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
                            // but not when the control key is pressed (avoiding MacOS right click)
                            if (!disabled && event.button === 0 && event.ctrlKey === false) {
                                context.onOpenToggle(); // prevent trigger focusing when opening
                                // this allows the content to be given focus without competition
                                if (!context.open) event.preventDefault();
                            }
                        }),
                        onKeyDown: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
                            if (disabled) return;
                            if (['Enter', ' '].includes(event.key)) context.onOpenToggle();
                            if (event.key === 'ArrowDown') context.onOpenChange(true); // prevent keydown from scrolling window / first focused item to execute
                            // that keydown (inadvertently closing the menu)
                            if (['Enter', ' ', 'ArrowDown'].includes(event.key)) event.preventDefault();
                        })
                    })));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$d2469213b3befba9, {
                    displayName: $d1bf075a6b218014$var$TRIGGER_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuPortal
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$PORTAL_NAME = 'DropdownMenuPortal';
                const $d1bf075a6b218014$export$cd369b4d4d54efc9 = props => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...portalProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Portal, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, portalProps));
                };
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$cd369b4d4d54efc9, {
                    displayName: $d1bf075a6b218014$var$PORTAL_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuContent
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$CONTENT_NAME = 'DropdownMenuContent';
                const $d1bf075a6b218014$export$6e76d93a37c01248 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...contentProps
                    } = props;
                    const context = $d1bf075a6b218014$var$useDropdownMenuContext($d1bf075a6b218014$var$CONTENT_NAME, __scopeDropdownMenu);
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    const hasInteractedOutsideRef = $7dQ7Q$react.useRef(false);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Content, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({
                        id: context.contentId,
                        "aria-labelledby": context.triggerId
                    }, menuScope, contentProps, {
                        ref: forwardedRef,
                        onCloseAutoFocus: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onCloseAutoFocus, event => {
                            var _context$triggerRef$c;
                            if (!hasInteractedOutsideRef.current)(_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
                            hasInteractedOutsideRef.current = false; // Always prevent auto focus because we either focus manually or want user agent focus
                            event.preventDefault();
                        }),
                        onInteractOutside: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onInteractOutside, event => {
                            const originalEvent = event.detail.originalEvent;
                            const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
                            const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
                            if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
                        }),
                        style: {
                            ...props.style,
                            '--radix-dropdown-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',
                            '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',
                            '--radix-dropdown-menu-content-available-height': 'var(--radix-popper-available-height)',
                            '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',
                            '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)'
                        }
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$6e76d93a37c01248, {
                    displayName: $d1bf075a6b218014$var$CONTENT_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuGroup
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$GROUP_NAME = 'DropdownMenuGroup';
                const $d1bf075a6b218014$export$246bebaba3a2f70e = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...groupProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Group, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, groupProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$246bebaba3a2f70e, {
                    displayName: $d1bf075a6b218014$var$GROUP_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuLabel
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$LABEL_NAME = 'DropdownMenuLabel';
                const $d1bf075a6b218014$export$76e48c5b57f24495 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...labelProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Label, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, labelProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$76e48c5b57f24495, {
                    displayName: $d1bf075a6b218014$var$LABEL_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuItem
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$ITEM_NAME = 'DropdownMenuItem';
                const $d1bf075a6b218014$export$ed97964d1871885d = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...itemProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Item, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, itemProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$ed97964d1871885d, {
                    displayName: $d1bf075a6b218014$var$ITEM_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuCheckboxItem
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';
                const $d1bf075a6b218014$export$53a69729da201fa9 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...checkboxItemProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.CheckboxItem, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, checkboxItemProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$53a69729da201fa9, {
                    displayName: $d1bf075a6b218014$var$CHECKBOX_ITEM_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuRadioGroup
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';
                const $d1bf075a6b218014$export$3323ad73d55f587e = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...radioGroupProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.RadioGroup, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, radioGroupProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$3323ad73d55f587e, {
                    displayName: $d1bf075a6b218014$var$RADIO_GROUP_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuRadioItem
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$RADIO_ITEM_NAME = 'DropdownMenuRadioItem';
                const $d1bf075a6b218014$export$e4f69b41b1637536 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...radioItemProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.RadioItem, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, radioItemProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$e4f69b41b1637536, {
                    displayName: $d1bf075a6b218014$var$RADIO_ITEM_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuItemIndicator
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$INDICATOR_NAME = 'DropdownMenuItemIndicator';
                const $d1bf075a6b218014$export$42355ae145153fb6 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...itemIndicatorProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.ItemIndicator, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, itemIndicatorProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$42355ae145153fb6, {
                    displayName: $d1bf075a6b218014$var$INDICATOR_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuSeparator
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$SEPARATOR_NAME = 'DropdownMenuSeparator';
                const $d1bf075a6b218014$export$da160178fd3bc7e9 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...separatorProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Separator, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, separatorProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$da160178fd3bc7e9, {
                    displayName: $d1bf075a6b218014$var$SEPARATOR_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuArrow
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$ARROW_NAME = 'DropdownMenuArrow';
                const $d1bf075a6b218014$export$34b8980744021ec5 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...arrowProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Arrow, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, arrowProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$34b8980744021ec5, {
                    displayName: $d1bf075a6b218014$var$ARROW_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuSub
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$export$2f307d81a64f5442 = props => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        children: children,
                        open: openProp,
                        onOpenChange: onOpenChange,
                        defaultOpen: defaultOpen
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    const [open = false, setOpen] = $7dQ7Q$radixuireactusecontrollablestate.useControllableState({
                        prop: openProp,
                        defaultProp: defaultOpen,
                        onChange: onOpenChange
                    });
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Sub, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, {
                        open: open,
                        onOpenChange: setOpen
                    }), children);
                };
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuSubTrigger
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';
                const $d1bf075a6b218014$export$21dcb7ec56f874cf = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...subTriggerProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.SubTrigger, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, subTriggerProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$21dcb7ec56f874cf, {
                    displayName: $d1bf075a6b218014$var$SUB_TRIGGER_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * DropdownMenuSubContent
                 * -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$var$SUB_CONTENT_NAME = 'DropdownMenuSubContent';
                const $d1bf075a6b218014$export$f34ec8bc2482cc5f = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeDropdownMenu: __scopeDropdownMenu,
                        ...subContentProps
                    } = props;
                    const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
                    return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.SubContent, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, subContentProps, {
                        ref: forwardedRef,
                        style: {
                            ...props.style,
                            '--radix-dropdown-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',
                            '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',
                            '--radix-dropdown-menu-content-available-height': 'var(--radix-popper-available-height)',
                            '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',
                            '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)'
                        }
                    }));
                });
                /*#__PURE__*/
                Object.assign($d1bf075a6b218014$export$f34ec8bc2482cc5f, {
                    displayName: $d1bf075a6b218014$var$SUB_CONTENT_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                const $d1bf075a6b218014$export$be92b6f5f03c0fe9 = $d1bf075a6b218014$export$e44a253a59704894;
                const $d1bf075a6b218014$export$41fb9f06171c75f4 = $d1bf075a6b218014$export$d2469213b3befba9;
                const $d1bf075a6b218014$export$602eac185826482c = $d1bf075a6b218014$export$cd369b4d4d54efc9;
                const $d1bf075a6b218014$export$7c6e2c02157bb7d2 = $d1bf075a6b218014$export$6e76d93a37c01248;
                const $d1bf075a6b218014$export$eb2fcfdbd7ba97d4 = $d1bf075a6b218014$export$246bebaba3a2f70e;
                const $d1bf075a6b218014$export$b04be29aa201d4f5 = $d1bf075a6b218014$export$76e48c5b57f24495;
                const $d1bf075a6b218014$export$6d08773d2e66f8f2 = $d1bf075a6b218014$export$ed97964d1871885d;
                const $d1bf075a6b218014$export$16ce288f89fa631c = $d1bf075a6b218014$export$53a69729da201fa9;
                const $d1bf075a6b218014$export$a98f0dcb43a68a25 = $d1bf075a6b218014$export$3323ad73d55f587e;
                const $d1bf075a6b218014$export$371ab307eab489c0 = $d1bf075a6b218014$export$e4f69b41b1637536;
                const $d1bf075a6b218014$export$c3468e2714d175fa = $d1bf075a6b218014$export$42355ae145153fb6;
                const $d1bf075a6b218014$export$1ff3c3f08ae963c0 = $d1bf075a6b218014$export$da160178fd3bc7e9;
                const $d1bf075a6b218014$export$21b07c8f274aebd5 = $d1bf075a6b218014$export$34b8980744021ec5;
                const $d1bf075a6b218014$export$d7a01e11500dfb6f = $d1bf075a6b218014$export$2f307d81a64f5442;
                const $d1bf075a6b218014$export$2ea8a7a591ac5eac = $d1bf075a6b218014$export$21dcb7ec56f874cf;
                const $d1bf075a6b218014$export$6d4de93b380beddf = $d1bf075a6b218014$export$f34ec8bc2482cc5f;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-focus-guards/dist/index.js":
            /*!************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-focus-guards/dist/index.js ***!
              \************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $cnctE$react = __webpack_require__( /*! react */ "react");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "FocusGuards", () => $71476a6ed7dbbaf3$export$ac5b58043b79449b);
                $parcel$export(module.exports, "Root", () => $71476a6ed7dbbaf3$export$be92b6f5f03c0fe9);
                $parcel$export(module.exports, "useFocusGuards", () => $71476a6ed7dbbaf3$export$b7ece24a22aeda8c);

                /** Number of components which have requested interest to have focus guards */
                let $71476a6ed7dbbaf3$var$count = 0;

                function $71476a6ed7dbbaf3$export$ac5b58043b79449b(props) {
                    $71476a6ed7dbbaf3$export$b7ece24a22aeda8c();
                    return props.children;
                }
                /**
                 * Injects a pair of focus guards at the edges of the whole DOM tree
                 * to ensure `focusin` & `focusout` events can be caught consistently.
                 */
                function $71476a6ed7dbbaf3$export$b7ece24a22aeda8c() {
                    $cnctE$react.useEffect(() => {
                        var _edgeGuards$, _edgeGuards$2;
                        const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
                        document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $71476a6ed7dbbaf3$var$createFocusGuard());
                        document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $71476a6ed7dbbaf3$var$createFocusGuard());
                        $71476a6ed7dbbaf3$var$count++;
                        return () => {
                            if ($71476a6ed7dbbaf3$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach(node => node.remove());
                            $71476a6ed7dbbaf3$var$count--;
                        };
                    }, []);
                }

                function $71476a6ed7dbbaf3$var$createFocusGuard() {
                    const element = document.createElement('span');
                    element.setAttribute('data-radix-focus-guard', '');
                    element.tabIndex = 0;
                    element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
                    return element;
                }
                const $71476a6ed7dbbaf3$export$be92b6f5f03c0fe9 = $71476a6ed7dbbaf3$export$ac5b58043b79449b;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-focus-scope/dist/index.js":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-focus-scope/dist/index.js ***!
              \***********************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $buum9$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $buum9$react = __webpack_require__( /*! react */ "react");
                var $buum9$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $buum9$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
                var $buum9$radixuireactusecallbackref = __webpack_require__( /*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "FocusScope", () => $2bc01e66e04aa9ed$export$20e40289641fbbb6);
                $parcel$export(module.exports, "Root", () => $2bc01e66e04aa9ed$export$be92b6f5f03c0fe9);
                const $2bc01e66e04aa9ed$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';
                const $2bc01e66e04aa9ed$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';
                const $2bc01e66e04aa9ed$var$EVENT_OPTIONS = {
                    bubbles: false,
                    cancelable: true
                };
                /* -------------------------------------------------------------------------------------------------
                 * FocusScope
                 * -----------------------------------------------------------------------------------------------*/
                const $2bc01e66e04aa9ed$var$FOCUS_SCOPE_NAME = 'FocusScope';
                const $2bc01e66e04aa9ed$export$20e40289641fbbb6 = /*#__PURE__*/ $buum9$react.forwardRef((props, forwardedRef) => {
                    const {
                        loop = false,
                            trapped = false,
                            onMountAutoFocus: onMountAutoFocusProp,
                            onUnmountAutoFocus: onUnmountAutoFocusProp,
                            ...scopeProps
                    } = props;
                    const [container1, setContainer] = $buum9$react.useState(null);
                    const onMountAutoFocus = $buum9$radixuireactusecallbackref.useCallbackRef(onMountAutoFocusProp);
                    const onUnmountAutoFocus = $buum9$radixuireactusecallbackref.useCallbackRef(onUnmountAutoFocusProp);
                    const lastFocusedElementRef = $buum9$react.useRef(null);
                    const composedRefs = $buum9$radixuireactcomposerefs.useComposedRefs(forwardedRef, node => setContainer(node));
                    const focusScope = $buum9$react.useRef({
                        paused: false,
                        pause() {
                            this.paused = true;
                        },
                        resume() {
                            this.paused = false;
                        }
                    }).current; // Takes care of trapping focus if focus is moved outside programmatically for example
                    $buum9$react.useEffect(() => {
                        if (trapped) {
                            function handleFocusIn(event) {
                                if (focusScope.paused || !container1) return;
                                const target = event.target;
                                if (container1.contains(target)) lastFocusedElementRef.current = target;
                                else $2bc01e66e04aa9ed$var$focus(lastFocusedElementRef.current, {
                                    select: true
                                });
                            }

                            function handleFocusOut(event) {
                                if (focusScope.paused || !container1) return;
                                const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:
                                //
                                // 1. When the user switches app/tabs/windows/the browser itself loses focus.
                                // 2. In Google Chrome, when the focused element is removed from the DOM.
                                //
                                // We let the browser do its thing here because:
                                //
                                // 1. The browser already keeps a memory of what's focused for when the page gets refocused.
                                // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it
                                //    throws the CPU to 100%, so we avoid doing anything for this reason here too.
                                if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)
                                // that is outside the container, we move focus to the last valid focused element inside.
                                if (!container1.contains(relatedTarget)) $2bc01e66e04aa9ed$var$focus(lastFocusedElementRef.current, {
                                    select: true
                                });
                            } // When the focused element gets removed from the DOM, browsers move focus
                            // back to the document.body. In this case, we move focus to the container
                            // to keep focus trapped correctly.
                            function handleMutations(mutations) {
                                const focusedElement = document.activeElement;
                                for (const mutation of mutations) {
                                    if (mutation.removedNodes.length > 0) {
                                        if (!(container1 !== null && container1 !== void 0 && container1.contains(focusedElement))) $2bc01e66e04aa9ed$var$focus(container1);
                                    }
                                }
                            }
                            document.addEventListener('focusin', handleFocusIn);
                            document.addEventListener('focusout', handleFocusOut);
                            const mutationObserver = new MutationObserver(handleMutations);
                            if (container1) mutationObserver.observe(container1, {
                                childList: true,
                                subtree: true
                            });
                            return () => {
                                document.removeEventListener('focusin', handleFocusIn);
                                document.removeEventListener('focusout', handleFocusOut);
                                mutationObserver.disconnect();
                            };
                        }
                    }, [trapped, container1, focusScope.paused]);
                    $buum9$react.useEffect(() => {
                        if (container1) {
                            $2bc01e66e04aa9ed$var$focusScopesStack.add(focusScope);
                            const previouslyFocusedElement = document.activeElement;
                            const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
                            if (!hasFocusedCandidate) {
                                const mountEvent = new CustomEvent($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_MOUNT, $2bc01e66e04aa9ed$var$EVENT_OPTIONS);
                                container1.addEventListener($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
                                container1.dispatchEvent(mountEvent);
                                if (!mountEvent.defaultPrevented) {
                                    $2bc01e66e04aa9ed$var$focusFirst($2bc01e66e04aa9ed$var$removeLinks($2bc01e66e04aa9ed$var$getTabbableCandidates(container1)), {
                                        select: true
                                    });
                                    if (document.activeElement === previouslyFocusedElement) $2bc01e66e04aa9ed$var$focus(container1);
                                }
                            }
                            return () => {
                                container1.removeEventListener($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.
                                // We need to delay the focus a little to get around it for now.
                                // See: https://github.com/facebook/react/issues/17894
                                setTimeout(() => {
                                    const unmountEvent = new CustomEvent($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_UNMOUNT, $2bc01e66e04aa9ed$var$EVENT_OPTIONS);
                                    container1.addEventListener($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
                                    container1.dispatchEvent(unmountEvent);
                                    if (!unmountEvent.defaultPrevented) $2bc01e66e04aa9ed$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
                                        select: true
                                    });
                                    // we need to remove the listener after we `dispatchEvent`
                                    container1.removeEventListener($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
                                    $2bc01e66e04aa9ed$var$focusScopesStack.remove(focusScope);
                                }, 0);
                            };
                        }
                    }, [container1, onMountAutoFocus, onUnmountAutoFocus, focusScope]); // Takes care of looping focus (when tabbing whilst at the edges)
                    const handleKeyDown = $buum9$react.useCallback(event => {
                        if (!loop && !trapped) return;
                        if (focusScope.paused) return;
                        const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
                        const focusedElement = document.activeElement;
                        if (isTabKey && focusedElement) {
                            const container = event.currentTarget;
                            const [first, last] = $2bc01e66e04aa9ed$var$getTabbableEdges(container);
                            const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges
                            if (!hasTabbableElementsInside) {
                                if (focusedElement === container) event.preventDefault();
                            } else {
                                if (!event.shiftKey && focusedElement === last) {
                                    event.preventDefault();
                                    if (loop) $2bc01e66e04aa9ed$var$focus(first, {
                                        select: true
                                    });
                                } else if (event.shiftKey && focusedElement === first) {
                                    event.preventDefault();
                                    if (loop) $2bc01e66e04aa9ed$var$focus(last, {
                                        select: true
                                    });
                                }
                            }
                        }
                    }, [loop, trapped, focusScope.paused]);
                    return /*#__PURE__*/ $buum9$react.createElement($buum9$radixuireactprimitive.Primitive.div, $parcel$interopDefault($buum9$babelruntimehelpersextends)({
                        tabIndex: -1
                    }, scopeProps, {
                        ref: composedRefs,
                        onKeyDown: handleKeyDown
                    }));
                });
                /*#__PURE__*/
                Object.assign($2bc01e66e04aa9ed$export$20e40289641fbbb6, {
                    displayName: $2bc01e66e04aa9ed$var$FOCUS_SCOPE_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * Utils
                 * -----------------------------------------------------------------------------------------------*/
                /**
                 * Attempts focusing the first element in a list of candidates.
                 * Stops when focus has actually moved.
                 */
                function $2bc01e66e04aa9ed$var$focusFirst(candidates, {
                    select = false
                } = {}) {
                    const previouslyFocusedElement = document.activeElement;
                    for (const candidate of candidates) {
                        $2bc01e66e04aa9ed$var$focus(candidate, {
                            select: select
                        });
                        if (document.activeElement !== previouslyFocusedElement) return;
                    }
                }
                /**
                 * Returns the first and last tabbable elements inside a container.
                 */
                function $2bc01e66e04aa9ed$var$getTabbableEdges(container) {
                    const candidates = $2bc01e66e04aa9ed$var$getTabbableCandidates(container);
                    const first = $2bc01e66e04aa9ed$var$findVisible(candidates, container);
                    const last = $2bc01e66e04aa9ed$var$findVisible(candidates.reverse(), container);
                    return [first, last];
                }
                /**
                 * Returns a list of potential tabbable candidates.
                 *
                 * NOTE: This is only a close approximation. For example it doesn't take into account cases like when
                 * elements are not visible. This cannot be worked out easily by just reading a property, but rather
                 * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
                 *
                 * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
                 * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
                 */
                function $2bc01e66e04aa9ed$var$getTabbableCandidates(container) {
                    const nodes = [];
                    const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
                        acceptNode: node => {
                            const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
                            if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
                            // runtime's understanding of tabbability, so this automatically accounts
                            // for any kind of element that could be tabbed to.
                            return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
                        }
                    });
                    while (walker.nextNode()) nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it
                    // hinders accessibility to have tab order different from visual order.
                    return nodes;
                }
                /**
                 * Returns the first visible element in a list.
                 * NOTE: Only checks visibility up to the `container`.
                 */
                function $2bc01e66e04aa9ed$var$findVisible(elements, container) {
                    for (const element of elements) {
                        // we stop checking if it's hidden at the `container` level (excluding)
                        if (!$2bc01e66e04aa9ed$var$isHidden(element, {
                                upTo: container
                            })) return element;
                    }
                }

                function $2bc01e66e04aa9ed$var$isHidden(node, {
                    upTo: upTo
                }) {
                    if (getComputedStyle(node).visibility === 'hidden') return true;
                    while (node) {
                        // we stop at `upTo` (excluding it)
                        if (upTo !== undefined && node === upTo) return false;
                        if (getComputedStyle(node).display === 'none') return true;
                        node = node.parentElement;
                    }
                    return false;
                }

                function $2bc01e66e04aa9ed$var$isSelectableInput(element) {
                    return element instanceof HTMLInputElement && 'select' in element;
                }

                function $2bc01e66e04aa9ed$var$focus(element, {
                    select = false
                } = {}) {
                    // only focus if that element is focusable
                    if (element && element.focus) {
                        const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users
                        element.focus({
                            preventScroll: true
                        }); // only select if its not the same element, it supports selection and we need to select
                        if (element !== previouslyFocusedElement && $2bc01e66e04aa9ed$var$isSelectableInput(element) && select) element.select();
                    }
                }
                /* -------------------------------------------------------------------------------------------------
                 * FocusScope stack
                 * -----------------------------------------------------------------------------------------------*/
                const $2bc01e66e04aa9ed$var$focusScopesStack = $2bc01e66e04aa9ed$var$createFocusScopesStack();

                function $2bc01e66e04aa9ed$var$createFocusScopesStack() {
                    /** A stack of focus scopes, with the active one at the top */
                    let stack = [];
                    return {
                        add(focusScope) {
                            // pause the currently active focus scope (at the top of the stack)
                            const activeFocusScope = stack[0];
                            if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
                            // remove in case it already exists (because we'll re-add it at the top of the stack)
                            stack = $2bc01e66e04aa9ed$var$arrayRemove(stack, focusScope);
                            stack.unshift(focusScope);
                        },
                        remove(focusScope) {
                            var _stack$;
                            stack = $2bc01e66e04aa9ed$var$arrayRemove(stack, focusScope);
                            (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
                        }
                    };
                }

                function $2bc01e66e04aa9ed$var$arrayRemove(array, item) {
                    const updatedArray = [...array];
                    const index = updatedArray.indexOf(item);
                    if (index !== -1) updatedArray.splice(index, 1);
                    return updatedArray;
                }

                function $2bc01e66e04aa9ed$var$removeLinks(items) {
                    return items.filter(item => item.tagName !== 'A');
                }
                const $2bc01e66e04aa9ed$export$be92b6f5f03c0fe9 = $2bc01e66e04aa9ed$export$20e40289641fbbb6;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-id/dist/index.js":
            /*!**************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-id/dist/index.js ***!
              \**************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $47woD$react = __webpack_require__( /*! react */ "react");
                var $47woD$radixuireactuselayouteffect = __webpack_require__( /*! @radix-ui/react-use-layout-effect */ "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "useId", () => $dc478e4659f630c5$export$f680877a34711e37);
                const $dc478e4659f630c5$var$useReactId = $47woD$react['useId'.toString()] || (() => undefined);
                let $dc478e4659f630c5$var$count = 0;

                function $dc478e4659f630c5$export$f680877a34711e37(deterministicId) {
                    const [id, setId] = $47woD$react.useState($dc478e4659f630c5$var$useReactId()); // React versions older than 18 will have client-side ids only.
                    $47woD$radixuireactuselayouteffect.useLayoutEffect(() => {
                        if (!deterministicId) setId(reactId => reactId !== null && reactId !== void 0 ? reactId : String($dc478e4659f630c5$var$count++));
                    }, [deterministicId]);
                    return deterministicId || (id ? `radix-${id}` : '');
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-menu/dist/index.js":
            /*!****************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-menu/dist/index.js ***!
              \****************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $cnSS2$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $cnSS2$react = __webpack_require__( /*! react */ "react");
                var $cnSS2$radixuiprimitive = __webpack_require__( /*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
                var $cnSS2$radixuireactcollection = __webpack_require__( /*! @radix-ui/react-collection */ "../../../node_modules/@radix-ui/react-collection/dist/index.js");
                var $cnSS2$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $cnSS2$radixuireactcontext = __webpack_require__( /*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
                var $cnSS2$radixuireactdirection = __webpack_require__( /*! @radix-ui/react-direction */ "../../../node_modules/@radix-ui/react-direction/dist/index.js");
                var $cnSS2$radixuireactdismissablelayer = __webpack_require__( /*! @radix-ui/react-dismissable-layer */ "../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js");
                var $cnSS2$radixuireactfocusguards = __webpack_require__( /*! @radix-ui/react-focus-guards */ "../../../node_modules/@radix-ui/react-focus-guards/dist/index.js");
                var $cnSS2$radixuireactfocusscope = __webpack_require__( /*! @radix-ui/react-focus-scope */ "../../../node_modules/@radix-ui/react-focus-scope/dist/index.js");
                var $cnSS2$radixuireactid = __webpack_require__( /*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");
                var $cnSS2$radixuireactpopper = __webpack_require__( /*! @radix-ui/react-popper */ "../../../node_modules/@radix-ui/react-popper/dist/index.js");
                var $cnSS2$radixuireactportal = __webpack_require__( /*! @radix-ui/react-portal */ "../../../node_modules/@radix-ui/react-portal/dist/index.js");
                var $cnSS2$radixuireactpresence = __webpack_require__( /*! @radix-ui/react-presence */ "../../../node_modules/@radix-ui/react-presence/dist/index.js");
                var $cnSS2$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
                var $cnSS2$radixuireactrovingfocus = __webpack_require__( /*! @radix-ui/react-roving-focus */ "../../../node_modules/@radix-ui/react-roving-focus/dist/index.js");
                var $cnSS2$radixuireactslot = __webpack_require__( /*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");
                var $cnSS2$radixuireactusecallbackref = __webpack_require__( /*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
                var $cnSS2$ariahidden = __webpack_require__( /*! aria-hidden */ "../../../node_modules/aria-hidden/dist/es2015/index.js");
                var $cnSS2$reactremovescroll = __webpack_require__( /*! react-remove-scroll */ "../../../node_modules/react-remove-scroll/dist/es2015/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "createMenuScope", () => $213e4d2df823067d$export$4027731b685e72eb);
                $parcel$export(module.exports, "Menu", () => $213e4d2df823067d$export$d9b273488cd8ce6f);
                $parcel$export(module.exports, "MenuAnchor", () => $213e4d2df823067d$export$9fa5ebd18bee4d43);
                $parcel$export(module.exports, "MenuPortal", () => $213e4d2df823067d$export$793392f970497feb);
                $parcel$export(module.exports, "MenuContent", () => $213e4d2df823067d$export$479f0f2f71193efe);
                $parcel$export(module.exports, "MenuGroup", () => $213e4d2df823067d$export$22a631d1f72787bb);
                $parcel$export(module.exports, "MenuLabel", () => $213e4d2df823067d$export$dd37bec0e8a99143);
                $parcel$export(module.exports, "MenuItem", () => $213e4d2df823067d$export$2ce376c2cc3355c8);
                $parcel$export(module.exports, "MenuCheckboxItem", () => $213e4d2df823067d$export$f6f243521332502d);
                $parcel$export(module.exports, "MenuRadioGroup", () => $213e4d2df823067d$export$ea2200c9eee416b3);
                $parcel$export(module.exports, "MenuRadioItem", () => $213e4d2df823067d$export$69bd225e9817f6d0);
                $parcel$export(module.exports, "MenuItemIndicator", () => $213e4d2df823067d$export$a2593e23056970a3);
                $parcel$export(module.exports, "MenuSeparator", () => $213e4d2df823067d$export$1cec7dcdd713e220);
                $parcel$export(module.exports, "MenuArrow", () => $213e4d2df823067d$export$bcdda4773debf5fa);
                $parcel$export(module.exports, "MenuSub", () => $213e4d2df823067d$export$71bdb9d1e2909932);
                $parcel$export(module.exports, "MenuSubTrigger", () => $213e4d2df823067d$export$5fbbb3ba7297405f);
                $parcel$export(module.exports, "MenuSubContent", () => $213e4d2df823067d$export$e7142ab31822bde6);
                $parcel$export(module.exports, "Root", () => $213e4d2df823067d$export$be92b6f5f03c0fe9);
                $parcel$export(module.exports, "Anchor", () => $213e4d2df823067d$export$b688253958b8dfe7);
                $parcel$export(module.exports, "Portal", () => $213e4d2df823067d$export$602eac185826482c);
                $parcel$export(module.exports, "Content", () => $213e4d2df823067d$export$7c6e2c02157bb7d2);
                $parcel$export(module.exports, "Group", () => $213e4d2df823067d$export$eb2fcfdbd7ba97d4);
                $parcel$export(module.exports, "Label", () => $213e4d2df823067d$export$b04be29aa201d4f5);
                $parcel$export(module.exports, "Item", () => $213e4d2df823067d$export$6d08773d2e66f8f2);
                $parcel$export(module.exports, "CheckboxItem", () => $213e4d2df823067d$export$16ce288f89fa631c);
                $parcel$export(module.exports, "RadioGroup", () => $213e4d2df823067d$export$a98f0dcb43a68a25);
                $parcel$export(module.exports, "RadioItem", () => $213e4d2df823067d$export$371ab307eab489c0);
                $parcel$export(module.exports, "ItemIndicator", () => $213e4d2df823067d$export$c3468e2714d175fa);
                $parcel$export(module.exports, "Separator", () => $213e4d2df823067d$export$1ff3c3f08ae963c0);
                $parcel$export(module.exports, "Arrow", () => $213e4d2df823067d$export$21b07c8f274aebd5);
                $parcel$export(module.exports, "Sub", () => $213e4d2df823067d$export$d7a01e11500dfb6f);
                $parcel$export(module.exports, "SubTrigger", () => $213e4d2df823067d$export$2ea8a7a591ac5eac);
                $parcel$export(module.exports, "SubContent", () => $213e4d2df823067d$export$6d4de93b380beddf);
                const $213e4d2df823067d$var$SELECTION_KEYS = ['Enter', ' '];
                const $213e4d2df823067d$var$FIRST_KEYS = ['ArrowDown', 'PageUp', 'Home'];
                const $213e4d2df823067d$var$LAST_KEYS = ['ArrowUp', 'PageDown', 'End'];
                const $213e4d2df823067d$var$FIRST_LAST_KEYS = [...$213e4d2df823067d$var$FIRST_KEYS, ...$213e4d2df823067d$var$LAST_KEYS];
                const $213e4d2df823067d$var$SUB_OPEN_KEYS = {
                    ltr: [...$213e4d2df823067d$var$SELECTION_KEYS, 'ArrowRight'],
                    rtl: [...$213e4d2df823067d$var$SELECTION_KEYS, 'ArrowLeft']
                };
                const $213e4d2df823067d$var$SUB_CLOSE_KEYS = {
                    ltr: ['ArrowLeft'],
                    rtl: ['ArrowRight']
                };
                /* -------------------------------------------------------------------------------------------------
                 * Menu
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$MENU_NAME = 'Menu';
                const [$213e4d2df823067d$var$Collection, $213e4d2df823067d$var$useCollection, $213e4d2df823067d$var$createCollectionScope] = $cnSS2$radixuireactcollection.createCollection($213e4d2df823067d$var$MENU_NAME);
                const [$213e4d2df823067d$var$createMenuContext, $213e4d2df823067d$export$4027731b685e72eb] = $cnSS2$radixuireactcontext.createContextScope($213e4d2df823067d$var$MENU_NAME, [$213e4d2df823067d$var$createCollectionScope, $cnSS2$radixuireactpopper.createPopperScope, $cnSS2$radixuireactrovingfocus.createRovingFocusGroupScope]);
                const $213e4d2df823067d$var$usePopperScope = $cnSS2$radixuireactpopper.createPopperScope();
                const $213e4d2df823067d$var$useRovingFocusGroupScope = $cnSS2$radixuireactrovingfocus.createRovingFocusGroupScope();
                const [$213e4d2df823067d$var$MenuProvider, $213e4d2df823067d$var$useMenuContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$MENU_NAME);
                const [$213e4d2df823067d$var$MenuRootProvider, $213e4d2df823067d$var$useMenuRootContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$MENU_NAME);
                const $213e4d2df823067d$export$d9b273488cd8ce6f = props => {
                    const {
                        __scopeMenu: __scopeMenu,
                        open = false,
                        children: children,
                        dir: dir,
                        onOpenChange: onOpenChange,
                        modal = true
                    } = props;
                    const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
                    const [content, setContent] = $cnSS2$react.useState(null);
                    const isUsingKeyboardRef = $cnSS2$react.useRef(false);
                    const handleOpenChange = $cnSS2$radixuireactusecallbackref.useCallbackRef(onOpenChange);
                    const direction = $cnSS2$radixuireactdirection.useDirection(dir);
                    $cnSS2$react.useEffect(() => {
                        // Capture phase ensures we set the boolean before any side effects execute
                        // in response to the key or pointer event as they might depend on this value.
                        const handleKeyDown = () => {
                            isUsingKeyboardRef.current = true;
                            document.addEventListener('pointerdown', handlePointer, {
                                capture: true,
                                once: true
                            });
                            document.addEventListener('pointermove', handlePointer, {
                                capture: true,
                                once: true
                            });
                        };
                        const handlePointer = () => isUsingKeyboardRef.current = false;
                        document.addEventListener('keydown', handleKeyDown, {
                            capture: true
                        });
                        return () => {
                            document.removeEventListener('keydown', handleKeyDown, {
                                capture: true
                            });
                            document.removeEventListener('pointerdown', handlePointer, {
                                capture: true
                            });
                            document.removeEventListener('pointermove', handlePointer, {
                                capture: true
                            });
                        };
                    }, []);
                    return /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpopper.Root, popperScope, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuProvider, {
                        scope: __scopeMenu,
                        open: open,
                        onOpenChange: handleOpenChange,
                        content: content,
                        onContentChange: setContent
                    }, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuRootProvider, {
                        scope: __scopeMenu,
                        onClose: $cnSS2$react.useCallback(() => handleOpenChange(false), [handleOpenChange]),
                        isUsingKeyboardRef: isUsingKeyboardRef,
                        dir: direction,
                        modal: modal
                    }, children)));
                };
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$d9b273488cd8ce6f, {
                    displayName: $213e4d2df823067d$var$MENU_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuAnchor
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$ANCHOR_NAME = 'MenuAnchor';
                const $213e4d2df823067d$export$9fa5ebd18bee4d43 = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeMenu: __scopeMenu,
                        ...anchorProps
                    } = props;
                    const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
                    return /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpopper.Anchor, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, popperScope, anchorProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$9fa5ebd18bee4d43, {
                    displayName: $213e4d2df823067d$var$ANCHOR_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuPortal
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$PORTAL_NAME = 'MenuPortal';
                const [$213e4d2df823067d$var$PortalProvider, $213e4d2df823067d$var$usePortalContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$PORTAL_NAME, {
                    forceMount: undefined
                });
                const $213e4d2df823067d$export$793392f970497feb = props => {
                    const {
                        __scopeMenu: __scopeMenu,
                        forceMount: forceMount,
                        children: children,
                        container: container
                    } = props;
                    const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$PORTAL_NAME, __scopeMenu);
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$PortalProvider, {
                        scope: __scopeMenu,
                        forceMount: forceMount
                    }, /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpresence.Presence, {
                        present: forceMount || context.open
                    }, /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactportal.Portal, {
                        asChild: true,
                        container: container
                    }, children)));
                };
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$793392f970497feb, {
                    displayName: $213e4d2df823067d$var$PORTAL_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuContent
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$CONTENT_NAME = 'MenuContent';
                const [$213e4d2df823067d$var$MenuContentProvider, $213e4d2df823067d$var$useMenuContentContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$CONTENT_NAME);
                const $213e4d2df823067d$export$479f0f2f71193efe = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const portalContext = $213e4d2df823067d$var$usePortalContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
                    const {
                        forceMount = portalContext.forceMount,
                            ...contentProps
                    } = props;
                    const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
                    const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$Collection.Provider, {
                        scope: props.__scopeMenu
                    }, /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpresence.Presence, {
                        present: forceMount || context.open
                    }, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$Collection.Slot, {
                        scope: props.__scopeMenu
                    }, rootContext.modal ? /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuRootContentModal, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, contentProps, {
                        ref: forwardedRef
                    })) : /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuRootContentNonModal, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, contentProps, {
                        ref: forwardedRef
                    })))));
                });
                /* ---------------------------------------------------------------------------------------------- */
                const $213e4d2df823067d$var$MenuRootContentModal = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
                    const ref = $cnSS2$react.useRef(null);
                    const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref); // Hide everything from ARIA except the `MenuContent`
                    $cnSS2$react.useEffect(() => {
                        const content = ref.current;
                        if (content) return $cnSS2$ariahidden.hideOthers(content);
                    }, []);
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuContentImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, props, {
                        ref: composedRefs // we make sure we're not trapping once it's been closed
                            ,

                        trapFocus: context.open // make sure to only disable pointer events when open
                            ,

                        disableOutsidePointerEvents: context.open,
                        disableOutsideScroll: true // When focus is trapped, a `focusout` event may still happen.
                            ,

                        onFocusOutside: $cnSS2$radixuiprimitive.composeEventHandlers(props.onFocusOutside, event => event.preventDefault(), {
                            checkForDefaultPrevented: false
                        }),
                        onDismiss: () => context.onOpenChange(false)
                    }));
                });
                const $213e4d2df823067d$var$MenuRootContentNonModal = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuContentImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, props, {
                        ref: forwardedRef,
                        trapFocus: false,
                        disableOutsidePointerEvents: false,
                        disableOutsideScroll: false,
                        onDismiss: () => context.onOpenChange(false)
                    }));
                });
                /* ---------------------------------------------------------------------------------------------- */
                const $213e4d2df823067d$var$MenuContentImpl = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeMenu: __scopeMenu,
                        loop = false,
                        trapFocus: trapFocus,
                        onOpenAutoFocus: onOpenAutoFocus,
                        onCloseAutoFocus: onCloseAutoFocus,
                        disableOutsidePointerEvents: disableOutsidePointerEvents,
                        onEntryFocus: onEntryFocus,
                        onEscapeKeyDown: onEscapeKeyDown,
                        onPointerDownOutside: onPointerDownOutside,
                        onFocusOutside: onFocusOutside,
                        onInteractOutside: onInteractOutside,
                        onDismiss: onDismiss,
                        disableOutsideScroll: disableOutsideScroll,
                        ...contentProps
                    } = props;
                    const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, __scopeMenu);
                    const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$CONTENT_NAME, __scopeMenu);
                    const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
                    const rovingFocusGroupScope = $213e4d2df823067d$var$useRovingFocusGroupScope(__scopeMenu);
                    const getItems = $213e4d2df823067d$var$useCollection(__scopeMenu);
                    const [currentItemId, setCurrentItemId] = $cnSS2$react.useState(null);
                    const contentRef = $cnSS2$react.useRef(null);
                    const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, contentRef, context.onContentChange);
                    const timerRef = $cnSS2$react.useRef(0);
                    const searchRef = $cnSS2$react.useRef('');
                    const pointerGraceTimerRef = $cnSS2$react.useRef(0);
                    const pointerGraceIntentRef = $cnSS2$react.useRef(null);
                    const pointerDirRef = $cnSS2$react.useRef('right');
                    const lastPointerXRef = $cnSS2$react.useRef(0);
                    const ScrollLockWrapper = disableOutsideScroll ? $cnSS2$reactremovescroll.RemoveScroll : $cnSS2$react.Fragment;
                    const scrollLockWrapperProps = disableOutsideScroll ? {
                        as: $cnSS2$radixuireactslot.Slot,
                        allowPinchZoom: true
                    } : undefined;
                    const handleTypeaheadSearch = key => {
                        var _items$find, _items$find2;
                        const search = searchRef.current + key;
                        const items = getItems().filter(item => !item.disabled);
                        const currentItem = document.activeElement;
                        const currentMatch = (_items$find = items.find(item => item.ref.current === currentItem)) === null || _items$find === void 0 ? void 0 : _items$find.textValue;
                        const values = items.map(item => item.textValue);
                        const nextMatch = $213e4d2df823067d$var$getNextMatch(values, search, currentMatch);
                        const newItem = (_items$find2 = items.find(item => item.textValue === nextMatch)) === null || _items$find2 === void 0 ? void 0 : _items$find2.ref.current; // Reset `searchRef` 1 second after it was last updated
                        (function updateSearch(value) {
                            searchRef.current = value;
                            window.clearTimeout(timerRef.current);
                            if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000);
                        })(search);
                        if (newItem)
                            /**
                             * Imperative focus during keydown is risky so we prevent React's batching updates
                             * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332
                             */
                            setTimeout(() => newItem.focus());
                    };
                    $cnSS2$react.useEffect(() => {
                        return () => window.clearTimeout(timerRef.current);
                    }, []); // Make sure the whole tree has focus guards as our `MenuContent` may be
                    // the last element in the DOM (beacuse of the `Portal`)
                    $cnSS2$radixuireactfocusguards.useFocusGuards();
                    const isPointerMovingToSubmenu = $cnSS2$react.useCallback(event => {
                        var _pointerGraceIntentRe, _pointerGraceIntentRe2;
                        const isMovingTowards = pointerDirRef.current === ((_pointerGraceIntentRe = pointerGraceIntentRef.current) === null || _pointerGraceIntentRe === void 0 ? void 0 : _pointerGraceIntentRe.side);
                        return isMovingTowards && $213e4d2df823067d$var$isPointerInGraceArea(event, (_pointerGraceIntentRe2 = pointerGraceIntentRef.current) === null || _pointerGraceIntentRe2 === void 0 ? void 0 : _pointerGraceIntentRe2.area);
                    }, []);
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuContentProvider, {
                        scope: __scopeMenu,
                        searchRef: searchRef,
                        onItemEnter: $cnSS2$react.useCallback(event => {
                            if (isPointerMovingToSubmenu(event)) event.preventDefault();
                        }, [isPointerMovingToSubmenu]),
                        onItemLeave: $cnSS2$react.useCallback(event => {
                            var _contentRef$current;
                            if (isPointerMovingToSubmenu(event)) return;
                            (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 || _contentRef$current.focus();
                            setCurrentItemId(null);
                        }, [isPointerMovingToSubmenu]),
                        onTriggerLeave: $cnSS2$react.useCallback(event => {
                            if (isPointerMovingToSubmenu(event)) event.preventDefault();
                        }, [isPointerMovingToSubmenu]),
                        pointerGraceTimerRef: pointerGraceTimerRef,
                        onPointerGraceIntentChange: $cnSS2$react.useCallback(intent => {
                            pointerGraceIntentRef.current = intent;
                        }, [])
                    }, /*#__PURE__*/ $cnSS2$react.createElement(ScrollLockWrapper, scrollLockWrapperProps, /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactfocusscope.FocusScope, {
                        asChild: true,
                        trapped: trapFocus,
                        onMountAutoFocus: $cnSS2$radixuiprimitive.composeEventHandlers(onOpenAutoFocus, event => {
                            var _contentRef$current2;
                            // when opening, explicitly focus the content area only and leave
                            // `onEntryFocus` in  control of focusing first item
                            event.preventDefault();
                            (_contentRef$current2 = contentRef.current) === null || _contentRef$current2 === void 0 || _contentRef$current2.focus();
                        }),
                        onUnmountAutoFocus: onCloseAutoFocus
                    }, /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactdismissablelayer.DismissableLayer, {
                        asChild: true,
                        disableOutsidePointerEvents: disableOutsidePointerEvents,
                        onEscapeKeyDown: onEscapeKeyDown,
                        onPointerDownOutside: onPointerDownOutside,
                        onFocusOutside: onFocusOutside,
                        onInteractOutside: onInteractOutside,
                        onDismiss: onDismiss
                    }, /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactrovingfocus.Root, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        asChild: true
                    }, rovingFocusGroupScope, {
                        dir: rootContext.dir,
                        orientation: "vertical",
                        loop: loop,
                        currentTabStopId: currentItemId,
                        onCurrentTabStopIdChange: setCurrentItemId,
                        onEntryFocus: $cnSS2$radixuiprimitive.composeEventHandlers(onEntryFocus, event => {
                            // only focus first item when using keyboard
                            if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
                        })
                    }), /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpopper.Content, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        role: "menu",
                        "aria-orientation": "vertical",
                        "data-state": $213e4d2df823067d$var$getOpenState(context.open),
                        "data-radix-menu-content": "",
                        dir: rootContext.dir
                    }, popperScope, contentProps, {
                        ref: composedRefs,
                        style: {
                            outline: 'none',
                            ...contentProps.style
                        },
                        onKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(contentProps.onKeyDown, event => {
                            // submenu key events bubble through portals. We only care about keys in this menu.
                            const target = event.target;
                            const isKeyDownInside = target.closest('[data-radix-menu-content]') === event.currentTarget;
                            const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
                            const isCharacterKey = event.key.length === 1;
                            if (isKeyDownInside) {
                                // menus should not be navigated using tab key so we prevent it
                                if (event.key === 'Tab') event.preventDefault();
                                if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
                            } // focus first/last item based on key pressed
                            const content = contentRef.current;
                            if (event.target !== content) return;
                            if (!$213e4d2df823067d$var$FIRST_LAST_KEYS.includes(event.key)) return;
                            event.preventDefault();
                            const items = getItems().filter(item => !item.disabled);
                            const candidateNodes = items.map(item => item.ref.current);
                            if ($213e4d2df823067d$var$LAST_KEYS.includes(event.key)) candidateNodes.reverse();
                            $213e4d2df823067d$var$focusFirst(candidateNodes);
                        }),
                        onBlur: $cnSS2$radixuiprimitive.composeEventHandlers(props.onBlur, event => {
                            // clear search buffer when leaving the menu
                            if (!event.currentTarget.contains(event.target)) {
                                window.clearTimeout(timerRef.current);
                                searchRef.current = '';
                            }
                        }),
                        onPointerMove: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerMove, $213e4d2df823067d$var$whenMouse(event => {
                            const target = event.target;
                            const pointerXHasChanged = lastPointerXRef.current !== event.clientX; // We don't use `event.movementX` for this check because Safari will
                            // always return `0` on a pointer event.
                            if (event.currentTarget.contains(target) && pointerXHasChanged) {
                                const newDir = event.clientX > lastPointerXRef.current ? 'right' : 'left';
                                pointerDirRef.current = newDir;
                                lastPointerXRef.current = event.clientX;
                            }
                        }))
                    })))))));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$479f0f2f71193efe, {
                    displayName: $213e4d2df823067d$var$CONTENT_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuGroup
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$GROUP_NAME = 'MenuGroup';
                const $213e4d2df823067d$export$22a631d1f72787bb = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeMenu: __scopeMenu,
                        ...groupProps
                    } = props;
                    return /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.div, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        role: "group"
                    }, groupProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$22a631d1f72787bb, {
                    displayName: $213e4d2df823067d$var$GROUP_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuLabel
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$LABEL_NAME = 'MenuLabel';
                const $213e4d2df823067d$export$dd37bec0e8a99143 = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeMenu: __scopeMenu,
                        ...labelProps
                    } = props;
                    return /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.div, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, labelProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$dd37bec0e8a99143, {
                    displayName: $213e4d2df823067d$var$LABEL_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuItem
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$ITEM_NAME = 'MenuItem';
                const $213e4d2df823067d$var$ITEM_SELECT = 'menu.itemSelect';
                const $213e4d2df823067d$export$2ce376c2cc3355c8 = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        disabled = false,
                            onSelect: onSelect,
                            ...itemProps
                    } = props;
                    const ref = $cnSS2$react.useRef(null);
                    const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$ITEM_NAME, props.__scopeMenu);
                    const contentContext = $213e4d2df823067d$var$useMenuContentContext($213e4d2df823067d$var$ITEM_NAME, props.__scopeMenu);
                    const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
                    const isPointerDownRef = $cnSS2$react.useRef(false);
                    const handleSelect = () => {
                        const menuItem = ref.current;
                        if (!disabled && menuItem) {
                            const itemSelectEvent = new CustomEvent($213e4d2df823067d$var$ITEM_SELECT, {
                                bubbles: true,
                                cancelable: true
                            });
                            menuItem.addEventListener($213e4d2df823067d$var$ITEM_SELECT, event => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event), {
                                once: true
                            });
                            $cnSS2$radixuireactprimitive.dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);
                            if (itemSelectEvent.defaultPrevented) isPointerDownRef.current = false;
                            else rootContext.onClose();
                        }
                    };
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuItemImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, itemProps, {
                        ref: composedRefs,
                        disabled: disabled,
                        onClick: $cnSS2$radixuiprimitive.composeEventHandlers(props.onClick, handleSelect),
                        onPointerDown: event => {
                            var _props$onPointerDown;
                            (_props$onPointerDown = props.onPointerDown) === null || _props$onPointerDown === void 0 || _props$onPointerDown.call(props, event);
                            isPointerDownRef.current = true;
                        },
                        onPointerUp: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerUp, event => {
                            var _event$currentTarget;
                            // Pointer down can move to a different menu item which should activate it on pointer up.
                            // We dispatch a click for selection to allow composition with click based triggers and to
                            // prevent Firefox from getting stuck in text selection mode when the menu closes.
                            if (!isPointerDownRef.current)(_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 || _event$currentTarget.click();
                        }),
                        onKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
                            const isTypingAhead = contentContext.searchRef.current !== '';
                            if (disabled || isTypingAhead && event.key === ' ') return;
                            if ($213e4d2df823067d$var$SELECTION_KEYS.includes(event.key)) {
                                event.currentTarget.click();
                                /**
                                 * We prevent default browser behaviour for selection keys as they should trigger
                                 * a selection only:
                                 * - prevents space from scrolling the page.
                                 * - if keydown causes focus to move, prevents keydown from firing on the new target.
                                 */
                                event.preventDefault();
                            }
                        })
                    }));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$2ce376c2cc3355c8, {
                    displayName: $213e4d2df823067d$var$ITEM_NAME
                });
                /* ---------------------------------------------------------------------------------------------- */
                const $213e4d2df823067d$var$MenuItemImpl = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeMenu: __scopeMenu,
                        disabled = false,
                        textValue: textValue,
                        ...itemProps
                    } = props;
                    const contentContext = $213e4d2df823067d$var$useMenuContentContext($213e4d2df823067d$var$ITEM_NAME, __scopeMenu);
                    const rovingFocusGroupScope = $213e4d2df823067d$var$useRovingFocusGroupScope(__scopeMenu);
                    const ref = $cnSS2$react.useRef(null);
                    const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
                    const [isFocused, setIsFocused] = $cnSS2$react.useState(false); // get the item's `.textContent` as default strategy for typeahead `textValue`
                    const [textContent, setTextContent] = $cnSS2$react.useState('');
                    $cnSS2$react.useEffect(() => {
                        const menuItem = ref.current;
                        if (menuItem) {
                            var _menuItem$textContent;
                            setTextContent(((_menuItem$textContent = menuItem.textContent) !== null && _menuItem$textContent !== void 0 ? _menuItem$textContent : '').trim());
                        }
                    }, [itemProps.children]);
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$Collection.ItemSlot, {
                        scope: __scopeMenu,
                        disabled: disabled,
                        textValue: textValue !== null && textValue !== void 0 ? textValue : textContent
                    }, /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactrovingfocus.Item, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        asChild: true
                    }, rovingFocusGroupScope, {
                        focusable: !disabled
                    }), /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.div, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        role: "menuitem",
                        "data-highlighted": isFocused ? '' : undefined,
                        "aria-disabled": disabled || undefined,
                        "data-disabled": disabled ? '' : undefined
                    }, itemProps, {
                        ref: composedRefs,
                        onPointerMove: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerMove, $213e4d2df823067d$var$whenMouse(event => {
                            if (disabled) contentContext.onItemLeave(event);
                            else {
                                contentContext.onItemEnter(event);
                                if (!event.defaultPrevented) {
                                    const item = event.currentTarget;
                                    item.focus();
                                }
                            }
                        })),
                        onPointerLeave: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerLeave, $213e4d2df823067d$var$whenMouse(event => contentContext.onItemLeave(event))),
                        onFocus: $cnSS2$radixuiprimitive.composeEventHandlers(props.onFocus, () => setIsFocused(true)),
                        onBlur: $cnSS2$radixuiprimitive.composeEventHandlers(props.onBlur, () => setIsFocused(false))
                    }))));
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuCheckboxItem
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$CHECKBOX_ITEM_NAME = 'MenuCheckboxItem';
                const $213e4d2df823067d$export$f6f243521332502d = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        checked = false,
                            onCheckedChange: onCheckedChange,
                            ...checkboxItemProps
                    } = props;
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$ItemIndicatorProvider, {
                        scope: props.__scopeMenu,
                        checked: checked
                    }, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$export$2ce376c2cc3355c8, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        role: "menuitemcheckbox",
                        "aria-checked": $213e4d2df823067d$var$isIndeterminate(checked) ? 'mixed' : checked
                    }, checkboxItemProps, {
                        ref: forwardedRef,
                        "data-state": $213e4d2df823067d$var$getCheckedState(checked),
                        onSelect: $cnSS2$radixuiprimitive.composeEventHandlers(checkboxItemProps.onSelect, () => onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange($213e4d2df823067d$var$isIndeterminate(checked) ? true : !checked), {
                            checkForDefaultPrevented: false
                        })
                    })));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$f6f243521332502d, {
                    displayName: $213e4d2df823067d$var$CHECKBOX_ITEM_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuRadioGroup
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$RADIO_GROUP_NAME = 'MenuRadioGroup';
                const [$213e4d2df823067d$var$RadioGroupProvider, $213e4d2df823067d$var$useRadioGroupContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$RADIO_GROUP_NAME, {
                    value: undefined,
                    onValueChange: () => {}
                });
                const $213e4d2df823067d$export$ea2200c9eee416b3 = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        value: value,
                        onValueChange: onValueChange,
                        ...groupProps
                    } = props;
                    const handleValueChange = $cnSS2$radixuireactusecallbackref.useCallbackRef(onValueChange);
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$RadioGroupProvider, {
                        scope: props.__scopeMenu,
                        value: value,
                        onValueChange: handleValueChange
                    }, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$export$22a631d1f72787bb, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, groupProps, {
                        ref: forwardedRef
                    })));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$ea2200c9eee416b3, {
                    displayName: $213e4d2df823067d$var$RADIO_GROUP_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuRadioItem
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$RADIO_ITEM_NAME = 'MenuRadioItem';
                const $213e4d2df823067d$export$69bd225e9817f6d0 = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        value: value,
                        ...radioItemProps
                    } = props;
                    const context = $213e4d2df823067d$var$useRadioGroupContext($213e4d2df823067d$var$RADIO_ITEM_NAME, props.__scopeMenu);
                    const checked = value === context.value;
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$ItemIndicatorProvider, {
                        scope: props.__scopeMenu,
                        checked: checked
                    }, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$export$2ce376c2cc3355c8, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        role: "menuitemradio",
                        "aria-checked": checked
                    }, radioItemProps, {
                        ref: forwardedRef,
                        "data-state": $213e4d2df823067d$var$getCheckedState(checked),
                        onSelect: $cnSS2$radixuiprimitive.composeEventHandlers(radioItemProps.onSelect, () => {
                            var _context$onValueChang;
                            return (_context$onValueChang = context.onValueChange) === null || _context$onValueChang === void 0 ? void 0 : _context$onValueChang.call(context, value);
                        }, {
                            checkForDefaultPrevented: false
                        })
                    })));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$69bd225e9817f6d0, {
                    displayName: $213e4d2df823067d$var$RADIO_ITEM_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuItemIndicator
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$ITEM_INDICATOR_NAME = 'MenuItemIndicator';
                const [$213e4d2df823067d$var$ItemIndicatorProvider, $213e4d2df823067d$var$useItemIndicatorContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$ITEM_INDICATOR_NAME, {
                    checked: false
                });
                const $213e4d2df823067d$export$a2593e23056970a3 = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeMenu: __scopeMenu,
                        forceMount: forceMount,
                        ...itemIndicatorProps
                    } = props;
                    const indicatorContext = $213e4d2df823067d$var$useItemIndicatorContext($213e4d2df823067d$var$ITEM_INDICATOR_NAME, __scopeMenu);
                    return /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpresence.Presence, {
                        present: forceMount || $213e4d2df823067d$var$isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true
                    }, /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.span, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, itemIndicatorProps, {
                        ref: forwardedRef,
                        "data-state": $213e4d2df823067d$var$getCheckedState(indicatorContext.checked)
                    })));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$a2593e23056970a3, {
                    displayName: $213e4d2df823067d$var$ITEM_INDICATOR_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuSeparator
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$SEPARATOR_NAME = 'MenuSeparator';
                const $213e4d2df823067d$export$1cec7dcdd713e220 = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeMenu: __scopeMenu,
                        ...separatorProps
                    } = props;
                    return /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.div, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        role: "separator",
                        "aria-orientation": "horizontal"
                    }, separatorProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$1cec7dcdd713e220, {
                    displayName: $213e4d2df823067d$var$SEPARATOR_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuArrow
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$ARROW_NAME = 'MenuArrow';
                const $213e4d2df823067d$export$bcdda4773debf5fa = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeMenu: __scopeMenu,
                        ...arrowProps
                    } = props;
                    const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
                    return /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpopper.Arrow, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, popperScope, arrowProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$bcdda4773debf5fa, {
                    displayName: $213e4d2df823067d$var$ARROW_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuSub
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$SUB_NAME = 'MenuSub';
                const [$213e4d2df823067d$var$MenuSubProvider, $213e4d2df823067d$var$useMenuSubContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$SUB_NAME);
                const $213e4d2df823067d$export$71bdb9d1e2909932 = props => {
                    const {
                        __scopeMenu: __scopeMenu,
                        children: children,
                        open = false,
                        onOpenChange: onOpenChange
                    } = props;
                    const parentMenuContext = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$SUB_NAME, __scopeMenu);
                    const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
                    const [trigger, setTrigger] = $cnSS2$react.useState(null);
                    const [content, setContent] = $cnSS2$react.useState(null);
                    const handleOpenChange = $cnSS2$radixuireactusecallbackref.useCallbackRef(onOpenChange); // Prevent the parent menu from reopening with open submenus.
                    $cnSS2$react.useEffect(() => {
                        if (parentMenuContext.open === false) handleOpenChange(false);
                        return () => handleOpenChange(false);
                    }, [parentMenuContext.open, handleOpenChange]);
                    return /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpopper.Root, popperScope, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuProvider, {
                        scope: __scopeMenu,
                        open: open,
                        onOpenChange: handleOpenChange,
                        content: content,
                        onContentChange: setContent
                    }, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuSubProvider, {
                        scope: __scopeMenu,
                        contentId: $cnSS2$radixuireactid.useId(),
                        triggerId: $cnSS2$radixuireactid.useId(),
                        trigger: trigger,
                        onTriggerChange: setTrigger
                    }, children)));
                };
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$71bdb9d1e2909932, {
                    displayName: $213e4d2df823067d$var$SUB_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuSubTrigger
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$SUB_TRIGGER_NAME = 'MenuSubTrigger';
                const $213e4d2df823067d$export$5fbbb3ba7297405f = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$SUB_TRIGGER_NAME, props.__scopeMenu);
                    const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$SUB_TRIGGER_NAME, props.__scopeMenu);
                    const subContext = $213e4d2df823067d$var$useMenuSubContext($213e4d2df823067d$var$SUB_TRIGGER_NAME, props.__scopeMenu);
                    const contentContext = $213e4d2df823067d$var$useMenuContentContext($213e4d2df823067d$var$SUB_TRIGGER_NAME, props.__scopeMenu);
                    const openTimerRef = $cnSS2$react.useRef(null);
                    const {
                        pointerGraceTimerRef: pointerGraceTimerRef,
                        onPointerGraceIntentChange: onPointerGraceIntentChange
                    } = contentContext;
                    const scope = {
                        __scopeMenu: props.__scopeMenu
                    };
                    const clearOpenTimer = $cnSS2$react.useCallback(() => {
                        if (openTimerRef.current) window.clearTimeout(openTimerRef.current);
                        openTimerRef.current = null;
                    }, []);
                    $cnSS2$react.useEffect(() => clearOpenTimer, [clearOpenTimer]);
                    $cnSS2$react.useEffect(() => {
                        const pointerGraceTimer = pointerGraceTimerRef.current;
                        return () => {
                            window.clearTimeout(pointerGraceTimer);
                            onPointerGraceIntentChange(null);
                        };
                    }, [pointerGraceTimerRef, onPointerGraceIntentChange]);
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$export$9fa5ebd18bee4d43, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        asChild: true
                    }, scope), /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuItemImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        id: subContext.triggerId,
                        "aria-haspopup": "menu",
                        "aria-expanded": context.open,
                        "aria-controls": subContext.contentId,
                        "data-state": $213e4d2df823067d$var$getOpenState(context.open)
                    }, props, {
                        ref: $cnSS2$radixuireactcomposerefs.composeRefs(forwardedRef, subContext.onTriggerChange) // This is redundant for mouse users but we cannot determine pointer type from
                            ,

                        onClick: event => {
                            var _props$onClick;
                            (_props$onClick = props.onClick) === null || _props$onClick === void 0 || _props$onClick.call(props, event);
                            if (props.disabled || event.defaultPrevented) return;
                            /**
                             * We manually focus because iOS Safari doesn't always focus on click (e.g. buttons)
                             * and we rely heavily on `onFocusOutside` for submenus to close when switching
                             * between separate submenus.
                             */
                            event.currentTarget.focus();
                            if (!context.open) context.onOpenChange(true);
                        },
                        onPointerMove: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerMove, $213e4d2df823067d$var$whenMouse(event => {
                            contentContext.onItemEnter(event);
                            if (event.defaultPrevented) return;
                            if (!props.disabled && !context.open && !openTimerRef.current) {
                                contentContext.onPointerGraceIntentChange(null);
                                openTimerRef.current = window.setTimeout(() => {
                                    context.onOpenChange(true);
                                    clearOpenTimer();
                                }, 100);
                            }
                        })),
                        onPointerLeave: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerLeave, $213e4d2df823067d$var$whenMouse(event => {
                            var _context$content;
                            clearOpenTimer();
                            const contentRect = (_context$content = context.content) === null || _context$content === void 0 ? void 0 : _context$content.getBoundingClientRect();
                            if (contentRect) {
                                var _context$content2;
                                // TODO: make sure to update this when we change positioning logic
                                const side = (_context$content2 = context.content) === null || _context$content2 === void 0 ? void 0 : _context$content2.dataset.side;
                                const rightSide = side === 'right';
                                const bleed = rightSide ? -5 : 5;
                                const contentNearEdge = contentRect[rightSide ? 'left' : 'right'];
                                const contentFarEdge = contentRect[rightSide ? 'right' : 'left'];
                                contentContext.onPointerGraceIntentChange({
                                    area: [
                                        // consistently within polygon bounds
                                        {
                                            x: event.clientX + bleed,
                                            y: event.clientY
                                        }, {
                                            x: contentNearEdge,
                                            y: contentRect.top
                                        }, {
                                            x: contentFarEdge,
                                            y: contentRect.top
                                        }, {
                                            x: contentFarEdge,
                                            y: contentRect.bottom
                                        }, {
                                            x: contentNearEdge,
                                            y: contentRect.bottom
                                        }
                                    ],
                                    side: side
                                });
                                window.clearTimeout(pointerGraceTimerRef.current);
                                pointerGraceTimerRef.current = window.setTimeout(() => contentContext.onPointerGraceIntentChange(null), 300);
                            } else {
                                contentContext.onTriggerLeave(event);
                                if (event.defaultPrevented) return; // There's 100ms where the user may leave an item before the submenu was opened.
                                contentContext.onPointerGraceIntentChange(null);
                            }
                        })),
                        onKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
                            const isTypingAhead = contentContext.searchRef.current !== '';
                            if (props.disabled || isTypingAhead && event.key === ' ') return;
                            if ($213e4d2df823067d$var$SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
                                var _context$content3;
                                context.onOpenChange(true); // The trigger may hold focus if opened via pointer interaction
                                // so we ensure content is given focus again when switching to keyboard.
                                (_context$content3 = context.content) === null || _context$content3 === void 0 || _context$content3.focus(); // prevent window from scrolling
                                event.preventDefault();
                            }
                        })
                    })));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$5fbbb3ba7297405f, {
                    displayName: $213e4d2df823067d$var$SUB_TRIGGER_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * MenuSubContent
                 * -----------------------------------------------------------------------------------------------*/
                const $213e4d2df823067d$var$SUB_CONTENT_NAME = 'MenuSubContent';
                const $213e4d2df823067d$export$e7142ab31822bde6 = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef) => {
                    const portalContext = $213e4d2df823067d$var$usePortalContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
                    const {
                        forceMount = portalContext.forceMount,
                            ...subContentProps
                    } = props;
                    const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
                    const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
                    const subContext = $213e4d2df823067d$var$useMenuSubContext($213e4d2df823067d$var$SUB_CONTENT_NAME, props.__scopeMenu);
                    const ref = $cnSS2$react.useRef(null);
                    const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
                    return /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$Collection.Provider, {
                        scope: props.__scopeMenu
                    }, /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpresence.Presence, {
                        present: forceMount || context.open
                    }, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$Collection.Slot, {
                        scope: props.__scopeMenu
                    }, /*#__PURE__*/ $cnSS2$react.createElement($213e4d2df823067d$var$MenuContentImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
                        id: subContext.contentId,
                        "aria-labelledby": subContext.triggerId
                    }, subContentProps, {
                        ref: composedRefs,
                        align: "start",
                        side: rootContext.dir === 'rtl' ? 'left' : 'right',
                        disableOutsidePointerEvents: false,
                        disableOutsideScroll: false,
                        trapFocus: false,
                        onOpenAutoFocus: event => {
                                var _ref$current;
                                // when opening a submenu, focus content for keyboard users only
                                if (rootContext.isUsingKeyboardRef.current)(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.focus();
                                event.preventDefault();
                            } // The menu might close because of focusing another menu item in the parent menu. We
                            ,

                        onCloseAutoFocus: event => event.preventDefault(),
                        onFocusOutside: $cnSS2$radixuiprimitive.composeEventHandlers(props.onFocusOutside, event => {
                            // We prevent closing when the trigger is focused to avoid triggering a re-open animation
                            // on pointer interaction.
                            if (event.target !== subContext.trigger) context.onOpenChange(false);
                        }),
                        onEscapeKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(props.onEscapeKeyDown, event => {
                            rootContext.onClose(); // ensure pressing escape in submenu doesn't escape full screen mode
                            event.preventDefault();
                        }),
                        onKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
                            // Submenu key events bubble through portals. We only care about keys in this menu.
                            const isKeyDownInside = event.currentTarget.contains(event.target);
                            const isCloseKey = $213e4d2df823067d$var$SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
                            if (isKeyDownInside && isCloseKey) {
                                var _subContext$trigger;
                                context.onOpenChange(false); // We focus manually because we prevented it in `onCloseAutoFocus`
                                (_subContext$trigger = subContext.trigger) === null || _subContext$trigger === void 0 || _subContext$trigger.focus(); // prevent window from scrolling
                                event.preventDefault();
                            }
                        })
                    })))));
                });
                /*#__PURE__*/
                Object.assign($213e4d2df823067d$export$e7142ab31822bde6, {
                    displayName: $213e4d2df823067d$var$SUB_CONTENT_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                function $213e4d2df823067d$var$getOpenState(open) {
                    return open ? 'open' : 'closed';
                }

                function $213e4d2df823067d$var$isIndeterminate(checked) {
                    return checked === 'indeterminate';
                }

                function $213e4d2df823067d$var$getCheckedState(checked) {
                    return $213e4d2df823067d$var$isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';
                }

                function $213e4d2df823067d$var$focusFirst(candidates) {
                    const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
                    for (const candidate of candidates) {
                        // if focus is already where we want to go, we don't want to keep going through the candidates
                        if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
                        candidate.focus();
                        if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
                    }
                }
                /**
                 * Wraps an array around itself at a given start index
                 * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`
                 */
                function $213e4d2df823067d$var$wrapArray(array, startIndex) {
                    return array.map((_, index) => array[(startIndex + index) % array.length]);
                }
                /**
                 * This is the "meat" of the typeahead matching logic. It takes in all the values,
                 * the search and the current match, and returns the next match (or `undefined`).
                 *
                 * We normalize the search because if a user has repeatedly pressed a character,
                 * we want the exact same behavior as if we only had that one character
                 * (ie. cycle through options starting with that character)
                 *
                 * We also reorder the values by wrapping the array around the current match.
                 * This is so we always look forward from the current match, and picking the first
                 * match will always be the correct one.
                 *
                 * Finally, if the normalized search is exactly one character, we exclude the
                 * current match from the values because otherwise it would be the first to match always
                 * and focus would never move. This is as opposed to the regular case, where we
                 * don't want focus to move if the current match still matches.
                 */
                function $213e4d2df823067d$var$getNextMatch(values, search, currentMatch) {
                    const isRepeated = search.length > 1 && Array.from(search).every(char => char === search[0]);
                    const normalizedSearch = isRepeated ? search[0] : search;
                    const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;
                    let wrappedValues = $213e4d2df823067d$var$wrapArray(values, Math.max(currentMatchIndex, 0));
                    const excludeCurrentMatch = normalizedSearch.length === 1;
                    if (excludeCurrentMatch) wrappedValues = wrappedValues.filter(v => v !== currentMatch);
                    const nextMatch = wrappedValues.find(value => value.toLowerCase().startsWith(normalizedSearch.toLowerCase()));
                    return nextMatch !== currentMatch ? nextMatch : undefined;
                }
                // Determine if a point is inside of a polygon.
                // Based on https://github.com/substack/point-in-polygon
                function $213e4d2df823067d$var$isPointInPolygon(point, polygon) {
                    const {
                        x: x,
                        y: y
                    } = point;
                    let inside = false;
                    for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
                        const xi = polygon[i].x;
                        const yi = polygon[i].y;
                        const xj = polygon[j].x;
                        const yj = polygon[j].y; // prettier-ignore
                        const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
                        if (intersect) inside = !inside;
                    }
                    return inside;
                }

                function $213e4d2df823067d$var$isPointerInGraceArea(event, area) {
                    if (!area) return false;
                    const cursorPos = {
                        x: event.clientX,
                        y: event.clientY
                    };
                    return $213e4d2df823067d$var$isPointInPolygon(cursorPos, area);
                }

                function $213e4d2df823067d$var$whenMouse(handler) {
                    return event => event.pointerType === 'mouse' ? handler(event) : undefined;
                }
                const $213e4d2df823067d$export$be92b6f5f03c0fe9 = $213e4d2df823067d$export$d9b273488cd8ce6f;
                const $213e4d2df823067d$export$b688253958b8dfe7 = $213e4d2df823067d$export$9fa5ebd18bee4d43;
                const $213e4d2df823067d$export$602eac185826482c = $213e4d2df823067d$export$793392f970497feb;
                const $213e4d2df823067d$export$7c6e2c02157bb7d2 = $213e4d2df823067d$export$479f0f2f71193efe;
                const $213e4d2df823067d$export$eb2fcfdbd7ba97d4 = $213e4d2df823067d$export$22a631d1f72787bb;
                const $213e4d2df823067d$export$b04be29aa201d4f5 = $213e4d2df823067d$export$dd37bec0e8a99143;
                const $213e4d2df823067d$export$6d08773d2e66f8f2 = $213e4d2df823067d$export$2ce376c2cc3355c8;
                const $213e4d2df823067d$export$16ce288f89fa631c = $213e4d2df823067d$export$f6f243521332502d;
                const $213e4d2df823067d$export$a98f0dcb43a68a25 = $213e4d2df823067d$export$ea2200c9eee416b3;
                const $213e4d2df823067d$export$371ab307eab489c0 = $213e4d2df823067d$export$69bd225e9817f6d0;
                const $213e4d2df823067d$export$c3468e2714d175fa = $213e4d2df823067d$export$a2593e23056970a3;
                const $213e4d2df823067d$export$1ff3c3f08ae963c0 = $213e4d2df823067d$export$1cec7dcdd713e220;
                const $213e4d2df823067d$export$21b07c8f274aebd5 = $213e4d2df823067d$export$bcdda4773debf5fa;
                const $213e4d2df823067d$export$d7a01e11500dfb6f = $213e4d2df823067d$export$71bdb9d1e2909932;
                const $213e4d2df823067d$export$2ea8a7a591ac5eac = $213e4d2df823067d$export$5fbbb3ba7297405f;
                const $213e4d2df823067d$export$6d4de93b380beddf = $213e4d2df823067d$export$e7142ab31822bde6;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-popper/dist/index.js":
            /*!******************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-popper/dist/index.js ***!
              \******************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $50Iv9$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $50Iv9$react = __webpack_require__( /*! react */ "react");
                var $50Iv9$floatinguireactdom = __webpack_require__( /*! @floating-ui/react-dom */ "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js");
                var $50Iv9$radixuireactarrow = __webpack_require__( /*! @radix-ui/react-arrow */ "../../../node_modules/@radix-ui/react-arrow/dist/index.js");
                var $50Iv9$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $50Iv9$radixuireactcontext = __webpack_require__( /*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
                var $50Iv9$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
                var $50Iv9$radixuireactusecallbackref = __webpack_require__( /*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
                var $50Iv9$radixuireactuselayouteffect = __webpack_require__( /*! @radix-ui/react-use-layout-effect */ "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js");
                var $50Iv9$radixuireactusesize = __webpack_require__( /*! @radix-ui/react-use-size */ "../../../node_modules/@radix-ui/react-use-size/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "createPopperScope", () => $34310caa050a8d63$export$722aac194ae923);
                $parcel$export(module.exports, "Popper", () => $34310caa050a8d63$export$badac9ada3a0bdf9);
                $parcel$export(module.exports, "PopperAnchor", () => $34310caa050a8d63$export$ecd4e1ccab6ed6d);
                $parcel$export(module.exports, "PopperContent", () => $34310caa050a8d63$export$bc4ae5855d3c4fc);
                $parcel$export(module.exports, "PopperArrow", () => $34310caa050a8d63$export$79d62cd4e10a3fd0);
                $parcel$export(module.exports, "Root", () => $34310caa050a8d63$export$be92b6f5f03c0fe9);
                $parcel$export(module.exports, "Anchor", () => $34310caa050a8d63$export$b688253958b8dfe7);
                $parcel$export(module.exports, "Content", () => $34310caa050a8d63$export$7c6e2c02157bb7d2);
                $parcel$export(module.exports, "Arrow", () => $34310caa050a8d63$export$21b07c8f274aebd5);
                $parcel$export(module.exports, "SIDE_OPTIONS", () => $34310caa050a8d63$export$36f0086da09c4b9f);
                $parcel$export(module.exports, "ALIGN_OPTIONS", () => $34310caa050a8d63$export$3671ffab7b302fc9);
                const $34310caa050a8d63$export$36f0086da09c4b9f = ['top', 'right', 'bottom', 'left'];
                const $34310caa050a8d63$export$3671ffab7b302fc9 = ['start', 'center', 'end'];
                /* -------------------------------------------------------------------------------------------------
                 * Popper
                 * -----------------------------------------------------------------------------------------------*/
                const $34310caa050a8d63$var$POPPER_NAME = 'Popper';
                const [$34310caa050a8d63$var$createPopperContext, $34310caa050a8d63$export$722aac194ae923] = $50Iv9$radixuireactcontext.createContextScope($34310caa050a8d63$var$POPPER_NAME);
                const [$34310caa050a8d63$var$PopperProvider, $34310caa050a8d63$var$usePopperContext] = $34310caa050a8d63$var$createPopperContext($34310caa050a8d63$var$POPPER_NAME);
                const $34310caa050a8d63$export$badac9ada3a0bdf9 = props => {
                    const {
                        __scopePopper: __scopePopper,
                        children: children
                    } = props;
                    const [anchor, setAnchor] = $50Iv9$react.useState(null);
                    return /*#__PURE__*/ $50Iv9$react.createElement($34310caa050a8d63$var$PopperProvider, {
                        scope: __scopePopper,
                        anchor: anchor,
                        onAnchorChange: setAnchor
                    }, children);
                };
                /*#__PURE__*/
                Object.assign($34310caa050a8d63$export$badac9ada3a0bdf9, {
                    displayName: $34310caa050a8d63$var$POPPER_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * PopperAnchor
                 * -----------------------------------------------------------------------------------------------*/
                const $34310caa050a8d63$var$ANCHOR_NAME = 'PopperAnchor';
                const $34310caa050a8d63$export$ecd4e1ccab6ed6d = /*#__PURE__*/ $50Iv9$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopePopper: __scopePopper,
                        virtualRef: virtualRef,
                        ...anchorProps
                    } = props;
                    const context = $34310caa050a8d63$var$usePopperContext($34310caa050a8d63$var$ANCHOR_NAME, __scopePopper);
                    const ref = $50Iv9$react.useRef(null);
                    const composedRefs = $50Iv9$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
                    $50Iv9$react.useEffect(() => {
                        // Consumer can anchor the popper to something that isn't
                        // a DOM node e.g. pointer position, so we override the
                        // `anchorRef` with their virtual ref in this case.
                        context.onAnchorChange((virtualRef === null || virtualRef === void 0 ? void 0 : virtualRef.current) || ref.current);
                    });
                    return virtualRef ? null : /*#__PURE__*/ $50Iv9$react.createElement($50Iv9$radixuireactprimitive.Primitive.div, $parcel$interopDefault($50Iv9$babelruntimehelpersextends)({}, anchorProps, {
                        ref: composedRefs
                    }));
                });
                /*#__PURE__*/
                Object.assign($34310caa050a8d63$export$ecd4e1ccab6ed6d, {
                    displayName: $34310caa050a8d63$var$ANCHOR_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * PopperContent
                 * -----------------------------------------------------------------------------------------------*/
                const $34310caa050a8d63$var$CONTENT_NAME = 'PopperContent';
                const [$34310caa050a8d63$var$PopperContentProvider, $34310caa050a8d63$var$useContentContext] = $34310caa050a8d63$var$createPopperContext($34310caa050a8d63$var$CONTENT_NAME);
                const $34310caa050a8d63$export$bc4ae5855d3c4fc = /*#__PURE__*/ $50Iv9$react.forwardRef((props, forwardedRef) => {
                    var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$trans, _middlewareData$trans2, _middlewareData$hide;
                    const {
                        __scopePopper: __scopePopper,
                        side = 'bottom',
                        sideOffset = 0,
                        align = 'center',
                        alignOffset = 0,
                        arrowPadding = 0,
                        collisionBoundary = [],
                        collisionPadding: collisionPaddingProp = 0,
                        sticky = 'partial',
                        hideWhenDetached = false,
                        avoidCollisions = true,
                        onPlaced: onPlaced,
                        ...contentProps
                    } = props;
                    const context = $34310caa050a8d63$var$usePopperContext($34310caa050a8d63$var$CONTENT_NAME, __scopePopper);
                    const [content, setContent] = $50Iv9$react.useState(null);
                    const composedRefs = $50Iv9$radixuireactcomposerefs.useComposedRefs(forwardedRef, node => setContent(node));
                    const [arrow, setArrow] = $50Iv9$react.useState(null);
                    const arrowSize = $50Iv9$radixuireactusesize.useSize(arrow);
                    const arrowWidth = (_arrowSize$width = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _arrowSize$width !== void 0 ? _arrowSize$width : 0;
                    const arrowHeight = (_arrowSize$height = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _arrowSize$height !== void 0 ? _arrowSize$height : 0;
                    const desiredPlacement = side + (align !== 'center' ? '-' + align : '');
                    const collisionPadding = typeof collisionPaddingProp === 'number' ? collisionPaddingProp : {
                        top: 0,
                        right: 0,
                        bottom: 0,
                        left: 0,
                        ...collisionPaddingProp
                    };
                    const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
                    const hasExplicitBoundaries = boundary.length > 0;
                    const detectOverflowOptions = {
                        padding: collisionPadding,
                        boundary: boundary.filter($34310caa050a8d63$var$isNotNull),
                        // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
                        altBoundary: hasExplicitBoundaries
                    };
                    const {
                        refs: refs,
                        floatingStyles: floatingStyles,
                        placement: placement,
                        isPositioned: isPositioned,
                        middlewareData: middlewareData
                    } = $50Iv9$floatinguireactdom.useFloating({
                        // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
                        strategy: 'fixed',
                        placement: desiredPlacement,
                        whileElementsMounted: $50Iv9$floatinguireactdom.autoUpdate,
                        elements: {
                            reference: context.anchor
                        },
                        middleware: [$50Iv9$floatinguireactdom.offset({
                            mainAxis: sideOffset + arrowHeight,
                            alignmentAxis: alignOffset
                        }), avoidCollisions && $50Iv9$floatinguireactdom.shift({
                            mainAxis: true,
                            crossAxis: false,
                            limiter: sticky === 'partial' ? $50Iv9$floatinguireactdom.limitShift() : undefined,
                            ...detectOverflowOptions
                        }), avoidCollisions && $50Iv9$floatinguireactdom.flip({
                            ...detectOverflowOptions
                        }), $50Iv9$floatinguireactdom.size({
                            ...detectOverflowOptions,
                            apply: ({
                                elements: elements,
                                rects: rects,
                                availableWidth: availableWidth,
                                availableHeight: availableHeight
                            }) => {
                                const {
                                    width: anchorWidth,
                                    height: anchorHeight
                                } = rects.reference;
                                const contentStyle = elements.floating.style;
                                contentStyle.setProperty('--radix-popper-available-width', `${availableWidth}px`);
                                contentStyle.setProperty('--radix-popper-available-height', `${availableHeight}px`);
                                contentStyle.setProperty('--radix-popper-anchor-width', `${anchorWidth}px`);
                                contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`);
                            }
                        }), arrow && $50Iv9$floatinguireactdom.arrow({
                            element: arrow,
                            padding: arrowPadding
                        }), $34310caa050a8d63$var$transformOrigin({
                            arrowWidth: arrowWidth,
                            arrowHeight: arrowHeight
                        }), hideWhenDetached && $50Iv9$floatinguireactdom.hide({
                            strategy: 'referenceHidden'
                        })]
                    });
                    const [placedSide, placedAlign] = $34310caa050a8d63$var$getSideAndAlignFromPlacement(placement);
                    const handlePlaced = $50Iv9$radixuireactusecallbackref.useCallbackRef(onPlaced);
                    $50Iv9$radixuireactuselayouteffect.useLayoutEffect(() => {
                        if (isPositioned) handlePlaced === null || handlePlaced === void 0 || handlePlaced();
                    }, [isPositioned, handlePlaced]);
                    const arrowX = (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x;
                    const arrowY = (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y;
                    const cannotCenterArrow = ((_middlewareData$arrow3 = middlewareData.arrow) === null || _middlewareData$arrow3 === void 0 ? void 0 : _middlewareData$arrow3.centerOffset) !== 0;
                    const [contentZIndex, setContentZIndex] = $50Iv9$react.useState();
                    $50Iv9$radixuireactuselayouteffect.useLayoutEffect(() => {
                        if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
                    }, [content]);
                    return /*#__PURE__*/ $50Iv9$react.createElement("div", {
                        ref: refs.setFloating,
                        "data-radix-popper-content-wrapper": "",
                        style: {
                            ...floatingStyles,
                            transform: isPositioned ? floatingStyles.transform : 'translate(0, -200%)',
                            // keep off the page when measuring
                            minWidth: 'max-content',
                            zIndex: contentZIndex,
                            ['--radix-popper-transform-origin']: [(_middlewareData$trans = middlewareData.transformOrigin) === null || _middlewareData$trans === void 0 ? void 0 : _middlewareData$trans.x, (_middlewareData$trans2 = middlewareData.transformOrigin) === null || _middlewareData$trans2 === void 0 ? void 0 : _middlewareData$trans2.y].join(' ')
                        } // Floating UI interally calculates logical alignment based the `dir` attribute on
                        ,

                        dir: props.dir
                    }, /*#__PURE__*/ $50Iv9$react.createElement($34310caa050a8d63$var$PopperContentProvider, {
                        scope: __scopePopper,
                        placedSide: placedSide,
                        onArrowChange: setArrow,
                        arrowX: arrowX,
                        arrowY: arrowY,
                        shouldHideArrow: cannotCenterArrow
                    }, /*#__PURE__*/ $50Iv9$react.createElement($50Iv9$radixuireactprimitive.Primitive.div, $parcel$interopDefault($50Iv9$babelruntimehelpersextends)({
                        "data-side": placedSide,
                        "data-align": placedAlign
                    }, contentProps, {
                        ref: composedRefs,
                        style: {
                            ...contentProps.style,
                            // if the PopperContent hasn't been placed yet (not all measurements done)
                            // we prevent animations so that users's animation don't kick in too early referring wrong sides
                            animation: !isPositioned ? 'none' : undefined,
                            // hide the content if using the hide middleware and should be hidden
                            opacity: (_middlewareData$hide = middlewareData.hide) !== null && _middlewareData$hide !== void 0 && _middlewareData$hide.referenceHidden ? 0 : undefined
                        }
                    }))));
                });
                /*#__PURE__*/
                Object.assign($34310caa050a8d63$export$bc4ae5855d3c4fc, {
                    displayName: $34310caa050a8d63$var$CONTENT_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * PopperArrow
                 * -----------------------------------------------------------------------------------------------*/
                const $34310caa050a8d63$var$ARROW_NAME = 'PopperArrow';
                const $34310caa050a8d63$var$OPPOSITE_SIDE = {
                    top: 'bottom',
                    right: 'left',
                    bottom: 'top',
                    left: 'right'
                };
                const $34310caa050a8d63$export$79d62cd4e10a3fd0 = /*#__PURE__*/ $50Iv9$react.forwardRef(function $34310caa050a8d63$export$79d62cd4e10a3fd0(props, forwardedRef) {
                    const {
                        __scopePopper: __scopePopper,
                        ...arrowProps
                    } = props;
                    const contentContext = $34310caa050a8d63$var$useContentContext($34310caa050a8d63$var$ARROW_NAME, __scopePopper);
                    const baseSide = $34310caa050a8d63$var$OPPOSITE_SIDE[contentContext.placedSide];
                    return /*#__PURE__*/ ( // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
                        // doesn't report size as we'd expect on SVG elements.
                        // it reports their bounding box which is effectively the largest path inside the SVG.
                        $50Iv9$react.createElement("span", {
                            ref: contentContext.onArrowChange,
                            style: {
                                position: 'absolute',
                                left: contentContext.arrowX,
                                top: contentContext.arrowY,
                                [baseSide]: 0,
                                transformOrigin: {
                                    top: '',
                                    right: '0 0',
                                    bottom: 'center 0',
                                    left: '100% 0'
                                } [contentContext.placedSide],
                                transform: {
                                    top: 'translateY(100%)',
                                    right: 'translateY(50%) rotate(90deg) translateX(-50%)',
                                    bottom: `rotate(180deg)`,
                                    left: 'translateY(50%) rotate(-90deg) translateX(50%)'
                                } [contentContext.placedSide],
                                visibility: contentContext.shouldHideArrow ? 'hidden' : undefined
                            }
                        }, /*#__PURE__*/ $50Iv9$react.createElement($50Iv9$radixuireactarrow.Root, $parcel$interopDefault($50Iv9$babelruntimehelpersextends)({}, arrowProps, {
                            ref: forwardedRef,
                            style: {
                                ...arrowProps.style,
                                // ensures the element can be measured correctly (mostly for if SVG)
                                display: 'block'
                            }
                        })))
                    );
                });
                /*#__PURE__*/
                Object.assign($34310caa050a8d63$export$79d62cd4e10a3fd0, {
                    displayName: $34310caa050a8d63$var$ARROW_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                function $34310caa050a8d63$var$isNotNull(value) {
                    return value !== null;
                }
                const $34310caa050a8d63$var$transformOrigin = options => ({
                    name: 'transformOrigin',
                    options: options,
                    fn(data) {
                        var _middlewareData$arrow4, _middlewareData$arrow5, _middlewareData$arrow6, _middlewareData$arrow7, _middlewareData$arrow8;
                        const {
                            placement: placement,
                            rects: rects,
                            middlewareData: middlewareData
                        } = data;
                        const cannotCenterArrow = ((_middlewareData$arrow4 = middlewareData.arrow) === null || _middlewareData$arrow4 === void 0 ? void 0 : _middlewareData$arrow4.centerOffset) !== 0;
                        const isArrowHidden = cannotCenterArrow;
                        const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
                        const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
                        const [placedSide, placedAlign] = $34310caa050a8d63$var$getSideAndAlignFromPlacement(placement);
                        const noArrowAlign = {
                            start: '0%',
                            center: '50%',
                            end: '100%'
                        } [placedAlign];
                        const arrowXCenter = ((_middlewareData$arrow5 = (_middlewareData$arrow6 = middlewareData.arrow) === null || _middlewareData$arrow6 === void 0 ? void 0 : _middlewareData$arrow6.x) !== null && _middlewareData$arrow5 !== void 0 ? _middlewareData$arrow5 : 0) + arrowWidth / 2;
                        const arrowYCenter = ((_middlewareData$arrow7 = (_middlewareData$arrow8 = middlewareData.arrow) === null || _middlewareData$arrow8 === void 0 ? void 0 : _middlewareData$arrow8.y) !== null && _middlewareData$arrow7 !== void 0 ? _middlewareData$arrow7 : 0) + arrowHeight / 2;
                        let x = '';
                        let y = '';
                        if (placedSide === 'bottom') {
                            x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
                            y = `${-arrowHeight}px`;
                        } else if (placedSide === 'top') {
                            x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
                            y = `${rects.floating.height + arrowHeight}px`;
                        } else if (placedSide === 'right') {
                            x = `${-arrowHeight}px`;
                            y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
                        } else if (placedSide === 'left') {
                            x = `${rects.floating.width + arrowHeight}px`;
                            y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
                        }
                        return {
                            data: {
                                x: x,
                                y: y
                            }
                        };
                    }
                });

                function $34310caa050a8d63$var$getSideAndAlignFromPlacement(placement) {
                    const [side, align = 'center'] = placement.split('-');
                    return [side, align];
                }
                const $34310caa050a8d63$export$be92b6f5f03c0fe9 = $34310caa050a8d63$export$badac9ada3a0bdf9;
                const $34310caa050a8d63$export$b688253958b8dfe7 = $34310caa050a8d63$export$ecd4e1ccab6ed6d;
                const $34310caa050a8d63$export$7c6e2c02157bb7d2 = $34310caa050a8d63$export$bc4ae5855d3c4fc;
                const $34310caa050a8d63$export$21b07c8f274aebd5 = $34310caa050a8d63$export$79d62cd4e10a3fd0;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-portal/dist/index.js":
            /*!******************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-portal/dist/index.js ***!
              \******************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $amzHf$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $amzHf$react = __webpack_require__( /*! react */ "react");
                var $amzHf$reactdom = __webpack_require__( /*! react-dom */ "react-dom");
                var $amzHf$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "Portal", () => $913a70b877676c16$export$602eac185826482c);
                $parcel$export(module.exports, "Root", () => $913a70b877676c16$export$be92b6f5f03c0fe9);

                /* -------------------------------------------------------------------------------------------------
                 * Portal
                 * -----------------------------------------------------------------------------------------------*/
                const $913a70b877676c16$var$PORTAL_NAME = 'Portal';
                const $913a70b877676c16$export$602eac185826482c = /*#__PURE__*/ $amzHf$react.forwardRef((props, forwardedRef) => {
                    var _globalThis$document;
                    const {
                        container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body,
                            ...portalProps
                    } = props;
                    return container ? /*#__PURE__*/ $parcel$interopDefault($amzHf$reactdom).createPortal( /*#__PURE__*/ $amzHf$react.createElement($amzHf$radixuireactprimitive.Primitive.div, $parcel$interopDefault($amzHf$babelruntimehelpersextends)({}, portalProps, {
                        ref: forwardedRef
                    })), container) : null;
                });
                /*#__PURE__*/
                Object.assign($913a70b877676c16$export$602eac185826482c, {
                    displayName: $913a70b877676c16$var$PORTAL_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                const $913a70b877676c16$export$be92b6f5f03c0fe9 = $913a70b877676c16$export$602eac185826482c;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-presence/dist/index.js":
            /*!********************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-presence/dist/index.js ***!
              \********************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $fnLeV$react = __webpack_require__( /*! react */ "react");
                var $fnLeV$reactdom = __webpack_require__( /*! react-dom */ "react-dom");
                var $fnLeV$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $fnLeV$radixuireactuselayouteffect = __webpack_require__( /*! @radix-ui/react-use-layout-effect */ "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "Presence", () => $a2fa0214bb2735a1$export$99c2b779aa4e8b8b);

                function $8f63844556d0d3cd$export$3e6543de14f8614f(initialState, machine) {
                    return $fnLeV$react.useReducer((state, event) => {
                        const nextState = machine[state][event];
                        return nextState !== null && nextState !== void 0 ? nextState : state;
                    }, initialState);
                }
                const $a2fa0214bb2735a1$export$99c2b779aa4e8b8b = props => {
                    const {
                        present: present,
                        children: children
                    } = props;
                    const presence = $a2fa0214bb2735a1$var$usePresence(present);
                    const child = typeof children === 'function' ? children({
                        present: presence.isPresent
                    }) : $fnLeV$react.Children.only(children);
                    const ref = $fnLeV$radixuireactcomposerefs.useComposedRefs(presence.ref, child.ref);
                    const forceMount = typeof children === 'function';
                    return forceMount || presence.isPresent ? /*#__PURE__*/ $fnLeV$react.cloneElement(child, {
                        ref: ref
                    }) : null;
                };
                $a2fa0214bb2735a1$export$99c2b779aa4e8b8b.displayName = 'Presence';
                /* -------------------------------------------------------------------------------------------------
                 * usePresence
                 * -----------------------------------------------------------------------------------------------*/
                function $a2fa0214bb2735a1$var$usePresence(present) {
                    const [node1, setNode] = $fnLeV$react.useState();
                    const stylesRef = $fnLeV$react.useRef({});
                    const prevPresentRef = $fnLeV$react.useRef(present);
                    const prevAnimationNameRef = $fnLeV$react.useRef('none');
                    const initialState = present ? 'mounted' : 'unmounted';
                    const [state, send] = $8f63844556d0d3cd$export$3e6543de14f8614f(initialState, {
                        mounted: {
                            UNMOUNT: 'unmounted',
                            ANIMATION_OUT: 'unmountSuspended'
                        },
                        unmountSuspended: {
                            MOUNT: 'mounted',
                            ANIMATION_END: 'unmounted'
                        },
                        unmounted: {
                            MOUNT: 'mounted'
                        }
                    });
                    $fnLeV$react.useEffect(() => {
                        const currentAnimationName = $a2fa0214bb2735a1$var$getAnimationName(stylesRef.current);
                        prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';
                    }, [state]);
                    $fnLeV$radixuireactuselayouteffect.useLayoutEffect(() => {
                        const styles = stylesRef.current;
                        const wasPresent = prevPresentRef.current;
                        const hasPresentChanged = wasPresent !== present;
                        if (hasPresentChanged) {
                            const prevAnimationName = prevAnimationNameRef.current;
                            const currentAnimationName = $a2fa0214bb2735a1$var$getAnimationName(styles);
                            if (present) send('MOUNT');
                            else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none')
                                // If there is no exit animation or the element is hidden, animations won't run
                                // so we unmount instantly
                                send('UNMOUNT');
                            else {
                                /**
                                 * When `present` changes to `false`, we check changes to animation-name to
                                 * determine whether an animation has started. We chose this approach (reading
                                 * computed styles) because there is no `animationrun` event and `animationstart`
                                 * fires after `animation-delay` has expired which would be too late.
                                 */
                                const isAnimating = prevAnimationName !== currentAnimationName;
                                if (wasPresent && isAnimating) send('ANIMATION_OUT');
                                else send('UNMOUNT');
                            }
                            prevPresentRef.current = present;
                        }
                    }, [present, send]);
                    $fnLeV$radixuireactuselayouteffect.useLayoutEffect(() => {
                        if (node1) {
                            /**
                             * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`
                             * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we
                             * make sure we only trigger ANIMATION_END for the currently active animation.
                             */
                            const handleAnimationEnd = event => {
                                const currentAnimationName = $a2fa0214bb2735a1$var$getAnimationName(stylesRef.current);
                                const isCurrentAnimation = currentAnimationName.includes(event.animationName);
                                if (event.target === node1 && isCurrentAnimation)
                                    // With React 18 concurrency this update is applied
                                    // a frame after the animation ends, creating a flash of visible content.
                                    // By manually flushing we ensure they sync within a frame, removing the flash.
                                    $fnLeV$reactdom.flushSync(() => send('ANIMATION_END'));
                            };
                            const handleAnimationStart = event => {
                                if (event.target === node1)
                                    // if animation occurred, store its name as the previous animation.
                                    prevAnimationNameRef.current = $a2fa0214bb2735a1$var$getAnimationName(stylesRef.current);
                            };
                            node1.addEventListener('animationstart', handleAnimationStart);
                            node1.addEventListener('animationcancel', handleAnimationEnd);
                            node1.addEventListener('animationend', handleAnimationEnd);
                            return () => {
                                node1.removeEventListener('animationstart', handleAnimationStart);
                                node1.removeEventListener('animationcancel', handleAnimationEnd);
                                node1.removeEventListener('animationend', handleAnimationEnd);
                            };
                        } else
                            // Transition to the unmounted state if the node is removed prematurely.
                            // We avoid doing so during cleanup as the node may change but still exist.
                            send('ANIMATION_END');
                    }, [node1, send]);
                    return {
                        isPresent: ['mounted', 'unmountSuspended'].includes(state),
                        ref: $fnLeV$react.useCallback(node => {
                            if (node) stylesRef.current = getComputedStyle(node);
                            setNode(node);
                        }, [])
                    };
                }
                /* -----------------------------------------------------------------------------------------------*/
                function $a2fa0214bb2735a1$var$getAnimationName(styles) {
                    return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-primitive/dist/index.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-primitive/dist/index.js ***!
              \*********************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $iMixA$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $iMixA$react = __webpack_require__( /*! react */ "react");
                var $iMixA$reactdom = __webpack_require__( /*! react-dom */ "react-dom");
                var $iMixA$radixuireactslot = __webpack_require__( /*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "Primitive", () => $c3def6332c2749a6$export$250ffa63cdc0d034);
                $parcel$export(module.exports, "Root", () => $c3def6332c2749a6$export$be92b6f5f03c0fe9);
                $parcel$export(module.exports, "dispatchDiscreteCustomEvent", () => $c3def6332c2749a6$export$6d1a0317bde7de7f);
                const $c3def6332c2749a6$var$NODES = ['a', 'button', 'div', 'form', 'h2', 'h3', 'img', 'input', 'label', 'li', 'nav', 'ol', 'p', 'span', 'svg', 'ul']; // Temporary while we await merge of this fix:
                // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
                // prettier-ignore
                /* -------------------------------------------------------------------------------------------------
                 * Primitive
                 * -----------------------------------------------------------------------------------------------*/
                const $c3def6332c2749a6$export$250ffa63cdc0d034 = $c3def6332c2749a6$var$NODES.reduce((primitive, node) => {
                    const Node = /*#__PURE__*/ $iMixA$react.forwardRef((props, forwardedRef) => {
                        const {
                            asChild: asChild,
                            ...primitiveProps
                        } = props;
                        const Comp = asChild ? $iMixA$radixuireactslot.Slot : node;
                        $iMixA$react.useEffect(() => {
                            window[Symbol.for('radix-ui')] = true;
                        }, []);
                        return /*#__PURE__*/ $iMixA$react.createElement(Comp, $parcel$interopDefault($iMixA$babelruntimehelpersextends)({}, primitiveProps, {
                            ref: forwardedRef
                        }));
                    });
                    Node.displayName = `Primitive.${node}`;
                    return {
                        ...primitive,
                        [node]: Node
                    };
                }, {});
                /* -------------------------------------------------------------------------------------------------
                 * Utils
                 * -----------------------------------------------------------------------------------------------*/
                /**
                 * Flush custom event dispatch
                 * https://github.com/radix-ui/primitives/pull/1378
                 *
                 * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
                 *
                 * Internally, React prioritises events in the following order:
                 *  - discrete
                 *  - continuous
                 *  - default
                 *
                 * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
                 *
                 * `discrete` is an  important distinction as updates within these events are applied immediately.
                 * React however, is not able to infer the priority of custom event types due to how they are detected internally.
                 * Because of this, it's possible for updates from custom events to be unexpectedly batched when
                 * dispatched by another `discrete` event.
                 *
                 * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
                 * This utility should be used when dispatching a custom event from within another `discrete` event, this utility
                 * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
                 * For example:
                 *
                 * dispatching a known click 👎
                 * target.dispatchEvent(new Event(‘click’))
                 *
                 * dispatching a custom type within a non-discrete event 👎
                 * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
                 *
                 * dispatching a custom type within a `discrete` event 👍
                 * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
                 *
                 * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's  not recommended to use
                 * this utility with them. This is because it's possible for those handlers to be called implicitly during render
                 * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
                 */
                function $c3def6332c2749a6$export$6d1a0317bde7de7f(target, event) {
                    if (target) $iMixA$reactdom.flushSync(() => target.dispatchEvent(event));
                }
                /* -----------------------------------------------------------------------------------------------*/
                const $c3def6332c2749a6$export$be92b6f5f03c0fe9 = $c3def6332c2749a6$export$250ffa63cdc0d034;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-roving-focus/dist/index.js":
            /*!************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-roving-focus/dist/index.js ***!
              \************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $9QJ9Y$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $9QJ9Y$react = __webpack_require__( /*! react */ "react");
                var $9QJ9Y$radixuiprimitive = __webpack_require__( /*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
                var $9QJ9Y$radixuireactcollection = __webpack_require__( /*! @radix-ui/react-collection */ "../../../node_modules/@radix-ui/react-collection/dist/index.js");
                var $9QJ9Y$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $9QJ9Y$radixuireactcontext = __webpack_require__( /*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
                var $9QJ9Y$radixuireactid = __webpack_require__( /*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");
                var $9QJ9Y$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
                var $9QJ9Y$radixuireactusecallbackref = __webpack_require__( /*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
                var $9QJ9Y$radixuireactusecontrollablestate = __webpack_require__( /*! @radix-ui/react-use-controllable-state */ "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js");
                var $9QJ9Y$radixuireactdirection = __webpack_require__( /*! @radix-ui/react-direction */ "../../../node_modules/@radix-ui/react-direction/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "createRovingFocusGroupScope", () => $0063afae63b3fa70$export$c7109489551a4f4);
                $parcel$export(module.exports, "RovingFocusGroup", () => $0063afae63b3fa70$export$8699f7c8af148338);
                $parcel$export(module.exports, "RovingFocusGroupItem", () => $0063afae63b3fa70$export$ab9df7c53fe8454);
                $parcel$export(module.exports, "Root", () => $0063afae63b3fa70$export$be92b6f5f03c0fe9);
                $parcel$export(module.exports, "Item", () => $0063afae63b3fa70$export$6d08773d2e66f8f2);
                const $0063afae63b3fa70$var$ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';
                const $0063afae63b3fa70$var$EVENT_OPTIONS = {
                    bubbles: false,
                    cancelable: true
                };
                /* -------------------------------------------------------------------------------------------------
                 * RovingFocusGroup
                 * -----------------------------------------------------------------------------------------------*/
                const $0063afae63b3fa70$var$GROUP_NAME = 'RovingFocusGroup';
                const [$0063afae63b3fa70$var$Collection, $0063afae63b3fa70$var$useCollection, $0063afae63b3fa70$var$createCollectionScope] = $9QJ9Y$radixuireactcollection.createCollection($0063afae63b3fa70$var$GROUP_NAME);
                const [$0063afae63b3fa70$var$createRovingFocusGroupContext, $0063afae63b3fa70$export$c7109489551a4f4] = $9QJ9Y$radixuireactcontext.createContextScope($0063afae63b3fa70$var$GROUP_NAME, [$0063afae63b3fa70$var$createCollectionScope]);
                const [$0063afae63b3fa70$var$RovingFocusProvider, $0063afae63b3fa70$var$useRovingFocusContext] = $0063afae63b3fa70$var$createRovingFocusGroupContext($0063afae63b3fa70$var$GROUP_NAME);
                const $0063afae63b3fa70$export$8699f7c8af148338 = /*#__PURE__*/ $9QJ9Y$react.forwardRef((props, forwardedRef) => {
                    return /*#__PURE__*/ $9QJ9Y$react.createElement($0063afae63b3fa70$var$Collection.Provider, {
                        scope: props.__scopeRovingFocusGroup
                    }, /*#__PURE__*/ $9QJ9Y$react.createElement($0063afae63b3fa70$var$Collection.Slot, {
                        scope: props.__scopeRovingFocusGroup
                    }, /*#__PURE__*/ $9QJ9Y$react.createElement($0063afae63b3fa70$var$RovingFocusGroupImpl, $parcel$interopDefault($9QJ9Y$babelruntimehelpersextends)({}, props, {
                        ref: forwardedRef
                    }))));
                });
                /*#__PURE__*/
                Object.assign($0063afae63b3fa70$export$8699f7c8af148338, {
                    displayName: $0063afae63b3fa70$var$GROUP_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                const $0063afae63b3fa70$var$RovingFocusGroupImpl = /*#__PURE__*/ $9QJ9Y$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeRovingFocusGroup: __scopeRovingFocusGroup,
                        orientation: orientation,
                        loop = false,
                        dir: dir,
                        currentTabStopId: currentTabStopIdProp,
                        defaultCurrentTabStopId: defaultCurrentTabStopId,
                        onCurrentTabStopIdChange: onCurrentTabStopIdChange,
                        onEntryFocus: onEntryFocus,
                        ...groupProps
                    } = props;
                    const ref = $9QJ9Y$react.useRef(null);
                    const composedRefs = $9QJ9Y$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
                    const direction = $9QJ9Y$radixuireactdirection.useDirection(dir);
                    const [currentTabStopId = null, setCurrentTabStopId] = $9QJ9Y$radixuireactusecontrollablestate.useControllableState({
                        prop: currentTabStopIdProp,
                        defaultProp: defaultCurrentTabStopId,
                        onChange: onCurrentTabStopIdChange
                    });
                    const [isTabbingBackOut, setIsTabbingBackOut] = $9QJ9Y$react.useState(false);
                    const handleEntryFocus = $9QJ9Y$radixuireactusecallbackref.useCallbackRef(onEntryFocus);
                    const getItems = $0063afae63b3fa70$var$useCollection(__scopeRovingFocusGroup);
                    const isClickFocusRef = $9QJ9Y$react.useRef(false);
                    const [focusableItemsCount, setFocusableItemsCount] = $9QJ9Y$react.useState(0);
                    $9QJ9Y$react.useEffect(() => {
                        const node = ref.current;
                        if (node) {
                            node.addEventListener($0063afae63b3fa70$var$ENTRY_FOCUS, handleEntryFocus);
                            return () => node.removeEventListener($0063afae63b3fa70$var$ENTRY_FOCUS, handleEntryFocus);
                        }
                    }, [handleEntryFocus]);
                    return /*#__PURE__*/ $9QJ9Y$react.createElement($0063afae63b3fa70$var$RovingFocusProvider, {
                        scope: __scopeRovingFocusGroup,
                        orientation: orientation,
                        dir: direction,
                        loop: loop,
                        currentTabStopId: currentTabStopId,
                        onItemFocus: $9QJ9Y$react.useCallback(tabStopId => setCurrentTabStopId(tabStopId), [setCurrentTabStopId]),
                        onItemShiftTab: $9QJ9Y$react.useCallback(() => setIsTabbingBackOut(true), []),
                        onFocusableItemAdd: $9QJ9Y$react.useCallback(() => setFocusableItemsCount(prevCount => prevCount + 1), []),
                        onFocusableItemRemove: $9QJ9Y$react.useCallback(() => setFocusableItemsCount(prevCount => prevCount - 1), [])
                    }, /*#__PURE__*/ $9QJ9Y$react.createElement($9QJ9Y$radixuireactprimitive.Primitive.div, $parcel$interopDefault($9QJ9Y$babelruntimehelpersextends)({
                        tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
                        "data-orientation": orientation
                    }, groupProps, {
                        ref: composedRefs,
                        style: {
                            outline: 'none',
                            ...props.style
                        },
                        onMouseDown: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onMouseDown, () => {
                            isClickFocusRef.current = true;
                        }),
                        onFocus: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onFocus, event => {
                            // We normally wouldn't need this check, because we already check
                            // that the focus is on the current target and not bubbling to it.
                            // We do this because Safari doesn't focus buttons when clicked, and
                            // instead, the wrapper will get focused and not through a bubbling event.
                            const isKeyboardFocus = !isClickFocusRef.current;
                            if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
                                const entryFocusEvent = new CustomEvent($0063afae63b3fa70$var$ENTRY_FOCUS, $0063afae63b3fa70$var$EVENT_OPTIONS);
                                event.currentTarget.dispatchEvent(entryFocusEvent);
                                if (!entryFocusEvent.defaultPrevented) {
                                    const items = getItems().filter(item => item.focusable);
                                    const activeItem = items.find(item => item.active);
                                    const currentItem = items.find(item => item.id === currentTabStopId);
                                    const candidateItems = [activeItem, currentItem, ...items].filter(Boolean);
                                    const candidateNodes = candidateItems.map(item => item.ref.current);
                                    $0063afae63b3fa70$var$focusFirst(candidateNodes);
                                }
                            }
                            isClickFocusRef.current = false;
                        }),
                        onBlur: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
                    })));
                });
                /* -------------------------------------------------------------------------------------------------
                 * RovingFocusGroupItem
                 * -----------------------------------------------------------------------------------------------*/
                const $0063afae63b3fa70$var$ITEM_NAME = 'RovingFocusGroupItem';
                const $0063afae63b3fa70$export$ab9df7c53fe8454 = /*#__PURE__*/ $9QJ9Y$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeRovingFocusGroup: __scopeRovingFocusGroup,
                        focusable = true,
                        active = false,
                        tabStopId: tabStopId,
                        ...itemProps
                    } = props;
                    const autoId = $9QJ9Y$radixuireactid.useId();
                    const id = tabStopId || autoId;
                    const context = $0063afae63b3fa70$var$useRovingFocusContext($0063afae63b3fa70$var$ITEM_NAME, __scopeRovingFocusGroup);
                    const isCurrentTabStop = context.currentTabStopId === id;
                    const getItems = $0063afae63b3fa70$var$useCollection(__scopeRovingFocusGroup);
                    const {
                        onFocusableItemAdd: onFocusableItemAdd,
                        onFocusableItemRemove: onFocusableItemRemove
                    } = context;
                    $9QJ9Y$react.useEffect(() => {
                        if (focusable) {
                            onFocusableItemAdd();
                            return () => onFocusableItemRemove();
                        }
                    }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
                    return /*#__PURE__*/ $9QJ9Y$react.createElement($0063afae63b3fa70$var$Collection.ItemSlot, {
                        scope: __scopeRovingFocusGroup,
                        id: id,
                        focusable: focusable,
                        active: active
                    }, /*#__PURE__*/ $9QJ9Y$react.createElement($9QJ9Y$radixuireactprimitive.Primitive.span, $parcel$interopDefault($9QJ9Y$babelruntimehelpersextends)({
                        tabIndex: isCurrentTabStop ? 0 : -1,
                        "data-orientation": context.orientation
                    }, itemProps, {
                        ref: forwardedRef,
                        onMouseDown: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onMouseDown, event => {
                            // We prevent focusing non-focusable items on `mousedown`.
                            // Even though the item has tabIndex={-1}, that only means take it out of the tab order.
                            if (!focusable) event.preventDefault(); // Safari doesn't focus a button when clicked so we run our logic on mousedown also
                            else context.onItemFocus(id);
                        }),
                        onFocus: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
                        onKeyDown: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
                            if (event.key === 'Tab' && event.shiftKey) {
                                context.onItemShiftTab();
                                return;
                            }
                            if (event.target !== event.currentTarget) return;
                            const focusIntent = $0063afae63b3fa70$var$getFocusIntent(event, context.orientation, context.dir);
                            if (focusIntent !== undefined) {
                                event.preventDefault();
                                const items = getItems().filter(item => item.focusable);
                                let candidateNodes = items.map(item => item.ref.current);
                                if (focusIntent === 'last') candidateNodes.reverse();
                                else if (focusIntent === 'prev' || focusIntent === 'next') {
                                    if (focusIntent === 'prev') candidateNodes.reverse();
                                    const currentIndex = candidateNodes.indexOf(event.currentTarget);
                                    candidateNodes = context.loop ? $0063afae63b3fa70$var$wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
                                }
                                /**
                                 * Imperative focus during keydown is risky so we prevent React's batching updates
                                 * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332
                                 */
                                setTimeout(() => $0063afae63b3fa70$var$focusFirst(candidateNodes));
                            }
                        })
                    })));
                });
                /*#__PURE__*/
                Object.assign($0063afae63b3fa70$export$ab9df7c53fe8454, {
                    displayName: $0063afae63b3fa70$var$ITEM_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/ // prettier-ignore
                const $0063afae63b3fa70$var$MAP_KEY_TO_FOCUS_INTENT = {
                    ArrowLeft: 'prev',
                    ArrowUp: 'prev',
                    ArrowRight: 'next',
                    ArrowDown: 'next',
                    PageUp: 'first',
                    Home: 'first',
                    PageDown: 'last',
                    End: 'last'
                };

                function $0063afae63b3fa70$var$getDirectionAwareKey(key, dir) {
                    if (dir !== 'rtl') return key;
                    return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;
                }

                function $0063afae63b3fa70$var$getFocusIntent(event, orientation, dir) {
                    const key = $0063afae63b3fa70$var$getDirectionAwareKey(event.key, dir);
                    if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;
                    if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;
                    return $0063afae63b3fa70$var$MAP_KEY_TO_FOCUS_INTENT[key];
                }

                function $0063afae63b3fa70$var$focusFirst(candidates) {
                    const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
                    for (const candidate of candidates) {
                        // if focus is already where we want to go, we don't want to keep going through the candidates
                        if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
                        candidate.focus();
                        if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
                    }
                }
                /**
                 * Wraps an array around itself at a given start index
                 * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`
                 */
                function $0063afae63b3fa70$var$wrapArray(array, startIndex) {
                    return array.map((_, index) => array[(startIndex + index) % array.length]);
                }
                const $0063afae63b3fa70$export$be92b6f5f03c0fe9 = $0063afae63b3fa70$export$8699f7c8af148338;
                const $0063afae63b3fa70$export$6d08773d2e66f8f2 = $0063afae63b3fa70$export$ab9df7c53fe8454;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-slot/dist/index.js":
            /*!****************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-slot/dist/index.js ***!
              \****************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $dAvBt$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $dAvBt$react = __webpack_require__( /*! react */ "react");
                var $dAvBt$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "Slot", () => $82dc8d030dec7549$export$8c6ed5c666ac1360);
                $parcel$export(module.exports, "Slottable", () => $82dc8d030dec7549$export$d9f1ccf0bdb05d45);
                $parcel$export(module.exports, "Root", () => $82dc8d030dec7549$export$be92b6f5f03c0fe9);

                /* -------------------------------------------------------------------------------------------------
                 * Slot
                 * -----------------------------------------------------------------------------------------------*/
                const $82dc8d030dec7549$export$8c6ed5c666ac1360 = /*#__PURE__*/ $dAvBt$react.forwardRef((props, forwardedRef) => {
                    const {
                        children: children,
                        ...slotProps
                    } = props;
                    const childrenArray = $dAvBt$react.Children.toArray(children);
                    const slottable = childrenArray.find($82dc8d030dec7549$var$isSlottable);
                    if (slottable) {
                        // the new element to render is the one passed as a child of `Slottable`
                        const newElement = slottable.props.children;
                        const newChildren = childrenArray.map(child => {
                            if (child === slottable) {
                                // because the new element will be the one rendered, we are only interested
                                // in grabbing its children (`newElement.props.children`)
                                if ($dAvBt$react.Children.count(newElement) > 1) return $dAvBt$react.Children.only(null);
                                return /*#__PURE__*/ $dAvBt$react.isValidElement(newElement) ? newElement.props.children : null;
                            } else return child;
                        });
                        return /*#__PURE__*/ $dAvBt$react.createElement($82dc8d030dec7549$var$SlotClone, $parcel$interopDefault($dAvBt$babelruntimehelpersextends)({}, slotProps, {
                            ref: forwardedRef
                        }), /*#__PURE__*/ $dAvBt$react.isValidElement(newElement) ? /*#__PURE__*/ $dAvBt$react.cloneElement(newElement, undefined, newChildren) : null);
                    }
                    return /*#__PURE__*/ $dAvBt$react.createElement($82dc8d030dec7549$var$SlotClone, $parcel$interopDefault($dAvBt$babelruntimehelpersextends)({}, slotProps, {
                        ref: forwardedRef
                    }), children);
                });
                $82dc8d030dec7549$export$8c6ed5c666ac1360.displayName = 'Slot';
                /* -------------------------------------------------------------------------------------------------
                 * SlotClone
                 * -----------------------------------------------------------------------------------------------*/
                const $82dc8d030dec7549$var$SlotClone = /*#__PURE__*/ $dAvBt$react.forwardRef((props, forwardedRef) => {
                    const {
                        children: children,
                        ...slotProps
                    } = props;
                    if ( /*#__PURE__*/ $dAvBt$react.isValidElement(children)) return /*#__PURE__*/ $dAvBt$react.cloneElement(children, {
                        ...$82dc8d030dec7549$var$mergeProps(slotProps, children.props),
                        ref: forwardedRef ? $dAvBt$radixuireactcomposerefs.composeRefs(forwardedRef, children.ref) : children.ref
                    });
                    return $dAvBt$react.Children.count(children) > 1 ? $dAvBt$react.Children.only(null) : null;
                });
                $82dc8d030dec7549$var$SlotClone.displayName = 'SlotClone';
                /* -------------------------------------------------------------------------------------------------
                 * Slottable
                 * -----------------------------------------------------------------------------------------------*/
                const $82dc8d030dec7549$export$d9f1ccf0bdb05d45 = ({
                    children: children
                }) => {
                    return /*#__PURE__*/ $dAvBt$react.createElement($dAvBt$react.Fragment, null, children);
                };
                /* ---------------------------------------------------------------------------------------------- */
                function $82dc8d030dec7549$var$isSlottable(child) {
                    return /*#__PURE__*/ $dAvBt$react.isValidElement(child) && child.type === $82dc8d030dec7549$export$d9f1ccf0bdb05d45;
                }

                function $82dc8d030dec7549$var$mergeProps(slotProps, childProps) {
                    // all child props should override
                    const overrideProps = {
                        ...childProps
                    };
                    for (const propName in childProps) {
                        const slotPropValue = slotProps[propName];
                        const childPropValue = childProps[propName];
                        const isHandler = /^on[A-Z]/.test(propName);
                        if (isHandler) {
                            // if the handler exists on both, we compose them
                            if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
                                childPropValue(...args);
                                slotPropValue(...args);
                            };
                            else if (slotPropValue) overrideProps[propName] = slotPropValue;
                        } else if (propName === 'style') overrideProps[propName] = {
                            ...slotPropValue,
                            ...childPropValue
                        };
                        else if (propName === 'className') overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');
                    }
                    return {
                        ...slotProps,
                        ...overrideProps
                    };
                }
                const $82dc8d030dec7549$export$be92b6f5f03c0fe9 = $82dc8d030dec7549$export$8c6ed5c666ac1360;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-tooltip/dist/index.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-tooltip/dist/index.js ***!
              \*******************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $iVrL9$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $iVrL9$react = __webpack_require__( /*! react */ "react");
                var $iVrL9$radixuiprimitive = __webpack_require__( /*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
                var $iVrL9$radixuireactcomposerefs = __webpack_require__( /*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
                var $iVrL9$radixuireactcontext = __webpack_require__( /*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
                var $iVrL9$radixuireactdismissablelayer = __webpack_require__( /*! @radix-ui/react-dismissable-layer */ "../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js");
                var $iVrL9$radixuireactid = __webpack_require__( /*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");
                var $iVrL9$radixuireactpopper = __webpack_require__( /*! @radix-ui/react-popper */ "../../../node_modules/@radix-ui/react-popper/dist/index.js");
                var $iVrL9$radixuireactportal = __webpack_require__( /*! @radix-ui/react-portal */ "../../../node_modules/@radix-ui/react-portal/dist/index.js");
                var $iVrL9$radixuireactpresence = __webpack_require__( /*! @radix-ui/react-presence */ "../../../node_modules/@radix-ui/react-presence/dist/index.js");
                var $iVrL9$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
                var $iVrL9$radixuireactslot = __webpack_require__( /*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");
                var $iVrL9$radixuireactusecontrollablestate = __webpack_require__( /*! @radix-ui/react-use-controllable-state */ "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js");
                var $iVrL9$radixuireactvisuallyhidden = __webpack_require__( /*! @radix-ui/react-visually-hidden */ "../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "createTooltipScope", () => $c34afbc43c90cc6f$export$1c540a2224f0d865);
                $parcel$export(module.exports, "TooltipProvider", () => $c34afbc43c90cc6f$export$f78649fb9ca566b8);
                $parcel$export(module.exports, "Tooltip", () => $c34afbc43c90cc6f$export$28c660c63b792dea);
                $parcel$export(module.exports, "TooltipTrigger", () => $c34afbc43c90cc6f$export$8c610744efcf8a1d);
                $parcel$export(module.exports, "TooltipPortal", () => $c34afbc43c90cc6f$export$7b36b8f925ab7497);
                $parcel$export(module.exports, "TooltipContent", () => $c34afbc43c90cc6f$export$e9003e2be37ec060);
                $parcel$export(module.exports, "TooltipArrow", () => $c34afbc43c90cc6f$export$c27ee0ad710f7559);
                $parcel$export(module.exports, "Provider", () => $c34afbc43c90cc6f$export$2881499e37b75b9a);
                $parcel$export(module.exports, "Root", () => $c34afbc43c90cc6f$export$be92b6f5f03c0fe9);
                $parcel$export(module.exports, "Trigger", () => $c34afbc43c90cc6f$export$41fb9f06171c75f4);
                $parcel$export(module.exports, "Portal", () => $c34afbc43c90cc6f$export$602eac185826482c);
                $parcel$export(module.exports, "Content", () => $c34afbc43c90cc6f$export$7c6e2c02157bb7d2);
                $parcel$export(module.exports, "Arrow", () => $c34afbc43c90cc6f$export$21b07c8f274aebd5);
                const [$c34afbc43c90cc6f$var$createTooltipContext, $c34afbc43c90cc6f$export$1c540a2224f0d865] = $iVrL9$radixuireactcontext.createContextScope('Tooltip', [$iVrL9$radixuireactpopper.createPopperScope]);
                const $c34afbc43c90cc6f$var$usePopperScope = $iVrL9$radixuireactpopper.createPopperScope();
                /* -------------------------------------------------------------------------------------------------
                 * TooltipProvider
                 * -----------------------------------------------------------------------------------------------*/
                const $c34afbc43c90cc6f$var$PROVIDER_NAME = 'TooltipProvider';
                const $c34afbc43c90cc6f$var$DEFAULT_DELAY_DURATION = 700;
                const $c34afbc43c90cc6f$var$TOOLTIP_OPEN = 'tooltip.open';
                const [$c34afbc43c90cc6f$var$TooltipProviderContextProvider, $c34afbc43c90cc6f$var$useTooltipProviderContext] = $c34afbc43c90cc6f$var$createTooltipContext($c34afbc43c90cc6f$var$PROVIDER_NAME);
                const $c34afbc43c90cc6f$export$f78649fb9ca566b8 = props => {
                    const {
                        __scopeTooltip: __scopeTooltip,
                        delayDuration = $c34afbc43c90cc6f$var$DEFAULT_DELAY_DURATION,
                        skipDelayDuration = 300,
                        disableHoverableContent = false,
                        children: children
                    } = props;
                    const [isOpenDelayed, setIsOpenDelayed] = $iVrL9$react.useState(true);
                    const isPointerInTransitRef = $iVrL9$react.useRef(false);
                    const skipDelayTimerRef = $iVrL9$react.useRef(0);
                    $iVrL9$react.useEffect(() => {
                        const skipDelayTimer = skipDelayTimerRef.current;
                        return () => window.clearTimeout(skipDelayTimer);
                    }, []);
                    return /*#__PURE__*/ $iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipProviderContextProvider, {
                        scope: __scopeTooltip,
                        isOpenDelayed: isOpenDelayed,
                        delayDuration: delayDuration,
                        onOpen: $iVrL9$react.useCallback(() => {
                            window.clearTimeout(skipDelayTimerRef.current);
                            setIsOpenDelayed(false);
                        }, []),
                        onClose: $iVrL9$react.useCallback(() => {
                            window.clearTimeout(skipDelayTimerRef.current);
                            skipDelayTimerRef.current = window.setTimeout(() => setIsOpenDelayed(true), skipDelayDuration);
                        }, [skipDelayDuration]),
                        isPointerInTransitRef: isPointerInTransitRef,
                        onPointerInTransitChange: $iVrL9$react.useCallback(inTransit => {
                            isPointerInTransitRef.current = inTransit;
                        }, []),
                        disableHoverableContent: disableHoverableContent
                    }, children);
                };
                /*#__PURE__*/
                Object.assign($c34afbc43c90cc6f$export$f78649fb9ca566b8, {
                    displayName: $c34afbc43c90cc6f$var$PROVIDER_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * Tooltip
                 * -----------------------------------------------------------------------------------------------*/
                const $c34afbc43c90cc6f$var$TOOLTIP_NAME = 'Tooltip';
                const [$c34afbc43c90cc6f$var$TooltipContextProvider, $c34afbc43c90cc6f$var$useTooltipContext] = $c34afbc43c90cc6f$var$createTooltipContext($c34afbc43c90cc6f$var$TOOLTIP_NAME);
                const $c34afbc43c90cc6f$export$28c660c63b792dea = props => {
                    const {
                        __scopeTooltip: __scopeTooltip,
                        children: children,
                        open: openProp,
                        defaultOpen = false,
                        onOpenChange: onOpenChange,
                        disableHoverableContent: disableHoverableContentProp,
                        delayDuration: delayDurationProp
                    } = props;
                    const providerContext = $c34afbc43c90cc6f$var$useTooltipProviderContext($c34afbc43c90cc6f$var$TOOLTIP_NAME, props.__scopeTooltip);
                    const popperScope = $c34afbc43c90cc6f$var$usePopperScope(__scopeTooltip);
                    const [trigger, setTrigger] = $iVrL9$react.useState(null);
                    const contentId = $iVrL9$radixuireactid.useId();
                    const openTimerRef = $iVrL9$react.useRef(0);
                    const disableHoverableContent = disableHoverableContentProp !== null && disableHoverableContentProp !== void 0 ? disableHoverableContentProp : providerContext.disableHoverableContent;
                    const delayDuration = delayDurationProp !== null && delayDurationProp !== void 0 ? delayDurationProp : providerContext.delayDuration;
                    const wasOpenDelayedRef = $iVrL9$react.useRef(false);
                    const [open1 = false, setOpen] = $iVrL9$radixuireactusecontrollablestate.useControllableState({
                        prop: openProp,
                        defaultProp: defaultOpen,
                        onChange: open => {
                            if (open) {
                                providerContext.onOpen(); // as `onChange` is called within a lifecycle method we
                                // avoid dispatching via `dispatchDiscreteCustomEvent`.
                                document.dispatchEvent(new CustomEvent($c34afbc43c90cc6f$var$TOOLTIP_OPEN));
                            } else providerContext.onClose();
                            onOpenChange === null || onOpenChange === void 0 || onOpenChange(open);
                        }
                    });
                    const stateAttribute = $iVrL9$react.useMemo(() => {
                        return open1 ? wasOpenDelayedRef.current ? 'delayed-open' : 'instant-open' : 'closed';
                    }, [open1]);
                    const handleOpen = $iVrL9$react.useCallback(() => {
                        window.clearTimeout(openTimerRef.current);
                        wasOpenDelayedRef.current = false;
                        setOpen(true);
                    }, [setOpen]);
                    const handleClose = $iVrL9$react.useCallback(() => {
                        window.clearTimeout(openTimerRef.current);
                        setOpen(false);
                    }, [setOpen]);
                    const handleDelayedOpen = $iVrL9$react.useCallback(() => {
                        window.clearTimeout(openTimerRef.current);
                        openTimerRef.current = window.setTimeout(() => {
                            wasOpenDelayedRef.current = true;
                            setOpen(true);
                        }, delayDuration);
                    }, [delayDuration, setOpen]);
                    $iVrL9$react.useEffect(() => {
                        return () => window.clearTimeout(openTimerRef.current);
                    }, []);
                    return /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactpopper.Root, popperScope, /*#__PURE__*/ $iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipContextProvider, {
                        scope: __scopeTooltip,
                        contentId: contentId,
                        open: open1,
                        stateAttribute: stateAttribute,
                        trigger: trigger,
                        onTriggerChange: setTrigger,
                        onTriggerEnter: $iVrL9$react.useCallback(() => {
                            if (providerContext.isOpenDelayed) handleDelayedOpen();
                            else handleOpen();
                        }, [providerContext.isOpenDelayed, handleDelayedOpen, handleOpen]),
                        onTriggerLeave: $iVrL9$react.useCallback(() => {
                            if (disableHoverableContent) handleClose();
                            else
                                // Clear the timer in case the pointer leaves the trigger before the tooltip is opened.
                                window.clearTimeout(openTimerRef.current);
                        }, [handleClose, disableHoverableContent]),
                        onOpen: handleOpen,
                        onClose: handleClose,
                        disableHoverableContent: disableHoverableContent
                    }, children));
                };
                /*#__PURE__*/
                Object.assign($c34afbc43c90cc6f$export$28c660c63b792dea, {
                    displayName: $c34afbc43c90cc6f$var$TOOLTIP_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * TooltipTrigger
                 * -----------------------------------------------------------------------------------------------*/
                const $c34afbc43c90cc6f$var$TRIGGER_NAME = 'TooltipTrigger';
                const $c34afbc43c90cc6f$export$8c610744efcf8a1d = /*#__PURE__*/ $iVrL9$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeTooltip: __scopeTooltip,
                        ...triggerProps
                    } = props;
                    const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$TRIGGER_NAME, __scopeTooltip);
                    const providerContext = $c34afbc43c90cc6f$var$useTooltipProviderContext($c34afbc43c90cc6f$var$TRIGGER_NAME, __scopeTooltip);
                    const popperScope = $c34afbc43c90cc6f$var$usePopperScope(__scopeTooltip);
                    const ref = $iVrL9$react.useRef(null);
                    const composedRefs = $iVrL9$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref, context.onTriggerChange);
                    const isPointerDownRef = $iVrL9$react.useRef(false);
                    const hasPointerMoveOpenedRef = $iVrL9$react.useRef(false);
                    const handlePointerUp = $iVrL9$react.useCallback(() => isPointerDownRef.current = false, []);
                    $iVrL9$react.useEffect(() => {
                        return () => document.removeEventListener('pointerup', handlePointerUp);
                    }, [handlePointerUp]);
                    return /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactpopper.Anchor, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
                        asChild: true
                    }, popperScope), /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactprimitive.Primitive.button, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
                        // We purposefully avoid adding `type=button` here because tooltip triggers are also
                        // commonly anchors and the anchor `type` attribute signifies MIME type.
                        "aria-describedby": context.open ? context.contentId : undefined,
                        "data-state": context.stateAttribute
                    }, triggerProps, {
                        ref: composedRefs,
                        onPointerMove: $iVrL9$radixuiprimitive.composeEventHandlers(props.onPointerMove, event => {
                            if (event.pointerType === 'touch') return;
                            if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
                                context.onTriggerEnter();
                                hasPointerMoveOpenedRef.current = true;
                            }
                        }),
                        onPointerLeave: $iVrL9$radixuiprimitive.composeEventHandlers(props.onPointerLeave, () => {
                            context.onTriggerLeave();
                            hasPointerMoveOpenedRef.current = false;
                        }),
                        onPointerDown: $iVrL9$radixuiprimitive.composeEventHandlers(props.onPointerDown, () => {
                            isPointerDownRef.current = true;
                            document.addEventListener('pointerup', handlePointerUp, {
                                once: true
                            });
                        }),
                        onFocus: $iVrL9$radixuiprimitive.composeEventHandlers(props.onFocus, () => {
                            if (!isPointerDownRef.current) context.onOpen();
                        }),
                        onBlur: $iVrL9$radixuiprimitive.composeEventHandlers(props.onBlur, context.onClose),
                        onClick: $iVrL9$radixuiprimitive.composeEventHandlers(props.onClick, context.onClose)
                    })));
                });
                /*#__PURE__*/
                Object.assign($c34afbc43c90cc6f$export$8c610744efcf8a1d, {
                    displayName: $c34afbc43c90cc6f$var$TRIGGER_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * TooltipPortal
                 * -----------------------------------------------------------------------------------------------*/
                const $c34afbc43c90cc6f$var$PORTAL_NAME = 'TooltipPortal';
                const [$c34afbc43c90cc6f$var$PortalProvider, $c34afbc43c90cc6f$var$usePortalContext] = $c34afbc43c90cc6f$var$createTooltipContext($c34afbc43c90cc6f$var$PORTAL_NAME, {
                    forceMount: undefined
                });
                const $c34afbc43c90cc6f$export$7b36b8f925ab7497 = props => {
                    const {
                        __scopeTooltip: __scopeTooltip,
                        forceMount: forceMount,
                        children: children,
                        container: container
                    } = props;
                    const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$PORTAL_NAME, __scopeTooltip);
                    return /*#__PURE__*/ $iVrL9$react.createElement($c34afbc43c90cc6f$var$PortalProvider, {
                        scope: __scopeTooltip,
                        forceMount: forceMount
                    }, /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactpresence.Presence, {
                        present: forceMount || context.open
                    }, /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactportal.Portal, {
                        asChild: true,
                        container: container
                    }, children)));
                };
                /*#__PURE__*/
                Object.assign($c34afbc43c90cc6f$export$7b36b8f925ab7497, {
                    displayName: $c34afbc43c90cc6f$var$PORTAL_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * TooltipContent
                 * -----------------------------------------------------------------------------------------------*/
                const $c34afbc43c90cc6f$var$CONTENT_NAME = 'TooltipContent';
                const $c34afbc43c90cc6f$export$e9003e2be37ec060 = /*#__PURE__*/ $iVrL9$react.forwardRef((props, forwardedRef) => {
                    const portalContext = $c34afbc43c90cc6f$var$usePortalContext($c34afbc43c90cc6f$var$CONTENT_NAME, props.__scopeTooltip);
                    const {
                        forceMount = portalContext.forceMount,
                            side = 'top',
                            ...contentProps
                    } = props;
                    const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$CONTENT_NAME, props.__scopeTooltip);
                    return /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactpresence.Presence, {
                        present: forceMount || context.open
                    }, context.disableHoverableContent ? /*#__PURE__*/ $iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipContentImpl, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
                        side: side
                    }, contentProps, {
                        ref: forwardedRef
                    })) : /*#__PURE__*/ $iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipContentHoverable, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
                        side: side
                    }, contentProps, {
                        ref: forwardedRef
                    })));
                });
                const $c34afbc43c90cc6f$var$TooltipContentHoverable = /*#__PURE__*/ $iVrL9$react.forwardRef((props, forwardedRef) => {
                    const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$CONTENT_NAME, props.__scopeTooltip);
                    const providerContext = $c34afbc43c90cc6f$var$useTooltipProviderContext($c34afbc43c90cc6f$var$CONTENT_NAME, props.__scopeTooltip);
                    const ref = $iVrL9$react.useRef(null);
                    const composedRefs = $iVrL9$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
                    const [pointerGraceArea, setPointerGraceArea] = $iVrL9$react.useState(null);
                    const {
                        trigger: trigger,
                        onClose: onClose
                    } = context;
                    const content = ref.current;
                    const {
                        onPointerInTransitChange: onPointerInTransitChange
                    } = providerContext;
                    const handleRemoveGraceArea = $iVrL9$react.useCallback(() => {
                        setPointerGraceArea(null);
                        onPointerInTransitChange(false);
                    }, [onPointerInTransitChange]);
                    const handleCreateGraceArea = $iVrL9$react.useCallback((event, hoverTarget) => {
                        const currentTarget = event.currentTarget;
                        const exitPoint = {
                            x: event.clientX,
                            y: event.clientY
                        };
                        const exitSide = $c34afbc43c90cc6f$var$getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());
                        const paddedExitPoints = $c34afbc43c90cc6f$var$getPaddedExitPoints(exitPoint, exitSide);
                        const hoverTargetPoints = $c34afbc43c90cc6f$var$getPointsFromRect(hoverTarget.getBoundingClientRect());
                        const graceArea = $c34afbc43c90cc6f$var$getHull([...paddedExitPoints, ...hoverTargetPoints]);
                        setPointerGraceArea(graceArea);
                        onPointerInTransitChange(true);
                    }, [onPointerInTransitChange]);
                    $iVrL9$react.useEffect(() => {
                        return () => handleRemoveGraceArea();
                    }, [handleRemoveGraceArea]);
                    $iVrL9$react.useEffect(() => {
                        if (trigger && content) {
                            const handleTriggerLeave = event => handleCreateGraceArea(event, content);
                            const handleContentLeave = event => handleCreateGraceArea(event, trigger);
                            trigger.addEventListener('pointerleave', handleTriggerLeave);
                            content.addEventListener('pointerleave', handleContentLeave);
                            return () => {
                                trigger.removeEventListener('pointerleave', handleTriggerLeave);
                                content.removeEventListener('pointerleave', handleContentLeave);
                            };
                        }
                    }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
                    $iVrL9$react.useEffect(() => {
                        if (pointerGraceArea) {
                            const handleTrackPointerGrace = event => {
                                const target = event.target;
                                const pointerPosition = {
                                    x: event.clientX,
                                    y: event.clientY
                                };
                                const hasEnteredTarget = (trigger === null || trigger === void 0 ? void 0 : trigger.contains(target)) || (content === null || content === void 0 ? void 0 : content.contains(target));
                                const isPointerOutsideGraceArea = !$c34afbc43c90cc6f$var$isPointInPolygon(pointerPosition, pointerGraceArea);
                                if (hasEnteredTarget) handleRemoveGraceArea();
                                else if (isPointerOutsideGraceArea) {
                                    handleRemoveGraceArea();
                                    onClose();
                                }
                            };
                            document.addEventListener('pointermove', handleTrackPointerGrace);
                            return () => document.removeEventListener('pointermove', handleTrackPointerGrace);
                        }
                    }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
                    return /*#__PURE__*/ $iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipContentImpl, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({}, props, {
                        ref: composedRefs
                    }));
                });
                const [$c34afbc43c90cc6f$var$VisuallyHiddenContentContextProvider, $c34afbc43c90cc6f$var$useVisuallyHiddenContentContext] = $c34afbc43c90cc6f$var$createTooltipContext($c34afbc43c90cc6f$var$TOOLTIP_NAME, {
                    isInside: false
                });
                const $c34afbc43c90cc6f$var$TooltipContentImpl = /*#__PURE__*/ $iVrL9$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeTooltip: __scopeTooltip,
                        children: children,
                        'aria-label': ariaLabel,
                        onEscapeKeyDown: onEscapeKeyDown,
                        onPointerDownOutside: onPointerDownOutside,
                        ...contentProps
                    } = props;
                    const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$CONTENT_NAME, __scopeTooltip);
                    const popperScope = $c34afbc43c90cc6f$var$usePopperScope(__scopeTooltip);
                    const {
                        onClose: onClose
                    } = context; // Close this tooltip if another one opens
                    $iVrL9$react.useEffect(() => {
                        document.addEventListener($c34afbc43c90cc6f$var$TOOLTIP_OPEN, onClose);
                        return () => document.removeEventListener($c34afbc43c90cc6f$var$TOOLTIP_OPEN, onClose);
                    }, [onClose]); // Close the tooltip if the trigger is scrolled
                    $iVrL9$react.useEffect(() => {
                        if (context.trigger) {
                            const handleScroll = event => {
                                const target = event.target;
                                if (target !== null && target !== void 0 && target.contains(context.trigger)) onClose();
                            };
                            window.addEventListener('scroll', handleScroll, {
                                capture: true
                            });
                            return () => window.removeEventListener('scroll', handleScroll, {
                                capture: true
                            });
                        }
                    }, [context.trigger, onClose]);
                    return /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactdismissablelayer.DismissableLayer, {
                        asChild: true,
                        disableOutsidePointerEvents: false,
                        onEscapeKeyDown: onEscapeKeyDown,
                        onPointerDownOutside: onPointerDownOutside,
                        onFocusOutside: event => event.preventDefault(),
                        onDismiss: onClose
                    }, /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactpopper.Content, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
                        "data-state": context.stateAttribute
                    }, popperScope, contentProps, {
                        ref: forwardedRef,
                        style: {
                            ...contentProps.style,
                            '--radix-tooltip-content-transform-origin': 'var(--radix-popper-transform-origin)',
                            '--radix-tooltip-content-available-width': 'var(--radix-popper-available-width)',
                            '--radix-tooltip-content-available-height': 'var(--radix-popper-available-height)',
                            '--radix-tooltip-trigger-width': 'var(--radix-popper-anchor-width)',
                            '--radix-tooltip-trigger-height': 'var(--radix-popper-anchor-height)'
                        }
                    }), /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactslot.Slottable, null, children), /*#__PURE__*/ $iVrL9$react.createElement($c34afbc43c90cc6f$var$VisuallyHiddenContentContextProvider, {
                        scope: __scopeTooltip,
                        isInside: true
                    }, /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactvisuallyhidden.Root, {
                        id: context.contentId,
                        role: "tooltip"
                    }, ariaLabel || children))));
                });
                /*#__PURE__*/
                Object.assign($c34afbc43c90cc6f$export$e9003e2be37ec060, {
                    displayName: $c34afbc43c90cc6f$var$CONTENT_NAME
                });
                /* -------------------------------------------------------------------------------------------------
                 * TooltipArrow
                 * -----------------------------------------------------------------------------------------------*/
                const $c34afbc43c90cc6f$var$ARROW_NAME = 'TooltipArrow';
                const $c34afbc43c90cc6f$export$c27ee0ad710f7559 = /*#__PURE__*/ $iVrL9$react.forwardRef((props, forwardedRef) => {
                    const {
                        __scopeTooltip: __scopeTooltip,
                        ...arrowProps
                    } = props;
                    const popperScope = $c34afbc43c90cc6f$var$usePopperScope(__scopeTooltip);
                    const visuallyHiddenContentContext = $c34afbc43c90cc6f$var$useVisuallyHiddenContentContext($c34afbc43c90cc6f$var$ARROW_NAME, __scopeTooltip); // if the arrow is inside the `VisuallyHidden`, we don't want to render it all to
                    // prevent issues in positioning the arrow due to the duplicate
                    return visuallyHiddenContentContext.isInside ? null : /*#__PURE__*/ $iVrL9$react.createElement($iVrL9$radixuireactpopper.Arrow, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({}, popperScope, arrowProps, {
                        ref: forwardedRef
                    }));
                });
                /*#__PURE__*/
                Object.assign($c34afbc43c90cc6f$export$c27ee0ad710f7559, {
                    displayName: $c34afbc43c90cc6f$var$ARROW_NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                function $c34afbc43c90cc6f$var$getExitSideFromRect(point, rect) {
                    const top = Math.abs(rect.top - point.y);
                    const bottom = Math.abs(rect.bottom - point.y);
                    const right = Math.abs(rect.right - point.x);
                    const left = Math.abs(rect.left - point.x);
                    switch (Math.min(top, bottom, right, left)) {
                        case left:
                            return 'left';
                        case right:
                            return 'right';
                        case top:
                            return 'top';
                        case bottom:
                            return 'bottom';
                        default:
                            throw new Error('unreachable');
                    }
                }

                function $c34afbc43c90cc6f$var$getPaddedExitPoints(exitPoint, exitSide, padding = 5) {
                    const paddedExitPoints = [];
                    switch (exitSide) {
                        case 'top':
                            paddedExitPoints.push({
                                x: exitPoint.x - padding,
                                y: exitPoint.y + padding
                            }, {
                                x: exitPoint.x + padding,
                                y: exitPoint.y + padding
                            });
                            break;
                        case 'bottom':
                            paddedExitPoints.push({
                                x: exitPoint.x - padding,
                                y: exitPoint.y - padding
                            }, {
                                x: exitPoint.x + padding,
                                y: exitPoint.y - padding
                            });
                            break;
                        case 'left':
                            paddedExitPoints.push({
                                x: exitPoint.x + padding,
                                y: exitPoint.y - padding
                            }, {
                                x: exitPoint.x + padding,
                                y: exitPoint.y + padding
                            });
                            break;
                        case 'right':
                            paddedExitPoints.push({
                                x: exitPoint.x - padding,
                                y: exitPoint.y - padding
                            }, {
                                x: exitPoint.x - padding,
                                y: exitPoint.y + padding
                            });
                            break;
                    }
                    return paddedExitPoints;
                }

                function $c34afbc43c90cc6f$var$getPointsFromRect(rect) {
                    const {
                        top: top,
                        right: right,
                        bottom: bottom,
                        left: left
                    } = rect;
                    return [{
                        x: left,
                        y: top
                    }, {
                        x: right,
                        y: top
                    }, {
                        x: right,
                        y: bottom
                    }, {
                        x: left,
                        y: bottom
                    }];
                } // Determine if a point is inside of a polygon.
                // Based on https://github.com/substack/point-in-polygon
                function $c34afbc43c90cc6f$var$isPointInPolygon(point, polygon) {
                    const {
                        x: x,
                        y: y
                    } = point;
                    let inside = false;
                    for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
                        const xi = polygon[i].x;
                        const yi = polygon[i].y;
                        const xj = polygon[j].x;
                        const yj = polygon[j].y; // prettier-ignore
                        const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
                        if (intersect) inside = !inside;
                    }
                    return inside;
                } // Returns a new array of points representing the convex hull of the given set of points.
                // https://www.nayuki.io/page/convex-hull-algorithm
                function $c34afbc43c90cc6f$var$getHull(points) {
                    const newPoints = points.slice();
                    newPoints.sort((a, b) => {
                        if (a.x < b.x) return -1;
                        else if (a.x > b.x) return 1;
                        else if (a.y < b.y) return -1;
                        else if (a.y > b.y) return 1;
                        else return 0;
                    });
                    return $c34afbc43c90cc6f$var$getHullPresorted(newPoints);
                } // Returns the convex hull, assuming that each points[i] <= points[i + 1]. Runs in O(n) time.
                function $c34afbc43c90cc6f$var$getHullPresorted(points) {
                    if (points.length <= 1) return points.slice();
                    const upperHull = [];
                    for (let i = 0; i < points.length; i++) {
                        const p = points[i];
                        while (upperHull.length >= 2) {
                            const q = upperHull[upperHull.length - 1];
                            const r = upperHull[upperHull.length - 2];
                            if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();
                            else break;
                        }
                        upperHull.push(p);
                    }
                    upperHull.pop();
                    const lowerHull = [];
                    for (let i1 = points.length - 1; i1 >= 0; i1--) {
                        const p = points[i1];
                        while (lowerHull.length >= 2) {
                            const q = lowerHull[lowerHull.length - 1];
                            const r = lowerHull[lowerHull.length - 2];
                            if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();
                            else break;
                        }
                        lowerHull.push(p);
                    }
                    lowerHull.pop();
                    if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) return upperHull;
                    else return upperHull.concat(lowerHull);
                }
                const $c34afbc43c90cc6f$export$2881499e37b75b9a = $c34afbc43c90cc6f$export$f78649fb9ca566b8;
                const $c34afbc43c90cc6f$export$be92b6f5f03c0fe9 = $c34afbc43c90cc6f$export$28c660c63b792dea;
                const $c34afbc43c90cc6f$export$41fb9f06171c75f4 = $c34afbc43c90cc6f$export$8c610744efcf8a1d;
                const $c34afbc43c90cc6f$export$602eac185826482c = $c34afbc43c90cc6f$export$7b36b8f925ab7497;
                const $c34afbc43c90cc6f$export$7c6e2c02157bb7d2 = $c34afbc43c90cc6f$export$e9003e2be37ec060;
                const $c34afbc43c90cc6f$export$21b07c8f274aebd5 = $c34afbc43c90cc6f$export$c27ee0ad710f7559;

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js ***!
              \****************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $92muK$react = __webpack_require__( /*! react */ "react");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "useCallbackRef", () => $28e03942f763e819$export$25bec8c6f54ee79a);

                /**
                 * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
                 * prop or avoid re-executing effects when passed as a dependency
                 */
                function $28e03942f763e819$export$25bec8c6f54ee79a(callback) {
                    const callbackRef = $92muK$react.useRef(callback);
                    $92muK$react.useEffect(() => {
                        callbackRef.current = callback;
                    }); // https://github.com/facebook/react/issues/19240
                    return $92muK$react.useMemo(() => (...args) => {
                        var _callbackRef$current;
                        return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
                    }, []);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js":
            /*!**********************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js ***!
              \**********************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $ijazI$react = __webpack_require__( /*! react */ "react");
                var $ijazI$radixuireactusecallbackref = __webpack_require__( /*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "useControllableState", () => $b84d42d44371bff7$export$6f32135080cb4c3);

                function $b84d42d44371bff7$export$6f32135080cb4c3({
                    prop: prop,
                    defaultProp: defaultProp,
                    onChange = () => {}
                }) {
                    const [uncontrolledProp, setUncontrolledProp] = $b84d42d44371bff7$var$useUncontrolledState({
                        defaultProp: defaultProp,
                        onChange: onChange
                    });
                    const isControlled = prop !== undefined;
                    const value1 = isControlled ? prop : uncontrolledProp;
                    const handleChange = $ijazI$radixuireactusecallbackref.useCallbackRef(onChange);
                    const setValue = $ijazI$react.useCallback(nextValue => {
                        if (isControlled) {
                            const setter = nextValue;
                            const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
                            if (value !== prop) handleChange(value);
                        } else setUncontrolledProp(nextValue);
                    }, [isControlled, prop, setUncontrolledProp, handleChange]);
                    return [value1, setValue];
                }

                function $b84d42d44371bff7$var$useUncontrolledState({
                    defaultProp: defaultProp,
                    onChange: onChange
                }) {
                    const uncontrolledState = $ijazI$react.useState(defaultProp);
                    const [value] = uncontrolledState;
                    const prevValueRef = $ijazI$react.useRef(value);
                    const handleChange = $ijazI$radixuireactusecallbackref.useCallbackRef(onChange);
                    $ijazI$react.useEffect(() => {
                        if (prevValueRef.current !== value) {
                            handleChange(value);
                            prevValueRef.current = value;
                        }
                    }, [value, prevValueRef, handleChange]);
                    return uncontrolledState;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.js":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.js ***!
              \******************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $b0gz3$react = __webpack_require__( /*! react */ "react");
                var $b0gz3$radixuireactusecallbackref = __webpack_require__( /*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "useEscapeKeydown", () => $24c84e9f83c4454f$export$3a72a57244d6e765);

                /**
                 * Listens for when the escape key is down
                 */
                function $24c84e9f83c4454f$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
                    const onEscapeKeyDown = $b0gz3$radixuireactusecallbackref.useCallbackRef(onEscapeKeyDownProp);
                    $b0gz3$react.useEffect(() => {
                        const handleKeyDown = event => {
                            if (event.key === 'Escape') onEscapeKeyDown(event);
                        };
                        ownerDocument.addEventListener('keydown', handleKeyDown);
                        return () => ownerDocument.removeEventListener('keydown', handleKeyDown);
                    }, [onEscapeKeyDown, ownerDocument]);
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js ***!
              \*****************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $caHyQ$react = __webpack_require__( /*! react */ "react");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "useLayoutEffect", () => $ca21affb0542a8a4$export$e5c5a5f917a5871c);

                /**
                 * On the server, React emits a warning when calling `useLayoutEffect`.
                 * This is because neither `useLayoutEffect` nor `useEffect` run on the server.
                 * We use this safe version which suppresses the warning by replacing it with a noop on the server.
                 *
                 * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
                 */
                const $ca21affb0542a8a4$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? $caHyQ$react.useLayoutEffect : () => {};

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-use-size/dist/index.js":
            /*!********************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-use-size/dist/index.js ***!
              \********************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $ksDzM$react = __webpack_require__( /*! react */ "react");
                var $ksDzM$radixuireactuselayouteffect = __webpack_require__( /*! @radix-ui/react-use-layout-effect */ "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }
                $parcel$export(module.exports, "useSize", () => $d2c1d285af17635b$export$1ab7ae714698c4b8);

                function $d2c1d285af17635b$export$1ab7ae714698c4b8(element) {
                    const [size, setSize] = $ksDzM$react.useState(undefined);
                    $ksDzM$radixuireactuselayouteffect.useLayoutEffect(() => {
                        if (element) {
                            // provide size as early as possible
                            setSize({
                                width: element.offsetWidth,
                                height: element.offsetHeight
                            });
                            const resizeObserver = new ResizeObserver(entries => {
                                if (!Array.isArray(entries)) return;
                                // Since we only observe the one element, we don't need to loop over the
                                // array
                                if (!entries.length) return;
                                const entry = entries[0];
                                let width;
                                let height;
                                if ('borderBoxSize' in entry) {
                                    const borderSizeEntry = entry['borderBoxSize']; // iron out differences between browsers
                                    const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
                                    width = borderSize['inlineSize'];
                                    height = borderSize['blockSize'];
                                } else {
                                    // for browsers that don't support `borderBoxSize`
                                    // we calculate it ourselves to get the correct border box.
                                    width = element.offsetWidth;
                                    height = element.offsetHeight;
                                }
                                setSize({
                                    width: width,
                                    height: height
                                });
                            });
                            resizeObserver.observe(element, {
                                box: 'border-box'
                            });
                            return () => resizeObserver.unobserve(element);
                        } else
                            // We only want to reset to `undefined` when the element becomes `null`,
                            // not if it changes to another element.
                            setSize(undefined);
                    }, [element]);
                    return size;
                }

                /***/
            }),

        /***/
        "../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js ***!
              \***************************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var $awrN2$babelruntimehelpersextends = __webpack_require__( /*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
                var $awrN2$react = __webpack_require__( /*! react */ "react");
                var $awrN2$radixuireactprimitive = __webpack_require__( /*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");

                function $parcel$export(e, n, v, s) {
                    Object.defineProperty(e, n, {
                        get: v,
                        set: s,
                        enumerable: true,
                        configurable: true
                    });
                }

                function $parcel$interopDefault(a) {
                    return a && a.__esModule ? a.default : a;
                }
                $parcel$export(module.exports, "VisuallyHidden", () => $685371e9c20848e2$export$439d29a4e110a164);
                $parcel$export(module.exports, "Root", () => $685371e9c20848e2$export$be92b6f5f03c0fe9);

                /* -------------------------------------------------------------------------------------------------
                 * VisuallyHidden
                 * -----------------------------------------------------------------------------------------------*/
                const $685371e9c20848e2$var$NAME = 'VisuallyHidden';
                const $685371e9c20848e2$export$439d29a4e110a164 = /*#__PURE__*/ $awrN2$react.forwardRef((props, forwardedRef) => {
                    return /*#__PURE__*/ $awrN2$react.createElement($awrN2$radixuireactprimitive.Primitive.span, $parcel$interopDefault($awrN2$babelruntimehelpersextends)({}, props, {
                        ref: forwardedRef,
                        style: {
                            // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
                            position: 'absolute',
                            border: 0,
                            width: 1,
                            height: 1,
                            padding: 0,
                            margin: -1,
                            overflow: 'hidden',
                            clip: 'rect(0, 0, 0, 0)',
                            whiteSpace: 'nowrap',
                            wordWrap: 'normal',
                            ...props.style
                        }
                    }));
                });
                /*#__PURE__*/
                Object.assign($685371e9c20848e2$export$439d29a4e110a164, {
                    displayName: $685371e9c20848e2$var$NAME
                });
                /* -----------------------------------------------------------------------------------------------*/
                const $685371e9c20848e2$export$be92b6f5f03c0fe9 = $685371e9c20848e2$export$439d29a4e110a164;

                /***/
            }),

        /***/
        "../../../node_modules/aria-hidden/dist/es2015/index.js":
            /*!**************************************************************!*\
              !*** ../../../node_modules/aria-hidden/dist/es2015/index.js ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.suppressOthers = exports.supportsInert = exports.inertOthers = exports.hideOthers = void 0;
                var getDefaultParent = function(originalTarget) {
                    if (typeof document === 'undefined') {
                        return null;
                    }
                    var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
                    return sampleTarget.ownerDocument.body;
                };
                var counterMap = new WeakMap();
                var uncontrolledNodes = new WeakMap();
                var markerMap = {};
                var lockCount = 0;
                var unwrapHost = function(node) {
                    return node && (node.host || unwrapHost(node.parentNode));
                };
                var correctTargets = function(parent, targets) {
                    return targets.map(function(target) {
                        if (parent.contains(target)) {
                            return target;
                        }
                        var correctedTarget = unwrapHost(target);
                        if (correctedTarget && parent.contains(correctedTarget)) {
                            return correctedTarget;
                        }
                        console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
                        return null;
                    }).filter(function(x) {
                        return Boolean(x);
                    });
                };
                /**
                 * Marks everything except given node(or nodes) as aria-hidden
                 * @param {Element | Element[]} originalTarget - elements to keep on the page
                 * @param [parentNode] - top element, defaults to document.body
                 * @param {String} [markerName] - a special attribute to mark every node
                 * @param {String} [controlAttribute] - html Attribute to control
                 * @return {Undo} undo command
                 */
                var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
                    var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
                    if (!markerMap[markerName]) {
                        markerMap[markerName] = new WeakMap();
                    }
                    var markerCounter = markerMap[markerName];
                    var hiddenNodes = [];
                    var elementsToKeep = new Set();
                    var elementsToStop = new Set(targets);
                    var keep = function(el) {
                        if (!el || elementsToKeep.has(el)) {
                            return;
                        }
                        elementsToKeep.add(el);
                        keep(el.parentNode);
                    };
                    targets.forEach(keep);
                    var deep = function(parent) {
                        if (!parent || elementsToStop.has(parent)) {
                            return;
                        }
                        Array.prototype.forEach.call(parent.children, function(node) {
                            if (elementsToKeep.has(node)) {
                                deep(node);
                            } else {
                                var attr = node.getAttribute(controlAttribute);
                                var alreadyHidden = attr !== null && attr !== 'false';
                                var counterValue = (counterMap.get(node) || 0) + 1;
                                var markerValue = (markerCounter.get(node) || 0) + 1;
                                counterMap.set(node, counterValue);
                                markerCounter.set(node, markerValue);
                                hiddenNodes.push(node);
                                if (counterValue === 1 && alreadyHidden) {
                                    uncontrolledNodes.set(node, true);
                                }
                                if (markerValue === 1) {
                                    node.setAttribute(markerName, 'true');
                                }
                                if (!alreadyHidden) {
                                    node.setAttribute(controlAttribute, 'true');
                                }
                            }
                        });
                    };
                    deep(parentNode);
                    elementsToKeep.clear();
                    lockCount++;
                    return function() {
                        hiddenNodes.forEach(function(node) {
                            var counterValue = counterMap.get(node) - 1;
                            var markerValue = markerCounter.get(node) - 1;
                            counterMap.set(node, counterValue);
                            markerCounter.set(node, markerValue);
                            if (!counterValue) {
                                if (!uncontrolledNodes.has(node)) {
                                    node.removeAttribute(controlAttribute);
                                }
                                uncontrolledNodes.delete(node);
                            }
                            if (!markerValue) {
                                node.removeAttribute(markerName);
                            }
                        });
                        lockCount--;
                        if (!lockCount) {
                            // clear
                            counterMap = new WeakMap();
                            counterMap = new WeakMap();
                            uncontrolledNodes = new WeakMap();
                            markerMap = {};
                        }
                    };
                };
                /**
                 * Marks everything except given node(or nodes) as aria-hidden
                 * @param {Element | Element[]} originalTarget - elements to keep on the page
                 * @param [parentNode] - top element, defaults to document.body
                 * @param {String} [markerName] - a special attribute to mark every node
                 * @return {Undo} undo command
                 */
                var hideOthers = function(originalTarget, parentNode, markerName) {
                    if (markerName === void 0) {
                        markerName = 'data-aria-hidden';
                    }
                    var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
                    var activeParentNode = parentNode || getDefaultParent(originalTarget);
                    if (!activeParentNode) {
                        return function() {
                            return null;
                        };
                    }
                    // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10
                    targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));
                    return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
                };
                /**
                 * Marks everything except given node(or nodes) as inert
                 * @param {Element | Element[]} originalTarget - elements to keep on the page
                 * @param [parentNode] - top element, defaults to document.body
                 * @param {String} [markerName] - a special attribute to mark every node
                 * @return {Undo} undo command
                 */
                exports.hideOthers = hideOthers;
                var inertOthers = function(originalTarget, parentNode, markerName) {
                    if (markerName === void 0) {
                        markerName = 'data-inert-ed';
                    }
                    var activeParentNode = parentNode || getDefaultParent(originalTarget);
                    if (!activeParentNode) {
                        return function() {
                            return null;
                        };
                    }
                    return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');
                };
                /**
                 * @returns if current browser supports inert
                 */
                exports.inertOthers = inertOthers;
                var supportsInert = function() {
                    return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');
                };
                /**
                 * Automatic function to "suppress" DOM elements - _hide_ or _inert_ in the best possible way
                 * @param {Element | Element[]} originalTarget - elements to keep on the page
                 * @param [parentNode] - top element, defaults to document.body
                 * @param {String} [markerName] - a special attribute to mark every node
                 * @return {Undo} undo command
                 */
                exports.supportsInert = supportsInert;
                var suppressOthers = function(originalTarget, parentNode, markerName) {
                    if (markerName === void 0) {
                        markerName = 'data-suppressed';
                    }
                    return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);
                };
                exports.suppressOthers = suppressOthers;

                /***/
            }),

        /***/
        "../../../node_modules/clsx/dist/clsx.m.js":
            /*!*************************************************!*\
              !*** ../../../node_modules/clsx/dist/clsx.m.js ***!
              \*************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.clsx = clsx;
                exports["default"] = void 0;

                function r(e) {
                    var t,
                        f,
                        n = "";
                    if ("string" == typeof e || "number" == typeof e) n += e;
                    else if ("object" == typeof e)
                        if (Array.isArray(e))
                            for (t = 0; t < e.length; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
                        else
                            for (t in e) e[t] && (n && (n += " "), n += t);
                    return n;
                }

                function clsx() {
                    for (var e, t, f = 0, n = ""; f < arguments.length;)(e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
                    return n;
                }
                var _default = exports["default"] = clsx;

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/comment/comment.js":
            /*!*****************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/comment/comment.js ***!
              \*****************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    var noOptions = {};
                    var nonWS = /[^\s\u00a0]/;
                    var Pos = CodeMirror.Pos,
                        cmp = CodeMirror.cmpPos;

                    function firstNonWS(str) {
                        var found = str.search(nonWS);
                        return found == -1 ? 0 : found;
                    }
                    CodeMirror.commands.toggleComment = function(cm) {
                        cm.toggleComment();
                    };
                    CodeMirror.defineExtension("toggleComment", function(options) {
                        if (!options) options = noOptions;
                        var cm = this;
                        var minLine = Infinity,
                            ranges = this.listSelections(),
                            mode = null;
                        for (var i = ranges.length - 1; i >= 0; i--) {
                            var from = ranges[i].from(),
                                to = ranges[i].to();
                            if (from.line >= minLine) continue;
                            if (to.line >= minLine) to = Pos(minLine, 0);
                            minLine = from.line;
                            if (mode == null) {
                                if (cm.uncomment(from, to, options)) mode = "un";
                                else {
                                    cm.lineComment(from, to, options);
                                    mode = "line";
                                }
                            } else if (mode == "un") {
                                cm.uncomment(from, to, options);
                            } else {
                                cm.lineComment(from, to, options);
                            }
                        }
                    });

                    // Rough heuristic to try and detect lines that are part of multi-line string
                    function probablyInsideString(cm, pos, line) {
                        return /\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line, 0))) && !/^[\'\"\`]/.test(line);
                    }

                    function getMode(cm, pos) {
                        var mode = cm.getMode();
                        return mode.useInnerComments === false || !mode.innerMode ? mode : cm.getModeAt(pos);
                    }
                    CodeMirror.defineExtension("lineComment", function(from, to, options) {
                        if (!options) options = noOptions;
                        var self = this,
                            mode = getMode(self, from);
                        var firstLine = self.getLine(from.line);
                        if (firstLine == null || probablyInsideString(self, from, firstLine)) return;
                        var commentString = options.lineComment || mode.lineComment;
                        if (!commentString) {
                            if (options.blockCommentStart || mode.blockCommentStart) {
                                options.fullLines = true;
                                self.blockComment(from, to, options);
                            }
                            return;
                        }
                        var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);
                        var pad = options.padding == null ? " " : options.padding;
                        var blankLines = options.commentBlankLines || from.line == to.line;
                        self.operation(function() {
                            if (options.indent) {
                                var baseString = null;
                                for (var i = from.line; i < end; ++i) {
                                    var line = self.getLine(i);
                                    var whitespace = line.slice(0, firstNonWS(line));
                                    if (baseString == null || baseString.length > whitespace.length) {
                                        baseString = whitespace;
                                    }
                                }
                                for (var i = from.line; i < end; ++i) {
                                    var line = self.getLine(i),
                                        cut = baseString.length;
                                    if (!blankLines && !nonWS.test(line)) continue;
                                    if (line.slice(0, cut) != baseString) cut = firstNonWS(line);
                                    self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));
                                }
                            } else {
                                for (var i = from.line; i < end; ++i) {
                                    if (blankLines || nonWS.test(self.getLine(i))) self.replaceRange(commentString + pad, Pos(i, 0));
                                }
                            }
                        });
                    });
                    CodeMirror.defineExtension("blockComment", function(from, to, options) {
                        if (!options) options = noOptions;
                        var self = this,
                            mode = getMode(self, from);
                        var startString = options.blockCommentStart || mode.blockCommentStart;
                        var endString = options.blockCommentEnd || mode.blockCommentEnd;
                        if (!startString || !endString) {
                            if ((options.lineComment || mode.lineComment) && options.fullLines != false) self.lineComment(from, to, options);
                            return;
                        }
                        if (/\bcomment\b/.test(self.getTokenTypeAt(Pos(from.line, 0)))) return;
                        var end = Math.min(to.line, self.lastLine());
                        if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;
                        var pad = options.padding == null ? " " : options.padding;
                        if (from.line > end) return;
                        self.operation(function() {
                            if (options.fullLines != false) {
                                var lastLineHasText = nonWS.test(self.getLine(end));
                                self.replaceRange(pad + endString, Pos(end));
                                self.replaceRange(startString + pad, Pos(from.line, 0));
                                var lead = options.blockCommentLead || mode.blockCommentLead;
                                if (lead != null)
                                    for (var i = from.line + 1; i <= end; ++i)
                                        if (i != end || lastLineHasText) self.replaceRange(lead + pad, Pos(i, 0));
                            } else {
                                var atCursor = cmp(self.getCursor("to"), to) == 0,
                                    empty = !self.somethingSelected();
                                self.replaceRange(endString, to);
                                if (atCursor) self.setSelection(empty ? to : self.getCursor("from"), to);
                                self.replaceRange(startString, from);
                            }
                        });
                    });
                    CodeMirror.defineExtension("uncomment", function(from, to, options) {
                        if (!options) options = noOptions;
                        var self = this,
                            mode = getMode(self, from);
                        var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()),
                            start = Math.min(from.line, end);

                        // Try finding line comments
                        var lineString = options.lineComment || mode.lineComment,
                            lines = [];
                        var pad = options.padding == null ? " " : options.padding,
                            didSomething;
                        lineComment: {
                            if (!lineString) break lineComment;
                            for (var i = start; i <= end; ++i) {
                                var line = self.getLine(i);
                                var found = line.indexOf(lineString);
                                if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;
                                if (found == -1 && nonWS.test(line)) break lineComment;
                                if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;
                                lines.push(line);
                            }
                            self.operation(function() {
                                for (var i = start; i <= end; ++i) {
                                    var line = lines[i - start];
                                    var pos = line.indexOf(lineString),
                                        endPos = pos + lineString.length;
                                    if (pos < 0) continue;
                                    if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;
                                    didSomething = true;
                                    self.replaceRange("", Pos(i, pos), Pos(i, endPos));
                                }
                            });
                            if (didSomething) return true;
                        }

                        // Try block comments
                        var startString = options.blockCommentStart || mode.blockCommentStart;
                        var endString = options.blockCommentEnd || mode.blockCommentEnd;
                        if (!startString || !endString) return false;
                        var lead = options.blockCommentLead || mode.blockCommentLead;
                        var startLine = self.getLine(start),
                            open = startLine.indexOf(startString);
                        if (open == -1) return false;
                        var endLine = end == start ? startLine : self.getLine(end);
                        var close = endLine.indexOf(endString, end == start ? open + startString.length : 0);
                        var insideStart = Pos(start, open + 1),
                            insideEnd = Pos(end, close + 1);
                        if (close == -1 || !/comment/.test(self.getTokenTypeAt(insideStart)) || !/comment/.test(self.getTokenTypeAt(insideEnd)) || self.getRange(insideStart, insideEnd, "\n").indexOf(endString) > -1) return false;

                        // Avoid killing block comments completely outside the selection.
                        // Positions of the last startString before the start of the selection, and the first endString after it.
                        var lastStart = startLine.lastIndexOf(startString, from.ch);
                        var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);
                        if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;
                        // Positions of the first endString after the end of the selection, and the last startString before it.
                        firstEnd = endLine.indexOf(endString, to.ch);
                        var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);
                        lastStart = firstEnd == -1 || almostLastStart == -1 ? -1 : to.ch + almostLastStart;
                        if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;
                        self.operation(function() {
                            self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)), Pos(end, close + endString.length));
                            var openEnd = open + startString.length;
                            if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;
                            self.replaceRange("", Pos(start, open), Pos(start, openEnd));
                            if (lead)
                                for (var i = start + 1; i <= end; ++i) {
                                    var line = self.getLine(i),
                                        found = line.indexOf(lead);
                                    if (found == -1 || nonWS.test(line.slice(0, found))) continue;
                                    var foundEnd = found + lead.length;
                                    if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;
                                    self.replaceRange("", Pos(i, found), Pos(i, foundEnd));
                                }
                        });
                        return true;
                    });
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/dialog/dialog.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/dialog/dialog.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                // Open simple dialogs on top of an editor. Relies on dialog.css.

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    function dialogDiv(cm, template, bottom) {
                        var wrap = cm.getWrapperElement();
                        var dialog;
                        dialog = wrap.appendChild(document.createElement("div"));
                        if (bottom) dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";
                        else dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";
                        if (typeof template == "string") {
                            dialog.innerHTML = template;
                        } else {
                            // Assuming it's a detached DOM element.
                            dialog.appendChild(template);
                        }
                        CodeMirror.addClass(wrap, 'dialog-opened');
                        return dialog;
                    }

                    function closeNotification(cm, newVal) {
                        if (cm.state.currentNotificationClose) cm.state.currentNotificationClose();
                        cm.state.currentNotificationClose = newVal;
                    }
                    CodeMirror.defineExtension("openDialog", function(template, callback, options) {
                        if (!options) options = {};
                        closeNotification(this, null);
                        var dialog = dialogDiv(this, template, options.bottom);
                        var closed = false,
                            me = this;

                        function close(newVal) {
                            if (typeof newVal == 'string') {
                                inp.value = newVal;
                            } else {
                                if (closed) return;
                                closed = true;
                                CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
                                dialog.parentNode.removeChild(dialog);
                                me.focus();
                                if (options.onClose) options.onClose(dialog);
                            }
                        }
                        var inp = dialog.getElementsByTagName("input")[0],
                            button;
                        if (inp) {
                            inp.focus();
                            if (options.value) {
                                inp.value = options.value;
                                if (options.selectValueOnOpen !== false) {
                                    inp.select();
                                }
                            }
                            if (options.onInput) CodeMirror.on(inp, "input", function(e) {
                                options.onInput(e, inp.value, close);
                            });
                            if (options.onKeyUp) CodeMirror.on(inp, "keyup", function(e) {
                                options.onKeyUp(e, inp.value, close);
                            });
                            CodeMirror.on(inp, "keydown", function(e) {
                                if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) {
                                    return;
                                }
                                if (e.keyCode == 27 || options.closeOnEnter !== false && e.keyCode == 13) {
                                    inp.blur();
                                    CodeMirror.e_stop(e);
                                    close();
                                }
                                if (e.keyCode == 13) callback(inp.value, e);
                            });
                            if (options.closeOnBlur !== false) CodeMirror.on(dialog, "focusout", function(evt) {
                                if (evt.relatedTarget !== null) close();
                            });
                        } else if (button = dialog.getElementsByTagName("button")[0]) {
                            CodeMirror.on(button, "click", function() {
                                close();
                                me.focus();
                            });
                            if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);
                            button.focus();
                        }
                        return close;
                    });
                    CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) {
                        closeNotification(this, null);
                        var dialog = dialogDiv(this, template, options && options.bottom);
                        var buttons = dialog.getElementsByTagName("button");
                        var closed = false,
                            me = this,
                            blurring = 1;

                        function close() {
                            if (closed) return;
                            closed = true;
                            CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
                            dialog.parentNode.removeChild(dialog);
                            me.focus();
                        }
                        buttons[0].focus();
                        for (var i = 0; i < buttons.length; ++i) {
                            var b = buttons[i];
                            (function(callback) {
                                CodeMirror.on(b, "click", function(e) {
                                    CodeMirror.e_preventDefault(e);
                                    close();
                                    if (callback) callback(me);
                                });
                            })(callbacks[i]);
                            CodeMirror.on(b, "blur", function() {
                                --blurring;
                                setTimeout(function() {
                                    if (blurring <= 0) close();
                                }, 200);
                            });
                            CodeMirror.on(b, "focus", function() {
                                ++blurring;
                            });
                        }
                    });

                    /*
                     * openNotification
                     * Opens a notification, that can be closed with an optional timer
                     * (default 5000ms timer) and always closes on click.
                     *
                     * If a notification is opened while another is opened, it will close the
                     * currently opened one and open the new one immediately.
                     */
                    CodeMirror.defineExtension("openNotification", function(template, options) {
                        closeNotification(this, close);
                        var dialog = dialogDiv(this, template, options && options.bottom);
                        var closed = false,
                            doneTimer;
                        var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;

                        function close() {
                            if (closed) return;
                            closed = true;
                            clearTimeout(doneTimer);
                            CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
                            dialog.parentNode.removeChild(dialog);
                        }
                        CodeMirror.on(dialog, 'click', function(e) {
                            CodeMirror.e_preventDefault(e);
                            close();
                        });
                        if (duration) doneTimer = setTimeout(close, duration);
                        return close;
                    });
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/edit/closebrackets.js":
            /*!********************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/edit/closebrackets.js ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    var defaults = {
                        pairs: "()[]{}''\"\"",
                        closeBefore: ")]}'\":;>",
                        triples: "",
                        explode: "[]{}"
                    };
                    var Pos = CodeMirror.Pos;
                    CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) {
                        if (old && old != CodeMirror.Init) {
                            cm.removeKeyMap(keyMap);
                            cm.state.closeBrackets = null;
                        }
                        if (val) {
                            ensureBound(getOption(val, "pairs"));
                            cm.state.closeBrackets = val;
                            cm.addKeyMap(keyMap);
                        }
                    });

                    function getOption(conf, name) {
                        if (name == "pairs" && typeof conf == "string") return conf;
                        if (typeof conf == "object" && conf[name] != null) return conf[name];
                        return defaults[name];
                    }
                    var keyMap = {
                        Backspace: handleBackspace,
                        Enter: handleEnter
                    };

                    function ensureBound(chars) {
                        for (var i = 0; i < chars.length; i++) {
                            var ch = chars.charAt(i),
                                key = "'" + ch + "'";
                            if (!keyMap[key]) keyMap[key] = handler(ch);
                        }
                    }
                    ensureBound(defaults.pairs + "`");

                    function handler(ch) {
                        return function(cm) {
                            return handleChar(cm, ch);
                        };
                    }

                    function getConfig(cm) {
                        var deflt = cm.state.closeBrackets;
                        if (!deflt || deflt.override) return deflt;
                        var mode = cm.getModeAt(cm.getCursor());
                        return mode.closeBrackets || deflt;
                    }

                    function handleBackspace(cm) {
                        var conf = getConfig(cm);
                        if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
                        var pairs = getOption(conf, "pairs");
                        var ranges = cm.listSelections();
                        for (var i = 0; i < ranges.length; i++) {
                            if (!ranges[i].empty()) return CodeMirror.Pass;
                            var around = charsAround(cm, ranges[i].head);
                            if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;
                        }
                        for (var i = ranges.length - 1; i >= 0; i--) {
                            var cur = ranges[i].head;
                            cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1), "+delete");
                        }
                    }

                    function handleEnter(cm) {
                        var conf = getConfig(cm);
                        var explode = conf && getOption(conf, "explode");
                        if (!explode || cm.getOption("disableInput")) return CodeMirror.Pass;
                        var ranges = cm.listSelections();
                        for (var i = 0; i < ranges.length; i++) {
                            if (!ranges[i].empty()) return CodeMirror.Pass;
                            var around = charsAround(cm, ranges[i].head);
                            if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass;
                        }
                        cm.operation(function() {
                            var linesep = cm.lineSeparator() || "\n";
                            cm.replaceSelection(linesep + linesep, null);
                            moveSel(cm, -1);
                            ranges = cm.listSelections();
                            for (var i = 0; i < ranges.length; i++) {
                                var line = ranges[i].head.line;
                                cm.indentLine(line, null, true);
                                cm.indentLine(line + 1, null, true);
                            }
                        });
                    }

                    function moveSel(cm, dir) {
                        var newRanges = [],
                            ranges = cm.listSelections(),
                            primary = 0;
                        for (var i = 0; i < ranges.length; i++) {
                            var range = ranges[i];
                            if (range.head == cm.getCursor()) primary = i;
                            var pos = range.head.ch || dir > 0 ? {
                                line: range.head.line,
                                ch: range.head.ch + dir
                            } : {
                                line: range.head.line - 1
                            };
                            newRanges.push({
                                anchor: pos,
                                head: pos
                            });
                        }
                        cm.setSelections(newRanges, primary);
                    }

                    function contractSelection(sel) {
                        var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0;
                        return {
                            anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)),
                            head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1))
                        };
                    }

                    function handleChar(cm, ch) {
                        var conf = getConfig(cm);
                        if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
                        var pairs = getOption(conf, "pairs");
                        var pos = pairs.indexOf(ch);
                        if (pos == -1) return CodeMirror.Pass;
                        var closeBefore = getOption(conf, "closeBefore");
                        var triples = getOption(conf, "triples");
                        var identical = pairs.charAt(pos + 1) == ch;
                        var ranges = cm.listSelections();
                        var opening = pos % 2 == 0;
                        var type;
                        for (var i = 0; i < ranges.length; i++) {
                            var range = ranges[i],
                                cur = range.head,
                                curType;
                            var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));
                            if (opening && !range.empty()) {
                                curType = "surround";
                            } else if ((identical || !opening) && next == ch) {
                                if (identical && stringStartsAfter(cm, cur)) curType = "both";
                                else if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch) curType = "skipThree";
                                else curType = "skip";
                            } else if (identical && cur.ch > 1 && triples.indexOf(ch) >= 0 && cm.getRange(Pos(cur.line, cur.ch - 2), cur) == ch + ch) {
                                if (cur.ch > 2 && /\bstring/.test(cm.getTokenTypeAt(Pos(cur.line, cur.ch - 2)))) return CodeMirror.Pass;
                                curType = "addFour";
                            } else if (identical) {
                                var prev = cur.ch == 0 ? " " : cm.getRange(Pos(cur.line, cur.ch - 1), cur);
                                if (!CodeMirror.isWordChar(next) && prev != ch && !CodeMirror.isWordChar(prev)) curType = "both";
                                else return CodeMirror.Pass;
                            } else if (opening && (next.length === 0 || /\s/.test(next) || closeBefore.indexOf(next) > -1)) {
                                curType = "both";
                            } else {
                                return CodeMirror.Pass;
                            }
                            if (!type) type = curType;
                            else if (type != curType) return CodeMirror.Pass;
                        }
                        var left = pos % 2 ? pairs.charAt(pos - 1) : ch;
                        var right = pos % 2 ? ch : pairs.charAt(pos + 1);
                        cm.operation(function() {
                            if (type == "skip") {
                                moveSel(cm, 1);
                            } else if (type == "skipThree") {
                                moveSel(cm, 3);
                            } else if (type == "surround") {
                                var sels = cm.getSelections();
                                for (var i = 0; i < sels.length; i++) sels[i] = left + sels[i] + right;
                                cm.replaceSelections(sels, "around");
                                sels = cm.listSelections().slice();
                                for (var i = 0; i < sels.length; i++) sels[i] = contractSelection(sels[i]);
                                cm.setSelections(sels);
                            } else if (type == "both") {
                                cm.replaceSelection(left + right, null);
                                cm.triggerElectric(left + right);
                                moveSel(cm, -1);
                            } else if (type == "addFour") {
                                cm.replaceSelection(left + left + left + left, "before");
                                moveSel(cm, 1);
                            }
                        });
                    }

                    function charsAround(cm, pos) {
                        var str = cm.getRange(Pos(pos.line, pos.ch - 1), Pos(pos.line, pos.ch + 1));
                        return str.length == 2 ? str : null;
                    }

                    function stringStartsAfter(cm, pos) {
                        var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1));
                        return /\bstring/.test(token.type) && token.start == pos.ch && (pos.ch == 0 || !/\bstring/.test(cm.getTokenTypeAt(pos)));
                    }
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/edit/matchbrackets.js":
            /*!********************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/edit/matchbrackets.js ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    var ie_lt8 = /MSIE \d/.test(navigator.userAgent) && (document.documentMode == null || document.documentMode < 8);
                    var Pos = CodeMirror.Pos;
                    var matching = {
                        "(": ")>",
                        ")": "(<",
                        "[": "]>",
                        "]": "[<",
                        "{": "}>",
                        "}": "{<",
                        "<": ">>",
                        ">": "<<"
                    };

                    function bracketRegex(config) {
                        return config && config.bracketRegex || /[(){}[\]]/;
                    }

                    function findMatchingBracket(cm, where, config) {
                        var line = cm.getLineHandle(where.line),
                            pos = where.ch - 1;
                        var afterCursor = config && config.afterCursor;
                        if (afterCursor == null) afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className);
                        var re = bracketRegex(config);

                        // A cursor is defined as between two characters, but in in vim command mode
                        // (i.e. not insert mode), the cursor is visually represented as a
                        // highlighted box on top of the 2nd character. Otherwise, we allow matches
                        // from before or after the cursor.
                        var match = !afterCursor && pos >= 0 && re.test(line.text.charAt(pos)) && matching[line.text.charAt(pos)] || re.test(line.text.charAt(pos + 1)) && matching[line.text.charAt(++pos)];
                        if (!match) return null;
                        var dir = match.charAt(1) == ">" ? 1 : -1;
                        if (config && config.strict && dir > 0 != (pos == where.ch)) return null;
                        var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));
                        var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style, config);
                        if (found == null) return null;
                        return {
                            from: Pos(where.line, pos),
                            to: found && found.pos,
                            match: found && found.ch == match.charAt(0),
                            forward: dir > 0
                        };
                    }

                    // bracketRegex is used to specify which type of bracket to scan
                    // should be a regexp, e.g. /[[\]]/
                    //
                    // Note: If "where" is on an open bracket, then this bracket is ignored.
                    //
                    // Returns false when no bracket was found, null when it reached
                    // maxScanLines and gave up
                    function scanForBracket(cm, where, dir, style, config) {
                        var maxScanLen = config && config.maxScanLineLength || 10000;
                        var maxScanLines = config && config.maxScanLines || 1000;
                        var stack = [];
                        var re = bracketRegex(config);
                        var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1) : Math.max(cm.firstLine() - 1, where.line - maxScanLines);
                        for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {
                            var line = cm.getLine(lineNo);
                            if (!line) continue;
                            var pos = dir > 0 ? 0 : line.length - 1,
                                end = dir > 0 ? line.length : -1;
                            if (line.length > maxScanLen) continue;
                            if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);
                            for (; pos != end; pos += dir) {
                                var ch = line.charAt(pos);
                                if (re.test(ch) && (style === undefined || (cm.getTokenTypeAt(Pos(lineNo, pos + 1)) || "") == (style || ""))) {
                                    var match = matching[ch];
                                    if (match && match.charAt(1) == ">" == dir > 0) stack.push(ch);
                                    else if (!stack.length) return {
                                        pos: Pos(lineNo, pos),
                                        ch: ch
                                    };
                                    else stack.pop();
                                }
                            }
                        }
                        return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;
                    }

                    function matchBrackets(cm, autoclear, config) {
                        // Disable brace matching in long lines, since it'll cause hugely slow updates
                        var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000,
                            highlightNonMatching = config && config.highlightNonMatching;
                        var marks = [],
                            ranges = cm.listSelections();
                        for (var i = 0; i < ranges.length; i++) {
                            var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, config);
                            if (match && (match.match || highlightNonMatching !== false) && cm.getLine(match.from.line).length <= maxHighlightLen) {
                                var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
                                marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {
                                    className: style
                                }));
                                if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen) marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {
                                    className: style
                                }));
                            }
                        }
                        if (marks.length) {
                            // Kludge to work around the IE bug from issue #1193, where text
                            // input stops going to the textarea whenever this fires.
                            if (ie_lt8 && cm.state.focused) cm.focus();
                            var clear = function() {
                                cm.operation(function() {
                                    for (var i = 0; i < marks.length; i++) marks[i].clear();
                                });
                            };
                            if (autoclear) setTimeout(clear, 800);
                            else return clear;
                        }
                    }

                    function doMatchBrackets(cm) {
                        cm.operation(function() {
                            if (cm.state.matchBrackets.currentlyHighlighted) {
                                cm.state.matchBrackets.currentlyHighlighted();
                                cm.state.matchBrackets.currentlyHighlighted = null;
                            }
                            cm.state.matchBrackets.currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);
                        });
                    }

                    function clearHighlighted(cm) {
                        if (cm.state.matchBrackets && cm.state.matchBrackets.currentlyHighlighted) {
                            cm.state.matchBrackets.currentlyHighlighted();
                            cm.state.matchBrackets.currentlyHighlighted = null;
                        }
                    }
                    CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) {
                        if (old && old != CodeMirror.Init) {
                            cm.off("cursorActivity", doMatchBrackets);
                            cm.off("focus", doMatchBrackets);
                            cm.off("blur", clearHighlighted);
                            clearHighlighted(cm);
                        }
                        if (val) {
                            cm.state.matchBrackets = typeof val == "object" ? val : {};
                            cm.on("cursorActivity", doMatchBrackets);
                            cm.on("focus", doMatchBrackets);
                            cm.on("blur", clearHighlighted);
                        }
                    });
                    CodeMirror.defineExtension("matchBrackets", function() {
                        matchBrackets(this, true);
                    });
                    CodeMirror.defineExtension("findMatchingBracket", function(pos, config, oldConfig) {
                        // Backwards-compatibility kludge
                        if (oldConfig || typeof config == "boolean") {
                            if (!oldConfig) {
                                config = config ? {
                                    strict: true
                                } : null;
                            } else {
                                oldConfig.strict = config;
                                config = oldConfig;
                            }
                        }
                        return findMatchingBracket(this, pos, config);
                    });
                    CodeMirror.defineExtension("scanForBracket", function(pos, dir, style, config) {
                        return scanForBracket(this, pos, dir, style, config);
                    });
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/fold/brace-fold.js":
            /*!*****************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/fold/brace-fold.js ***!
              \*****************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    function bracketFolding(pairs) {
                        return function(cm, start) {
                            var line = start.line,
                                lineText = cm.getLine(line);

                            function findOpening(pair) {
                                var tokenType;
                                for (var at = start.ch, pass = 0;;) {
                                    var found = at <= 0 ? -1 : lineText.lastIndexOf(pair[0], at - 1);
                                    if (found == -1) {
                                        if (pass == 1) break;
                                        pass = 1;
                                        at = lineText.length;
                                        continue;
                                    }
                                    if (pass == 1 && found < start.ch) break;
                                    tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));
                                    if (!/^(comment|string)/.test(tokenType)) return {
                                        ch: found + 1,
                                        tokenType: tokenType,
                                        pair: pair
                                    };
                                    at = found - 1;
                                }
                            }

                            function findRange(found) {
                                var count = 1,
                                    lastLine = cm.lastLine(),
                                    end,
                                    startCh = found.ch,
                                    endCh;
                                outer: for (var i = line; i <= lastLine; ++i) {
                                    var text = cm.getLine(i),
                                        pos = i == line ? startCh : 0;
                                    for (;;) {
                                        var nextOpen = text.indexOf(found.pair[0], pos),
                                            nextClose = text.indexOf(found.pair[1], pos);
                                        if (nextOpen < 0) nextOpen = text.length;
                                        if (nextClose < 0) nextClose = text.length;
                                        pos = Math.min(nextOpen, nextClose);
                                        if (pos == text.length) break;
                                        if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == found.tokenType) {
                                            if (pos == nextOpen) ++count;
                                            else if (!--count) {
                                                end = i;
                                                endCh = pos;
                                                break outer;
                                            }
                                        }
                                        ++pos;
                                    }
                                }
                                if (end == null || line == end) return null;
                                return {
                                    from: CodeMirror.Pos(line, startCh),
                                    to: CodeMirror.Pos(end, endCh)
                                };
                            }
                            var found = [];
                            for (var i = 0; i < pairs.length; i++) {
                                var open = findOpening(pairs[i]);
                                if (open) found.push(open);
                            }
                            found.sort(function(a, b) {
                                return a.ch - b.ch;
                            });
                            for (var i = 0; i < found.length; i++) {
                                var range = findRange(found[i]);
                                if (range) return range;
                            }
                            return null;
                        };
                    }
                    CodeMirror.registerHelper("fold", "brace", bracketFolding([
                        ["{", "}"],
                        ["[", "]"]
                    ]));
                    CodeMirror.registerHelper("fold", "brace-paren", bracketFolding([
                        ["{", "}"],
                        ["[", "]"],
                        ["(", ")"]
                    ]));
                    CodeMirror.registerHelper("fold", "import", function(cm, start) {
                        function hasImport(line) {
                            if (line < cm.firstLine() || line > cm.lastLine()) return null;
                            var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
                            if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
                            if (start.type != "keyword" || start.string != "import") return null;
                            // Now find closing semicolon, return its position
                            for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) {
                                var text = cm.getLine(i),
                                    semi = text.indexOf(";");
                                if (semi != -1) return {
                                    startCh: start.end,
                                    end: CodeMirror.Pos(i, semi)
                                };
                            }
                        }
                        var startLine = start.line,
                            has = hasImport(startLine),
                            prev;
                        if (!has || hasImport(startLine - 1) || (prev = hasImport(startLine - 2)) && prev.end.line == startLine - 1) return null;
                        for (var end = has.end;;) {
                            var next = hasImport(end.line + 1);
                            if (next == null) break;
                            end = next.end;
                        }
                        return {
                            from: cm.clipPos(CodeMirror.Pos(startLine, has.startCh + 1)),
                            to: end
                        };
                    });
                    CodeMirror.registerHelper("fold", "include", function(cm, start) {
                        function hasInclude(line) {
                            if (line < cm.firstLine() || line > cm.lastLine()) return null;
                            var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
                            if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
                            if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8;
                        }
                        var startLine = start.line,
                            has = hasInclude(startLine);
                        if (has == null || hasInclude(startLine - 1) != null) return null;
                        for (var end = startLine;;) {
                            var next = hasInclude(end + 1);
                            if (next == null) break;
                            ++end;
                        }
                        return {
                            from: CodeMirror.Pos(startLine, has + 1),
                            to: cm.clipPos(CodeMirror.Pos(end))
                        };
                    });
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/fold/foldcode.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/fold/foldcode.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    function doFold(cm, pos, options, force) {
                        if (options && options.call) {
                            var finder = options;
                            options = null;
                        } else {
                            var finder = getOption(cm, options, "rangeFinder");
                        }
                        if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);
                        var minSize = getOption(cm, options, "minFoldSize");

                        function getRange(allowFolded) {
                            var range = finder(cm, pos);
                            if (!range || range.to.line - range.from.line < minSize) return null;
                            if (force === "fold") return range;
                            var marks = cm.findMarksAt(range.from);
                            for (var i = 0; i < marks.length; ++i) {
                                if (marks[i].__isFold) {
                                    if (!allowFolded) return null;
                                    range.cleared = true;
                                    marks[i].clear();
                                }
                            }
                            return range;
                        }
                        var range = getRange(true);
                        if (getOption(cm, options, "scanUp"))
                            while (!range && pos.line > cm.firstLine()) {
                                pos = CodeMirror.Pos(pos.line - 1, 0);
                                range = getRange(false);
                            }
                        if (!range || range.cleared || force === "unfold") return;
                        var myWidget = makeWidget(cm, options, range);
                        CodeMirror.on(myWidget, "mousedown", function(e) {
                            myRange.clear();
                            CodeMirror.e_preventDefault(e);
                        });
                        var myRange = cm.markText(range.from, range.to, {
                            replacedWith: myWidget,
                            clearOnEnter: getOption(cm, options, "clearOnEnter"),
                            __isFold: true
                        });
                        myRange.on("clear", function(from, to) {
                            CodeMirror.signal(cm, "unfold", cm, from, to);
                        });
                        CodeMirror.signal(cm, "fold", cm, range.from, range.to);
                    }

                    function makeWidget(cm, options, range) {
                        var widget = getOption(cm, options, "widget");
                        if (typeof widget == "function") {
                            widget = widget(range.from, range.to);
                        }
                        if (typeof widget == "string") {
                            var text = document.createTextNode(widget);
                            widget = document.createElement("span");
                            widget.appendChild(text);
                            widget.className = "CodeMirror-foldmarker";
                        } else if (widget) {
                            widget = widget.cloneNode(true);
                        }
                        return widget;
                    }

                    // Clumsy backwards-compatible interface
                    CodeMirror.newFoldFunction = function(rangeFinder, widget) {
                        return function(cm, pos) {
                            doFold(cm, pos, {
                                rangeFinder: rangeFinder,
                                widget: widget
                            });
                        };
                    };

                    // New-style interface
                    CodeMirror.defineExtension("foldCode", function(pos, options, force) {
                        doFold(this, pos, options, force);
                    });
                    CodeMirror.defineExtension("isFolded", function(pos) {
                        var marks = this.findMarksAt(pos);
                        for (var i = 0; i < marks.length; ++i)
                            if (marks[i].__isFold) return true;
                    });
                    CodeMirror.commands.toggleFold = function(cm) {
                        cm.foldCode(cm.getCursor());
                    };
                    CodeMirror.commands.fold = function(cm) {
                        cm.foldCode(cm.getCursor(), null, "fold");
                    };
                    CodeMirror.commands.unfold = function(cm) {
                        cm.foldCode(cm.getCursor(), {
                            scanUp: false
                        }, "unfold");
                    };
                    CodeMirror.commands.foldAll = function(cm) {
                        cm.operation(function() {
                            for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++) cm.foldCode(CodeMirror.Pos(i, 0), {
                                scanUp: false
                            }, "fold");
                        });
                    };
                    CodeMirror.commands.unfoldAll = function(cm) {
                        cm.operation(function() {
                            for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++) cm.foldCode(CodeMirror.Pos(i, 0), {
                                scanUp: false
                            }, "unfold");
                        });
                    };
                    CodeMirror.registerHelper("fold", "combine", function() {
                        var funcs = Array.prototype.slice.call(arguments, 0);
                        return function(cm, start) {
                            for (var i = 0; i < funcs.length; ++i) {
                                var found = funcs[i](cm, start);
                                if (found) return found;
                            }
                        };
                    });
                    CodeMirror.registerHelper("fold", "auto", function(cm, start) {
                        var helpers = cm.getHelpers(start, "fold");
                        for (var i = 0; i < helpers.length; i++) {
                            var cur = helpers[i](cm, start);
                            if (cur) return cur;
                        }
                    });
                    var defaultOptions = {
                        rangeFinder: CodeMirror.fold.auto,
                        widget: "\u2194",
                        minFoldSize: 0,
                        scanUp: false,
                        clearOnEnter: true
                    };
                    CodeMirror.defineOption("foldOptions", null);

                    function getOption(cm, options, name) {
                        if (options && options[name] !== undefined) return options[name];
                        var editorOptions = cm.options.foldOptions;
                        if (editorOptions && editorOptions[name] !== undefined) return editorOptions[name];
                        return defaultOptions[name];
                    }
                    CodeMirror.defineExtension("foldOption", function(options, name) {
                        return getOption(this, options, name);
                    });
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/fold/foldgutter.js":
            /*!*****************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/fold/foldgutter.js ***!
              \*****************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"), __webpack_require__( /*! ./foldcode */ "../../../node_modules/codemirror/addon/fold/foldcode.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    CodeMirror.defineOption("foldGutter", false, function(cm, val, old) {
                        if (old && old != CodeMirror.Init) {
                            cm.clearGutter(cm.state.foldGutter.options.gutter);
                            cm.state.foldGutter = null;
                            cm.off("gutterClick", onGutterClick);
                            cm.off("changes", onChange);
                            cm.off("viewportChange", onViewportChange);
                            cm.off("fold", onFold);
                            cm.off("unfold", onFold);
                            cm.off("swapDoc", onChange);
                        }
                        if (val) {
                            cm.state.foldGutter = new State(parseOptions(val));
                            updateInViewport(cm);
                            cm.on("gutterClick", onGutterClick);
                            cm.on("changes", onChange);
                            cm.on("viewportChange", onViewportChange);
                            cm.on("fold", onFold);
                            cm.on("unfold", onFold);
                            cm.on("swapDoc", onChange);
                        }
                    });
                    var Pos = CodeMirror.Pos;

                    function State(options) {
                        this.options = options;
                        this.from = this.to = 0;
                    }

                    function parseOptions(opts) {
                        if (opts === true) opts = {};
                        if (opts.gutter == null) opts.gutter = "CodeMirror-foldgutter";
                        if (opts.indicatorOpen == null) opts.indicatorOpen = "CodeMirror-foldgutter-open";
                        if (opts.indicatorFolded == null) opts.indicatorFolded = "CodeMirror-foldgutter-folded";
                        return opts;
                    }

                    function isFolded(cm, line) {
                        var marks = cm.findMarks(Pos(line, 0), Pos(line + 1, 0));
                        for (var i = 0; i < marks.length; ++i) {
                            if (marks[i].__isFold) {
                                var fromPos = marks[i].find(-1);
                                if (fromPos && fromPos.line === line) return marks[i];
                            }
                        }
                    }

                    function marker(spec) {
                        if (typeof spec == "string") {
                            var elt = document.createElement("div");
                            elt.className = spec + " CodeMirror-guttermarker-subtle";
                            return elt;
                        } else {
                            return spec.cloneNode(true);
                        }
                    }

                    function updateFoldInfo(cm, from, to) {
                        var opts = cm.state.foldGutter.options,
                            cur = from - 1;
                        var minSize = cm.foldOption(opts, "minFoldSize");
                        var func = cm.foldOption(opts, "rangeFinder");
                        // we can reuse the built-in indicator element if its className matches the new state
                        var clsFolded = typeof opts.indicatorFolded == "string" && classTest(opts.indicatorFolded);
                        var clsOpen = typeof opts.indicatorOpen == "string" && classTest(opts.indicatorOpen);
                        cm.eachLine(from, to, function(line) {
                            ++cur;
                            var mark = null;
                            var old = line.gutterMarkers;
                            if (old) old = old[opts.gutter];
                            if (isFolded(cm, cur)) {
                                if (clsFolded && old && clsFolded.test(old.className)) return;
                                mark = marker(opts.indicatorFolded);
                            } else {
                                var pos = Pos(cur, 0);
                                var range = func && func(cm, pos);
                                if (range && range.to.line - range.from.line >= minSize) {
                                    if (clsOpen && old && clsOpen.test(old.className)) return;
                                    mark = marker(opts.indicatorOpen);
                                }
                            }
                            if (!mark && !old) return;
                            cm.setGutterMarker(line, opts.gutter, mark);
                        });
                    }

                    // copied from CodeMirror/src/util/dom.js
                    function classTest(cls) {
                        return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*");
                    }

                    function updateInViewport(cm) {
                        var vp = cm.getViewport(),
                            state = cm.state.foldGutter;
                        if (!state) return;
                        cm.operation(function() {
                            updateFoldInfo(cm, vp.from, vp.to);
                        });
                        state.from = vp.from;
                        state.to = vp.to;
                    }

                    function onGutterClick(cm, line, gutter) {
                        var state = cm.state.foldGutter;
                        if (!state) return;
                        var opts = state.options;
                        if (gutter != opts.gutter) return;
                        var folded = isFolded(cm, line);
                        if (folded) folded.clear();
                        else cm.foldCode(Pos(line, 0), opts);
                    }

                    function onChange(cm) {
                        var state = cm.state.foldGutter;
                        if (!state) return;
                        var opts = state.options;
                        state.from = state.to = 0;
                        clearTimeout(state.changeUpdate);
                        state.changeUpdate = setTimeout(function() {
                            updateInViewport(cm);
                        }, opts.foldOnChangeTimeSpan || 600);
                    }

                    function onViewportChange(cm) {
                        var state = cm.state.foldGutter;
                        if (!state) return;
                        var opts = state.options;
                        clearTimeout(state.changeUpdate);
                        state.changeUpdate = setTimeout(function() {
                            var vp = cm.getViewport();
                            if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {
                                updateInViewport(cm);
                            } else {
                                cm.operation(function() {
                                    if (vp.from < state.from) {
                                        updateFoldInfo(cm, vp.from, state.from);
                                        state.from = vp.from;
                                    }
                                    if (vp.to > state.to) {
                                        updateFoldInfo(cm, state.to, vp.to);
                                        state.to = vp.to;
                                    }
                                });
                            }
                        }, opts.updateViewportTimeSpan || 400);
                    }

                    function onFold(cm, from) {
                        var state = cm.state.foldGutter;
                        if (!state) return;
                        var line = from.line;
                        if (line >= state.from && line < state.to) updateFoldInfo(cm, line, line + 1);
                    }
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/hint/show-hint.js":
            /*!****************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/hint/show-hint.js ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                // declare global: DOMRect

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    var HINT_ELEMENT_CLASS = "CodeMirror-hint";
                    var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active";

                    // This is the old interface, kept around for now to stay
                    // backwards-compatible.
                    CodeMirror.showHint = function(cm, getHints, options) {
                        if (!getHints) return cm.showHint(options);
                        if (options && options.async) getHints.async = true;
                        var newOpts = {
                            hint: getHints
                        };
                        if (options)
                            for (var prop in options) newOpts[prop] = options[prop];
                        return cm.showHint(newOpts);
                    };
                    CodeMirror.defineExtension("showHint", function(options) {
                        options = parseOptions(this, this.getCursor("start"), options);
                        var selections = this.listSelections();
                        if (selections.length > 1) return;
                        // By default, don't allow completion when something is selected.
                        // A hint function can have a `supportsSelection` property to
                        // indicate that it can handle selections.
                        if (this.somethingSelected()) {
                            if (!options.hint.supportsSelection) return;
                            // Don't try with cross-line selections
                            for (var i = 0; i < selections.length; i++)
                                if (selections[i].head.line != selections[i].anchor.line) return;
                        }
                        if (this.state.completionActive) this.state.completionActive.close();
                        var completion = this.state.completionActive = new Completion(this, options);
                        if (!completion.options.hint) return;
                        CodeMirror.signal(this, "startCompletion", this);
                        completion.update(true);
                    });
                    CodeMirror.defineExtension("closeHint", function() {
                        if (this.state.completionActive) this.state.completionActive.close();
                    });

                    function Completion(cm, options) {
                        this.cm = cm;
                        this.options = options;
                        this.widget = null;
                        this.debounce = 0;
                        this.tick = 0;
                        this.startPos = this.cm.getCursor("start");
                        this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;
                        if (this.options.updateOnCursorActivity) {
                            var self = this;
                            cm.on("cursorActivity", this.activityFunc = function() {
                                self.cursorActivity();
                            });
                        }
                    }
                    var requestAnimationFrame = window.requestAnimationFrame || function(fn) {
                        return setTimeout(fn, 1000 / 60);
                    };
                    var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
                    Completion.prototype = {
                        close: function() {
                            if (!this.active()) return;
                            this.cm.state.completionActive = null;
                            this.tick = null;
                            if (this.options.updateOnCursorActivity) {
                                this.cm.off("cursorActivity", this.activityFunc);
                            }
                            if (this.widget && this.data) CodeMirror.signal(this.data, "close");
                            if (this.widget) this.widget.close();
                            CodeMirror.signal(this.cm, "endCompletion", this.cm);
                        },
                        active: function() {
                            return this.cm.state.completionActive == this;
                        },
                        pick: function(data, i) {
                            var completion = data.list[i],
                                self = this;
                            this.cm.operation(function() {
                                if (completion.hint) completion.hint(self.cm, data, completion);
                                else self.cm.replaceRange(getText(completion), completion.from || data.from, completion.to || data.to, "complete");
                                CodeMirror.signal(data, "pick", completion);
                                self.cm.scrollIntoView();
                            });
                            if (this.options.closeOnPick) {
                                this.close();
                            }
                        },
                        cursorActivity: function() {
                            if (this.debounce) {
                                cancelAnimationFrame(this.debounce);
                                this.debounce = 0;
                            }
                            var identStart = this.startPos;
                            if (this.data) {
                                identStart = this.data.from;
                            }
                            var pos = this.cm.getCursor(),
                                line = this.cm.getLine(pos.line);
                            if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch || pos.ch < identStart.ch || this.cm.somethingSelected() || !pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1))) {
                                this.close();
                            } else {
                                var self = this;
                                this.debounce = requestAnimationFrame(function() {
                                    self.update();
                                });
                                if (this.widget) this.widget.disable();
                            }
                        },
                        update: function(first) {
                            if (this.tick == null) return;
                            var self = this,
                                myTick = ++this.tick;
                            fetchHints(this.options.hint, this.cm, this.options, function(data) {
                                if (self.tick == myTick) self.finishUpdate(data, first);
                            });
                        },
                        finishUpdate: function(data, first) {
                            if (this.data) CodeMirror.signal(this.data, "update");
                            var picked = this.widget && this.widget.picked || first && this.options.completeSingle;
                            if (this.widget) this.widget.close();
                            this.data = data;
                            if (data && data.list.length) {
                                if (picked && data.list.length == 1) {
                                    this.pick(data, 0);
                                } else {
                                    this.widget = new Widget(this, data);
                                    CodeMirror.signal(data, "shown");
                                }
                            }
                        }
                    };

                    function parseOptions(cm, pos, options) {
                        var editor = cm.options.hintOptions;
                        var out = {};
                        for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
                        if (editor)
                            for (var prop in editor)
                                if (editor[prop] !== undefined) out[prop] = editor[prop];
                        if (options)
                            for (var prop in options)
                                if (options[prop] !== undefined) out[prop] = options[prop];
                        if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos);
                        return out;
                    }

                    function getText(completion) {
                        if (typeof completion == "string") return completion;
                        else return completion.text;
                    }

                    function buildKeyMap(completion, handle) {
                        var baseMap = {
                            Up: function() {
                                handle.moveFocus(-1);
                            },
                            Down: function() {
                                handle.moveFocus(1);
                            },
                            PageUp: function() {
                                handle.moveFocus(-handle.menuSize() + 1, true);
                            },
                            PageDown: function() {
                                handle.moveFocus(handle.menuSize() - 1, true);
                            },
                            Home: function() {
                                handle.setFocus(0);
                            },
                            End: function() {
                                handle.setFocus(handle.length - 1);
                            },
                            Enter: handle.pick,
                            Tab: handle.pick,
                            Esc: handle.close
                        };
                        var mac = /Mac/.test(navigator.platform);
                        if (mac) {
                            baseMap["Ctrl-P"] = function() {
                                handle.moveFocus(-1);
                            };
                            baseMap["Ctrl-N"] = function() {
                                handle.moveFocus(1);
                            };
                        }
                        var custom = completion.options.customKeys;
                        var ourMap = custom ? {} : baseMap;

                        function addBinding(key, val) {
                            var bound;
                            if (typeof val != "string") bound = function(cm) {
                                return val(cm, handle);
                            };
                            // This mechanism is deprecated
                            else if (baseMap.hasOwnProperty(val)) bound = baseMap[val];
                            else bound = val;
                            ourMap[key] = bound;
                        }
                        if (custom)
                            for (var key in custom)
                                if (custom.hasOwnProperty(key)) addBinding(key, custom[key]);
                        var extra = completion.options.extraKeys;
                        if (extra)
                            for (var key in extra)
                                if (extra.hasOwnProperty(key)) addBinding(key, extra[key]);
                        return ourMap;
                    }

                    function getHintElement(hintsElement, el) {
                        while (el && el != hintsElement) {
                            if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el;
                            el = el.parentNode;
                        }
                    }

                    function Widget(completion, data) {
                        this.id = "cm-complete-" + Math.floor(Math.random(1e6));
                        this.completion = completion;
                        this.data = data;
                        this.picked = false;
                        var widget = this,
                            cm = completion.cm;
                        var ownerDocument = cm.getInputField().ownerDocument;
                        var parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow;
                        var hints = this.hints = ownerDocument.createElement("ul");
                        hints.setAttribute("role", "listbox");
                        hints.setAttribute("aria-expanded", "true");
                        hints.id = this.id;
                        var theme = completion.cm.options.theme;
                        hints.className = "CodeMirror-hints " + theme;
                        this.selectedHint = data.selectedHint || 0;
                        var completions = data.list;
                        for (var i = 0; i < completions.length; ++i) {
                            var elt = hints.appendChild(ownerDocument.createElement("li")),
                                cur = completions[i];
                            var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);
                            if (cur.className != null) className = cur.className + " " + className;
                            elt.className = className;
                            if (i == this.selectedHint) elt.setAttribute("aria-selected", "true");
                            elt.id = this.id + "-" + i;
                            elt.setAttribute("role", "option");
                            if (cur.render) cur.render(elt, data, cur);
                            else elt.appendChild(ownerDocument.createTextNode(cur.displayText || getText(cur)));
                            elt.hintId = i;
                        }
                        var container = completion.options.container || ownerDocument.body;
                        var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null);
                        var left = pos.left,
                            top = pos.bottom,
                            below = true;
                        var offsetLeft = 0,
                            offsetTop = 0;
                        if (container !== ownerDocument.body) {
                            // We offset the cursor position because left and top are relative to the offsetParent's top left corner.
                            var isContainerPositioned = ['absolute', 'relative', 'fixed'].indexOf(parentWindow.getComputedStyle(container).position) !== -1;
                            var offsetParent = isContainerPositioned ? container : container.offsetParent;
                            var offsetParentPosition = offsetParent.getBoundingClientRect();
                            var bodyPosition = ownerDocument.body.getBoundingClientRect();
                            offsetLeft = offsetParentPosition.left - bodyPosition.left - offsetParent.scrollLeft;
                            offsetTop = offsetParentPosition.top - bodyPosition.top - offsetParent.scrollTop;
                        }
                        hints.style.left = left - offsetLeft + "px";
                        hints.style.top = top - offsetTop + "px";

                        // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.
                        var winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth);
                        var winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight);
                        container.appendChild(hints);
                        cm.getInputField().setAttribute("aria-autocomplete", "list");
                        cm.getInputField().setAttribute("aria-owns", this.id);
                        cm.getInputField().setAttribute("aria-activedescendant", this.id + "-" + this.selectedHint);
                        var box = completion.options.moveOnOverlap ? hints.getBoundingClientRect() : new DOMRect();
                        var scrolls = completion.options.paddingForScrollbar ? hints.scrollHeight > hints.clientHeight + 1 : false;

                        // Compute in the timeout to avoid reflow on init
                        var startScroll;
                        setTimeout(function() {
                            startScroll = cm.getScrollInfo();
                        });
                        var overlapY = box.bottom - winH;
                        if (overlapY > 0) {
                            var height = box.bottom - box.top,
                                curTop = pos.top - (pos.bottom - box.top);
                            if (curTop - height > 0) {
                                // Fits above cursor
                                hints.style.top = (top = pos.top - height - offsetTop) + "px";
                                below = false;
                            } else if (height > winH) {
                                hints.style.height = winH - 5 + "px";
                                hints.style.top = (top = pos.bottom - box.top - offsetTop) + "px";
                                var cursor = cm.getCursor();
                                if (data.from.ch != cursor.ch) {
                                    pos = cm.cursorCoords(cursor);
                                    hints.style.left = (left = pos.left - offsetLeft) + "px";
                                    box = hints.getBoundingClientRect();
                                }
                            }
                        }
                        var overlapX = box.right - winW;
                        if (scrolls) overlapX += cm.display.nativeBarWidth;
                        if (overlapX > 0) {
                            if (box.right - box.left > winW) {
                                hints.style.width = winW - 5 + "px";
                                overlapX -= box.right - box.left - winW;
                            }
                            hints.style.left = (left = pos.left - overlapX - offsetLeft) + "px";
                        }
                        if (scrolls)
                            for (var node = hints.firstChild; node; node = node.nextSibling) node.style.paddingRight = cm.display.nativeBarWidth + "px";
                        cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
                            moveFocus: function(n, avoidWrap) {
                                widget.changeActive(widget.selectedHint + n, avoidWrap);
                            },
                            setFocus: function(n) {
                                widget.changeActive(n);
                            },
                            menuSize: function() {
                                return widget.screenAmount();
                            },
                            length: completions.length,
                            close: function() {
                                completion.close();
                            },
                            pick: function() {
                                widget.pick();
                            },
                            data: data
                        }));
                        if (completion.options.closeOnUnfocus) {
                            var closingOnBlur;
                            cm.on("blur", this.onBlur = function() {
                                closingOnBlur = setTimeout(function() {
                                    completion.close();
                                }, 100);
                            });
                            cm.on("focus", this.onFocus = function() {
                                clearTimeout(closingOnBlur);
                            });
                        }
                        cm.on("scroll", this.onScroll = function() {
                            var curScroll = cm.getScrollInfo(),
                                editor = cm.getWrapperElement().getBoundingClientRect();
                            if (!startScroll) startScroll = cm.getScrollInfo();
                            var newTop = top + startScroll.top - curScroll.top;
                            var point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop);
                            if (!below) point += hints.offsetHeight;
                            if (point <= editor.top || point >= editor.bottom) return completion.close();
                            hints.style.top = newTop + "px";
                            hints.style.left = left + startScroll.left - curScroll.left + "px";
                        });
                        CodeMirror.on(hints, "dblclick", function(e) {
                            var t = getHintElement(hints, e.target || e.srcElement);
                            if (t && t.hintId != null) {
                                widget.changeActive(t.hintId);
                                widget.pick();
                            }
                        });
                        CodeMirror.on(hints, "click", function(e) {
                            var t = getHintElement(hints, e.target || e.srcElement);
                            if (t && t.hintId != null) {
                                widget.changeActive(t.hintId);
                                if (completion.options.completeOnSingleClick) widget.pick();
                            }
                        });
                        CodeMirror.on(hints, "mousedown", function() {
                            setTimeout(function() {
                                cm.focus();
                            }, 20);
                        });

                        // The first hint doesn't need to be scrolled to on init
                        var selectedHintRange = this.getSelectedHintRange();
                        if (selectedHintRange.from !== 0 || selectedHintRange.to !== 0) {
                            this.scrollToActive();
                        }
                        CodeMirror.signal(data, "select", completions[this.selectedHint], hints.childNodes[this.selectedHint]);
                        return true;
                    }
                    Widget.prototype = {
                        close: function() {
                            if (this.completion.widget != this) return;
                            this.completion.widget = null;
                            if (this.hints.parentNode) this.hints.parentNode.removeChild(this.hints);
                            this.completion.cm.removeKeyMap(this.keyMap);
                            var input = this.completion.cm.getInputField();
                            input.removeAttribute("aria-activedescendant");
                            input.removeAttribute("aria-owns");
                            var cm = this.completion.cm;
                            if (this.completion.options.closeOnUnfocus) {
                                cm.off("blur", this.onBlur);
                                cm.off("focus", this.onFocus);
                            }
                            cm.off("scroll", this.onScroll);
                        },
                        disable: function() {
                            this.completion.cm.removeKeyMap(this.keyMap);
                            var widget = this;
                            this.keyMap = {
                                Enter: function() {
                                    widget.picked = true;
                                }
                            };
                            this.completion.cm.addKeyMap(this.keyMap);
                        },
                        pick: function() {
                            this.completion.pick(this.data, this.selectedHint);
                        },
                        changeActive: function(i, avoidWrap) {
                            if (i >= this.data.list.length) i = avoidWrap ? this.data.list.length - 1 : 0;
                            else if (i < 0) i = avoidWrap ? 0 : this.data.list.length - 1;
                            if (this.selectedHint == i) return;
                            var node = this.hints.childNodes[this.selectedHint];
                            if (node) {
                                node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
                                node.removeAttribute("aria-selected");
                            }
                            node = this.hints.childNodes[this.selectedHint = i];
                            node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
                            node.setAttribute("aria-selected", "true");
                            this.completion.cm.getInputField().setAttribute("aria-activedescendant", node.id);
                            this.scrollToActive();
                            CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
                        },
                        scrollToActive: function() {
                            var selectedHintRange = this.getSelectedHintRange();
                            var node1 = this.hints.childNodes[selectedHintRange.from];
                            var node2 = this.hints.childNodes[selectedHintRange.to];
                            var firstNode = this.hints.firstChild;
                            if (node1.offsetTop < this.hints.scrollTop) this.hints.scrollTop = node1.offsetTop - firstNode.offsetTop;
                            else if (node2.offsetTop + node2.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) this.hints.scrollTop = node2.offsetTop + node2.offsetHeight - this.hints.clientHeight + firstNode.offsetTop;
                        },
                        screenAmount: function() {
                            return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
                        },
                        getSelectedHintRange: function() {
                            var margin = this.completion.options.scrollMargin || 0;
                            return {
                                from: Math.max(0, this.selectedHint - margin),
                                to: Math.min(this.data.list.length - 1, this.selectedHint + margin)
                            };
                        }
                    };

                    function applicableHelpers(cm, helpers) {
                        if (!cm.somethingSelected()) return helpers;
                        var result = [];
                        for (var i = 0; i < helpers.length; i++)
                            if (helpers[i].supportsSelection) result.push(helpers[i]);
                        return result;
                    }

                    function fetchHints(hint, cm, options, callback) {
                        if (hint.async) {
                            hint(cm, callback, options);
                        } else {
                            var result = hint(cm, options);
                            if (result && result.then) result.then(callback);
                            else callback(result);
                        }
                    }

                    function resolveAutoHints(cm, pos) {
                        var helpers = cm.getHelpers(pos, "hint"),
                            words;
                        if (helpers.length) {
                            var resolved = function(cm, callback, options) {
                                var app = applicableHelpers(cm, helpers);

                                function run(i) {
                                    if (i == app.length) return callback(null);
                                    fetchHints(app[i], cm, options, function(result) {
                                        if (result && result.list.length > 0) callback(result);
                                        else run(i + 1);
                                    });
                                }
                                run(0);
                            };
                            resolved.async = true;
                            resolved.supportsSelection = true;
                            return resolved;
                        } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
                            return function(cm) {
                                return CodeMirror.hint.fromList(cm, {
                                    words: words
                                });
                            };
                        } else if (CodeMirror.hint.anyword) {
                            return function(cm, options) {
                                return CodeMirror.hint.anyword(cm, options);
                            };
                        } else {
                            return function() {};
                        }
                    }
                    CodeMirror.registerHelper("hint", "auto", {
                        resolve: resolveAutoHints
                    });
                    CodeMirror.registerHelper("hint", "fromList", function(cm, options) {
                        var cur = cm.getCursor(),
                            token = cm.getTokenAt(cur);
                        var term,
                            from = CodeMirror.Pos(cur.line, token.start),
                            to = cur;
                        if (token.start < cur.ch && /\w/.test(token.string.charAt(cur.ch - token.start - 1))) {
                            term = token.string.substr(0, cur.ch - token.start);
                        } else {
                            term = "";
                            from = cur;
                        }
                        var found = [];
                        for (var i = 0; i < options.words.length; i++) {
                            var word = options.words[i];
                            if (word.slice(0, term.length) == term) found.push(word);
                        }
                        if (found.length) return {
                            list: found,
                            from: from,
                            to: to
                        };
                    });
                    CodeMirror.commands.autocomplete = CodeMirror.showHint;
                    var defaultOptions = {
                        hint: CodeMirror.hint.auto,
                        completeSingle: true,
                        alignWithWord: true,
                        closeCharacters: /[\s()\[\]{};:>,]/,
                        closeOnPick: true,
                        closeOnUnfocus: true,
                        updateOnCursorActivity: true,
                        completeOnSingleClick: true,
                        container: null,
                        customKeys: null,
                        extraKeys: null,
                        paddingForScrollbar: true,
                        moveOnOverlap: true
                    };
                    CodeMirror.defineOption("hintOptions", null);
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/lint/lint.js":
            /*!***********************************************************!*\
              !*** ../../../node_modules/codemirror/addon/lint/lint.js ***!
              \***********************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    var GUTTER_ID = "CodeMirror-lint-markers";
                    var LINT_LINE_ID = "CodeMirror-lint-line-";

                    function showTooltip(cm, e, content) {
                        var tt = document.createElement("div");
                        tt.className = "CodeMirror-lint-tooltip cm-s-" + cm.options.theme;
                        tt.appendChild(content.cloneNode(true));
                        if (cm.state.lint.options.selfContain) cm.getWrapperElement().appendChild(tt);
                        else document.body.appendChild(tt);

                        function position(e) {
                            if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position);
                            tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px";
                            tt.style.left = e.clientX + 5 + "px";
                        }
                        CodeMirror.on(document, "mousemove", position);
                        position(e);
                        if (tt.style.opacity != null) tt.style.opacity = 1;
                        return tt;
                    }

                    function rm(elt) {
                        if (elt.parentNode) elt.parentNode.removeChild(elt);
                    }

                    function hideTooltip(tt) {
                        if (!tt.parentNode) return;
                        if (tt.style.opacity == null) rm(tt);
                        tt.style.opacity = 0;
                        setTimeout(function() {
                            rm(tt);
                        }, 600);
                    }

                    function showTooltipFor(cm, e, content, node) {
                        var tooltip = showTooltip(cm, e, content);

                        function hide() {
                            CodeMirror.off(node, "mouseout", hide);
                            if (tooltip) {
                                hideTooltip(tooltip);
                                tooltip = null;
                            }
                        }
                        var poll = setInterval(function() {
                            if (tooltip)
                                for (var n = node;; n = n.parentNode) {
                                    if (n && n.nodeType == 11) n = n.host;
                                    if (n == document.body) return;
                                    if (!n) {
                                        hide();
                                        break;
                                    }
                                }
                            if (!tooltip) return clearInterval(poll);
                        }, 400);
                        CodeMirror.on(node, "mouseout", hide);
                    }

                    function LintState(cm, conf, hasGutter) {
                        this.marked = [];
                        if (conf instanceof Function) conf = {
                            getAnnotations: conf
                        };
                        if (!conf || conf === true) conf = {};
                        this.options = {};
                        this.linterOptions = conf.options || {};
                        for (var prop in defaults) this.options[prop] = defaults[prop];
                        for (var prop in conf) {
                            if (defaults.hasOwnProperty(prop)) {
                                if (conf[prop] != null) this.options[prop] = conf[prop];
                            } else if (!conf.options) {
                                this.linterOptions[prop] = conf[prop];
                            }
                        }
                        this.timeout = null;
                        this.hasGutter = hasGutter;
                        this.onMouseOver = function(e) {
                            onMouseOver(cm, e);
                        };
                        this.waitingFor = 0;
                    }
                    var defaults = {
                        highlightLines: false,
                        tooltips: true,
                        delay: 500,
                        lintOnChange: true,
                        getAnnotations: null,
                        async: false,
                        selfContain: null,
                        formatAnnotation: null,
                        onUpdateLinting: null
                    };

                    function clearMarks(cm) {
                        var state = cm.state.lint;
                        if (state.hasGutter) cm.clearGutter(GUTTER_ID);
                        if (state.options.highlightLines) clearErrorLines(cm);
                        for (var i = 0; i < state.marked.length; ++i) state.marked[i].clear();
                        state.marked.length = 0;
                    }

                    function clearErrorLines(cm) {
                        cm.eachLine(function(line) {
                            var has = line.wrapClass && /\bCodeMirror-lint-line-\w+\b/.exec(line.wrapClass);
                            if (has) cm.removeLineClass(line, "wrap", has[0]);
                        });
                    }

                    function makeMarker(cm, labels, severity, multiple, tooltips) {
                        var marker = document.createElement("div"),
                            inner = marker;
                        marker.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + severity;
                        if (multiple) {
                            inner = marker.appendChild(document.createElement("div"));
                            inner.className = "CodeMirror-lint-marker CodeMirror-lint-marker-multiple";
                        }
                        if (tooltips != false) CodeMirror.on(inner, "mouseover", function(e) {
                            showTooltipFor(cm, e, labels, inner);
                        });
                        return marker;
                    }

                    function getMaxSeverity(a, b) {
                        if (a == "error") return a;
                        else return b;
                    }

                    function groupByLine(annotations) {
                        var lines = [];
                        for (var i = 0; i < annotations.length; ++i) {
                            var ann = annotations[i],
                                line = ann.from.line;
                            (lines[line] || (lines[line] = [])).push(ann);
                        }
                        return lines;
                    }

                    function annotationTooltip(ann) {
                        var severity = ann.severity;
                        if (!severity) severity = "error";
                        var tip = document.createElement("div");
                        tip.className = "CodeMirror-lint-message CodeMirror-lint-message-" + severity;
                        if (typeof ann.messageHTML != 'undefined') {
                            tip.innerHTML = ann.messageHTML;
                        } else {
                            tip.appendChild(document.createTextNode(ann.message));
                        }
                        return tip;
                    }

                    function lintAsync(cm, getAnnotations) {
                        var state = cm.state.lint;
                        var id = ++state.waitingFor;

                        function abort() {
                            id = -1;
                            cm.off("change", abort);
                        }
                        cm.on("change", abort);
                        getAnnotations(cm.getValue(), function(annotations, arg2) {
                            cm.off("change", abort);
                            if (state.waitingFor != id) return;
                            if (arg2 && annotations instanceof CodeMirror) annotations = arg2;
                            cm.operation(function() {
                                updateLinting(cm, annotations);
                            });
                        }, state.linterOptions, cm);
                    }

                    function startLinting(cm) {
                        var state = cm.state.lint;
                        if (!state) return;
                        var options = state.options;
                        /*
                         * Passing rules in `options` property prevents JSHint (and other linters) from complaining
                         * about unrecognized rules like `onUpdateLinting`, `delay`, `lintOnChange`, etc.
                         */
                        var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint");
                        if (!getAnnotations) return;
                        if (options.async || getAnnotations.async) {
                            lintAsync(cm, getAnnotations);
                        } else {
                            var annotations = getAnnotations(cm.getValue(), state.linterOptions, cm);
                            if (!annotations) return;
                            if (annotations.then) annotations.then(function(issues) {
                                cm.operation(function() {
                                    updateLinting(cm, issues);
                                });
                            });
                            else cm.operation(function() {
                                updateLinting(cm, annotations);
                            });
                        }
                    }

                    function updateLinting(cm, annotationsNotSorted) {
                        var state = cm.state.lint;
                        if (!state) return;
                        var options = state.options;
                        clearMarks(cm);
                        var annotations = groupByLine(annotationsNotSorted);
                        for (var line = 0; line < annotations.length; ++line) {
                            var anns = annotations[line];
                            if (!anns) continue;

                            // filter out duplicate messages
                            var message = [];
                            anns = anns.filter(function(item) {
                                return message.indexOf(item.message) > -1 ? false : message.push(item.message);
                            });
                            var maxSeverity = null;
                            var tipLabel = state.hasGutter && document.createDocumentFragment();
                            for (var i = 0; i < anns.length; ++i) {
                                var ann = anns[i];
                                var severity = ann.severity;
                                if (!severity) severity = "error";
                                maxSeverity = getMaxSeverity(maxSeverity, severity);
                                if (options.formatAnnotation) ann = options.formatAnnotation(ann);
                                if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann));
                                if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {
                                    className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + severity,
                                    __annotation: ann
                                }));
                            }
                            // use original annotations[line] to show multiple messages
                            if (state.hasGutter) cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, annotations[line].length > 1, options.tooltips));
                            if (options.highlightLines) cm.addLineClass(line, "wrap", LINT_LINE_ID + maxSeverity);
                        }
                        if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm);
                    }

                    function onChange(cm) {
                        var state = cm.state.lint;
                        if (!state) return;
                        clearTimeout(state.timeout);
                        state.timeout = setTimeout(function() {
                            startLinting(cm);
                        }, state.options.delay);
                    }

                    function popupTooltips(cm, annotations, e) {
                        var target = e.target || e.srcElement;
                        var tooltip = document.createDocumentFragment();
                        for (var i = 0; i < annotations.length; i++) {
                            var ann = annotations[i];
                            tooltip.appendChild(annotationTooltip(ann));
                        }
                        showTooltipFor(cm, e, tooltip, target);
                    }

                    function onMouseOver(cm, e) {
                        var target = e.target || e.srcElement;
                        if (!/\bCodeMirror-lint-mark-/.test(target.className)) return;
                        var box = target.getBoundingClientRect(),
                            x = (box.left + box.right) / 2,
                            y = (box.top + box.bottom) / 2;
                        var spans = cm.findMarksAt(cm.coordsChar({
                            left: x,
                            top: y
                        }, "client"));
                        var annotations = [];
                        for (var i = 0; i < spans.length; ++i) {
                            var ann = spans[i].__annotation;
                            if (ann) annotations.push(ann);
                        }
                        if (annotations.length) popupTooltips(cm, annotations, e);
                    }
                    CodeMirror.defineOption("lint", false, function(cm, val, old) {
                        if (old && old != CodeMirror.Init) {
                            clearMarks(cm);
                            if (cm.state.lint.options.lintOnChange !== false) cm.off("change", onChange);
                            CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver);
                            clearTimeout(cm.state.lint.timeout);
                            delete cm.state.lint;
                        }
                        if (val) {
                            var gutters = cm.getOption("gutters"),
                                hasLintGutter = false;
                            for (var i = 0; i < gutters.length; ++i)
                                if (gutters[i] == GUTTER_ID) hasLintGutter = true;
                            var state = cm.state.lint = new LintState(cm, val, hasLintGutter);
                            if (state.options.lintOnChange) cm.on("change", onChange);
                            if (state.options.tooltips != false && state.options.tooltips != "gutter") CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
                            startLinting(cm);
                        }
                    });
                    CodeMirror.defineExtension("performLint", function() {
                        startLinting(this);
                    });
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/search/jump-to-line.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/search/jump-to-line.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                // Defines jumpToLine command. Uses dialog.js if present.

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"), __webpack_require__( /*! ../dialog/dialog */ "../../../node_modules/codemirror/addon/dialog/dialog.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    // default search panel location
                    CodeMirror.defineOption("search", {
                        bottom: false
                    });

                    function dialog(cm, text, shortText, deflt, f) {
                        if (cm.openDialog) cm.openDialog(text, f, {
                            value: deflt,
                            selectValueOnOpen: true,
                            bottom: cm.options.search.bottom
                        });
                        else f(prompt(shortText, deflt));
                    }

                    function getJumpDialog(cm) {
                        return cm.phrase("Jump to line:") + ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' + cm.phrase("(Use line:column or scroll% syntax)") + '</span>';
                    }

                    function interpretLine(cm, string) {
                        var num = Number(string);
                        if (/^[-+]/.test(string)) return cm.getCursor().line + num;
                        else return num - 1;
                    }
                    CodeMirror.commands.jumpToLine = function(cm) {
                        var cur = cm.getCursor();
                        dialog(cm, getJumpDialog(cm), cm.phrase("Jump to line:"), cur.line + 1 + ":" + cur.ch, function(posStr) {
                            if (!posStr) return;
                            var match;
                            if (match = /^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(posStr)) {
                                cm.setCursor(interpretLine(cm, match[1]), Number(match[2]));
                            } else if (match = /^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(posStr)) {
                                var line = Math.round(cm.lineCount() * Number(match[1]) / 100);
                                if (/^[-+]/.test(match[1])) line = cur.line + line + 1;
                                cm.setCursor(line - 1, cur.ch);
                            } else if (match = /^\s*\:?\s*([\+\-]?\d+)\s*/.exec(posStr)) {
                                cm.setCursor(interpretLine(cm, match[1]), cur.ch);
                            }
                        });
                    };
                    CodeMirror.keyMap["default"]["Alt-G"] = "jumpToLine";
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/search/search.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/search/search.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                // Define search commands. Depends on dialog.js or another
                // implementation of the openDialog method.

                // Replace works a little oddly -- it will do the replace on the next
                // Ctrl-G (or whatever is bound to findNext) press. You prevent a
                // replace by making sure the match is no longer selected when hitting
                // Ctrl-G.

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"), __webpack_require__( /*! ./searchcursor */ "../../../node_modules/codemirror/addon/search/searchcursor.js"), __webpack_require__( /*! ../dialog/dialog */ "../../../node_modules/codemirror/addon/dialog/dialog.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    // default search panel location
                    CodeMirror.defineOption("search", {
                        bottom: false
                    });

                    function searchOverlay(query, caseInsensitive) {
                        if (typeof query == "string") query = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), caseInsensitive ? "gi" : "g");
                        else if (!query.global) query = new RegExp(query.source, query.ignoreCase ? "gi" : "g");
                        return {
                            token: function(stream) {
                                query.lastIndex = stream.pos;
                                var match = query.exec(stream.string);
                                if (match && match.index == stream.pos) {
                                    stream.pos += match[0].length || 1;
                                    return "searching";
                                } else if (match) {
                                    stream.pos = match.index;
                                } else {
                                    stream.skipToEnd();
                                }
                            }
                        };
                    }

                    function SearchState() {
                        this.posFrom = this.posTo = this.lastQuery = this.query = null;
                        this.overlay = null;
                    }

                    function getSearchState(cm) {
                        return cm.state.search || (cm.state.search = new SearchState());
                    }

                    function queryCaseInsensitive(query) {
                        return typeof query == "string" && query == query.toLowerCase();
                    }

                    function getSearchCursor(cm, query, pos) {
                        // Heuristic: if the query string is all lowercase, do a case insensitive search.
                        return cm.getSearchCursor(query, pos, {
                            caseFold: queryCaseInsensitive(query),
                            multiline: true
                        });
                    }

                    function persistentDialog(cm, text, deflt, onEnter, onKeyDown) {
                        cm.openDialog(text, onEnter, {
                            value: deflt,
                            selectValueOnOpen: true,
                            closeOnEnter: false,
                            onClose: function() {
                                clearSearch(cm);
                            },
                            onKeyDown: onKeyDown,
                            bottom: cm.options.search.bottom
                        });
                    }

                    function dialog(cm, text, shortText, deflt, f) {
                        if (cm.openDialog) cm.openDialog(text, f, {
                            value: deflt,
                            selectValueOnOpen: true,
                            bottom: cm.options.search.bottom
                        });
                        else f(prompt(shortText, deflt));
                    }

                    function confirmDialog(cm, text, shortText, fs) {
                        if (cm.openConfirm) cm.openConfirm(text, fs);
                        else if (confirm(shortText)) fs[0]();
                    }

                    function parseString(string) {
                        return string.replace(/\\([nrt\\])/g, function(match, ch) {
                            if (ch == "n") return "\n";
                            if (ch == "r") return "\r";
                            if (ch == "t") return "\t";
                            if (ch == "\\") return "\\";
                            return match;
                        });
                    }

                    function parseQuery(query) {
                        var isRE = query.match(/^\/(.*)\/([a-z]*)$/);
                        if (isRE) {
                            try {
                                query = new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i");
                            } catch (e) {} // Not a regular expression after all, do a string search
                        } else {
                            query = parseString(query);
                        }
                        if (typeof query == "string" ? query == "" : query.test("")) query = /x^/;
                        return query;
                    }

                    function startSearch(cm, state, query) {
                        state.queryText = query;
                        state.query = parseQuery(query);
                        cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query));
                        state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query));
                        cm.addOverlay(state.overlay);
                        if (cm.showMatchesOnScrollbar) {
                            if (state.annotate) {
                                state.annotate.clear();
                                state.annotate = null;
                            }
                            state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query));
                        }
                    }

                    function doSearch(cm, rev, persistent, immediate) {
                        var state = getSearchState(cm);
                        if (state.query) return findNext(cm, rev);
                        var q = cm.getSelection() || state.lastQuery;
                        if (q instanceof RegExp && q.source == "x^") q = null;
                        if (persistent && cm.openDialog) {
                            var hiding = null;
                            var searchNext = function(query, event) {
                                CodeMirror.e_stop(event);
                                if (!query) return;
                                if (query != state.queryText) {
                                    startSearch(cm, state, query);
                                    state.posFrom = state.posTo = cm.getCursor();
                                }
                                if (hiding) hiding.style.opacity = 1;
                                findNext(cm, event.shiftKey, function(_, to) {
                                    var dialog;
                                    if (to.line < 3 && document.querySelector && (dialog = cm.display.wrapper.querySelector(".CodeMirror-dialog")) && dialog.getBoundingClientRect().bottom - 4 > cm.cursorCoords(to, "window").top)(hiding = dialog).style.opacity = .4;
                                });
                            };
                            persistentDialog(cm, getQueryDialog(cm), q, searchNext, function(event, query) {
                                var keyName = CodeMirror.keyName(event);
                                var extra = cm.getOption('extraKeys'),
                                    cmd = extra && extra[keyName] || CodeMirror.keyMap[cm.getOption("keyMap")][keyName];
                                if (cmd == "findNext" || cmd == "findPrev" || cmd == "findPersistentNext" || cmd == "findPersistentPrev") {
                                    CodeMirror.e_stop(event);
                                    startSearch(cm, getSearchState(cm), query);
                                    cm.execCommand(cmd);
                                } else if (cmd == "find" || cmd == "findPersistent") {
                                    CodeMirror.e_stop(event);
                                    searchNext(query, event);
                                }
                            });
                            if (immediate && q) {
                                startSearch(cm, state, q);
                                findNext(cm, rev);
                            }
                        } else {
                            dialog(cm, getQueryDialog(cm), "Search for:", q, function(query) {
                                if (query && !state.query) cm.operation(function() {
                                    startSearch(cm, state, query);
                                    state.posFrom = state.posTo = cm.getCursor();
                                    findNext(cm, rev);
                                });
                            });
                        }
                    }

                    function findNext(cm, rev, callback) {
                        cm.operation(function() {
                            var state = getSearchState(cm);
                            var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);
                            if (!cursor.find(rev)) {
                                cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0));
                                if (!cursor.find(rev)) return;
                            }
                            cm.setSelection(cursor.from(), cursor.to());
                            cm.scrollIntoView({
                                from: cursor.from(),
                                to: cursor.to()
                            }, 20);
                            state.posFrom = cursor.from();
                            state.posTo = cursor.to();
                            if (callback) callback(cursor.from(), cursor.to());
                        });
                    }

                    function clearSearch(cm) {
                        cm.operation(function() {
                            var state = getSearchState(cm);
                            state.lastQuery = state.query;
                            if (!state.query) return;
                            state.query = state.queryText = null;
                            cm.removeOverlay(state.overlay);
                            if (state.annotate) {
                                state.annotate.clear();
                                state.annotate = null;
                            }
                        });
                    }

                    function el(tag, attrs) {
                        var element = tag ? document.createElement(tag) : document.createDocumentFragment();
                        for (var key in attrs) {
                            element[key] = attrs[key];
                        }
                        for (var i = 2; i < arguments.length; i++) {
                            var child = arguments[i];
                            element.appendChild(typeof child == "string" ? document.createTextNode(child) : child);
                        }
                        return element;
                    }

                    function getQueryDialog(cm) {
                        return el("", null, el("span", {
                            className: "CodeMirror-search-label"
                        }, cm.phrase("Search:")), " ", el("input", {
                            type: "text",
                            "style": "width: 10em",
                            className: "CodeMirror-search-field"
                        }), " ", el("span", {
                            style: "color: #888",
                            className: "CodeMirror-search-hint"
                        }, cm.phrase("(Use /re/ syntax for regexp search)")));
                    }

                    function getReplaceQueryDialog(cm) {
                        return el("", null, " ", el("input", {
                            type: "text",
                            "style": "width: 10em",
                            className: "CodeMirror-search-field"
                        }), " ", el("span", {
                            style: "color: #888",
                            className: "CodeMirror-search-hint"
                        }, cm.phrase("(Use /re/ syntax for regexp search)")));
                    }

                    function getReplacementQueryDialog(cm) {
                        return el("", null, el("span", {
                            className: "CodeMirror-search-label"
                        }, cm.phrase("With:")), " ", el("input", {
                            type: "text",
                            "style": "width: 10em",
                            className: "CodeMirror-search-field"
                        }));
                    }

                    function getDoReplaceConfirm(cm) {
                        return el("", null, el("span", {
                            className: "CodeMirror-search-label"
                        }, cm.phrase("Replace?")), " ", el("button", {}, cm.phrase("Yes")), " ", el("button", {}, cm.phrase("No")), " ", el("button", {}, cm.phrase("All")), " ", el("button", {}, cm.phrase("Stop")));
                    }

                    function replaceAll(cm, query, text) {
                        cm.operation(function() {
                            for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
                                if (typeof query != "string") {
                                    var match = cm.getRange(cursor.from(), cursor.to()).match(query);
                                    cursor.replace(text.replace(/\$(\d)/g, function(_, i) {
                                        return match[i];
                                    }));
                                } else cursor.replace(text);
                            }
                        });
                    }

                    function replace(cm, all) {
                        if (cm.getOption("readOnly")) return;
                        var query = cm.getSelection() || getSearchState(cm).lastQuery;
                        var dialogText = all ? cm.phrase("Replace all:") : cm.phrase("Replace:");
                        var fragment = el("", null, el("span", {
                            className: "CodeMirror-search-label"
                        }, dialogText), getReplaceQueryDialog(cm));
                        dialog(cm, fragment, dialogText, query, function(query) {
                            if (!query) return;
                            query = parseQuery(query);
                            dialog(cm, getReplacementQueryDialog(cm), cm.phrase("Replace with:"), "", function(text) {
                                text = parseString(text);
                                if (all) {
                                    replaceAll(cm, query, text);
                                } else {
                                    clearSearch(cm);
                                    var cursor = getSearchCursor(cm, query, cm.getCursor("from"));
                                    var advance = function() {
                                        var start = cursor.from(),
                                            match;
                                        if (!(match = cursor.findNext())) {
                                            cursor = getSearchCursor(cm, query);
                                            if (!(match = cursor.findNext()) || start && cursor.from().line == start.line && cursor.from().ch == start.ch) return;
                                        }
                                        cm.setSelection(cursor.from(), cursor.to());
                                        cm.scrollIntoView({
                                            from: cursor.from(),
                                            to: cursor.to()
                                        });
                                        confirmDialog(cm, getDoReplaceConfirm(cm), cm.phrase("Replace?"), [function() {
                                            doReplace(match);
                                        }, advance, function() {
                                            replaceAll(cm, query, text);
                                        }]);
                                    };
                                    var doReplace = function(match) {
                                        cursor.replace(typeof query == "string" ? text : text.replace(/\$(\d)/g, function(_, i) {
                                            return match[i];
                                        }));
                                        advance();
                                    };
                                    advance();
                                }
                            });
                        });
                    }
                    CodeMirror.commands.find = function(cm) {
                        clearSearch(cm);
                        doSearch(cm);
                    };
                    CodeMirror.commands.findPersistent = function(cm) {
                        clearSearch(cm);
                        doSearch(cm, false, true);
                    };
                    CodeMirror.commands.findPersistentNext = function(cm) {
                        doSearch(cm, false, true, true);
                    };
                    CodeMirror.commands.findPersistentPrev = function(cm) {
                        doSearch(cm, true, true, true);
                    };
                    CodeMirror.commands.findNext = doSearch;
                    CodeMirror.commands.findPrev = function(cm) {
                        doSearch(cm, true);
                    };
                    CodeMirror.commands.clearSearch = clearSearch;
                    CodeMirror.commands.replace = replace;
                    CodeMirror.commands.replaceAll = function(cm) {
                        replace(cm, true);
                    };
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/addon/search/searchcursor.js":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/codemirror/addon/search/searchcursor.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    var Pos = CodeMirror.Pos;

                    function regexpFlags(regexp) {
                        var flags = regexp.flags;
                        return flags != null ? flags : (regexp.ignoreCase ? "i" : "") + (regexp.global ? "g" : "") + (regexp.multiline ? "m" : "");
                    }

                    function ensureFlags(regexp, flags) {
                        var current = regexpFlags(regexp),
                            target = current;
                        for (var i = 0; i < flags.length; i++)
                            if (target.indexOf(flags.charAt(i)) == -1) target += flags.charAt(i);
                        return current == target ? regexp : new RegExp(regexp.source, target);
                    }

                    function maybeMultiline(regexp) {
                        return /\\s|\\n|\n|\\W|\\D|\[\^/.test(regexp.source);
                    }

                    function searchRegexpForward(doc, regexp, start) {
                        regexp = ensureFlags(regexp, "g");
                        for (var line = start.line, ch = start.ch, last = doc.lastLine(); line <= last; line++, ch = 0) {
                            regexp.lastIndex = ch;
                            var string = doc.getLine(line),
                                match = regexp.exec(string);
                            if (match) return {
                                from: Pos(line, match.index),
                                to: Pos(line, match.index + match[0].length),
                                match: match
                            };
                        }
                    }

                    function searchRegexpForwardMultiline(doc, regexp, start) {
                        if (!maybeMultiline(regexp)) return searchRegexpForward(doc, regexp, start);
                        regexp = ensureFlags(regexp, "gm");
                        var string,
                            chunk = 1;
                        for (var line = start.line, last = doc.lastLine(); line <= last;) {
                            // This grows the search buffer in exponentially-sized chunks
                            // between matches, so that nearby matches are fast and don't
                            // require concatenating the whole document (in case we're
                            // searching for something that has tons of matches), but at the
                            // same time, the amount of retries is limited.
                            for (var i = 0; i < chunk; i++) {
                                if (line > last) break;
                                var curLine = doc.getLine(line++);
                                string = string == null ? curLine : string + "\n" + curLine;
                            }
                            chunk = chunk * 2;
                            regexp.lastIndex = start.ch;
                            var match = regexp.exec(string);
                            if (match) {
                                var before = string.slice(0, match.index).split("\n"),
                                    inside = match[0].split("\n");
                                var startLine = start.line + before.length - 1,
                                    startCh = before[before.length - 1].length;
                                return {
                                    from: Pos(startLine, startCh),
                                    to: Pos(startLine + inside.length - 1, inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),
                                    match: match
                                };
                            }
                        }
                    }

                    function lastMatchIn(string, regexp, endMargin) {
                        var match,
                            from = 0;
                        while (from <= string.length) {
                            regexp.lastIndex = from;
                            var newMatch = regexp.exec(string);
                            if (!newMatch) break;
                            var end = newMatch.index + newMatch[0].length;
                            if (end > string.length - endMargin) break;
                            if (!match || end > match.index + match[0].length) match = newMatch;
                            from = newMatch.index + 1;
                        }
                        return match;
                    }

                    function searchRegexpBackward(doc, regexp, start) {
                        regexp = ensureFlags(regexp, "g");
                        for (var line = start.line, ch = start.ch, first = doc.firstLine(); line >= first; line--, ch = -1) {
                            var string = doc.getLine(line);
                            var match = lastMatchIn(string, regexp, ch < 0 ? 0 : string.length - ch);
                            if (match) return {
                                from: Pos(line, match.index),
                                to: Pos(line, match.index + match[0].length),
                                match: match
                            };
                        }
                    }

                    function searchRegexpBackwardMultiline(doc, regexp, start) {
                        if (!maybeMultiline(regexp)) return searchRegexpBackward(doc, regexp, start);
                        regexp = ensureFlags(regexp, "gm");
                        var string,
                            chunkSize = 1,
                            endMargin = doc.getLine(start.line).length - start.ch;
                        for (var line = start.line, first = doc.firstLine(); line >= first;) {
                            for (var i = 0; i < chunkSize && line >= first; i++) {
                                var curLine = doc.getLine(line--);
                                string = string == null ? curLine : curLine + "\n" + string;
                            }
                            chunkSize *= 2;
                            var match = lastMatchIn(string, regexp, endMargin);
                            if (match) {
                                var before = string.slice(0, match.index).split("\n"),
                                    inside = match[0].split("\n");
                                var startLine = line + before.length,
                                    startCh = before[before.length - 1].length;
                                return {
                                    from: Pos(startLine, startCh),
                                    to: Pos(startLine + inside.length - 1, inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),
                                    match: match
                                };
                            }
                        }
                    }
                    var doFold, noFold;
                    if (String.prototype.normalize) {
                        doFold = function(str) {
                            return str.normalize("NFD").toLowerCase();
                        };
                        noFold = function(str) {
                            return str.normalize("NFD");
                        };
                    } else {
                        doFold = function(str) {
                            return str.toLowerCase();
                        };
                        noFold = function(str) {
                            return str;
                        };
                    }

                    // Maps a position in a case-folded line back to a position in the original line
                    // (compensating for codepoints increasing in number during folding)
                    function adjustPos(orig, folded, pos, foldFunc) {
                        if (orig.length == folded.length) return pos;
                        for (var min = 0, max = pos + Math.max(0, orig.length - folded.length);;) {
                            if (min == max) return min;
                            var mid = min + max >> 1;
                            var len = foldFunc(orig.slice(0, mid)).length;
                            if (len == pos) return mid;
                            else if (len > pos) max = mid;
                            else min = mid + 1;
                        }
                    }

                    function searchStringForward(doc, query, start, caseFold) {
                        // Empty string would match anything and never progress, so we
                        // define it to match nothing instead.
                        if (!query.length) return null;
                        var fold = caseFold ? doFold : noFold;
                        var lines = fold(query).split(/\r|\n\r?/);
                        search: for (var line = start.line, ch = start.ch, last = doc.lastLine() + 1 - lines.length; line <= last; line++, ch = 0) {
                            var orig = doc.getLine(line).slice(ch),
                                string = fold(orig);
                            if (lines.length == 1) {
                                var found = string.indexOf(lines[0]);
                                if (found == -1) continue search;
                                var start = adjustPos(orig, string, found, fold) + ch;
                                return {
                                    from: Pos(line, adjustPos(orig, string, found, fold) + ch),
                                    to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold) + ch)
                                };
                            } else {
                                var cutFrom = string.length - lines[0].length;
                                if (string.slice(cutFrom) != lines[0]) continue search;
                                for (var i = 1; i < lines.length - 1; i++)
                                    if (fold(doc.getLine(line + i)) != lines[i]) continue search;
                                var end = doc.getLine(line + lines.length - 1),
                                    endString = fold(end),
                                    lastLine = lines[lines.length - 1];
                                if (endString.slice(0, lastLine.length) != lastLine) continue search;
                                return {
                                    from: Pos(line, adjustPos(orig, string, cutFrom, fold) + ch),
                                    to: Pos(line + lines.length - 1, adjustPos(end, endString, lastLine.length, fold))
                                };
                            }
                        }
                    }

                    function searchStringBackward(doc, query, start, caseFold) {
                        if (!query.length) return null;
                        var fold = caseFold ? doFold : noFold;
                        var lines = fold(query).split(/\r|\n\r?/);
                        search: for (var line = start.line, ch = start.ch, first = doc.firstLine() - 1 + lines.length; line >= first; line--, ch = -1) {
                            var orig = doc.getLine(line);
                            if (ch > -1) orig = orig.slice(0, ch);
                            var string = fold(orig);
                            if (lines.length == 1) {
                                var found = string.lastIndexOf(lines[0]);
                                if (found == -1) continue search;
                                return {
                                    from: Pos(line, adjustPos(orig, string, found, fold)),
                                    to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold))
                                };
                            } else {
                                var lastLine = lines[lines.length - 1];
                                if (string.slice(0, lastLine.length) != lastLine) continue search;
                                for (var i = 1, start = line - lines.length + 1; i < lines.length - 1; i++)
                                    if (fold(doc.getLine(start + i)) != lines[i]) continue search;
                                var top = doc.getLine(line + 1 - lines.length),
                                    topString = fold(top);
                                if (topString.slice(topString.length - lines[0].length) != lines[0]) continue search;
                                return {
                                    from: Pos(line + 1 - lines.length, adjustPos(top, topString, top.length - lines[0].length, fold)),
                                    to: Pos(line, adjustPos(orig, string, lastLine.length, fold))
                                };
                            }
                        }
                    }

                    function SearchCursor(doc, query, pos, options) {
                        this.atOccurrence = false;
                        this.afterEmptyMatch = false;
                        this.doc = doc;
                        pos = pos ? doc.clipPos(pos) : Pos(0, 0);
                        this.pos = {
                            from: pos,
                            to: pos
                        };
                        var caseFold;
                        if (typeof options == "object") {
                            caseFold = options.caseFold;
                        } else {
                            // Backwards compat for when caseFold was the 4th argument
                            caseFold = options;
                            options = null;
                        }
                        if (typeof query == "string") {
                            if (caseFold == null) caseFold = false;
                            this.matches = function(reverse, pos) {
                                return (reverse ? searchStringBackward : searchStringForward)(doc, query, pos, caseFold);
                            };
                        } else {
                            query = ensureFlags(query, "gm");
                            if (!options || options.multiline !== false) this.matches = function(reverse, pos) {
                                return (reverse ? searchRegexpBackwardMultiline : searchRegexpForwardMultiline)(doc, query, pos);
                            };
                            else this.matches = function(reverse, pos) {
                                return (reverse ? searchRegexpBackward : searchRegexpForward)(doc, query, pos);
                            };
                        }
                    }
                    SearchCursor.prototype = {
                        findNext: function() {
                            return this.find(false);
                        },
                        findPrevious: function() {
                            return this.find(true);
                        },
                        find: function(reverse) {
                            var head = this.doc.clipPos(reverse ? this.pos.from : this.pos.to);
                            if (this.afterEmptyMatch && this.atOccurrence) {
                                // do not return the same 0 width match twice
                                head = Pos(head.line, head.ch);
                                if (reverse) {
                                    head.ch--;
                                    if (head.ch < 0) {
                                        head.line--;
                                        head.ch = (this.doc.getLine(head.line) || "").length;
                                    }
                                } else {
                                    head.ch++;
                                    if (head.ch > (this.doc.getLine(head.line) || "").length) {
                                        head.ch = 0;
                                        head.line++;
                                    }
                                }
                                if (CodeMirror.cmpPos(head, this.doc.clipPos(head)) != 0) {
                                    return this.atOccurrence = false;
                                }
                            }
                            var result = this.matches(reverse, head);
                            this.afterEmptyMatch = result && CodeMirror.cmpPos(result.from, result.to) == 0;
                            if (result) {
                                this.pos = result;
                                this.atOccurrence = true;
                                return this.pos.match || true;
                            } else {
                                var end = Pos(reverse ? this.doc.firstLine() : this.doc.lastLine() + 1, 0);
                                this.pos = {
                                    from: end,
                                    to: end
                                };
                                return this.atOccurrence = false;
                            }
                        },
                        from: function() {
                            if (this.atOccurrence) return this.pos.from;
                        },
                        to: function() {
                            if (this.atOccurrence) return this.pos.to;
                        },
                        replace: function(newText, origin) {
                            if (!this.atOccurrence) return;
                            var lines = CodeMirror.splitLines(newText);
                            this.doc.replaceRange(lines, this.pos.from, this.pos.to, origin);
                            this.pos.to = Pos(this.pos.from.line + lines.length - 1, lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0));
                        }
                    };
                    CodeMirror.defineExtension("getSearchCursor", function(query, pos, caseFold) {
                        return new SearchCursor(this.doc, query, pos, caseFold);
                    });
                    CodeMirror.defineDocExtension("getSearchCursor", function(query, pos, caseFold) {
                        return new SearchCursor(this, query, pos, caseFold);
                    });
                    CodeMirror.defineExtension("selectMatches", function(query, caseFold) {
                        var ranges = [];
                        var cur = this.getSearchCursor(query, this.getCursor("from"), caseFold);
                        while (cur.findNext()) {
                            if (CodeMirror.cmpPos(cur.to(), this.getCursor("to")) > 0) break;
                            ranges.push({
                                anchor: cur.from(),
                                head: cur.to()
                            });
                        }
                        if (ranges.length) this.setSelections(ranges, 0);
                    });
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/keymap/sublime.js":
            /*!**********************************************************!*\
              !*** ../../../node_modules/codemirror/keymap/sublime.js ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                // A rough approximation of Sublime Text's keybindings
                // Depends on addon/search/searchcursor.js and optionally addon/dialog/dialogs.js

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"), __webpack_require__( /*! ../addon/search/searchcursor */ "../../../node_modules/codemirror/addon/search/searchcursor.js"), __webpack_require__( /*! ../addon/edit/matchbrackets */ "../../../node_modules/codemirror/addon/edit/matchbrackets.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    var cmds = CodeMirror.commands;
                    var Pos = CodeMirror.Pos;

                    // This is not exactly Sublime's algorithm. I couldn't make heads or tails of that.
                    function findPosSubword(doc, start, dir) {
                        if (dir < 0 && start.ch == 0) return doc.clipPos(Pos(start.line - 1));
                        var line = doc.getLine(start.line);
                        if (dir > 0 && start.ch >= line.length) return doc.clipPos(Pos(start.line + 1, 0));
                        var state = "start",
                            type,
                            startPos = start.ch;
                        for (var pos = startPos, e = dir < 0 ? 0 : line.length, i = 0; pos != e; pos += dir, i++) {
                            var next = line.charAt(dir < 0 ? pos - 1 : pos);
                            var cat = next != "_" && CodeMirror.isWordChar(next) ? "w" : "o";
                            if (cat == "w" && next.toUpperCase() == next) cat = "W";
                            if (state == "start") {
                                if (cat != "o") {
                                    state = "in";
                                    type = cat;
                                } else startPos = pos + dir;
                            } else if (state == "in") {
                                if (type != cat) {
                                    if (type == "w" && cat == "W" && dir < 0) pos--;
                                    if (type == "W" && cat == "w" && dir > 0) {
                                        // From uppercase to lowercase
                                        if (pos == startPos + 1) {
                                            type = "w";
                                            continue;
                                        } else pos--;
                                    }
                                    break;
                                }
                            }
                        }
                        return Pos(start.line, pos);
                    }

                    function moveSubword(cm, dir) {
                        cm.extendSelectionsBy(function(range) {
                            if (cm.display.shift || cm.doc.extend || range.empty()) return findPosSubword(cm.doc, range.head, dir);
                            else return dir < 0 ? range.from() : range.to();
                        });
                    }
                    cmds.goSubwordLeft = function(cm) {
                        moveSubword(cm, -1);
                    };
                    cmds.goSubwordRight = function(cm) {
                        moveSubword(cm, 1);
                    };
                    cmds.scrollLineUp = function(cm) {
                        var info = cm.getScrollInfo();
                        if (!cm.somethingSelected()) {
                            var visibleBottomLine = cm.lineAtHeight(info.top + info.clientHeight, "local");
                            if (cm.getCursor().line >= visibleBottomLine) cm.execCommand("goLineUp");
                        }
                        cm.scrollTo(null, info.top - cm.defaultTextHeight());
                    };
                    cmds.scrollLineDown = function(cm) {
                        var info = cm.getScrollInfo();
                        if (!cm.somethingSelected()) {
                            var visibleTopLine = cm.lineAtHeight(info.top, "local") + 1;
                            if (cm.getCursor().line <= visibleTopLine) cm.execCommand("goLineDown");
                        }
                        cm.scrollTo(null, info.top + cm.defaultTextHeight());
                    };
                    cmds.splitSelectionByLine = function(cm) {
                        var ranges = cm.listSelections(),
                            lineRanges = [];
                        for (var i = 0; i < ranges.length; i++) {
                            var from = ranges[i].from(),
                                to = ranges[i].to();
                            for (var line = from.line; line <= to.line; ++line)
                                if (!(to.line > from.line && line == to.line && to.ch == 0)) lineRanges.push({
                                    anchor: line == from.line ? from : Pos(line, 0),
                                    head: line == to.line ? to : Pos(line)
                                });
                        }
                        cm.setSelections(lineRanges, 0);
                    };
                    cmds.singleSelectionTop = function(cm) {
                        var range = cm.listSelections()[0];
                        cm.setSelection(range.anchor, range.head, {
                            scroll: false
                        });
                    };
                    cmds.selectLine = function(cm) {
                        var ranges = cm.listSelections(),
                            extended = [];
                        for (var i = 0; i < ranges.length; i++) {
                            var range = ranges[i];
                            extended.push({
                                anchor: Pos(range.from().line, 0),
                                head: Pos(range.to().line + 1, 0)
                            });
                        }
                        cm.setSelections(extended);
                    };

                    function insertLine(cm, above) {
                        if (cm.isReadOnly()) return CodeMirror.Pass;
                        cm.operation(function() {
                            var len = cm.listSelections().length,
                                newSelection = [],
                                last = -1;
                            for (var i = 0; i < len; i++) {
                                var head = cm.listSelections()[i].head;
                                if (head.line <= last) continue;
                                var at = Pos(head.line + (above ? 0 : 1), 0);
                                cm.replaceRange("\n", at, null, "+insertLine");
                                cm.indentLine(at.line, null, true);
                                newSelection.push({
                                    head: at,
                                    anchor: at
                                });
                                last = head.line + 1;
                            }
                            cm.setSelections(newSelection);
                        });
                        cm.execCommand("indentAuto");
                    }
                    cmds.insertLineAfter = function(cm) {
                        return insertLine(cm, false);
                    };
                    cmds.insertLineBefore = function(cm) {
                        return insertLine(cm, true);
                    };

                    function wordAt(cm, pos) {
                        var start = pos.ch,
                            end = start,
                            line = cm.getLine(pos.line);
                        while (start && CodeMirror.isWordChar(line.charAt(start - 1))) --start;
                        while (end < line.length && CodeMirror.isWordChar(line.charAt(end))) ++end;
                        return {
                            from: Pos(pos.line, start),
                            to: Pos(pos.line, end),
                            word: line.slice(start, end)
                        };
                    }
                    cmds.selectNextOccurrence = function(cm) {
                        var from = cm.getCursor("from"),
                            to = cm.getCursor("to");
                        var fullWord = cm.state.sublimeFindFullWord == cm.doc.sel;
                        if (CodeMirror.cmpPos(from, to) == 0) {
                            var word = wordAt(cm, from);
                            if (!word.word) return;
                            cm.setSelection(word.from, word.to);
                            fullWord = true;
                        } else {
                            var text = cm.getRange(from, to);
                            var query = fullWord ? new RegExp("\\b" + text + "\\b") : text;
                            var cur = cm.getSearchCursor(query, to);
                            var found = cur.findNext();
                            if (!found) {
                                cur = cm.getSearchCursor(query, Pos(cm.firstLine(), 0));
                                found = cur.findNext();
                            }
                            if (!found || isSelectedRange(cm.listSelections(), cur.from(), cur.to())) return;
                            cm.addSelection(cur.from(), cur.to());
                        }
                        if (fullWord) cm.state.sublimeFindFullWord = cm.doc.sel;
                    };
                    cmds.skipAndSelectNextOccurrence = function(cm) {
                        var prevAnchor = cm.getCursor("anchor"),
                            prevHead = cm.getCursor("head");
                        cmds.selectNextOccurrence(cm);
                        if (CodeMirror.cmpPos(prevAnchor, prevHead) != 0) {
                            cm.doc.setSelections(cm.doc.listSelections().filter(function(sel) {
                                return sel.anchor != prevAnchor || sel.head != prevHead;
                            }));
                        }
                    };

                    function addCursorToSelection(cm, dir) {
                        var ranges = cm.listSelections(),
                            newRanges = [];
                        for (var i = 0; i < ranges.length; i++) {
                            var range = ranges[i];
                            var newAnchor = cm.findPosV(range.anchor, dir, "line", range.anchor.goalColumn);
                            var newHead = cm.findPosV(range.head, dir, "line", range.head.goalColumn);
                            newAnchor.goalColumn = range.anchor.goalColumn != null ? range.anchor.goalColumn : cm.cursorCoords(range.anchor, "div").left;
                            newHead.goalColumn = range.head.goalColumn != null ? range.head.goalColumn : cm.cursorCoords(range.head, "div").left;
                            var newRange = {
                                anchor: newAnchor,
                                head: newHead
                            };
                            newRanges.push(range);
                            newRanges.push(newRange);
                        }
                        cm.setSelections(newRanges);
                    }
                    cmds.addCursorToPrevLine = function(cm) {
                        addCursorToSelection(cm, -1);
                    };
                    cmds.addCursorToNextLine = function(cm) {
                        addCursorToSelection(cm, 1);
                    };

                    function isSelectedRange(ranges, from, to) {
                        for (var i = 0; i < ranges.length; i++)
                            if (CodeMirror.cmpPos(ranges[i].from(), from) == 0 && CodeMirror.cmpPos(ranges[i].to(), to) == 0) return true;
                        return false;
                    }
                    var mirror = "(){}[]";

                    function selectBetweenBrackets(cm) {
                        var ranges = cm.listSelections(),
                            newRanges = [];
                        for (var i = 0; i < ranges.length; i++) {
                            var range = ranges[i],
                                pos = range.head,
                                opening = cm.scanForBracket(pos, -1);
                            if (!opening) return false;
                            for (;;) {
                                var closing = cm.scanForBracket(pos, 1);
                                if (!closing) return false;
                                if (closing.ch == mirror.charAt(mirror.indexOf(opening.ch) + 1)) {
                                    var startPos = Pos(opening.pos.line, opening.pos.ch + 1);
                                    if (CodeMirror.cmpPos(startPos, range.from()) == 0 && CodeMirror.cmpPos(closing.pos, range.to()) == 0) {
                                        opening = cm.scanForBracket(opening.pos, -1);
                                        if (!opening) return false;
                                    } else {
                                        newRanges.push({
                                            anchor: startPos,
                                            head: closing.pos
                                        });
                                        break;
                                    }
                                }
                                pos = Pos(closing.pos.line, closing.pos.ch + 1);
                            }
                        }
                        cm.setSelections(newRanges);
                        return true;
                    }
                    cmds.selectScope = function(cm) {
                        selectBetweenBrackets(cm) || cm.execCommand("selectAll");
                    };
                    cmds.selectBetweenBrackets = function(cm) {
                        if (!selectBetweenBrackets(cm)) return CodeMirror.Pass;
                    };

                    function puncType(type) {
                        return !type ? null : /\bpunctuation\b/.test(type) ? type : undefined;
                    }
                    cmds.goToBracket = function(cm) {
                        cm.extendSelectionsBy(function(range) {
                            var next = cm.scanForBracket(range.head, 1, puncType(cm.getTokenTypeAt(range.head)));
                            if (next && CodeMirror.cmpPos(next.pos, range.head) != 0) return next.pos;
                            var prev = cm.scanForBracket(range.head, -1, puncType(cm.getTokenTypeAt(Pos(range.head.line, range.head.ch + 1))));
                            return prev && Pos(prev.pos.line, prev.pos.ch + 1) || range.head;
                        });
                    };
                    cmds.swapLineUp = function(cm) {
                        if (cm.isReadOnly()) return CodeMirror.Pass;
                        var ranges = cm.listSelections(),
                            linesToMove = [],
                            at = cm.firstLine() - 1,
                            newSels = [];
                        for (var i = 0; i < ranges.length; i++) {
                            var range = ranges[i],
                                from = range.from().line - 1,
                                to = range.to().line;
                            newSels.push({
                                anchor: Pos(range.anchor.line - 1, range.anchor.ch),
                                head: Pos(range.head.line - 1, range.head.ch)
                            });
                            if (range.to().ch == 0 && !range.empty()) --to;
                            if (from > at) linesToMove.push(from, to);
                            else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;
                            at = to;
                        }
                        cm.operation(function() {
                            for (var i = 0; i < linesToMove.length; i += 2) {
                                var from = linesToMove[i],
                                    to = linesToMove[i + 1];
                                var line = cm.getLine(from);
                                cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine");
                                if (to > cm.lastLine()) cm.replaceRange("\n" + line, Pos(cm.lastLine()), null, "+swapLine");
                                else cm.replaceRange(line + "\n", Pos(to, 0), null, "+swapLine");
                            }
                            cm.setSelections(newSels);
                            cm.scrollIntoView();
                        });
                    };
                    cmds.swapLineDown = function(cm) {
                        if (cm.isReadOnly()) return CodeMirror.Pass;
                        var ranges = cm.listSelections(),
                            linesToMove = [],
                            at = cm.lastLine() + 1;
                        for (var i = ranges.length - 1; i >= 0; i--) {
                            var range = ranges[i],
                                from = range.to().line + 1,
                                to = range.from().line;
                            if (range.to().ch == 0 && !range.empty()) from--;
                            if (from < at) linesToMove.push(from, to);
                            else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;
                            at = to;
                        }
                        cm.operation(function() {
                            for (var i = linesToMove.length - 2; i >= 0; i -= 2) {
                                var from = linesToMove[i],
                                    to = linesToMove[i + 1];
                                var line = cm.getLine(from);
                                if (from == cm.lastLine()) cm.replaceRange("", Pos(from - 1), Pos(from), "+swapLine");
                                else cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine");
                                cm.replaceRange(line + "\n", Pos(to, 0), null, "+swapLine");
                            }
                            cm.scrollIntoView();
                        });
                    };
                    cmds.toggleCommentIndented = function(cm) {
                        cm.toggleComment({
                            indent: true
                        });
                    };
                    cmds.joinLines = function(cm) {
                        var ranges = cm.listSelections(),
                            joined = [];
                        for (var i = 0; i < ranges.length; i++) {
                            var range = ranges[i],
                                from = range.from();
                            var start = from.line,
                                end = range.to().line;
                            while (i < ranges.length - 1 && ranges[i + 1].from().line == end) end = ranges[++i].to().line;
                            joined.push({
                                start: start,
                                end: end,
                                anchor: !range.empty() && from
                            });
                        }
                        cm.operation(function() {
                            var offset = 0,
                                ranges = [];
                            for (var i = 0; i < joined.length; i++) {
                                var obj = joined[i];
                                var anchor = obj.anchor && Pos(obj.anchor.line - offset, obj.anchor.ch),
                                    head;
                                for (var line = obj.start; line <= obj.end; line++) {
                                    var actual = line - offset;
                                    if (line == obj.end) head = Pos(actual, cm.getLine(actual).length + 1);
                                    if (actual < cm.lastLine()) {
                                        cm.replaceRange(" ", Pos(actual), Pos(actual + 1, /^\s*/.exec(cm.getLine(actual + 1))[0].length));
                                        ++offset;
                                    }
                                }
                                ranges.push({
                                    anchor: anchor || head,
                                    head: head
                                });
                            }
                            cm.setSelections(ranges, 0);
                        });
                    };
                    cmds.duplicateLine = function(cm) {
                        cm.operation(function() {
                            var rangeCount = cm.listSelections().length;
                            for (var i = 0; i < rangeCount; i++) {
                                var range = cm.listSelections()[i];
                                if (range.empty()) cm.replaceRange(cm.getLine(range.head.line) + "\n", Pos(range.head.line, 0));
                                else cm.replaceRange(cm.getRange(range.from(), range.to()), range.from());
                            }
                            cm.scrollIntoView();
                        });
                    };

                    function sortLines(cm, caseSensitive, direction) {
                        if (cm.isReadOnly()) return CodeMirror.Pass;
                        var ranges = cm.listSelections(),
                            toSort = [],
                            selected;
                        for (var i = 0; i < ranges.length; i++) {
                            var range = ranges[i];
                            if (range.empty()) continue;
                            var from = range.from().line,
                                to = range.to().line;
                            while (i < ranges.length - 1 && ranges[i + 1].from().line == to) to = ranges[++i].to().line;
                            if (!ranges[i].to().ch) to--;
                            toSort.push(from, to);
                        }
                        if (toSort.length) selected = true;
                        else toSort.push(cm.firstLine(), cm.lastLine());
                        cm.operation(function() {
                            var ranges = [];
                            for (var i = 0; i < toSort.length; i += 2) {
                                var from = toSort[i],
                                    to = toSort[i + 1];
                                var start = Pos(from, 0),
                                    end = Pos(to);
                                var lines = cm.getRange(start, end, false);
                                if (caseSensitive) lines.sort(function(a, b) {
                                    return a < b ? -direction : a == b ? 0 : direction;
                                });
                                else lines.sort(function(a, b) {
                                    var au = a.toUpperCase(),
                                        bu = b.toUpperCase();
                                    if (au != bu) {
                                        a = au;
                                        b = bu;
                                    }
                                    return a < b ? -direction : a == b ? 0 : direction;
                                });
                                cm.replaceRange(lines, start, end);
                                if (selected) ranges.push({
                                    anchor: start,
                                    head: Pos(to + 1, 0)
                                });
                            }
                            if (selected) cm.setSelections(ranges, 0);
                        });
                    }
                    cmds.sortLines = function(cm) {
                        sortLines(cm, true, 1);
                    };
                    cmds.reverseSortLines = function(cm) {
                        sortLines(cm, true, -1);
                    };
                    cmds.sortLinesInsensitive = function(cm) {
                        sortLines(cm, false, 1);
                    };
                    cmds.reverseSortLinesInsensitive = function(cm) {
                        sortLines(cm, false, -1);
                    };
                    cmds.nextBookmark = function(cm) {
                        var marks = cm.state.sublimeBookmarks;
                        if (marks)
                            while (marks.length) {
                                var current = marks.shift();
                                var found = current.find();
                                if (found) {
                                    marks.push(current);
                                    return cm.setSelection(found.from, found.to);
                                }
                            }
                    };
                    cmds.prevBookmark = function(cm) {
                        var marks = cm.state.sublimeBookmarks;
                        if (marks)
                            while (marks.length) {
                                marks.unshift(marks.pop());
                                var found = marks[marks.length - 1].find();
                                if (!found) marks.pop();
                                else return cm.setSelection(found.from, found.to);
                            }
                    };
                    cmds.toggleBookmark = function(cm) {
                        var ranges = cm.listSelections();
                        var marks = cm.state.sublimeBookmarks || (cm.state.sublimeBookmarks = []);
                        for (var i = 0; i < ranges.length; i++) {
                            var from = ranges[i].from(),
                                to = ranges[i].to();
                            var found = ranges[i].empty() ? cm.findMarksAt(from) : cm.findMarks(from, to);
                            for (var j = 0; j < found.length; j++) {
                                if (found[j].sublimeBookmark) {
                                    found[j].clear();
                                    for (var k = 0; k < marks.length; k++)
                                        if (marks[k] == found[j]) marks.splice(k--, 1);
                                    break;
                                }
                            }
                            if (j == found.length) marks.push(cm.markText(from, to, {
                                sublimeBookmark: true,
                                clearWhenEmpty: false
                            }));
                        }
                    };
                    cmds.clearBookmarks = function(cm) {
                        var marks = cm.state.sublimeBookmarks;
                        if (marks)
                            for (var i = 0; i < marks.length; i++) marks[i].clear();
                        marks.length = 0;
                    };
                    cmds.selectBookmarks = function(cm) {
                        var marks = cm.state.sublimeBookmarks,
                            ranges = [];
                        if (marks)
                            for (var i = 0; i < marks.length; i++) {
                                var found = marks[i].find();
                                if (!found) marks.splice(i--, 0);
                                else ranges.push({
                                    anchor: found.from,
                                    head: found.to
                                });
                            }
                        if (ranges.length) cm.setSelections(ranges, 0);
                    };

                    function modifyWordOrSelection(cm, mod) {
                        cm.operation(function() {
                            var ranges = cm.listSelections(),
                                indices = [],
                                replacements = [];
                            for (var i = 0; i < ranges.length; i++) {
                                var range = ranges[i];
                                if (range.empty()) {
                                    indices.push(i);
                                    replacements.push("");
                                } else replacements.push(mod(cm.getRange(range.from(), range.to())));
                            }
                            cm.replaceSelections(replacements, "around", "case");
                            for (var i = indices.length - 1, at; i >= 0; i--) {
                                var range = ranges[indices[i]];
                                if (at && CodeMirror.cmpPos(range.head, at) > 0) continue;
                                var word = wordAt(cm, range.head);
                                at = word.from;
                                cm.replaceRange(mod(word.word), word.from, word.to);
                            }
                        });
                    }
                    cmds.smartBackspace = function(cm) {
                        if (cm.somethingSelected()) return CodeMirror.Pass;
                        cm.operation(function() {
                            var cursors = cm.listSelections();
                            var indentUnit = cm.getOption("indentUnit");
                            for (var i = cursors.length - 1; i >= 0; i--) {
                                var cursor = cursors[i].head;
                                var toStartOfLine = cm.getRange({
                                    line: cursor.line,
                                    ch: 0
                                }, cursor);
                                var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption("tabSize"));

                                // Delete by one character by default
                                var deletePos = cm.findPosH(cursor, -1, "char", false);
                                if (toStartOfLine && !/\S/.test(toStartOfLine) && column % indentUnit == 0) {
                                    var prevIndent = new Pos(cursor.line, CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit));

                                    // Smart delete only if we found a valid prevIndent location
                                    if (prevIndent.ch != cursor.ch) deletePos = prevIndent;
                                }
                                cm.replaceRange("", deletePos, cursor, "+delete");
                            }
                        });
                    };
                    cmds.delLineRight = function(cm) {
                        cm.operation(function() {
                            var ranges = cm.listSelections();
                            for (var i = ranges.length - 1; i >= 0; i--) cm.replaceRange("", ranges[i].anchor, Pos(ranges[i].to().line), "+delete");
                            cm.scrollIntoView();
                        });
                    };
                    cmds.upcaseAtCursor = function(cm) {
                        modifyWordOrSelection(cm, function(str) {
                            return str.toUpperCase();
                        });
                    };
                    cmds.downcaseAtCursor = function(cm) {
                        modifyWordOrSelection(cm, function(str) {
                            return str.toLowerCase();
                        });
                    };
                    cmds.setSublimeMark = function(cm) {
                        if (cm.state.sublimeMark) cm.state.sublimeMark.clear();
                        cm.state.sublimeMark = cm.setBookmark(cm.getCursor());
                    };
                    cmds.selectToSublimeMark = function(cm) {
                        var found = cm.state.sublimeMark && cm.state.sublimeMark.find();
                        if (found) cm.setSelection(cm.getCursor(), found);
                    };
                    cmds.deleteToSublimeMark = function(cm) {
                        var found = cm.state.sublimeMark && cm.state.sublimeMark.find();
                        if (found) {
                            var from = cm.getCursor(),
                                to = found;
                            if (CodeMirror.cmpPos(from, to) > 0) {
                                var tmp = to;
                                to = from;
                                from = tmp;
                            }
                            cm.state.sublimeKilled = cm.getRange(from, to);
                            cm.replaceRange("", from, to);
                        }
                    };
                    cmds.swapWithSublimeMark = function(cm) {
                        var found = cm.state.sublimeMark && cm.state.sublimeMark.find();
                        if (found) {
                            cm.state.sublimeMark.clear();
                            cm.state.sublimeMark = cm.setBookmark(cm.getCursor());
                            cm.setCursor(found);
                        }
                    };
                    cmds.sublimeYank = function(cm) {
                        if (cm.state.sublimeKilled != null) cm.replaceSelection(cm.state.sublimeKilled, null, "paste");
                    };
                    cmds.showInCenter = function(cm) {
                        var pos = cm.cursorCoords(null, "local");
                        cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2);
                    };

                    function getTarget(cm) {
                        var from = cm.getCursor("from"),
                            to = cm.getCursor("to");
                        if (CodeMirror.cmpPos(from, to) == 0) {
                            var word = wordAt(cm, from);
                            if (!word.word) return;
                            from = word.from;
                            to = word.to;
                        }
                        return {
                            from: from,
                            to: to,
                            query: cm.getRange(from, to),
                            word: word
                        };
                    }

                    function findAndGoTo(cm, forward) {
                        var target = getTarget(cm);
                        if (!target) return;
                        var query = target.query;
                        var cur = cm.getSearchCursor(query, forward ? target.to : target.from);
                        if (forward ? cur.findNext() : cur.findPrevious()) {
                            cm.setSelection(cur.from(), cur.to());
                        } else {
                            cur = cm.getSearchCursor(query, forward ? Pos(cm.firstLine(), 0) : cm.clipPos(Pos(cm.lastLine())));
                            if (forward ? cur.findNext() : cur.findPrevious()) cm.setSelection(cur.from(), cur.to());
                            else if (target.word) cm.setSelection(target.from, target.to);
                        }
                    };
                    cmds.findUnder = function(cm) {
                        findAndGoTo(cm, true);
                    };
                    cmds.findUnderPrevious = function(cm) {
                        findAndGoTo(cm, false);
                    };
                    cmds.findAllUnder = function(cm) {
                        var target = getTarget(cm);
                        if (!target) return;
                        var cur = cm.getSearchCursor(target.query);
                        var matches = [];
                        var primaryIndex = -1;
                        while (cur.findNext()) {
                            matches.push({
                                anchor: cur.from(),
                                head: cur.to()
                            });
                            if (cur.from().line <= target.from.line && cur.from().ch <= target.from.ch) primaryIndex++;
                        }
                        cm.setSelections(matches, primaryIndex);
                    };
                    var keyMap = CodeMirror.keyMap;
                    keyMap.macSublime = {
                        "Cmd-Left": "goLineStartSmart",
                        "Shift-Tab": "indentLess",
                        "Shift-Ctrl-K": "deleteLine",
                        "Alt-Q": "wrapLines",
                        "Ctrl-Left": "goSubwordLeft",
                        "Ctrl-Right": "goSubwordRight",
                        "Ctrl-Alt-Up": "scrollLineUp",
                        "Ctrl-Alt-Down": "scrollLineDown",
                        "Cmd-L": "selectLine",
                        "Shift-Cmd-L": "splitSelectionByLine",
                        "Esc": "singleSelectionTop",
                        "Cmd-Enter": "insertLineAfter",
                        "Shift-Cmd-Enter": "insertLineBefore",
                        "Cmd-D": "selectNextOccurrence",
                        "Shift-Cmd-Space": "selectScope",
                        "Shift-Cmd-M": "selectBetweenBrackets",
                        "Cmd-M": "goToBracket",
                        "Cmd-Ctrl-Up": "swapLineUp",
                        "Cmd-Ctrl-Down": "swapLineDown",
                        "Cmd-/": "toggleCommentIndented",
                        "Cmd-J": "joinLines",
                        "Shift-Cmd-D": "duplicateLine",
                        "F5": "sortLines",
                        "Shift-F5": "reverseSortLines",
                        "Cmd-F5": "sortLinesInsensitive",
                        "Shift-Cmd-F5": "reverseSortLinesInsensitive",
                        "F2": "nextBookmark",
                        "Shift-F2": "prevBookmark",
                        "Cmd-F2": "toggleBookmark",
                        "Shift-Cmd-F2": "clearBookmarks",
                        "Alt-F2": "selectBookmarks",
                        "Backspace": "smartBackspace",
                        "Cmd-K Cmd-D": "skipAndSelectNextOccurrence",
                        "Cmd-K Cmd-K": "delLineRight",
                        "Cmd-K Cmd-U": "upcaseAtCursor",
                        "Cmd-K Cmd-L": "downcaseAtCursor",
                        "Cmd-K Cmd-Space": "setSublimeMark",
                        "Cmd-K Cmd-A": "selectToSublimeMark",
                        "Cmd-K Cmd-W": "deleteToSublimeMark",
                        "Cmd-K Cmd-X": "swapWithSublimeMark",
                        "Cmd-K Cmd-Y": "sublimeYank",
                        "Cmd-K Cmd-C": "showInCenter",
                        "Cmd-K Cmd-G": "clearBookmarks",
                        "Cmd-K Cmd-Backspace": "delLineLeft",
                        "Cmd-K Cmd-1": "foldAll",
                        "Cmd-K Cmd-0": "unfoldAll",
                        "Cmd-K Cmd-J": "unfoldAll",
                        "Ctrl-Shift-Up": "addCursorToPrevLine",
                        "Ctrl-Shift-Down": "addCursorToNextLine",
                        "Cmd-F3": "findUnder",
                        "Shift-Cmd-F3": "findUnderPrevious",
                        "Alt-F3": "findAllUnder",
                        "Shift-Cmd-[": "fold",
                        "Shift-Cmd-]": "unfold",
                        "Cmd-I": "findIncremental",
                        "Shift-Cmd-I": "findIncrementalReverse",
                        "Cmd-H": "replace",
                        "F3": "findNext",
                        "Shift-F3": "findPrev",
                        "fallthrough": "macDefault"
                    };
                    CodeMirror.normalizeKeyMap(keyMap.macSublime);
                    keyMap.pcSublime = {
                        "Shift-Tab": "indentLess",
                        "Shift-Ctrl-K": "deleteLine",
                        "Alt-Q": "wrapLines",
                        "Ctrl-T": "transposeChars",
                        "Alt-Left": "goSubwordLeft",
                        "Alt-Right": "goSubwordRight",
                        "Ctrl-Up": "scrollLineUp",
                        "Ctrl-Down": "scrollLineDown",
                        "Ctrl-L": "selectLine",
                        "Shift-Ctrl-L": "splitSelectionByLine",
                        "Esc": "singleSelectionTop",
                        "Ctrl-Enter": "insertLineAfter",
                        "Shift-Ctrl-Enter": "insertLineBefore",
                        "Ctrl-D": "selectNextOccurrence",
                        "Shift-Ctrl-Space": "selectScope",
                        "Shift-Ctrl-M": "selectBetweenBrackets",
                        "Ctrl-M": "goToBracket",
                        "Shift-Ctrl-Up": "swapLineUp",
                        "Shift-Ctrl-Down": "swapLineDown",
                        "Ctrl-/": "toggleCommentIndented",
                        "Ctrl-J": "joinLines",
                        "Shift-Ctrl-D": "duplicateLine",
                        "F9": "sortLines",
                        "Shift-F9": "reverseSortLines",
                        "Ctrl-F9": "sortLinesInsensitive",
                        "Shift-Ctrl-F9": "reverseSortLinesInsensitive",
                        "F2": "nextBookmark",
                        "Shift-F2": "prevBookmark",
                        "Ctrl-F2": "toggleBookmark",
                        "Shift-Ctrl-F2": "clearBookmarks",
                        "Alt-F2": "selectBookmarks",
                        "Backspace": "smartBackspace",
                        "Ctrl-K Ctrl-D": "skipAndSelectNextOccurrence",
                        "Ctrl-K Ctrl-K": "delLineRight",
                        "Ctrl-K Ctrl-U": "upcaseAtCursor",
                        "Ctrl-K Ctrl-L": "downcaseAtCursor",
                        "Ctrl-K Ctrl-Space": "setSublimeMark",
                        "Ctrl-K Ctrl-A": "selectToSublimeMark",
                        "Ctrl-K Ctrl-W": "deleteToSublimeMark",
                        "Ctrl-K Ctrl-X": "swapWithSublimeMark",
                        "Ctrl-K Ctrl-Y": "sublimeYank",
                        "Ctrl-K Ctrl-C": "showInCenter",
                        "Ctrl-K Ctrl-G": "clearBookmarks",
                        "Ctrl-K Ctrl-Backspace": "delLineLeft",
                        "Ctrl-K Ctrl-1": "foldAll",
                        "Ctrl-K Ctrl-0": "unfoldAll",
                        "Ctrl-K Ctrl-J": "unfoldAll",
                        "Ctrl-Alt-Up": "addCursorToPrevLine",
                        "Ctrl-Alt-Down": "addCursorToNextLine",
                        "Ctrl-F3": "findUnder",
                        "Shift-Ctrl-F3": "findUnderPrevious",
                        "Alt-F3": "findAllUnder",
                        "Shift-Ctrl-[": "fold",
                        "Shift-Ctrl-]": "unfold",
                        "Ctrl-I": "findIncremental",
                        "Shift-Ctrl-I": "findIncrementalReverse",
                        "Ctrl-H": "replace",
                        "F3": "findNext",
                        "Shift-F3": "findPrev",
                        "fallthrough": "pcDefault"
                    };
                    CodeMirror.normalizeKeyMap(keyMap.pcSublime);
                    var mac = keyMap.default == keyMap.macDefault;
                    keyMap.sublime = mac ? keyMap.macSublime : keyMap.pcSublime;
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/lib/codemirror.js":
            /*!**********************************************************!*\
              !*** ../../../node_modules/codemirror/lib/codemirror.js ***!
              \**********************************************************/
            /***/
            (function(module) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                // This is CodeMirror (https://codemirror.net), a code editor
                // implemented in JavaScript on top of the browser's DOM.
                //
                // You can find some technical background for some of the code below
                // at http://marijnhaverbeke.nl/blog/#cm-internals .

                (function(global, factory) {
                    true ? module.exports = factory() : 0;
                })(void 0, function() {
                    'use strict';

                    // Kludges for bugs and behavior differences that can't be feature
                    // detected are enabled based on userAgent etc sniffing.
                    var userAgent = navigator.userAgent;
                    var platform = navigator.platform;
                    var gecko = /gecko\/\d/i.test(userAgent);
                    var ie_upto10 = /MSIE \d/.test(userAgent);
                    var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent);
                    var edge = /Edge\/(\d+)/.exec(userAgent);
                    var ie = ie_upto10 || ie_11up || edge;
                    var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);
                    var webkit = !edge && /WebKit\//.test(userAgent);
                    var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent);
                    var chrome = !edge && /Chrome\//.test(userAgent);
                    var presto = /Opera\//.test(userAgent);
                    var safari = /Apple Computer/.test(navigator.vendor);
                    var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
                    var phantom = /PhantomJS/.test(userAgent);
                    var ios = safari && (/Mobile\/\w+/.test(userAgent) || navigator.maxTouchPoints > 2);
                    var android = /Android/.test(userAgent);
                    // This is woefully incomplete. Suggestions for alternative methods welcome.
                    var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
                    var mac = ios || /Mac/.test(platform);
                    var chromeOS = /\bCrOS\b/.test(userAgent);
                    var windows = /win/i.test(platform);
                    var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);
                    if (presto_version) {
                        presto_version = Number(presto_version[1]);
                    }
                    if (presto_version && presto_version >= 15) {
                        presto = false;
                        webkit = true;
                    }
                    // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
                    var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
                    var captureRightClick = gecko || ie && ie_version >= 9;

                    function classTest(cls) {
                        return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*");
                    }
                    var rmClass = function(node, cls) {
                        var current = node.className;
                        var match = classTest(cls).exec(current);
                        if (match) {
                            var after = current.slice(match.index + match[0].length);
                            node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
                        }
                    };

                    function removeChildren(e) {
                        for (var count = e.childNodes.length; count > 0; --count) {
                            e.removeChild(e.firstChild);
                        }
                        return e;
                    }

                    function removeChildrenAndAdd(parent, e) {
                        return removeChildren(parent).appendChild(e);
                    }

                    function elt(tag, content, className, style) {
                        var e = document.createElement(tag);
                        if (className) {
                            e.className = className;
                        }
                        if (style) {
                            e.style.cssText = style;
                        }
                        if (typeof content == "string") {
                            e.appendChild(document.createTextNode(content));
                        } else if (content) {
                            for (var i = 0; i < content.length; ++i) {
                                e.appendChild(content[i]);
                            }
                        }
                        return e;
                    }
                    // wrapper for elt, which removes the elt from the accessibility tree
                    function eltP(tag, content, className, style) {
                        var e = elt(tag, content, className, style);
                        e.setAttribute("role", "presentation");
                        return e;
                    }
                    var range;
                    if (document.createRange) {
                        range = function(node, start, end, endNode) {
                            var r = document.createRange();
                            r.setEnd(endNode || node, end);
                            r.setStart(node, start);
                            return r;
                        };
                    } else {
                        range = function(node, start, end) {
                            var r = document.body.createTextRange();
                            try {
                                r.moveToElementText(node.parentNode);
                            } catch (e) {
                                return r;
                            }
                            r.collapse(true);
                            r.moveEnd("character", end);
                            r.moveStart("character", start);
                            return r;
                        };
                    }

                    function contains(parent, child) {
                        if (child.nodeType == 3)
                        // Android browser always returns false when child is a textnode
                        {
                            child = child.parentNode;
                        }
                        if (parent.contains) {
                            return parent.contains(child);
                        }
                        do {
                            if (child.nodeType == 11) {
                                child = child.host;
                            }
                            if (child == parent) {
                                return true;
                            }
                        } while (child = child.parentNode);
                    }

                    function activeElt() {
                        // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
                        // IE < 10 will throw when accessed while the page is loading or in an iframe.
                        // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
                        var activeElement;
                        try {
                            activeElement = document.activeElement;
                        } catch (e) {
                            activeElement = document.body || null;
                        }
                        while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) {
                            activeElement = activeElement.shadowRoot.activeElement;
                        }
                        return activeElement;
                    }

                    function addClass(node, cls) {
                        var current = node.className;
                        if (!classTest(cls).test(current)) {
                            node.className += (current ? " " : "") + cls;
                        }
                    }

                    function joinClasses(a, b) {
                        var as = a.split(" ");
                        for (var i = 0; i < as.length; i++) {
                            if (as[i] && !classTest(as[i]).test(b)) {
                                b += " " + as[i];
                            }
                        }
                        return b;
                    }
                    var selectInput = function(node) {
                        node.select();
                    };
                    if (ios)
                    // Mobile Safari apparently has a bug where select() is broken.
                    {
                        selectInput = function(node) {
                            node.selectionStart = 0;
                            node.selectionEnd = node.value.length;
                        };
                    } else if (ie)
                    // Suppress mysterious IE10 errors
                    {
                        selectInput = function(node) {
                            try {
                                node.select();
                            } catch (_e) {}
                        };
                    }

                    function bind(f) {
                        var args = Array.prototype.slice.call(arguments, 1);
                        return function() {
                            return f.apply(null, args);
                        };
                    }

                    function copyObj(obj, target, overwrite) {
                        if (!target) {
                            target = {};
                        }
                        for (var prop in obj) {
                            if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) {
                                target[prop] = obj[prop];
                            }
                        }
                        return target;
                    }

                    // Counts the column offset in a string, taking tabs into account.
                    // Used mostly to find indentation.
                    function countColumn(string, end, tabSize, startIndex, startValue) {
                        if (end == null) {
                            end = string.search(/[^\s\u00a0]/);
                            if (end == -1) {
                                end = string.length;
                            }
                        }
                        for (var i = startIndex || 0, n = startValue || 0;;) {
                            var nextTab = string.indexOf("\t", i);
                            if (nextTab < 0 || nextTab >= end) {
                                return n + (end - i);
                            }
                            n += nextTab - i;
                            n += tabSize - n % tabSize;
                            i = nextTab + 1;
                        }
                    }
                    var Delayed = function() {
                        this.id = null;
                        this.f = null;
                        this.time = 0;
                        this.handler = bind(this.onTimeout, this);
                    };
                    Delayed.prototype.onTimeout = function(self) {
                        self.id = 0;
                        if (self.time <= +new Date()) {
                            self.f();
                        } else {
                            setTimeout(self.handler, self.time - +new Date());
                        }
                    };
                    Delayed.prototype.set = function(ms, f) {
                        this.f = f;
                        var time = +new Date() + ms;
                        if (!this.id || time < this.time) {
                            clearTimeout(this.id);
                            this.id = setTimeout(this.handler, ms);
                            this.time = time;
                        }
                    };

                    function indexOf(array, elt) {
                        for (var i = 0; i < array.length; ++i) {
                            if (array[i] == elt) {
                                return i;
                            }
                        }
                        return -1;
                    }

                    // Number of pixels added to scroller and sizer to hide scrollbar
                    var scrollerGap = 50;

                    // Returned or thrown by various protocols to signal 'I'm not
                    // handling this'.
                    var Pass = {
                        toString: function() {
                            return "CodeMirror.Pass";
                        }
                    };

                    // Reused option objects for setSelection & friends
                    var sel_dontScroll = {
                            scroll: false
                        },
                        sel_mouse = {
                            origin: "*mouse"
                        },
                        sel_move = {
                            origin: "+move"
                        };

                    // The inverse of countColumn -- find the offset that corresponds to
                    // a particular column.
                    function findColumn(string, goal, tabSize) {
                        for (var pos = 0, col = 0;;) {
                            var nextTab = string.indexOf("\t", pos);
                            if (nextTab == -1) {
                                nextTab = string.length;
                            }
                            var skipped = nextTab - pos;
                            if (nextTab == string.length || col + skipped >= goal) {
                                return pos + Math.min(skipped, goal - col);
                            }
                            col += nextTab - pos;
                            col += tabSize - col % tabSize;
                            pos = nextTab + 1;
                            if (col >= goal) {
                                return pos;
                            }
                        }
                    }
                    var spaceStrs = [""];

                    function spaceStr(n) {
                        while (spaceStrs.length <= n) {
                            spaceStrs.push(lst(spaceStrs) + " ");
                        }
                        return spaceStrs[n];
                    }

                    function lst(arr) {
                        return arr[arr.length - 1];
                    }

                    function map(array, f) {
                        var out = [];
                        for (var i = 0; i < array.length; i++) {
                            out[i] = f(array[i], i);
                        }
                        return out;
                    }

                    function insertSorted(array, value, score) {
                        var pos = 0,
                            priority = score(value);
                        while (pos < array.length && score(array[pos]) <= priority) {
                            pos++;
                        }
                        array.splice(pos, 0, value);
                    }

                    function nothing() {}

                    function createObj(base, props) {
                        var inst;
                        if (Object.create) {
                            inst = Object.create(base);
                        } else {
                            nothing.prototype = base;
                            inst = new nothing();
                        }
                        if (props) {
                            copyObj(props, inst);
                        }
                        return inst;
                    }
                    var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;

                    function isWordCharBasic(ch) {
                        return /\w/.test(ch) || ch > "\x80" && (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
                    }

                    function isWordChar(ch, helper) {
                        if (!helper) {
                            return isWordCharBasic(ch);
                        }
                        if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) {
                            return true;
                        }
                        return helper.test(ch);
                    }

                    function isEmpty(obj) {
                        for (var n in obj) {
                            if (obj.hasOwnProperty(n) && obj[n]) {
                                return false;
                            }
                        }
                        return true;
                    }

                    // Extending unicode characters. A series of a non-extending char +
                    // any number of extending chars is treated as a single unit as far
                    // as editing and measuring is concerned. This is not fully correct,
                    // since some scripts/fonts/browsers also treat other configurations
                    // of code points as a group.
                    var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;

                    function isExtendingChar(ch) {
                        return ch.charCodeAt(0) >= 768 && extendingChars.test(ch);
                    }

                    // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.
                    function skipExtendingChars(str, pos, dir) {
                        while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) {
                            pos += dir;
                        }
                        return pos;
                    }

                    // Returns the value from the range [`from`; `to`] that satisfies
                    // `pred` and is closest to `from`. Assumes that at least `to`
                    // satisfies `pred`. Supports `from` being greater than `to`.
                    function findFirst(pred, from, to) {
                        // At any point we are certain `to` satisfies `pred`, don't know
                        // whether `from` does.
                        var dir = from > to ? -1 : 1;
                        for (;;) {
                            if (from == to) {
                                return from;
                            }
                            var midF = (from + to) / 2,
                                mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);
                            if (mid == from) {
                                return pred(mid) ? from : to;
                            }
                            if (pred(mid)) {
                                to = mid;
                            } else {
                                from = mid + dir;
                            }
                        }
                    }

                    // BIDI HELPERS

                    function iterateBidiSections(order, from, to, f) {
                        if (!order) {
                            return f(from, to, "ltr", 0);
                        }
                        var found = false;
                        for (var i = 0; i < order.length; ++i) {
                            var part = order[i];
                            if (part.from < to && part.to > from || from == to && part.to == from) {
                                f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i);
                                found = true;
                            }
                        }
                        if (!found) {
                            f(from, to, "ltr");
                        }
                    }
                    var bidiOther = null;

                    function getBidiPartAt(order, ch, sticky) {
                        var found;
                        bidiOther = null;
                        for (var i = 0; i < order.length; ++i) {
                            var cur = order[i];
                            if (cur.from < ch && cur.to > ch) {
                                return i;
                            }
                            if (cur.to == ch) {
                                if (cur.from != cur.to && sticky == "before") {
                                    found = i;
                                } else {
                                    bidiOther = i;
                                }
                            }
                            if (cur.from == ch) {
                                if (cur.from != cur.to && sticky != "before") {
                                    found = i;
                                } else {
                                    bidiOther = i;
                                }
                            }
                        }
                        return found != null ? found : bidiOther;
                    }

                    // Bidirectional ordering algorithm
                    // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
                    // that this (partially) implements.

                    // One-char codes used for character types:
                    // L (L):   Left-to-Right
                    // R (R):   Right-to-Left
                    // r (AL):  Right-to-Left Arabic
                    // 1 (EN):  European Number
                    // + (ES):  European Number Separator
                    // % (ET):  European Number Terminator
                    // n (AN):  Arabic Number
                    // , (CS):  Common Number Separator
                    // m (NSM): Non-Spacing Mark
                    // b (BN):  Boundary Neutral
                    // s (B):   Paragraph Separator
                    // t (S):   Segment Separator
                    // w (WS):  Whitespace
                    // N (ON):  Other Neutrals

                    // Returns null if characters are ordered as they appear
                    // (left-to-right), or an array of sections ({from, to, level}
                    // objects) in the order in which they occur visually.
                    var bidiOrdering = function() {
                        // Character types for codepoints 0 to 0xff
                        var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";
                        // Character types for codepoints 0x600 to 0x6f9
                        var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";

                        function charType(code) {
                            if (code <= 0xf7) {
                                return lowTypes.charAt(code);
                            } else if (0x590 <= code && code <= 0x5f4) {
                                return "R";
                            } else if (0x600 <= code && code <= 0x6f9) {
                                return arabicTypes.charAt(code - 0x600);
                            } else if (0x6ee <= code && code <= 0x8ac) {
                                return "r";
                            } else if (0x2000 <= code && code <= 0x200b) {
                                return "w";
                            } else if (code == 0x200c) {
                                return "b";
                            } else {
                                return "L";
                            }
                        }
                        var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
                        var isNeutral = /[stwN]/,
                            isStrong = /[LRr]/,
                            countsAsLeft = /[Lb1n]/,
                            countsAsNum = /[1n]/;

                        function BidiSpan(level, from, to) {
                            this.level = level;
                            this.from = from;
                            this.to = to;
                        }
                        return function(str, direction) {
                            var outerType = direction == "ltr" ? "L" : "R";
                            if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) {
                                return false;
                            }
                            var len = str.length,
                                types = [];
                            for (var i = 0; i < len; ++i) {
                                types.push(charType(str.charCodeAt(i)));
                            }

                            // W1. Examine each non-spacing mark (NSM) in the level run, and
                            // change the type of the NSM to the type of the previous
                            // character. If the NSM is at the start of the level run, it will
                            // get the type of sor.
                            for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {
                                var type = types[i$1];
                                if (type == "m") {
                                    types[i$1] = prev;
                                } else {
                                    prev = type;
                                }
                            }

                            // W2. Search backwards from each instance of a European number
                            // until the first strong type (R, L, AL, or sor) is found. If an
                            // AL is found, change the type of the European number to Arabic
                            // number.
                            // W3. Change all ALs to R.
                            for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {
                                var type$1 = types[i$2];
                                if (type$1 == "1" && cur == "r") {
                                    types[i$2] = "n";
                                } else if (isStrong.test(type$1)) {
                                    cur = type$1;
                                    if (type$1 == "r") {
                                        types[i$2] = "R";
                                    }
                                }
                            }

                            // W4. A single European separator between two European numbers
                            // changes to a European number. A single common separator between
                            // two numbers of the same type changes to that type.
                            for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {
                                var type$2 = types[i$3];
                                if (type$2 == "+" && prev$1 == "1" && types[i$3 + 1] == "1") {
                                    types[i$3] = "1";
                                } else if (type$2 == "," && prev$1 == types[i$3 + 1] && (prev$1 == "1" || prev$1 == "n")) {
                                    types[i$3] = prev$1;
                                }
                                prev$1 = type$2;
                            }

                            // W5. A sequence of European terminators adjacent to European
                            // numbers changes to all European numbers.
                            // W6. Otherwise, separators and terminators change to Other
                            // Neutral.
                            for (var i$4 = 0; i$4 < len; ++i$4) {
                                var type$3 = types[i$4];
                                if (type$3 == ",") {
                                    types[i$4] = "N";
                                } else if (type$3 == "%") {
                                    var end = void 0;
                                    for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}
                                    var replace = i$4 && types[i$4 - 1] == "!" || end < len && types[end] == "1" ? "1" : "N";
                                    for (var j = i$4; j < end; ++j) {
                                        types[j] = replace;
                                    }
                                    i$4 = end - 1;
                                }
                            }

                            // W7. Search backwards from each instance of a European number
                            // until the first strong type (R, L, or sor) is found. If an L is
                            // found, then change the type of the European number to L.
                            for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {
                                var type$4 = types[i$5];
                                if (cur$1 == "L" && type$4 == "1") {
                                    types[i$5] = "L";
                                } else if (isStrong.test(type$4)) {
                                    cur$1 = type$4;
                                }
                            }

                            // N1. A sequence of neutrals takes the direction of the
                            // surrounding strong text if the text on both sides has the same
                            // direction. European and Arabic numbers act as if they were R in
                            // terms of their influence on neutrals. Start-of-level-run (sor)
                            // and end-of-level-run (eor) are used at level run boundaries.
                            // N2. Any remaining neutrals take the embedding direction.
                            for (var i$6 = 0; i$6 < len; ++i$6) {
                                if (isNeutral.test(types[i$6])) {
                                    var end$1 = void 0;
                                    for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}
                                    var before = (i$6 ? types[i$6 - 1] : outerType) == "L";
                                    var after = (end$1 < len ? types[end$1] : outerType) == "L";
                                    var replace$1 = before == after ? before ? "L" : "R" : outerType;
                                    for (var j$1 = i$6; j$1 < end$1; ++j$1) {
                                        types[j$1] = replace$1;
                                    }
                                    i$6 = end$1 - 1;
                                }
                            }

                            // Here we depart from the documented algorithm, in order to avoid
                            // building up an actual levels array. Since there are only three
                            // levels (0, 1, 2) in an implementation that doesn't take
                            // explicit embedding into account, we can build up the order on
                            // the fly, without following the level-based algorithm.
                            var order = [],
                                m;
                            for (var i$7 = 0; i$7 < len;) {
                                if (countsAsLeft.test(types[i$7])) {
                                    var start = i$7;
                                    for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}
                                    order.push(new BidiSpan(0, start, i$7));
                                } else {
                                    var pos = i$7,
                                        at = order.length,
                                        isRTL = direction == "rtl" ? 1 : 0;
                                    for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}
                                    for (var j$2 = pos; j$2 < i$7;) {
                                        if (countsAsNum.test(types[j$2])) {
                                            if (pos < j$2) {
                                                order.splice(at, 0, new BidiSpan(1, pos, j$2));
                                                at += isRTL;
                                            }
                                            var nstart = j$2;
                                            for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
                                            order.splice(at, 0, new BidiSpan(2, nstart, j$2));
                                            at += isRTL;
                                            pos = j$2;
                                        } else {
                                            ++j$2;
                                        }
                                    }
                                    if (pos < i$7) {
                                        order.splice(at, 0, new BidiSpan(1, pos, i$7));
                                    }
                                }
                            }
                            if (direction == "ltr") {
                                if (order[0].level == 1 && (m = str.match(/^\s+/))) {
                                    order[0].from = m[0].length;
                                    order.unshift(new BidiSpan(0, 0, m[0].length));
                                }
                                if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
                                    lst(order).to -= m[0].length;
                                    order.push(new BidiSpan(0, len - m[0].length, len));
                                }
                            }
                            return direction == "rtl" ? order.reverse() : order;
                        };
                    }();

                    // Get the bidi ordering for the given line (and cache it). Returns
                    // false for lines that are fully left-to-right, and an array of
                    // BidiSpan objects otherwise.
                    function getOrder(line, direction) {
                        var order = line.order;
                        if (order == null) {
                            order = line.order = bidiOrdering(line.text, direction);
                        }
                        return order;
                    }

                    // EVENT HANDLING

                    // Lightweight event framework. on/off also work on DOM nodes,
                    // registering native DOM handlers.

                    var noHandlers = [];
                    var on = function(emitter, type, f) {
                        if (emitter.addEventListener) {
                            emitter.addEventListener(type, f, false);
                        } else if (emitter.attachEvent) {
                            emitter.attachEvent("on" + type, f);
                        } else {
                            var map = emitter._handlers || (emitter._handlers = {});
                            map[type] = (map[type] || noHandlers).concat(f);
                        }
                    };

                    function getHandlers(emitter, type) {
                        return emitter._handlers && emitter._handlers[type] || noHandlers;
                    }

                    function off(emitter, type, f) {
                        if (emitter.removeEventListener) {
                            emitter.removeEventListener(type, f, false);
                        } else if (emitter.detachEvent) {
                            emitter.detachEvent("on" + type, f);
                        } else {
                            var map = emitter._handlers,
                                arr = map && map[type];
                            if (arr) {
                                var index = indexOf(arr, f);
                                if (index > -1) {
                                    map[type] = arr.slice(0, index).concat(arr.slice(index + 1));
                                }
                            }
                        }
                    }

                    function signal(emitter, type /*, values...*/ ) {
                        var handlers = getHandlers(emitter, type);
                        if (!handlers.length) {
                            return;
                        }
                        var args = Array.prototype.slice.call(arguments, 2);
                        for (var i = 0; i < handlers.length; ++i) {
                            handlers[i].apply(null, args);
                        }
                    }

                    // The DOM events that CodeMirror handles can be overridden by
                    // registering a (non-DOM) handler on the editor for the event name,
                    // and preventDefault-ing the event in that handler.
                    function signalDOMEvent(cm, e, override) {
                        if (typeof e == "string") {
                            e = {
                                type: e,
                                preventDefault: function() {
                                    this.defaultPrevented = true;
                                }
                            };
                        }
                        signal(cm, override || e.type, cm, e);
                        return e_defaultPrevented(e) || e.codemirrorIgnore;
                    }

                    function signalCursorActivity(cm) {
                        var arr = cm._handlers && cm._handlers.cursorActivity;
                        if (!arr) {
                            return;
                        }
                        var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);
                        for (var i = 0; i < arr.length; ++i) {
                            if (indexOf(set, arr[i]) == -1) {
                                set.push(arr[i]);
                            }
                        }
                    }

                    function hasHandler(emitter, type) {
                        return getHandlers(emitter, type).length > 0;
                    }

                    // Add on and off methods to a constructor's prototype, to make
                    // registering events on such objects more convenient.
                    function eventMixin(ctor) {
                        ctor.prototype.on = function(type, f) {
                            on(this, type, f);
                        };
                        ctor.prototype.off = function(type, f) {
                            off(this, type, f);
                        };
                    }

                    // Due to the fact that we still support jurassic IE versions, some
                    // compatibility wrappers are needed.

                    function e_preventDefault(e) {
                        if (e.preventDefault) {
                            e.preventDefault();
                        } else {
                            e.returnValue = false;
                        }
                    }

                    function e_stopPropagation(e) {
                        if (e.stopPropagation) {
                            e.stopPropagation();
                        } else {
                            e.cancelBubble = true;
                        }
                    }

                    function e_defaultPrevented(e) {
                        return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;
                    }

                    function e_stop(e) {
                        e_preventDefault(e);
                        e_stopPropagation(e);
                    }

                    function e_target(e) {
                        return e.target || e.srcElement;
                    }

                    function e_button(e) {
                        var b = e.which;
                        if (b == null) {
                            if (e.button & 1) {
                                b = 1;
                            } else if (e.button & 2) {
                                b = 3;
                            } else if (e.button & 4) {
                                b = 2;
                            }
                        }
                        if (mac && e.ctrlKey && b == 1) {
                            b = 3;
                        }
                        return b;
                    }

                    // Detect drag-and-drop
                    var dragAndDrop = function() {
                        // There is *some* kind of drag-and-drop support in IE6-8, but I
                        // couldn't get it to work yet.
                        if (ie && ie_version < 9) {
                            return false;
                        }
                        var div = elt('div');
                        return "draggable" in div || "dragDrop" in div;
                    }();
                    var zwspSupported;

                    function zeroWidthElement(measure) {
                        if (zwspSupported == null) {
                            var test = elt("span", "\u200b");
                            removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
                            if (measure.firstChild.offsetHeight != 0) {
                                zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8);
                            }
                        }
                        var node = zwspSupported ? elt("span", "\u200b") : elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
                        node.setAttribute("cm-text", "");
                        return node;
                    }

                    // Feature-detect IE's crummy client rect reporting for bidi text
                    var badBidiRects;

                    function hasBadBidiRects(measure) {
                        if (badBidiRects != null) {
                            return badBidiRects;
                        }
                        var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
                        var r0 = range(txt, 0, 1).getBoundingClientRect();
                        var r1 = range(txt, 1, 2).getBoundingClientRect();
                        removeChildren(measure);
                        if (!r0 || r0.left == r0.right) {
                            return false;
                        } // Safari returns null in some cases (#2780)
                        return badBidiRects = r1.right - r0.right < 3;
                    }

                    // See if "".split is the broken IE version, if so, provide an
                    // alternative way to split lines.
                    var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function(string) {
                        var pos = 0,
                            result = [],
                            l = string.length;
                        while (pos <= l) {
                            var nl = string.indexOf("\n", pos);
                            if (nl == -1) {
                                nl = string.length;
                            }
                            var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
                            var rt = line.indexOf("\r");
                            if (rt != -1) {
                                result.push(line.slice(0, rt));
                                pos += rt + 1;
                            } else {
                                result.push(line);
                                pos = nl + 1;
                            }
                        }
                        return result;
                    } : function(string) {
                        return string.split(/\r\n?|\n/);
                    };
                    var hasSelection = window.getSelection ? function(te) {
                        try {
                            return te.selectionStart != te.selectionEnd;
                        } catch (e) {
                            return false;
                        }
                    } : function(te) {
                        var range;
                        try {
                            range = te.ownerDocument.selection.createRange();
                        } catch (e) {}
                        if (!range || range.parentElement() != te) {
                            return false;
                        }
                        return range.compareEndPoints("StartToEnd", range) != 0;
                    };
                    var hasCopyEvent = function() {
                        var e = elt("div");
                        if ("oncopy" in e) {
                            return true;
                        }
                        e.setAttribute("oncopy", "return;");
                        return typeof e.oncopy == "function";
                    }();
                    var badZoomedRects = null;

                    function hasBadZoomedRects(measure) {
                        if (badZoomedRects != null) {
                            return badZoomedRects;
                        }
                        var node = removeChildrenAndAdd(measure, elt("span", "x"));
                        var normal = node.getBoundingClientRect();
                        var fromRange = range(node, 0, 1).getBoundingClientRect();
                        return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1;
                    }

                    // Known modes, by name and by MIME
                    var modes = {},
                        mimeModes = {};

                    // Extra arguments are stored as the mode's dependencies, which is
                    // used by (legacy) mechanisms like loadmode.js to automatically
                    // load a mode. (Preferred mechanism is the require/define calls.)
                    function defineMode(name, mode) {
                        if (arguments.length > 2) {
                            mode.dependencies = Array.prototype.slice.call(arguments, 2);
                        }
                        modes[name] = mode;
                    }

                    function defineMIME(mime, spec) {
                        mimeModes[mime] = spec;
                    }

                    // Given a MIME type, a {name, ...options} config object, or a name
                    // string, return a mode config object.
                    function resolveMode(spec) {
                        if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
                            spec = mimeModes[spec];
                        } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
                            var found = mimeModes[spec.name];
                            if (typeof found == "string") {
                                found = {
                                    name: found
                                };
                            }
                            spec = createObj(found, spec);
                            spec.name = found.name;
                        } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
                            return resolveMode("application/xml");
                        } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
                            return resolveMode("application/json");
                        }
                        if (typeof spec == "string") {
                            return {
                                name: spec
                            };
                        } else {
                            return spec || {
                                name: "null"
                            };
                        }
                    }

                    // Given a mode spec (anything that resolveMode accepts), find and
                    // initialize an actual mode object.
                    function getMode(options, spec) {
                        spec = resolveMode(spec);
                        var mfactory = modes[spec.name];
                        if (!mfactory) {
                            return getMode(options, "text/plain");
                        }
                        var modeObj = mfactory(options, spec);
                        if (modeExtensions.hasOwnProperty(spec.name)) {
                            var exts = modeExtensions[spec.name];
                            for (var prop in exts) {
                                if (!exts.hasOwnProperty(prop)) {
                                    continue;
                                }
                                if (modeObj.hasOwnProperty(prop)) {
                                    modeObj["_" + prop] = modeObj[prop];
                                }
                                modeObj[prop] = exts[prop];
                            }
                        }
                        modeObj.name = spec.name;
                        if (spec.helperType) {
                            modeObj.helperType = spec.helperType;
                        }
                        if (spec.modeProps) {
                            for (var prop$1 in spec.modeProps) {
                                modeObj[prop$1] = spec.modeProps[prop$1];
                            }
                        }
                        return modeObj;
                    }

                    // This can be used to attach properties to mode objects from
                    // outside the actual mode definition.
                    var modeExtensions = {};

                    function extendMode(mode, properties) {
                        var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : modeExtensions[mode] = {};
                        copyObj(properties, exts);
                    }

                    function copyState(mode, state) {
                        if (state === true) {
                            return state;
                        }
                        if (mode.copyState) {
                            return mode.copyState(state);
                        }
                        var nstate = {};
                        for (var n in state) {
                            var val = state[n];
                            if (val instanceof Array) {
                                val = val.concat([]);
                            }
                            nstate[n] = val;
                        }
                        return nstate;
                    }

                    // Given a mode and a state (for that mode), find the inner mode and
                    // state at the position that the state refers to.
                    function innerMode(mode, state) {
                        var info;
                        while (mode.innerMode) {
                            info = mode.innerMode(state);
                            if (!info || info.mode == mode) {
                                break;
                            }
                            state = info.state;
                            mode = info.mode;
                        }
                        return info || {
                            mode: mode,
                            state: state
                        };
                    }

                    function startState(mode, a1, a2) {
                        return mode.startState ? mode.startState(a1, a2) : true;
                    }

                    // STRING STREAM

                    // Fed to the mode parsers, provides helper functions to make
                    // parsers more succinct.

                    var StringStream = function(string, tabSize, lineOracle) {
                        this.pos = this.start = 0;
                        this.string = string;
                        this.tabSize = tabSize || 8;
                        this.lastColumnPos = this.lastColumnValue = 0;
                        this.lineStart = 0;
                        this.lineOracle = lineOracle;
                    };
                    StringStream.prototype.eol = function() {
                        return this.pos >= this.string.length;
                    };
                    StringStream.prototype.sol = function() {
                        return this.pos == this.lineStart;
                    };
                    StringStream.prototype.peek = function() {
                        return this.string.charAt(this.pos) || undefined;
                    };
                    StringStream.prototype.next = function() {
                        if (this.pos < this.string.length) {
                            return this.string.charAt(this.pos++);
                        }
                    };
                    StringStream.prototype.eat = function(match) {
                        var ch = this.string.charAt(this.pos);
                        var ok;
                        if (typeof match == "string") {
                            ok = ch == match;
                        } else {
                            ok = ch && (match.test ? match.test(ch) : match(ch));
                        }
                        if (ok) {
                            ++this.pos;
                            return ch;
                        }
                    };
                    StringStream.prototype.eatWhile = function(match) {
                        var start = this.pos;
                        while (this.eat(match)) {}
                        return this.pos > start;
                    };
                    StringStream.prototype.eatSpace = function() {
                        var start = this.pos;
                        while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) {
                            ++this.pos;
                        }
                        return this.pos > start;
                    };
                    StringStream.prototype.skipToEnd = function() {
                        this.pos = this.string.length;
                    };
                    StringStream.prototype.skipTo = function(ch) {
                        var found = this.string.indexOf(ch, this.pos);
                        if (found > -1) {
                            this.pos = found;
                            return true;
                        }
                    };
                    StringStream.prototype.backUp = function(n) {
                        this.pos -= n;
                    };
                    StringStream.prototype.column = function() {
                        if (this.lastColumnPos < this.start) {
                            this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
                            this.lastColumnPos = this.start;
                        }
                        return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);
                    };
                    StringStream.prototype.indentation = function() {
                        return countColumn(this.string, null, this.tabSize) - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);
                    };
                    StringStream.prototype.match = function(pattern, consume, caseInsensitive) {
                        if (typeof pattern == "string") {
                            var cased = function(str) {
                                return caseInsensitive ? str.toLowerCase() : str;
                            };
                            var substr = this.string.substr(this.pos, pattern.length);
                            if (cased(substr) == cased(pattern)) {
                                if (consume !== false) {
                                    this.pos += pattern.length;
                                }
                                return true;
                            }
                        } else {
                            var match = this.string.slice(this.pos).match(pattern);
                            if (match && match.index > 0) {
                                return null;
                            }
                            if (match && consume !== false) {
                                this.pos += match[0].length;
                            }
                            return match;
                        }
                    };
                    StringStream.prototype.current = function() {
                        return this.string.slice(this.start, this.pos);
                    };
                    StringStream.prototype.hideFirstChars = function(n, inner) {
                        this.lineStart += n;
                        try {
                            return inner();
                        } finally {
                            this.lineStart -= n;
                        }
                    };
                    StringStream.prototype.lookAhead = function(n) {
                        var oracle = this.lineOracle;
                        return oracle && oracle.lookAhead(n);
                    };
                    StringStream.prototype.baseToken = function() {
                        var oracle = this.lineOracle;
                        return oracle && oracle.baseToken(this.pos);
                    };

                    // Find the line object corresponding to the given line number.
                    function getLine(doc, n) {
                        n -= doc.first;
                        if (n < 0 || n >= doc.size) {
                            throw new Error("There is no line " + (n + doc.first) + " in the document.");
                        }
                        var chunk = doc;
                        while (!chunk.lines) {
                            for (var i = 0;; ++i) {
                                var child = chunk.children[i],
                                    sz = child.chunkSize();
                                if (n < sz) {
                                    chunk = child;
                                    break;
                                }
                                n -= sz;
                            }
                        }
                        return chunk.lines[n];
                    }

                    // Get the part of a document between two positions, as an array of
                    // strings.
                    function getBetween(doc, start, end) {
                        var out = [],
                            n = start.line;
                        doc.iter(start.line, end.line + 1, function(line) {
                            var text = line.text;
                            if (n == end.line) {
                                text = text.slice(0, end.ch);
                            }
                            if (n == start.line) {
                                text = text.slice(start.ch);
                            }
                            out.push(text);
                            ++n;
                        });
                        return out;
                    }
                    // Get the lines between from and to, as array of strings.
                    function getLines(doc, from, to) {
                        var out = [];
                        doc.iter(from, to, function(line) {
                            out.push(line.text);
                        }); // iter aborts when callback returns truthy value
                        return out;
                    }

                    // Update the height of a line, propagating the height change
                    // upwards to parent nodes.
                    function updateLineHeight(line, height) {
                        var diff = height - line.height;
                        if (diff) {
                            for (var n = line; n; n = n.parent) {
                                n.height += diff;
                            }
                        }
                    }

                    // Given a line object, find its line number by walking up through
                    // its parent links.
                    function lineNo(line) {
                        if (line.parent == null) {
                            return null;
                        }
                        var cur = line.parent,
                            no = indexOf(cur.lines, line);
                        for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
                            for (var i = 0;; ++i) {
                                if (chunk.children[i] == cur) {
                                    break;
                                }
                                no += chunk.children[i].chunkSize();
                            }
                        }
                        return no + cur.first;
                    }

                    // Find the line at the given vertical position, using the height
                    // information in the document tree.
                    function lineAtHeight(chunk, h) {
                        var n = chunk.first;
                        outer: do {
                            for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {
                                var child = chunk.children[i$1],
                                    ch = child.height;
                                if (h < ch) {
                                    chunk = child;
                                    continue outer;
                                }
                                h -= ch;
                                n += child.chunkSize();
                            }
                            return n;
                        } while (!chunk.lines);
                        var i = 0;
                        for (; i < chunk.lines.length; ++i) {
                            var line = chunk.lines[i],
                                lh = line.height;
                            if (h < lh) {
                                break;
                            }
                            h -= lh;
                        }
                        return n + i;
                    }

                    function isLine(doc, l) {
                        return l >= doc.first && l < doc.first + doc.size;
                    }

                    function lineNumberFor(options, i) {
                        return String(options.lineNumberFormatter(i + options.firstLineNumber));
                    }

                    // A Pos instance represents a position within the text.
                    function Pos(line, ch, sticky) {
                        if (sticky === void 0) sticky = null;
                        if (!(this instanceof Pos)) {
                            return new Pos(line, ch, sticky);
                        }
                        this.line = line;
                        this.ch = ch;
                        this.sticky = sticky;
                    }

                    // Compare two positions, return 0 if they are the same, a negative
                    // number when a is less, and a positive number otherwise.
                    function cmp(a, b) {
                        return a.line - b.line || a.ch - b.ch;
                    }

                    function equalCursorPos(a, b) {
                        return a.sticky == b.sticky && cmp(a, b) == 0;
                    }

                    function copyPos(x) {
                        return Pos(x.line, x.ch);
                    }

                    function maxPos(a, b) {
                        return cmp(a, b) < 0 ? b : a;
                    }

                    function minPos(a, b) {
                        return cmp(a, b) < 0 ? a : b;
                    }

                    // Most of the external API clips given positions to make sure they
                    // actually exist within the document.
                    function clipLine(doc, n) {
                        return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));
                    }

                    function clipPos(doc, pos) {
                        if (pos.line < doc.first) {
                            return Pos(doc.first, 0);
                        }
                        var last = doc.first + doc.size - 1;
                        if (pos.line > last) {
                            return Pos(last, getLine(doc, last).text.length);
                        }
                        return clipToLen(pos, getLine(doc, pos.line).text.length);
                    }

                    function clipToLen(pos, linelen) {
                        var ch = pos.ch;
                        if (ch == null || ch > linelen) {
                            return Pos(pos.line, linelen);
                        } else if (ch < 0) {
                            return Pos(pos.line, 0);
                        } else {
                            return pos;
                        }
                    }

                    function clipPosArray(doc, array) {
                        var out = [];
                        for (var i = 0; i < array.length; i++) {
                            out[i] = clipPos(doc, array[i]);
                        }
                        return out;
                    }
                    var SavedContext = function(state, lookAhead) {
                        this.state = state;
                        this.lookAhead = lookAhead;
                    };
                    var Context = function(doc, state, line, lookAhead) {
                        this.state = state;
                        this.doc = doc;
                        this.line = line;
                        this.maxLookAhead = lookAhead || 0;
                        this.baseTokens = null;
                        this.baseTokenPos = 1;
                    };
                    Context.prototype.lookAhead = function(n) {
                        var line = this.doc.getLine(this.line + n);
                        if (line != null && n > this.maxLookAhead) {
                            this.maxLookAhead = n;
                        }
                        return line;
                    };
                    Context.prototype.baseToken = function(n) {
                        if (!this.baseTokens) {
                            return null;
                        }
                        while (this.baseTokens[this.baseTokenPos] <= n) {
                            this.baseTokenPos += 2;
                        }
                        var type = this.baseTokens[this.baseTokenPos + 1];
                        return {
                            type: type && type.replace(/( |^)overlay .*/, ""),
                            size: this.baseTokens[this.baseTokenPos] - n
                        };
                    };
                    Context.prototype.nextLine = function() {
                        this.line++;
                        if (this.maxLookAhead > 0) {
                            this.maxLookAhead--;
                        }
                    };
                    Context.fromSaved = function(doc, saved, line) {
                        if (saved instanceof SavedContext) {
                            return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead);
                        } else {
                            return new Context(doc, copyState(doc.mode, saved), line);
                        }
                    };
                    Context.prototype.save = function(copy) {
                        var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;
                        return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state;
                    };

                    // Compute a style array (an array starting with a mode generation
                    // -- for invalidation -- followed by pairs of end positions and
                    // style strings), which is used to highlight the tokens on the
                    // line.
                    function highlightLine(cm, line, context, forceToEnd) {
                        // A styles array always starts with a number identifying the
                        // mode/overlays that it is based on (for easy invalidation).
                        var st = [cm.state.modeGen],
                            lineClasses = {};
                        // Compute the base array of styles
                        runMode(cm, line.text, cm.doc.mode, context, function(end, style) {
                            return st.push(end, style);
                        }, lineClasses, forceToEnd);
                        var state = context.state;

                        // Run overlays, adjust style array.
                        var loop = function(o) {
                            context.baseTokens = st;
                            var overlay = cm.state.overlays[o],
                                i = 1,
                                at = 0;
                            context.state = true;
                            runMode(cm, line.text, overlay.mode, context, function(end, style) {
                                var start = i;
                                // Ensure there's a token end at the current position, and that i points at it
                                while (at < end) {
                                    var i_end = st[i];
                                    if (i_end > end) {
                                        st.splice(i, 1, end, st[i + 1], i_end);
                                    }
                                    i += 2;
                                    at = Math.min(end, i_end);
                                }
                                if (!style) {
                                    return;
                                }
                                if (overlay.opaque) {
                                    st.splice(start, i - start, end, "overlay " + style);
                                    i = start + 2;
                                } else {
                                    for (; start < i; start += 2) {
                                        var cur = st[start + 1];
                                        st[start + 1] = (cur ? cur + " " : "") + "overlay " + style;
                                    }
                                }
                            }, lineClasses);
                            context.state = state;
                            context.baseTokens = null;
                            context.baseTokenPos = 1;
                        };
                        for (var o = 0; o < cm.state.overlays.length; ++o) loop(o);
                        return {
                            styles: st,
                            classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null
                        };
                    }

                    function getLineStyles(cm, line, updateFrontier) {
                        if (!line.styles || line.styles[0] != cm.state.modeGen) {
                            var context = getContextBefore(cm, lineNo(line));
                            var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);
                            var result = highlightLine(cm, line, context);
                            if (resetState) {
                                context.state = resetState;
                            }
                            line.stateAfter = context.save(!resetState);
                            line.styles = result.styles;
                            if (result.classes) {
                                line.styleClasses = result.classes;
                            } else if (line.styleClasses) {
                                line.styleClasses = null;
                            }
                            if (updateFrontier === cm.doc.highlightFrontier) {
                                cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier);
                            }
                        }
                        return line.styles;
                    }

                    function getContextBefore(cm, n, precise) {
                        var doc = cm.doc,
                            display = cm.display;
                        if (!doc.mode.startState) {
                            return new Context(doc, true, n);
                        }
                        var start = findStartLine(cm, n, precise);
                        var saved = start > doc.first && getLine(doc, start - 1).stateAfter;
                        var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);
                        doc.iter(start, n, function(line) {
                            processLine(cm, line.text, context);
                            var pos = context.line;
                            line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;
                            context.nextLine();
                        });
                        if (precise) {
                            doc.modeFrontier = context.line;
                        }
                        return context;
                    }

                    // Lightweight form of highlight -- proceed over this line and
                    // update state, but don't save a style array. Used for lines that
                    // aren't currently visible.
                    function processLine(cm, text, context, startAt) {
                        var mode = cm.doc.mode;
                        var stream = new StringStream(text, cm.options.tabSize, context);
                        stream.start = stream.pos = startAt || 0;
                        if (text == "") {
                            callBlankLine(mode, context.state);
                        }
                        while (!stream.eol()) {
                            readToken(mode, stream, context.state);
                            stream.start = stream.pos;
                        }
                    }

                    function callBlankLine(mode, state) {
                        if (mode.blankLine) {
                            return mode.blankLine(state);
                        }
                        if (!mode.innerMode) {
                            return;
                        }
                        var inner = innerMode(mode, state);
                        if (inner.mode.blankLine) {
                            return inner.mode.blankLine(inner.state);
                        }
                    }

                    function readToken(mode, stream, state, inner) {
                        for (var i = 0; i < 10; i++) {
                            if (inner) {
                                inner[0] = innerMode(mode, state).mode;
                            }
                            var style = mode.token(stream, state);
                            if (stream.pos > stream.start) {
                                return style;
                            }
                        }
                        throw new Error("Mode " + mode.name + " failed to advance stream.");
                    }
                    var Token = function(stream, type, state) {
                        this.start = stream.start;
                        this.end = stream.pos;
                        this.string = stream.current();
                        this.type = type || null;
                        this.state = state;
                    };

                    // Utility for getTokenAt and getLineTokens
                    function takeToken(cm, pos, precise, asArray) {
                        var doc = cm.doc,
                            mode = doc.mode,
                            style;
                        pos = clipPos(doc, pos);
                        var line = getLine(doc, pos.line),
                            context = getContextBefore(cm, pos.line, precise);
                        var stream = new StringStream(line.text, cm.options.tabSize, context),
                            tokens;
                        if (asArray) {
                            tokens = [];
                        }
                        while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
                            stream.start = stream.pos;
                            style = readToken(mode, stream, context.state);
                            if (asArray) {
                                tokens.push(new Token(stream, style, copyState(doc.mode, context.state)));
                            }
                        }
                        return asArray ? tokens : new Token(stream, style, context.state);
                    }

                    function extractLineClasses(type, output) {
                        if (type) {
                            for (;;) {
                                var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/);
                                if (!lineClass) {
                                    break;
                                }
                                type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);
                                var prop = lineClass[1] ? "bgClass" : "textClass";
                                if (output[prop] == null) {
                                    output[prop] = lineClass[2];
                                } else if (!new RegExp("(?:^|\\s)" + lineClass[2] + "(?:$|\\s)").test(output[prop])) {
                                    output[prop] += " " + lineClass[2];
                                }
                            }
                        }
                        return type;
                    }

                    // Run the given mode's parser over a line, calling f for each token.
                    function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {
                        var flattenSpans = mode.flattenSpans;
                        if (flattenSpans == null) {
                            flattenSpans = cm.options.flattenSpans;
                        }
                        var curStart = 0,
                            curStyle = null;
                        var stream = new StringStream(text, cm.options.tabSize, context),
                            style;
                        var inner = cm.options.addModeClass && [null];
                        if (text == "") {
                            extractLineClasses(callBlankLine(mode, context.state), lineClasses);
                        }
                        while (!stream.eol()) {
                            if (stream.pos > cm.options.maxHighlightLength) {
                                flattenSpans = false;
                                if (forceToEnd) {
                                    processLine(cm, text, context, stream.pos);
                                }
                                stream.pos = text.length;
                                style = null;
                            } else {
                                style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);
                            }
                            if (inner) {
                                var mName = inner[0].name;
                                if (mName) {
                                    style = "m-" + (style ? mName + " " + style : mName);
                                }
                            }
                            if (!flattenSpans || curStyle != style) {
                                while (curStart < stream.start) {
                                    curStart = Math.min(stream.start, curStart + 5000);
                                    f(curStart, curStyle);
                                }
                                curStyle = style;
                            }
                            stream.start = stream.pos;
                        }
                        while (curStart < stream.pos) {
                            // Webkit seems to refuse to render text nodes longer than 57444
                            // characters, and returns inaccurate measurements in nodes
                            // starting around 5000 chars.
                            var pos = Math.min(stream.pos, curStart + 5000);
                            f(pos, curStyle);
                            curStart = pos;
                        }
                    }

                    // Finds the line to start with when starting a parse. Tries to
                    // find a line with a stateAfter, so that it can start with a
                    // valid state. If that fails, it returns the line with the
                    // smallest indentation, which tends to need the least context to
                    // parse correctly.
                    function findStartLine(cm, n, precise) {
                        var minindent,
                            minline,
                            doc = cm.doc;
                        var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
                        for (var search = n; search > lim; --search) {
                            if (search <= doc.first) {
                                return doc.first;
                            }
                            var line = getLine(doc, search - 1),
                                after = line.stateAfter;
                            if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier)) {
                                return search;
                            }
                            var indented = countColumn(line.text, null, cm.options.tabSize);
                            if (minline == null || minindent > indented) {
                                minline = search - 1;
                                minindent = indented;
                            }
                        }
                        return minline;
                    }

                    function retreatFrontier(doc, n) {
                        doc.modeFrontier = Math.min(doc.modeFrontier, n);
                        if (doc.highlightFrontier < n - 10) {
                            return;
                        }
                        var start = doc.first;
                        for (var line = n - 1; line > start; line--) {
                            var saved = getLine(doc, line).stateAfter;
                            // change is on 3
                            // state on line 1 looked ahead 2 -- so saw 3
                            // test 1 + 2 < 3 should cover this
                            if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {
                                start = line + 1;
                                break;
                            }
                        }
                        doc.highlightFrontier = Math.min(doc.highlightFrontier, start);
                    }

                    // Optimize some code when these features are not used.
                    var sawReadOnlySpans = false,
                        sawCollapsedSpans = false;

                    function seeReadOnlySpans() {
                        sawReadOnlySpans = true;
                    }

                    function seeCollapsedSpans() {
                        sawCollapsedSpans = true;
                    }

                    // TEXTMARKER SPANS

                    function MarkedSpan(marker, from, to) {
                        this.marker = marker;
                        this.from = from;
                        this.to = to;
                    }

                    // Search an array of spans for a span matching the given marker.
                    function getMarkedSpanFor(spans, marker) {
                        if (spans) {
                            for (var i = 0; i < spans.length; ++i) {
                                var span = spans[i];
                                if (span.marker == marker) {
                                    return span;
                                }
                            }
                        }
                    }

                    // Remove a span from an array, returning undefined if no spans are
                    // left (we don't store arrays for lines without spans).
                    function removeMarkedSpan(spans, span) {
                        var r;
                        for (var i = 0; i < spans.length; ++i) {
                            if (spans[i] != span) {
                                (r || (r = [])).push(spans[i]);
                            }
                        }
                        return r;
                    }

                    // Add a span to a line.
                    function addMarkedSpan(line, span, op) {
                        var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet()));
                        if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {
                            line.markedSpans.push(span);
                        } else {
                            line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
                            if (inThisOp) {
                                inThisOp.add(line.markedSpans);
                            }
                        }
                        span.marker.attachLine(line);
                    }

                    // Used for the algorithm that adjusts markers for a change in the
                    // document. These functions cut an array of spans at a given
                    // character position, returning an array of remaining chunks (or
                    // undefined if nothing remains).
                    function markedSpansBefore(old, startCh, isInsert) {
                        var nw;
                        if (old) {
                            for (var i = 0; i < old.length; ++i) {
                                var span = old[i],
                                    marker = span.marker;
                                var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
                                if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
                                    var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);
                                    (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));
                                }
                            }
                        }
                        return nw;
                    }

                    function markedSpansAfter(old, endCh, isInsert) {
                        var nw;
                        if (old) {
                            for (var i = 0; i < old.length; ++i) {
                                var span = old[i],
                                    marker = span.marker;
                                var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
                                if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
                                    var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
                                    (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, span.to == null ? null : span.to - endCh));
                                }
                            }
                        }
                        return nw;
                    }

                    // Given a change object, compute the new set of marker spans that
                    // cover the line in which the change took place. Removes spans
                    // entirely within the change, reconnects spans belonging to the
                    // same marker that appear on both sides of the change, and cuts off
                    // spans partially within the change. Returns an array of span
                    // arrays with one element for each line in (after) the change.
                    function stretchSpansOverChange(doc, change) {
                        if (change.full) {
                            return null;
                        }
                        var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
                        var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
                        if (!oldFirst && !oldLast) {
                            return null;
                        }
                        var startCh = change.from.ch,
                            endCh = change.to.ch,
                            isInsert = cmp(change.from, change.to) == 0;
                        // Get the spans that 'stick out' on both sides
                        var first = markedSpansBefore(oldFirst, startCh, isInsert);
                        var last = markedSpansAfter(oldLast, endCh, isInsert);

                        // Next, merge those two ends
                        var sameLine = change.text.length == 1,
                            offset = lst(change.text).length + (sameLine ? startCh : 0);
                        if (first) {
                            // Fix up .to properties of first
                            for (var i = 0; i < first.length; ++i) {
                                var span = first[i];
                                if (span.to == null) {
                                    var found = getMarkedSpanFor(last, span.marker);
                                    if (!found) {
                                        span.to = startCh;
                                    } else if (sameLine) {
                                        span.to = found.to == null ? null : found.to + offset;
                                    }
                                }
                            }
                        }
                        if (last) {
                            // Fix up .from in last (or move them into first in case of sameLine)
                            for (var i$1 = 0; i$1 < last.length; ++i$1) {
                                var span$1 = last[i$1];
                                if (span$1.to != null) {
                                    span$1.to += offset;
                                }
                                if (span$1.from == null) {
                                    var found$1 = getMarkedSpanFor(first, span$1.marker);
                                    if (!found$1) {
                                        span$1.from = offset;
                                        if (sameLine) {
                                            (first || (first = [])).push(span$1);
                                        }
                                    }
                                } else {
                                    span$1.from += offset;
                                    if (sameLine) {
                                        (first || (first = [])).push(span$1);
                                    }
                                }
                            }
                        }
                        // Make sure we didn't create any zero-length spans
                        if (first) {
                            first = clearEmptySpans(first);
                        }
                        if (last && last != first) {
                            last = clearEmptySpans(last);
                        }
                        var newMarkers = [first];
                        if (!sameLine) {
                            // Fill gap with whole-line-spans
                            var gap = change.text.length - 2,
                                gapMarkers;
                            if (gap > 0 && first) {
                                for (var i$2 = 0; i$2 < first.length; ++i$2) {
                                    if (first[i$2].to == null) {
                                        (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null));
                                    }
                                }
                            }
                            for (var i$3 = 0; i$3 < gap; ++i$3) {
                                newMarkers.push(gapMarkers);
                            }
                            newMarkers.push(last);
                        }
                        return newMarkers;
                    }

                    // Remove spans that are empty and don't have a clearWhenEmpty
                    // option of false.
                    function clearEmptySpans(spans) {
                        for (var i = 0; i < spans.length; ++i) {
                            var span = spans[i];
                            if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) {
                                spans.splice(i--, 1);
                            }
                        }
                        if (!spans.length) {
                            return null;
                        }
                        return spans;
                    }

                    // Used to 'clip' out readOnly ranges when making a change.
                    function removeReadOnlyRanges(doc, from, to) {
                        var markers = null;
                        doc.iter(from.line, to.line + 1, function(line) {
                            if (line.markedSpans) {
                                for (var i = 0; i < line.markedSpans.length; ++i) {
                                    var mark = line.markedSpans[i].marker;
                                    if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) {
                                        (markers || (markers = [])).push(mark);
                                    }
                                }
                            }
                        });
                        if (!markers) {
                            return null;
                        }
                        var parts = [{
                            from: from,
                            to: to
                        }];
                        for (var i = 0; i < markers.length; ++i) {
                            var mk = markers[i],
                                m = mk.find(0);
                            for (var j = 0; j < parts.length; ++j) {
                                var p = parts[j];
                                if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) {
                                    continue;
                                }
                                var newParts = [j, 1],
                                    dfrom = cmp(p.from, m.from),
                                    dto = cmp(p.to, m.to);
                                if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) {
                                    newParts.push({
                                        from: p.from,
                                        to: m.from
                                    });
                                }
                                if (dto > 0 || !mk.inclusiveRight && !dto) {
                                    newParts.push({
                                        from: m.to,
                                        to: p.to
                                    });
                                }
                                parts.splice.apply(parts, newParts);
                                j += newParts.length - 3;
                            }
                        }
                        return parts;
                    }

                    // Connect or disconnect spans from a line.
                    function detachMarkedSpans(line) {
                        var spans = line.markedSpans;
                        if (!spans) {
                            return;
                        }
                        for (var i = 0; i < spans.length; ++i) {
                            spans[i].marker.detachLine(line);
                        }
                        line.markedSpans = null;
                    }

                    function attachMarkedSpans(line, spans) {
                        if (!spans) {
                            return;
                        }
                        for (var i = 0; i < spans.length; ++i) {
                            spans[i].marker.attachLine(line);
                        }
                        line.markedSpans = spans;
                    }

                    // Helpers used when computing which overlapping collapsed span
                    // counts as the larger one.
                    function extraLeft(marker) {
                        return marker.inclusiveLeft ? -1 : 0;
                    }

                    function extraRight(marker) {
                        return marker.inclusiveRight ? 1 : 0;
                    }

                    // Returns a number indicating which of two overlapping collapsed
                    // spans is larger (and thus includes the other). Falls back to
                    // comparing ids when the spans cover exactly the same range.
                    function compareCollapsedMarkers(a, b) {
                        var lenDiff = a.lines.length - b.lines.length;
                        if (lenDiff != 0) {
                            return lenDiff;
                        }
                        var aPos = a.find(),
                            bPos = b.find();
                        var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);
                        if (fromCmp) {
                            return -fromCmp;
                        }
                        var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);
                        if (toCmp) {
                            return toCmp;
                        }
                        return b.id - a.id;
                    }

                    // Find out whether a line ends or starts in a collapsed span. If
                    // so, return the marker for that span.
                    function collapsedSpanAtSide(line, start) {
                        var sps = sawCollapsedSpans && line.markedSpans,
                            found;
                        if (sps) {
                            for (var sp = void 0, i = 0; i < sps.length; ++i) {
                                sp = sps[i];
                                if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) {
                                    found = sp.marker;
                                }
                            }
                        }
                        return found;
                    }

                    function collapsedSpanAtStart(line) {
                        return collapsedSpanAtSide(line, true);
                    }

                    function collapsedSpanAtEnd(line) {
                        return collapsedSpanAtSide(line, false);
                    }

                    function collapsedSpanAround(line, ch) {
                        var sps = sawCollapsedSpans && line.markedSpans,
                            found;
                        if (sps) {
                            for (var i = 0; i < sps.length; ++i) {
                                var sp = sps[i];
                                if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) {
                                    found = sp.marker;
                                }
                            }
                        }
                        return found;
                    }

                    // Test whether there exists a collapsed span that partially
                    // overlaps (covers the start or end, but not both) of a new span.
                    // Such overlap is not allowed.
                    function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
                        var line = getLine(doc, lineNo);
                        var sps = sawCollapsedSpans && line.markedSpans;
                        if (sps) {
                            for (var i = 0; i < sps.length; ++i) {
                                var sp = sps[i];
                                if (!sp.marker.collapsed) {
                                    continue;
                                }
                                var found = sp.marker.find(0);
                                var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
                                var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
                                if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) {
                                    continue;
                                }
                                if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) {
                                    return true;
                                }
                            }
                        }
                    }

                    // A visual line is a line as drawn on the screen. Folding, for
                    // example, can cause multiple logical lines to appear on the same
                    // visual line. This finds the start of the visual line that the
                    // given line is part of (usually that is the line itself).
                    function visualLine(line) {
                        var merged;
                        while (merged = collapsedSpanAtStart(line)) {
                            line = merged.find(-1, true).line;
                        }
                        return line;
                    }

                    function visualLineEnd(line) {
                        var merged;
                        while (merged = collapsedSpanAtEnd(line)) {
                            line = merged.find(1, true).line;
                        }
                        return line;
                    }

                    // Returns an array of logical lines that continue the visual line
                    // started by the argument, or undefined if there are no such lines.
                    function visualLineContinued(line) {
                        var merged, lines;
                        while (merged = collapsedSpanAtEnd(line)) {
                            line = merged.find(1, true).line;
                            (lines || (lines = [])).push(line);
                        }
                        return lines;
                    }

                    // Get the line number of the start of the visual line that the
                    // given line number is part of.
                    function visualLineNo(doc, lineN) {
                        var line = getLine(doc, lineN),
                            vis = visualLine(line);
                        if (line == vis) {
                            return lineN;
                        }
                        return lineNo(vis);
                    }

                    // Get the line number of the start of the next visual line after
                    // the given line.
                    function visualLineEndNo(doc, lineN) {
                        if (lineN > doc.lastLine()) {
                            return lineN;
                        }
                        var line = getLine(doc, lineN),
                            merged;
                        if (!lineIsHidden(doc, line)) {
                            return lineN;
                        }
                        while (merged = collapsedSpanAtEnd(line)) {
                            line = merged.find(1, true).line;
                        }
                        return lineNo(line) + 1;
                    }

                    // Compute whether a line is hidden. Lines count as hidden when they
                    // are part of a visual line that starts with another line, or when
                    // they are entirely covered by collapsed, non-widget span.
                    function lineIsHidden(doc, line) {
                        var sps = sawCollapsedSpans && line.markedSpans;
                        if (sps) {
                            for (var sp = void 0, i = 0; i < sps.length; ++i) {
                                sp = sps[i];
                                if (!sp.marker.collapsed) {
                                    continue;
                                }
                                if (sp.from == null) {
                                    return true;
                                }
                                if (sp.marker.widgetNode) {
                                    continue;
                                }
                                if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) {
                                    return true;
                                }
                            }
                        }
                    }

                    function lineIsHiddenInner(doc, line, span) {
                        if (span.to == null) {
                            var end = span.marker.find(1, true);
                            return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker));
                        }
                        if (span.marker.inclusiveRight && span.to == line.text.length) {
                            return true;
                        }
                        for (var sp = void 0, i = 0; i < line.markedSpans.length; ++i) {
                            sp = line.markedSpans[i];
                            if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && (sp.to == null || sp.to != span.from) && (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && lineIsHiddenInner(doc, line, sp)) {
                                return true;
                            }
                        }
                    }

                    // Find the height above the given line.
                    function heightAtLine(lineObj) {
                        lineObj = visualLine(lineObj);
                        var h = 0,
                            chunk = lineObj.parent;
                        for (var i = 0; i < chunk.lines.length; ++i) {
                            var line = chunk.lines[i];
                            if (line == lineObj) {
                                break;
                            } else {
                                h += line.height;
                            }
                        }
                        for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
                            for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
                                var cur = p.children[i$1];
                                if (cur == chunk) {
                                    break;
                                } else {
                                    h += cur.height;
                                }
                            }
                        }
                        return h;
                    }

                    // Compute the character length of a line, taking into account
                    // collapsed ranges (see markText) that might hide parts, and join
                    // other lines onto it.
                    function lineLength(line) {
                        if (line.height == 0) {
                            return 0;
                        }
                        var len = line.text.length,
                            merged,
                            cur = line;
                        while (merged = collapsedSpanAtStart(cur)) {
                            var found = merged.find(0, true);
                            cur = found.from.line;
                            len += found.from.ch - found.to.ch;
                        }
                        cur = line;
                        while (merged = collapsedSpanAtEnd(cur)) {
                            var found$1 = merged.find(0, true);
                            len -= cur.text.length - found$1.from.ch;
                            cur = found$1.to.line;
                            len += cur.text.length - found$1.to.ch;
                        }
                        return len;
                    }

                    // Find the longest line in the document.
                    function findMaxLine(cm) {
                        var d = cm.display,
                            doc = cm.doc;
                        d.maxLine = getLine(doc, doc.first);
                        d.maxLineLength = lineLength(d.maxLine);
                        d.maxLineChanged = true;
                        doc.iter(function(line) {
                            var len = lineLength(line);
                            if (len > d.maxLineLength) {
                                d.maxLineLength = len;
                                d.maxLine = line;
                            }
                        });
                    }

                    // LINE DATA STRUCTURE

                    // Line objects. These hold state related to a line, including
                    // highlighting info (the styles array).
                    var Line = function(text, markedSpans, estimateHeight) {
                        this.text = text;
                        attachMarkedSpans(this, markedSpans);
                        this.height = estimateHeight ? estimateHeight(this) : 1;
                    };
                    Line.prototype.lineNo = function() {
                        return lineNo(this);
                    };
                    eventMixin(Line);

                    // Change the content (text, markers) of a line. Automatically
                    // invalidates cached information and tries to re-estimate the
                    // line's height.
                    function updateLine(line, text, markedSpans, estimateHeight) {
                        line.text = text;
                        if (line.stateAfter) {
                            line.stateAfter = null;
                        }
                        if (line.styles) {
                            line.styles = null;
                        }
                        if (line.order != null) {
                            line.order = null;
                        }
                        detachMarkedSpans(line);
                        attachMarkedSpans(line, markedSpans);
                        var estHeight = estimateHeight ? estimateHeight(line) : 1;
                        if (estHeight != line.height) {
                            updateLineHeight(line, estHeight);
                        }
                    }

                    // Detach a line from the document tree and its markers.
                    function cleanUpLine(line) {
                        line.parent = null;
                        detachMarkedSpans(line);
                    }

                    // Convert a style as returned by a mode (either null, or a string
                    // containing one or more styles) to a CSS style. This is cached,
                    // and also looks for line-wide styles.
                    var styleToClassCache = {},
                        styleToClassCacheWithMode = {};

                    function interpretTokenStyle(style, options) {
                        if (!style || /^\s*$/.test(style)) {
                            return null;
                        }
                        var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
                        return cache[style] || (cache[style] = style.replace(/\S+/g, "cm-$&"));
                    }

                    // Render the DOM representation of the text of a line. Also builds
                    // up a 'line map', which points at the DOM nodes that represent
                    // specific stretches of text, and is used by the measuring code.
                    // The returned object contains the DOM node, this map, and
                    // information about line-wide styles that were set by the mode.
                    function buildLineContent(cm, lineView) {
                        // The padding-right forces the element to have a 'border', which
                        // is needed on Webkit to be able to get line-level bounding
                        // rectangles for it (in measureChar).
                        var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null);
                        var builder = {
                            pre: eltP("pre", [content], "CodeMirror-line"),
                            content: content,
                            col: 0,
                            pos: 0,
                            cm: cm,
                            trailingSpace: false,
                            splitSpaces: cm.getOption("lineWrapping")
                        };
                        lineView.measure = {};

                        // Iterate over the logical lines that make up this visual line.
                        for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
                            var line = i ? lineView.rest[i - 1] : lineView.line,
                                order = void 0;
                            builder.pos = 0;
                            builder.addToken = buildToken;
                            // Optionally wire in some hacks into the token-rendering
                            // algorithm, to deal with browser quirks.
                            if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction))) {
                                builder.addToken = buildTokenBadBidi(builder.addToken, order);
                            }
                            builder.map = [];
                            var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);
                            insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));
                            if (line.styleClasses) {
                                if (line.styleClasses.bgClass) {
                                    builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || "");
                                }
                                if (line.styleClasses.textClass) {
                                    builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || "");
                                }
                            }

                            // Ensure at least a single node is present, for measuring.
                            if (builder.map.length == 0) {
                                builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure)));
                            }

                            // Store the map and a cache object for the current logical line
                            if (i == 0) {
                                lineView.measure.map = builder.map;
                                lineView.measure.cache = {};
                            } else {
                                (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map);
                                (lineView.measure.caches || (lineView.measure.caches = [])).push({});
                            }
                        }

                        // See issue #2901
                        if (webkit) {
                            var last = builder.content.lastChild;
                            if (/\bcm-tab\b/.test(last.className) || last.querySelector && last.querySelector(".cm-tab")) {
                                builder.content.className = "cm-tab-wrap-hack";
                            }
                        }
                        signal(cm, "renderLine", cm, lineView.line, builder.pre);
                        if (builder.pre.className) {
                            builder.textClass = joinClasses(builder.pre.className, builder.textClass || "");
                        }
                        return builder;
                    }

                    function defaultSpecialCharPlaceholder(ch) {
                        var token = elt("span", "\u2022", "cm-invalidchar");
                        token.title = "\\u" + ch.charCodeAt(0).toString(16);
                        token.setAttribute("aria-label", token.title);
                        return token;
                    }

                    // Build up the DOM representation for a single token, and add it to
                    // the line map. Takes care to render special characters separately.
                    function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {
                        if (!text) {
                            return;
                        }
                        var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;
                        var special = builder.cm.state.specialChars,
                            mustWrap = false;
                        var content;
                        if (!special.test(text)) {
                            builder.col += text.length;
                            content = document.createTextNode(displayText);
                            builder.map.push(builder.pos, builder.pos + text.length, content);
                            if (ie && ie_version < 9) {
                                mustWrap = true;
                            }
                            builder.pos += text.length;
                        } else {
                            content = document.createDocumentFragment();
                            var pos = 0;
                            while (true) {
                                special.lastIndex = pos;
                                var m = special.exec(text);
                                var skipped = m ? m.index - pos : text.length - pos;
                                if (skipped) {
                                    var txt = document.createTextNode(displayText.slice(pos, pos + skipped));
                                    if (ie && ie_version < 9) {
                                        content.appendChild(elt("span", [txt]));
                                    } else {
                                        content.appendChild(txt);
                                    }
                                    builder.map.push(builder.pos, builder.pos + skipped, txt);
                                    builder.col += skipped;
                                    builder.pos += skipped;
                                }
                                if (!m) {
                                    break;
                                }
                                pos += skipped + 1;
                                var txt$1 = void 0;
                                if (m[0] == "\t") {
                                    var tabSize = builder.cm.options.tabSize,
                                        tabWidth = tabSize - builder.col % tabSize;
                                    txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
                                    txt$1.setAttribute("role", "presentation");
                                    txt$1.setAttribute("cm-text", "\t");
                                    builder.col += tabWidth;
                                } else if (m[0] == "\r" || m[0] == "\n") {
                                    txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar"));
                                    txt$1.setAttribute("cm-text", m[0]);
                                    builder.col += 1;
                                } else {
                                    txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);
                                    txt$1.setAttribute("cm-text", m[0]);
                                    if (ie && ie_version < 9) {
                                        content.appendChild(elt("span", [txt$1]));
                                    } else {
                                        content.appendChild(txt$1);
                                    }
                                    builder.col += 1;
                                }
                                builder.map.push(builder.pos, builder.pos + 1, txt$1);
                                builder.pos++;
                            }
                        }
                        builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;
                        if (style || startStyle || endStyle || mustWrap || css || attributes) {
                            var fullStyle = style || "";
                            if (startStyle) {
                                fullStyle += startStyle;
                            }
                            if (endStyle) {
                                fullStyle += endStyle;
                            }
                            var token = elt("span", [content], fullStyle, css);
                            if (attributes) {
                                for (var attr in attributes) {
                                    if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class") {
                                        token.setAttribute(attr, attributes[attr]);
                                    }
                                }
                            }
                            return builder.content.appendChild(token);
                        }
                        builder.content.appendChild(content);
                    }

                    // Change some spaces to NBSP to prevent the browser from collapsing
                    // trailing spaces at the end of a line when rendering text (issue #1362).
                    function splitSpaces(text, trailingBefore) {
                        if (text.length > 1 && !/  /.test(text)) {
                            return text;
                        }
                        var spaceBefore = trailingBefore,
                            result = "";
                        for (var i = 0; i < text.length; i++) {
                            var ch = text.charAt(i);
                            if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32)) {
                                ch = "\u00a0";
                            }
                            result += ch;
                            spaceBefore = ch == " ";
                        }
                        return result;
                    }

                    // Work around nonsense dimensions being reported for stretches of
                    // right-to-left text.
                    function buildTokenBadBidi(inner, order) {
                        return function(builder, text, style, startStyle, endStyle, css, attributes) {
                            style = style ? style + " cm-force-border" : "cm-force-border";
                            var start = builder.pos,
                                end = start + text.length;
                            for (;;) {
                                // Find the part that overlaps with the start of this text
                                var part = void 0;
                                for (var i = 0; i < order.length; i++) {
                                    part = order[i];
                                    if (part.to > start && part.from <= start) {
                                        break;
                                    }
                                }
                                if (part.to >= end) {
                                    return inner(builder, text, style, startStyle, endStyle, css, attributes);
                                }
                                inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);
                                startStyle = null;
                                text = text.slice(part.to - start);
                                start = part.to;
                            }
                        };
                    }

                    function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
                        var widget = !ignoreWidget && marker.widgetNode;
                        if (widget) {
                            builder.map.push(builder.pos, builder.pos + size, widget);
                        }
                        if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
                            if (!widget) {
                                widget = builder.content.appendChild(document.createElement("span"));
                            }
                            widget.setAttribute("cm-marker", marker.id);
                        }
                        if (widget) {
                            builder.cm.display.input.setUneditable(widget);
                            builder.content.appendChild(widget);
                        }
                        builder.pos += size;
                        builder.trailingSpace = false;
                    }

                    // Outputs a number of spans to make up a line, taking highlighting
                    // and marked text into account.
                    function insertLineContent(line, builder, styles) {
                        var spans = line.markedSpans,
                            allText = line.text,
                            at = 0;
                        if (!spans) {
                            for (var i$1 = 1; i$1 < styles.length; i$1 += 2) {
                                builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1 + 1], builder.cm.options));
                            }
                            return;
                        }
                        var len = allText.length,
                            pos = 0,
                            i = 1,
                            text = "",
                            style,
                            css;
                        var nextChange = 0,
                            spanStyle,
                            spanEndStyle,
                            spanStartStyle,
                            collapsed,
                            attributes;
                        for (;;) {
                            if (nextChange == pos) {
                                // Update current marker set
                                spanStyle = spanEndStyle = spanStartStyle = css = "";
                                attributes = null;
                                collapsed = null;
                                nextChange = Infinity;
                                var foundBookmarks = [],
                                    endStyles = void 0;
                                for (var j = 0; j < spans.length; ++j) {
                                    var sp = spans[j],
                                        m = sp.marker;
                                    if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
                                        foundBookmarks.push(m);
                                    } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
                                        if (sp.to != null && sp.to != pos && nextChange > sp.to) {
                                            nextChange = sp.to;
                                            spanEndStyle = "";
                                        }
                                        if (m.className) {
                                            spanStyle += " " + m.className;
                                        }
                                        if (m.css) {
                                            css = (css ? css + ";" : "") + m.css;
                                        }
                                        if (m.startStyle && sp.from == pos) {
                                            spanStartStyle += " " + m.startStyle;
                                        }
                                        if (m.endStyle && sp.to == nextChange) {
                                            (endStyles || (endStyles = [])).push(m.endStyle, sp.to);
                                        }
                                        // support for the old title property
                                        // https://github.com/codemirror/CodeMirror/pull/5673
                                        if (m.title) {
                                            (attributes || (attributes = {})).title = m.title;
                                        }
                                        if (m.attributes) {
                                            for (var attr in m.attributes) {
                                                (attributes || (attributes = {}))[attr] = m.attributes[attr];
                                            }
                                        }
                                        if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) {
                                            collapsed = sp;
                                        }
                                    } else if (sp.from > pos && nextChange > sp.from) {
                                        nextChange = sp.from;
                                    }
                                }
                                if (endStyles) {
                                    for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2) {
                                        if (endStyles[j$1 + 1] == nextChange) {
                                            spanEndStyle += " " + endStyles[j$1];
                                        }
                                    }
                                }
                                if (!collapsed || collapsed.from == pos) {
                                    for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2) {
                                        buildCollapsedSpan(builder, 0, foundBookmarks[j$2]);
                                    }
                                }
                                if (collapsed && (collapsed.from || 0) == pos) {
                                    buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, collapsed.marker, collapsed.from == null);
                                    if (collapsed.to == null) {
                                        return;
                                    }
                                    if (collapsed.to == pos) {
                                        collapsed = false;
                                    }
                                }
                            }
                            if (pos >= len) {
                                break;
                            }
                            var upto = Math.min(len, nextChange);
                            while (true) {
                                if (text) {
                                    var end = pos + text.length;
                                    if (!collapsed) {
                                        var tokenText = end > upto ? text.slice(0, upto - pos) : text;
                                        builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes);
                                    }
                                    if (end >= upto) {
                                        text = text.slice(upto - pos);
                                        pos = upto;
                                        break;
                                    }
                                    pos = end;
                                    spanStartStyle = "";
                                }
                                text = allText.slice(at, at = styles[i++]);
                                style = interpretTokenStyle(styles[i++], builder.cm.options);
                            }
                        }
                    }

                    // These objects are used to represent the visible (currently drawn)
                    // part of the document. A LineView may correspond to multiple
                    // logical lines, if those are connected by collapsed ranges.
                    function LineView(doc, line, lineN) {
                        // The starting line
                        this.line = line;
                        // Continuing lines, if any
                        this.rest = visualLineContinued(line);
                        // Number of logical lines in this visual line
                        this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
                        this.node = this.text = null;
                        this.hidden = lineIsHidden(doc, line);
                    }

                    // Create a range of LineView objects for the given lines.
                    function buildViewArray(cm, from, to) {
                        var array = [],
                            nextPos;
                        for (var pos = from; pos < to; pos = nextPos) {
                            var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
                            nextPos = pos + view.size;
                            array.push(view);
                        }
                        return array;
                    }
                    var operationGroup = null;

                    function pushOperation(op) {
                        if (operationGroup) {
                            operationGroup.ops.push(op);
                        } else {
                            op.ownsGroup = operationGroup = {
                                ops: [op],
                                delayedCallbacks: []
                            };
                        }
                    }

                    function fireCallbacksForOps(group) {
                        // Calls delayed callbacks and cursorActivity handlers until no
                        // new ones appear
                        var callbacks = group.delayedCallbacks,
                            i = 0;
                        do {
                            for (; i < callbacks.length; i++) {
                                callbacks[i].call(null);
                            }
                            for (var j = 0; j < group.ops.length; j++) {
                                var op = group.ops[j];
                                if (op.cursorActivityHandlers) {
                                    while (op.cursorActivityCalled < op.cursorActivityHandlers.length) {
                                        op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm);
                                    }
                                }
                            }
                        } while (i < callbacks.length);
                    }

                    function finishOperation(op, endCb) {
                        var group = op.ownsGroup;
                        if (!group) {
                            return;
                        }
                        try {
                            fireCallbacksForOps(group);
                        } finally {
                            operationGroup = null;
                            endCb(group);
                        }
                    }
                    var orphanDelayedCallbacks = null;

                    // Often, we want to signal events at a point where we are in the
                    // middle of some work, but don't want the handler to start calling
                    // other methods on the editor, which might be in an inconsistent
                    // state or simply not expect any other events to happen.
                    // signalLater looks whether there are any handlers, and schedules
                    // them to be executed when the last operation ends, or, if no
                    // operation is active, when a timeout fires.
                    function signalLater(emitter, type /*, values...*/ ) {
                        var arr = getHandlers(emitter, type);
                        if (!arr.length) {
                            return;
                        }
                        var args = Array.prototype.slice.call(arguments, 2),
                            list;
                        if (operationGroup) {
                            list = operationGroup.delayedCallbacks;
                        } else if (orphanDelayedCallbacks) {
                            list = orphanDelayedCallbacks;
                        } else {
                            list = orphanDelayedCallbacks = [];
                            setTimeout(fireOrphanDelayed, 0);
                        }
                        var loop = function(i) {
                            list.push(function() {
                                return arr[i].apply(null, args);
                            });
                        };
                        for (var i = 0; i < arr.length; ++i) loop(i);
                    }

                    function fireOrphanDelayed() {
                        var delayed = orphanDelayedCallbacks;
                        orphanDelayedCallbacks = null;
                        for (var i = 0; i < delayed.length; ++i) {
                            delayed[i]();
                        }
                    }

                    // When an aspect of a line changes, a string is added to
                    // lineView.changes. This updates the relevant part of the line's
                    // DOM structure.
                    function updateLineForChanges(cm, lineView, lineN, dims) {
                        for (var j = 0; j < lineView.changes.length; j++) {
                            var type = lineView.changes[j];
                            if (type == "text") {
                                updateLineText(cm, lineView);
                            } else if (type == "gutter") {
                                updateLineGutter(cm, lineView, lineN, dims);
                            } else if (type == "class") {
                                updateLineClasses(cm, lineView);
                            } else if (type == "widget") {
                                updateLineWidgets(cm, lineView, dims);
                            }
                        }
                        lineView.changes = null;
                    }

                    // Lines with gutter elements, widgets or a background class need to
                    // be wrapped, and have the extra elements added to the wrapper div
                    function ensureLineWrapped(lineView) {
                        if (lineView.node == lineView.text) {
                            lineView.node = elt("div", null, null, "position: relative");
                            if (lineView.text.parentNode) {
                                lineView.text.parentNode.replaceChild(lineView.node, lineView.text);
                            }
                            lineView.node.appendChild(lineView.text);
                            if (ie && ie_version < 8) {
                                lineView.node.style.zIndex = 2;
                            }
                        }
                        return lineView.node;
                    }

                    function updateLineBackground(cm, lineView) {
                        var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
                        if (cls) {
                            cls += " CodeMirror-linebackground";
                        }
                        if (lineView.background) {
                            if (cls) {
                                lineView.background.className = cls;
                            } else {
                                lineView.background.parentNode.removeChild(lineView.background);
                                lineView.background = null;
                            }
                        } else if (cls) {
                            var wrap = ensureLineWrapped(lineView);
                            lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
                            cm.display.input.setUneditable(lineView.background);
                        }
                    }

                    // Wrapper around buildLineContent which will reuse the structure
                    // in display.externalMeasured when possible.
                    function getLineContent(cm, lineView) {
                        var ext = cm.display.externalMeasured;
                        if (ext && ext.line == lineView.line) {
                            cm.display.externalMeasured = null;
                            lineView.measure = ext.measure;
                            return ext.built;
                        }
                        return buildLineContent(cm, lineView);
                    }

                    // Redraw the line's text. Interacts with the background and text
                    // classes because the mode may output tokens that influence these
                    // classes.
                    function updateLineText(cm, lineView) {
                        var cls = lineView.text.className;
                        var built = getLineContent(cm, lineView);
                        if (lineView.text == lineView.node) {
                            lineView.node = built.pre;
                        }
                        lineView.text.parentNode.replaceChild(built.pre, lineView.text);
                        lineView.text = built.pre;
                        if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
                            lineView.bgClass = built.bgClass;
                            lineView.textClass = built.textClass;
                            updateLineClasses(cm, lineView);
                        } else if (cls) {
                            lineView.text.className = cls;
                        }
                    }

                    function updateLineClasses(cm, lineView) {
                        updateLineBackground(cm, lineView);
                        if (lineView.line.wrapClass) {
                            ensureLineWrapped(lineView).className = lineView.line.wrapClass;
                        } else if (lineView.node != lineView.text) {
                            lineView.node.className = "";
                        }
                        var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
                        lineView.text.className = textClass || "";
                    }

                    function updateLineGutter(cm, lineView, lineN, dims) {
                        if (lineView.gutter) {
                            lineView.node.removeChild(lineView.gutter);
                            lineView.gutter = null;
                        }
                        if (lineView.gutterBackground) {
                            lineView.node.removeChild(lineView.gutterBackground);
                            lineView.gutterBackground = null;
                        }
                        if (lineView.line.gutterClass) {
                            var wrap = ensureLineWrapped(lineView);
                            lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass, "left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + dims.gutterTotalWidth + "px");
                            cm.display.input.setUneditable(lineView.gutterBackground);
                            wrap.insertBefore(lineView.gutterBackground, lineView.text);
                        }
                        var markers = lineView.line.gutterMarkers;
                        if (cm.options.lineNumbers || markers) {
                            var wrap$1 = ensureLineWrapped(lineView);
                            var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px");
                            gutterWrap.setAttribute("aria-hidden", "true");
                            cm.display.input.setUneditable(gutterWrap);
                            wrap$1.insertBefore(gutterWrap, lineView.text);
                            if (lineView.line.gutterClass) {
                                gutterWrap.className += " " + lineView.line.gutterClass;
                            }
                            if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) {
                                lineView.lineNumber = gutterWrap.appendChild(elt("div", lineNumberFor(cm.options, lineN), "CodeMirror-linenumber CodeMirror-gutter-elt", "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + cm.display.lineNumInnerWidth + "px"));
                            }
                            if (markers) {
                                for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {
                                    var id = cm.display.gutterSpecs[k].className,
                                        found = markers.hasOwnProperty(id) && markers[id];
                                    if (found) {
                                        gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px"));
                                    }
                                }
                            }
                        }
                    }

                    function updateLineWidgets(cm, lineView, dims) {
                        if (lineView.alignable) {
                            lineView.alignable = null;
                        }
                        var isWidget = classTest("CodeMirror-linewidget");
                        for (var node = lineView.node.firstChild, next = void 0; node; node = next) {
                            next = node.nextSibling;
                            if (isWidget.test(node.className)) {
                                lineView.node.removeChild(node);
                            }
                        }
                        insertLineWidgets(cm, lineView, dims);
                    }

                    // Build a line's DOM representation from scratch
                    function buildLineElement(cm, lineView, lineN, dims) {
                        var built = getLineContent(cm, lineView);
                        lineView.text = lineView.node = built.pre;
                        if (built.bgClass) {
                            lineView.bgClass = built.bgClass;
                        }
                        if (built.textClass) {
                            lineView.textClass = built.textClass;
                        }
                        updateLineClasses(cm, lineView);
                        updateLineGutter(cm, lineView, lineN, dims);
                        insertLineWidgets(cm, lineView, dims);
                        return lineView.node;
                    }

                    // A lineView may contain multiple logical lines (when merged by
                    // collapsed spans). The widgets for all of them need to be drawn.
                    function insertLineWidgets(cm, lineView, dims) {
                        insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);
                        if (lineView.rest) {
                            for (var i = 0; i < lineView.rest.length; i++) {
                                insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false);
                            }
                        }
                    }

                    function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
                        if (!line.widgets) {
                            return;
                        }
                        var wrap = ensureLineWrapped(lineView);
                        for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
                            var widget = ws[i],
                                node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : ""));
                            if (!widget.handleMouseEvents) {
                                node.setAttribute("cm-ignore-events", "true");
                            }
                            positionLineWidget(widget, node, lineView, dims);
                            cm.display.input.setUneditable(node);
                            if (allowAbove && widget.above) {
                                wrap.insertBefore(node, lineView.gutter || lineView.text);
                            } else {
                                wrap.appendChild(node);
                            }
                            signalLater(widget, "redraw");
                        }
                    }

                    function positionLineWidget(widget, node, lineView, dims) {
                        if (widget.noHScroll) {
                            (lineView.alignable || (lineView.alignable = [])).push(node);
                            var width = dims.wrapperWidth;
                            node.style.left = dims.fixedPos + "px";
                            if (!widget.coverGutter) {
                                width -= dims.gutterTotalWidth;
                                node.style.paddingLeft = dims.gutterTotalWidth + "px";
                            }
                            node.style.width = width + "px";
                        }
                        if (widget.coverGutter) {
                            node.style.zIndex = 5;
                            node.style.position = "relative";
                            if (!widget.noHScroll) {
                                node.style.marginLeft = -dims.gutterTotalWidth + "px";
                            }
                        }
                    }

                    function widgetHeight(widget) {
                        if (widget.height != null) {
                            return widget.height;
                        }
                        var cm = widget.doc.cm;
                        if (!cm) {
                            return 0;
                        }
                        if (!contains(document.body, widget.node)) {
                            var parentStyle = "position: relative;";
                            if (widget.coverGutter) {
                                parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;";
                            }
                            if (widget.noHScroll) {
                                parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;";
                            }
                            removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
                        }
                        return widget.height = widget.node.parentNode.offsetHeight;
                    }

                    // Return true when the given mouse event happened in a widget
                    function eventInWidget(display, e) {
                        for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
                            if (!n || n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true" || n.parentNode == display.sizer && n != display.mover) {
                                return true;
                            }
                        }
                    }

                    // POSITION MEASUREMENT

                    function paddingTop(display) {
                        return display.lineSpace.offsetTop;
                    }

                    function paddingVert(display) {
                        return display.mover.offsetHeight - display.lineSpace.offsetHeight;
                    }

                    function paddingH(display) {
                        if (display.cachedPaddingH) {
                            return display.cachedPaddingH;
                        }
                        var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like"));
                        var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
                        var data = {
                            left: parseInt(style.paddingLeft),
                            right: parseInt(style.paddingRight)
                        };
                        if (!isNaN(data.left) && !isNaN(data.right)) {
                            display.cachedPaddingH = data;
                        }
                        return data;
                    }

                    function scrollGap(cm) {
                        return scrollerGap - cm.display.nativeBarWidth;
                    }

                    function displayWidth(cm) {
                        return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth;
                    }

                    function displayHeight(cm) {
                        return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight;
                    }

                    // Ensure the lineView.wrapping.heights array is populated. This is
                    // an array of bottom offsets for the lines that make up a drawn
                    // line. When lineWrapping is on, there might be more than one
                    // height.
                    function ensureLineHeights(cm, lineView, rect) {
                        var wrapping = cm.options.lineWrapping;
                        var curWidth = wrapping && displayWidth(cm);
                        if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
                            var heights = lineView.measure.heights = [];
                            if (wrapping) {
                                lineView.measure.width = curWidth;
                                var rects = lineView.text.firstChild.getClientRects();
                                for (var i = 0; i < rects.length - 1; i++) {
                                    var cur = rects[i],
                                        next = rects[i + 1];
                                    if (Math.abs(cur.bottom - next.bottom) > 2) {
                                        heights.push((cur.bottom + next.top) / 2 - rect.top);
                                    }
                                }
                            }
                            heights.push(rect.bottom - rect.top);
                        }
                    }

                    // Find a line map (mapping character offsets to text nodes) and a
                    // measurement cache for the given line number. (A line view might
                    // contain multiple lines when collapsed ranges are present.)
                    function mapFromLineView(lineView, line, lineN) {
                        if (lineView.line == line) {
                            return {
                                map: lineView.measure.map,
                                cache: lineView.measure.cache
                            };
                        }
                        if (lineView.rest) {
                            for (var i = 0; i < lineView.rest.length; i++) {
                                if (lineView.rest[i] == line) {
                                    return {
                                        map: lineView.measure.maps[i],
                                        cache: lineView.measure.caches[i]
                                    };
                                }
                            }
                            for (var i$1 = 0; i$1 < lineView.rest.length; i$1++) {
                                if (lineNo(lineView.rest[i$1]) > lineN) {
                                    return {
                                        map: lineView.measure.maps[i$1],
                                        cache: lineView.measure.caches[i$1],
                                        before: true
                                    };
                                }
                            }
                        }
                    }

                    // Render a line into the hidden node display.externalMeasured. Used
                    // when measurement is needed for a line that's not in the viewport.
                    function updateExternalMeasurement(cm, line) {
                        line = visualLine(line);
                        var lineN = lineNo(line);
                        var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
                        view.lineN = lineN;
                        var built = view.built = buildLineContent(cm, view);
                        view.text = built.pre;
                        removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
                        return view;
                    }

                    // Get a {top, bottom, left, right} box (in line-local coordinates)
                    // for a given character.
                    function measureChar(cm, line, ch, bias) {
                        return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias);
                    }

                    // Find a line view that corresponds to the given line number.
                    function findViewForLine(cm, lineN) {
                        if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) {
                            return cm.display.view[findViewIndex(cm, lineN)];
                        }
                        var ext = cm.display.externalMeasured;
                        if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) {
                            return ext;
                        }
                    }

                    // Measurement can be split in two steps, the set-up work that
                    // applies to the whole line, and the measurement of the actual
                    // character. Functions like coordsChar, that need to do a lot of
                    // measurements in a row, can thus ensure that the set-up work is
                    // only done once.
                    function prepareMeasureForLine(cm, line) {
                        var lineN = lineNo(line);
                        var view = findViewForLine(cm, lineN);
                        if (view && !view.text) {
                            view = null;
                        } else if (view && view.changes) {
                            updateLineForChanges(cm, view, lineN, getDimensions(cm));
                            cm.curOp.forceUpdate = true;
                        }
                        if (!view) {
                            view = updateExternalMeasurement(cm, line);
                        }
                        var info = mapFromLineView(view, line, lineN);
                        return {
                            line: line,
                            view: view,
                            rect: null,
                            map: info.map,
                            cache: info.cache,
                            before: info.before,
                            hasHeights: false
                        };
                    }

                    // Given a prepared measurement object, measures the position of an
                    // actual character (or fetches it from the cache).
                    function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
                        if (prepared.before) {
                            ch = -1;
                        }
                        var key = ch + (bias || ""),
                            found;
                        if (prepared.cache.hasOwnProperty(key)) {
                            found = prepared.cache[key];
                        } else {
                            if (!prepared.rect) {
                                prepared.rect = prepared.view.text.getBoundingClientRect();
                            }
                            if (!prepared.hasHeights) {
                                ensureLineHeights(cm, prepared.view, prepared.rect);
                                prepared.hasHeights = true;
                            }
                            found = measureCharInner(cm, prepared, ch, bias);
                            if (!found.bogus) {
                                prepared.cache[key] = found;
                            }
                        }
                        return {
                            left: found.left,
                            right: found.right,
                            top: varHeight ? found.rtop : found.top,
                            bottom: varHeight ? found.rbottom : found.bottom
                        };
                    }
                    var nullRect = {
                        left: 0,
                        right: 0,
                        top: 0,
                        bottom: 0
                    };

                    function nodeAndOffsetInLineMap(map, ch, bias) {
                        var node, start, end, collapse, mStart, mEnd;
                        // First, search the line map for the text node corresponding to,
                        // or closest to, the target character.
                        for (var i = 0; i < map.length; i += 3) {
                            mStart = map[i];
                            mEnd = map[i + 1];
                            if (ch < mStart) {
                                start = 0;
                                end = 1;
                                collapse = "left";
                            } else if (ch < mEnd) {
                                start = ch - mStart;
                                end = start + 1;
                            } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {
                                end = mEnd - mStart;
                                start = end - 1;
                                if (ch >= mEnd) {
                                    collapse = "right";
                                }
                            }
                            if (start != null) {
                                node = map[i + 2];
                                if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) {
                                    collapse = bias;
                                }
                                if (bias == "left" && start == 0) {
                                    while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {
                                        node = map[(i -= 3) + 2];
                                        collapse = "left";
                                    }
                                }
                                if (bias == "right" && start == mEnd - mStart) {
                                    while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {
                                        node = map[(i += 3) + 2];
                                        collapse = "right";
                                    }
                                }
                                break;
                            }
                        }
                        return {
                            node: node,
                            start: start,
                            end: end,
                            collapse: collapse,
                            coverStart: mStart,
                            coverEnd: mEnd
                        };
                    }

                    function getUsefulRect(rects, bias) {
                        var rect = nullRect;
                        if (bias == "left") {
                            for (var i = 0; i < rects.length; i++) {
                                if ((rect = rects[i]).left != rect.right) {
                                    break;
                                }
                            }
                        } else {
                            for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {
                                if ((rect = rects[i$1]).left != rect.right) {
                                    break;
                                }
                            }
                        }
                        return rect;
                    }

                    function measureCharInner(cm, prepared, ch, bias) {
                        var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);
                        var node = place.node,
                            start = place.start,
                            end = place.end,
                            collapse = place.collapse;
                        var rect;
                        if (node.nodeType == 3) {
                            // If it is a text node, use a range to retrieve the coordinates.
                            for (var i$1 = 0; i$1 < 4; i$1++) {
                                // Retry a maximum of 4 times when nonsense rectangles are returned
                                while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) {
                                    --start;
                                }
                                while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) {
                                    ++end;
                                }
                                if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) {
                                    rect = node.parentNode.getBoundingClientRect();
                                } else {
                                    rect = getUsefulRect(range(node, start, end).getClientRects(), bias);
                                }
                                if (rect.left || rect.right || start == 0) {
                                    break;
                                }
                                end = start;
                                start = start - 1;
                                collapse = "right";
                            }
                            if (ie && ie_version < 11) {
                                rect = maybeUpdateRectForZooming(cm.display.measure, rect);
                            }
                        } else {
                            // If it is a widget, simply get the box for the whole widget.
                            if (start > 0) {
                                collapse = bias = "right";
                            }
                            var rects;
                            if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) {
                                rect = rects[bias == "right" ? rects.length - 1 : 0];
                            } else {
                                rect = node.getBoundingClientRect();
                            }
                        }
                        if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
                            var rSpan = node.parentNode.getClientRects()[0];
                            if (rSpan) {
                                rect = {
                                    left: rSpan.left,
                                    right: rSpan.left + charWidth(cm.display),
                                    top: rSpan.top,
                                    bottom: rSpan.bottom
                                };
                            } else {
                                rect = nullRect;
                            }
                        }
                        var rtop = rect.top - prepared.rect.top,
                            rbot = rect.bottom - prepared.rect.top;
                        var mid = (rtop + rbot) / 2;
                        var heights = prepared.view.measure.heights;
                        var i = 0;
                        for (; i < heights.length - 1; i++) {
                            if (mid < heights[i]) {
                                break;
                            }
                        }
                        var top = i ? heights[i - 1] : 0,
                            bot = heights[i];
                        var result = {
                            left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
                            right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
                            top: top,
                            bottom: bot
                        };
                        if (!rect.left && !rect.right) {
                            result.bogus = true;
                        }
                        if (!cm.options.singleCursorHeightPerLine) {
                            result.rtop = rtop;
                            result.rbottom = rbot;
                        }
                        return result;
                    }

                    // Work around problem with bounding client rects on ranges being
                    // returned incorrectly when zoomed on IE10 and below.
                    function maybeUpdateRectForZooming(measure, rect) {
                        if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) {
                            return rect;
                        }
                        var scaleX = screen.logicalXDPI / screen.deviceXDPI;
                        var scaleY = screen.logicalYDPI / screen.deviceYDPI;
                        return {
                            left: rect.left * scaleX,
                            right: rect.right * scaleX,
                            top: rect.top * scaleY,
                            bottom: rect.bottom * scaleY
                        };
                    }

                    function clearLineMeasurementCacheFor(lineView) {
                        if (lineView.measure) {
                            lineView.measure.cache = {};
                            lineView.measure.heights = null;
                            if (lineView.rest) {
                                for (var i = 0; i < lineView.rest.length; i++) {
                                    lineView.measure.caches[i] = {};
                                }
                            }
                        }
                    }

                    function clearLineMeasurementCache(cm) {
                        cm.display.externalMeasure = null;
                        removeChildren(cm.display.lineMeasure);
                        for (var i = 0; i < cm.display.view.length; i++) {
                            clearLineMeasurementCacheFor(cm.display.view[i]);
                        }
                    }

                    function clearCaches(cm) {
                        clearLineMeasurementCache(cm);
                        cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;
                        if (!cm.options.lineWrapping) {
                            cm.display.maxLineChanged = true;
                        }
                        cm.display.lineNumChars = null;
                    }

                    function pageScrollX() {
                        // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206
                        // which causes page_Offset and bounding client rects to use
                        // different reference viewports and invalidate our calculations.
                        if (chrome && android) {
                            return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft));
                        }
                        return window.pageXOffset || (document.documentElement || document.body).scrollLeft;
                    }

                    function pageScrollY() {
                        if (chrome && android) {
                            return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop));
                        }
                        return window.pageYOffset || (document.documentElement || document.body).scrollTop;
                    }

                    function widgetTopHeight(lineObj) {
                        var ref = visualLine(lineObj);
                        var widgets = ref.widgets;
                        var height = 0;
                        if (widgets) {
                            for (var i = 0; i < widgets.length; ++i) {
                                if (widgets[i].above) {
                                    height += widgetHeight(widgets[i]);
                                }
                            }
                        }
                        return height;
                    }

                    // Converts a {top, bottom, left, right} box from line-local
                    // coordinates into another coordinate system. Context may be one of
                    // "line", "div" (display.lineDiv), "local"./null (editor), "window",
                    // or "page".
                    function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
                        if (!includeWidgets) {
                            var height = widgetTopHeight(lineObj);
                            rect.top += height;
                            rect.bottom += height;
                        }
                        if (context == "line") {
                            return rect;
                        }
                        if (!context) {
                            context = "local";
                        }
                        var yOff = heightAtLine(lineObj);
                        if (context == "local") {
                            yOff += paddingTop(cm.display);
                        } else {
                            yOff -= cm.display.viewOffset;
                        }
                        if (context == "page" || context == "window") {
                            var lOff = cm.display.lineSpace.getBoundingClientRect();
                            yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
                            var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
                            rect.left += xOff;
                            rect.right += xOff;
                        }
                        rect.top += yOff;
                        rect.bottom += yOff;
                        return rect;
                    }

                    // Coverts a box from "div" coords to another coordinate system.
                    // Context may be "window", "page", "div", or "local"./null.
                    function fromCoordSystem(cm, coords, context) {
                        if (context == "div") {
                            return coords;
                        }
                        var left = coords.left,
                            top = coords.top;
                        // First move into "page" coordinate system
                        if (context == "page") {
                            left -= pageScrollX();
                            top -= pageScrollY();
                        } else if (context == "local" || !context) {
                            var localBox = cm.display.sizer.getBoundingClientRect();
                            left += localBox.left;
                            top += localBox.top;
                        }
                        var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();
                        return {
                            left: left - lineSpaceBox.left,
                            top: top - lineSpaceBox.top
                        };
                    }

                    function charCoords(cm, pos, context, lineObj, bias) {
                        if (!lineObj) {
                            lineObj = getLine(cm.doc, pos.line);
                        }
                        return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context);
                    }

                    // Returns a box for a given cursor position, which may have an
                    // 'other' property containing the position of the secondary cursor
                    // on a bidi boundary.
                    // A cursor Pos(line, char, "before") is on the same visual line as `char - 1`
                    // and after `char - 1` in writing order of `char - 1`
                    // A cursor Pos(line, char, "after") is on the same visual line as `char`
                    // and before `char` in writing order of `char`
                    // Examples (upper-case letters are RTL, lower-case are LTR):
                    //     Pos(0, 1, ...)
                    //     before   after
                    // ab     a|b     a|b
                    // aB     a|B     aB|
                    // Ab     |Ab     A|b
                    // AB     B|A     B|A
                    // Every position after the last character on a line is considered to stick
                    // to the last character on the line.
                    function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
                        lineObj = lineObj || getLine(cm.doc, pos.line);
                        if (!preparedMeasure) {
                            preparedMeasure = prepareMeasureForLine(cm, lineObj);
                        }

                        function get(ch, right) {
                            var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);
                            if (right) {
                                m.left = m.right;
                            } else {
                                m.right = m.left;
                            }
                            return intoCoordSystem(cm, lineObj, m, context);
                        }
                        var order = getOrder(lineObj, cm.doc.direction),
                            ch = pos.ch,
                            sticky = pos.sticky;
                        if (ch >= lineObj.text.length) {
                            ch = lineObj.text.length;
                            sticky = "before";
                        } else if (ch <= 0) {
                            ch = 0;
                            sticky = "after";
                        }
                        if (!order) {
                            return get(sticky == "before" ? ch - 1 : ch, sticky == "before");
                        }

                        function getBidi(ch, partPos, invert) {
                            var part = order[partPos],
                                right = part.level == 1;
                            return get(invert ? ch - 1 : ch, right != invert);
                        }
                        var partPos = getBidiPartAt(order, ch, sticky);
                        var other = bidiOther;
                        var val = getBidi(ch, partPos, sticky == "before");
                        if (other != null) {
                            val.other = getBidi(ch, other, sticky != "before");
                        }
                        return val;
                    }

                    // Used to cheaply estimate the coordinates for a position. Used for
                    // intermediate scroll updates.
                    function estimateCoords(cm, pos) {
                        var left = 0;
                        pos = clipPos(cm.doc, pos);
                        if (!cm.options.lineWrapping) {
                            left = charWidth(cm.display) * pos.ch;
                        }
                        var lineObj = getLine(cm.doc, pos.line);
                        var top = heightAtLine(lineObj) + paddingTop(cm.display);
                        return {
                            left: left,
                            right: left,
                            top: top,
                            bottom: top + lineObj.height
                        };
                    }

                    // Positions returned by coordsChar contain some extra information.
                    // xRel is the relative x position of the input coordinates compared
                    // to the found position (so xRel > 0 means the coordinates are to
                    // the right of the character position, for example). When outside
                    // is true, that means the coordinates lie outside the line's
                    // vertical range.
                    function PosWithInfo(line, ch, sticky, outside, xRel) {
                        var pos = Pos(line, ch, sticky);
                        pos.xRel = xRel;
                        if (outside) {
                            pos.outside = outside;
                        }
                        return pos;
                    }

                    // Compute the character position closest to the given coordinates.
                    // Input must be lineSpace-local ("div" coordinate system).
                    function coordsChar(cm, x, y) {
                        var doc = cm.doc;
                        y += cm.display.viewOffset;
                        if (y < 0) {
                            return PosWithInfo(doc.first, 0, null, -1, -1);
                        }
                        var lineN = lineAtHeight(doc, y),
                            last = doc.first + doc.size - 1;
                        if (lineN > last) {
                            return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1);
                        }
                        if (x < 0) {
                            x = 0;
                        }
                        var lineObj = getLine(doc, lineN);
                        for (;;) {
                            var found = coordsCharInner(cm, lineObj, lineN, x, y);
                            var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));
                            if (!collapsed) {
                                return found;
                            }
                            var rangeEnd = collapsed.find(1);
                            if (rangeEnd.line == lineN) {
                                return rangeEnd;
                            }
                            lineObj = getLine(doc, lineN = rangeEnd.line);
                        }
                    }

                    function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
                        y -= widgetTopHeight(lineObj);
                        var end = lineObj.text.length;
                        var begin = findFirst(function(ch) {
                            return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y;
                        }, end, 0);
                        end = findFirst(function(ch) {
                            return measureCharPrepared(cm, preparedMeasure, ch).top > y;
                        }, begin, end);
                        return {
                            begin: begin,
                            end: end
                        };
                    }

                    function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
                        if (!preparedMeasure) {
                            preparedMeasure = prepareMeasureForLine(cm, lineObj);
                        }
                        var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top;
                        return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop);
                    }

                    // Returns true if the given side of a box is after the given
                    // coordinates, in top-to-bottom, left-to-right order.
                    function boxIsAfter(box, x, y, left) {
                        return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x;
                    }

                    function coordsCharInner(cm, lineObj, lineNo, x, y) {
                        // Move y into line-local coordinate space
                        y -= heightAtLine(lineObj);
                        var preparedMeasure = prepareMeasureForLine(cm, lineObj);
                        // When directly calling `measureCharPrepared`, we have to adjust
                        // for the widgets at this line.
                        var widgetHeight = widgetTopHeight(lineObj);
                        var begin = 0,
                            end = lineObj.text.length,
                            ltr = true;
                        var order = getOrder(lineObj, cm.doc.direction);
                        // If the line isn't plain left-to-right text, first figure out
                        // which bidi section the coordinates fall into.
                        if (order) {
                            var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)(cm, lineObj, lineNo, preparedMeasure, order, x, y);
                            ltr = part.level != 1;
                            // The awkward -1 offsets are needed because findFirst (called
                            // on these below) will treat its first bound as inclusive,
                            // second as exclusive, but we want to actually address the
                            // characters in the part's range
                            begin = ltr ? part.from : part.to - 1;
                            end = ltr ? part.to : part.from - 1;
                        }

                        // A binary search to find the first character whose bounding box
                        // starts after the coordinates. If we run across any whose box wrap
                        // the coordinates, store that.
                        var chAround = null,
                            boxAround = null;
                        var ch = findFirst(function(ch) {
                            var box = measureCharPrepared(cm, preparedMeasure, ch);
                            box.top += widgetHeight;
                            box.bottom += widgetHeight;
                            if (!boxIsAfter(box, x, y, false)) {
                                return false;
                            }
                            if (box.top <= y && box.left <= x) {
                                chAround = ch;
                                boxAround = box;
                            }
                            return true;
                        }, begin, end);
                        var baseX,
                            sticky,
                            outside = false;
                        // If a box around the coordinates was found, use that
                        if (boxAround) {
                            // Distinguish coordinates nearer to the left or right side of the box
                            var atLeft = x - boxAround.left < boxAround.right - x,
                                atStart = atLeft == ltr;
                            ch = chAround + (atStart ? 0 : 1);
                            sticky = atStart ? "after" : "before";
                            baseX = atLeft ? boxAround.left : boxAround.right;
                        } else {
                            // (Adjust for extended bound, if necessary.)
                            if (!ltr && (ch == end || ch == begin)) {
                                ch++;
                            }
                            // To determine which side to associate with, get the box to the
                            // left of the character and compare it's vertical position to the
                            // coordinates
                            sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" : measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y == ltr ? "after" : "before";
                            // Now get accurate coordinates for this place, in order to get a
                            // base X position
                            var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure);
                            baseX = coords.left;
                            outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;
                        }
                        ch = skipExtendingChars(lineObj.text, ch, 1);
                        return PosWithInfo(lineNo, ch, sticky, outside, x - baseX);
                    }

                    function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {
                        // Bidi parts are sorted left-to-right, and in a non-line-wrapping
                        // situation, we can take this ordering to correspond to the visual
                        // ordering. This finds the first part whose end is after the given
                        // coordinates.
                        var index = findFirst(function(i) {
                            var part = order[i],
                                ltr = part.level != 1;
                            return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"), "line", lineObj, preparedMeasure), x, y, true);
                        }, 0, order.length - 1);
                        var part = order[index];
                        // If this isn't the first part, the part's start is also after
                        // the coordinates, and the coordinates aren't on the same line as
                        // that start, move one part back.
                        if (index > 0) {
                            var ltr = part.level != 1;
                            var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"), "line", lineObj, preparedMeasure);
                            if (boxIsAfter(start, x, y, true) && start.top > y) {
                                part = order[index - 1];
                            }
                        }
                        return part;
                    }

                    function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {
                        // In a wrapped line, rtl text on wrapping boundaries can do things
                        // that don't correspond to the ordering in our `order` array at
                        // all, so a binary search doesn't work, and we want to return a
                        // part that only spans one line so that the binary search in
                        // coordsCharInner is safe. As such, we first find the extent of the
                        // wrapped line, and then do a flat search in which we discard any
                        // spans that aren't on the line.
                        var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);
                        var begin = ref.begin;
                        var end = ref.end;
                        if (/\s/.test(lineObj.text.charAt(end - 1))) {
                            end--;
                        }
                        var part = null,
                            closestDist = null;
                        for (var i = 0; i < order.length; i++) {
                            var p = order[i];
                            if (p.from >= end || p.to <= begin) {
                                continue;
                            }
                            var ltr = p.level != 1;
                            var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;
                            // Weigh against spans ending before this, so that they are only
                            // picked if nothing ends after
                            var dist = endX < x ? x - endX + 1e9 : endX - x;
                            if (!part || closestDist > dist) {
                                part = p;
                                closestDist = dist;
                            }
                        }
                        if (!part) {
                            part = order[order.length - 1];
                        }
                        // Clip the part to the wrapped line.
                        if (part.from < begin) {
                            part = {
                                from: begin,
                                to: part.to,
                                level: part.level
                            };
                        }
                        if (part.to > end) {
                            part = {
                                from: part.from,
                                to: end,
                                level: part.level
                            };
                        }
                        return part;
                    }
                    var measureText;
                    // Compute the default text height.
                    function textHeight(display) {
                        if (display.cachedTextHeight != null) {
                            return display.cachedTextHeight;
                        }
                        if (measureText == null) {
                            measureText = elt("pre", null, "CodeMirror-line-like");
                            // Measure a bunch of lines, for browsers that compute
                            // fractional heights.
                            for (var i = 0; i < 49; ++i) {
                                measureText.appendChild(document.createTextNode("x"));
                                measureText.appendChild(elt("br"));
                            }
                            measureText.appendChild(document.createTextNode("x"));
                        }
                        removeChildrenAndAdd(display.measure, measureText);
                        var height = measureText.offsetHeight / 50;
                        if (height > 3) {
                            display.cachedTextHeight = height;
                        }
                        removeChildren(display.measure);
                        return height || 1;
                    }

                    // Compute the default character width.
                    function charWidth(display) {
                        if (display.cachedCharWidth != null) {
                            return display.cachedCharWidth;
                        }
                        var anchor = elt("span", "xxxxxxxxxx");
                        var pre = elt("pre", [anchor], "CodeMirror-line-like");
                        removeChildrenAndAdd(display.measure, pre);
                        var rect = anchor.getBoundingClientRect(),
                            width = (rect.right - rect.left) / 10;
                        if (width > 2) {
                            display.cachedCharWidth = width;
                        }
                        return width || 10;
                    }

                    // Do a bulk-read of the DOM positions and sizes needed to draw the
                    // view, so that we don't interleave reading and writing to the DOM.
                    function getDimensions(cm) {
                        var d = cm.display,
                            left = {},
                            width = {};
                        var gutterLeft = d.gutters.clientLeft;
                        for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
                            var id = cm.display.gutterSpecs[i].className;
                            left[id] = n.offsetLeft + n.clientLeft + gutterLeft;
                            width[id] = n.clientWidth;
                        }
                        return {
                            fixedPos: compensateForHScroll(d),
                            gutterTotalWidth: d.gutters.offsetWidth,
                            gutterLeft: left,
                            gutterWidth: width,
                            wrapperWidth: d.wrapper.clientWidth
                        };
                    }

                    // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,
                    // but using getBoundingClientRect to get a sub-pixel-accurate
                    // result.
                    function compensateForHScroll(display) {
                        return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left;
                    }

                    // Returns a function that estimates the height of a line, to use as
                    // first approximation until the line becomes visible (and is thus
                    // properly measurable).
                    function estimateHeight(cm) {
                        var th = textHeight(cm.display),
                            wrapping = cm.options.lineWrapping;
                        var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
                        return function(line) {
                            if (lineIsHidden(cm.doc, line)) {
                                return 0;
                            }
                            var widgetsHeight = 0;
                            if (line.widgets) {
                                for (var i = 0; i < line.widgets.length; i++) {
                                    if (line.widgets[i].height) {
                                        widgetsHeight += line.widgets[i].height;
                                    }
                                }
                            }
                            if (wrapping) {
                                return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;
                            } else {
                                return widgetsHeight + th;
                            }
                        };
                    }

                    function estimateLineHeights(cm) {
                        var doc = cm.doc,
                            est = estimateHeight(cm);
                        doc.iter(function(line) {
                            var estHeight = est(line);
                            if (estHeight != line.height) {
                                updateLineHeight(line, estHeight);
                            }
                        });
                    }

                    // Given a mouse event, find the corresponding position. If liberal
                    // is false, it checks whether a gutter or scrollbar was clicked,
                    // and returns null if it was. forRect is used by rectangular
                    // selections, and tries to estimate a character position even for
                    // coordinates beyond the right of the text.
                    function posFromMouse(cm, e, liberal, forRect) {
                        var display = cm.display;
                        if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") {
                            return null;
                        }
                        var x,
                            y,
                            space = display.lineSpace.getBoundingClientRect();
                        // Fails unpredictably on IE[67] when mouse is dragged around quickly.
                        try {
                            x = e.clientX - space.left;
                            y = e.clientY - space.top;
                        } catch (e$1) {
                            return null;
                        }
                        var coords = coordsChar(cm, x, y),
                            line;
                        if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
                            var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
                            coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));
                        }
                        return coords;
                    }

                    // Find the view element corresponding to a given line. Return null
                    // when the line isn't visible.
                    function findViewIndex(cm, n) {
                        if (n >= cm.display.viewTo) {
                            return null;
                        }
                        n -= cm.display.viewFrom;
                        if (n < 0) {
                            return null;
                        }
                        var view = cm.display.view;
                        for (var i = 0; i < view.length; i++) {
                            n -= view[i].size;
                            if (n < 0) {
                                return i;
                            }
                        }
                    }

                    // Updates the display.view data structure for a given change to the
                    // document. From and to are in pre-change coordinates. Lendiff is
                    // the amount of lines added or subtracted by the change. This is
                    // used for changes that span multiple lines, or change the way
                    // lines are divided into visual lines. regLineChange (below)
                    // registers single-line changes.
                    function regChange(cm, from, to, lendiff) {
                        if (from == null) {
                            from = cm.doc.first;
                        }
                        if (to == null) {
                            to = cm.doc.first + cm.doc.size;
                        }
                        if (!lendiff) {
                            lendiff = 0;
                        }
                        var display = cm.display;
                        if (lendiff && to < display.viewTo && (display.updateLineNumbers == null || display.updateLineNumbers > from)) {
                            display.updateLineNumbers = from;
                        }
                        cm.curOp.viewChanged = true;
                        if (from >= display.viewTo) {
                            // Change after
                            if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) {
                                resetView(cm);
                            }
                        } else if (to <= display.viewFrom) {
                            // Change before
                            if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
                                resetView(cm);
                            } else {
                                display.viewFrom += lendiff;
                                display.viewTo += lendiff;
                            }
                        } else if (from <= display.viewFrom && to >= display.viewTo) {
                            // Full overlap
                            resetView(cm);
                        } else if (from <= display.viewFrom) {
                            // Top overlap
                            var cut = viewCuttingPoint(cm, to, to + lendiff, 1);
                            if (cut) {
                                display.view = display.view.slice(cut.index);
                                display.viewFrom = cut.lineN;
                                display.viewTo += lendiff;
                            } else {
                                resetView(cm);
                            }
                        } else if (to >= display.viewTo) {
                            // Bottom overlap
                            var cut$1 = viewCuttingPoint(cm, from, from, -1);
                            if (cut$1) {
                                display.view = display.view.slice(0, cut$1.index);
                                display.viewTo = cut$1.lineN;
                            } else {
                                resetView(cm);
                            }
                        } else {
                            // Gap in the middle
                            var cutTop = viewCuttingPoint(cm, from, from, -1);
                            var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);
                            if (cutTop && cutBot) {
                                display.view = display.view.slice(0, cutTop.index).concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)).concat(display.view.slice(cutBot.index));
                                display.viewTo += lendiff;
                            } else {
                                resetView(cm);
                            }
                        }
                        var ext = display.externalMeasured;
                        if (ext) {
                            if (to < ext.lineN) {
                                ext.lineN += lendiff;
                            } else if (from < ext.lineN + ext.size) {
                                display.externalMeasured = null;
                            }
                        }
                    }

                    // Register a change to a single line. Type must be one of "text",
                    // "gutter", "class", "widget"
                    function regLineChange(cm, line, type) {
                        cm.curOp.viewChanged = true;
                        var display = cm.display,
                            ext = cm.display.externalMeasured;
                        if (ext && line >= ext.lineN && line < ext.lineN + ext.size) {
                            display.externalMeasured = null;
                        }
                        if (line < display.viewFrom || line >= display.viewTo) {
                            return;
                        }
                        var lineView = display.view[findViewIndex(cm, line)];
                        if (lineView.node == null) {
                            return;
                        }
                        var arr = lineView.changes || (lineView.changes = []);
                        if (indexOf(arr, type) == -1) {
                            arr.push(type);
                        }
                    }

                    // Clear the view.
                    function resetView(cm) {
                        cm.display.viewFrom = cm.display.viewTo = cm.doc.first;
                        cm.display.view = [];
                        cm.display.viewOffset = 0;
                    }

                    function viewCuttingPoint(cm, oldN, newN, dir) {
                        var index = findViewIndex(cm, oldN),
                            diff,
                            view = cm.display.view;
                        if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) {
                            return {
                                index: index,
                                lineN: newN
                            };
                        }
                        var n = cm.display.viewFrom;
                        for (var i = 0; i < index; i++) {
                            n += view[i].size;
                        }
                        if (n != oldN) {
                            if (dir > 0) {
                                if (index == view.length - 1) {
                                    return null;
                                }
                                diff = n + view[index].size - oldN;
                                index++;
                            } else {
                                diff = n - oldN;
                            }
                            oldN += diff;
                            newN += diff;
                        }
                        while (visualLineNo(cm.doc, newN) != newN) {
                            if (index == (dir < 0 ? 0 : view.length - 1)) {
                                return null;
                            }
                            newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
                            index += dir;
                        }
                        return {
                            index: index,
                            lineN: newN
                        };
                    }

                    // Force the view to cover a given range, adding empty view element
                    // or clipping off existing ones as needed.
                    function adjustView(cm, from, to) {
                        var display = cm.display,
                            view = display.view;
                        if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {
                            display.view = buildViewArray(cm, from, to);
                            display.viewFrom = from;
                        } else {
                            if (display.viewFrom > from) {
                                display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view);
                            } else if (display.viewFrom < from) {
                                display.view = display.view.slice(findViewIndex(cm, from));
                            }
                            display.viewFrom = from;
                            if (display.viewTo < to) {
                                display.view = display.view.concat(buildViewArray(cm, display.viewTo, to));
                            } else if (display.viewTo > to) {
                                display.view = display.view.slice(0, findViewIndex(cm, to));
                            }
                        }
                        display.viewTo = to;
                    }

                    // Count the number of lines in the view whose DOM representation is
                    // out of date (or nonexistent).
                    function countDirtyView(cm) {
                        var view = cm.display.view,
                            dirty = 0;
                        for (var i = 0; i < view.length; i++) {
                            var lineView = view[i];
                            if (!lineView.hidden && (!lineView.node || lineView.changes)) {
                                ++dirty;
                            }
                        }
                        return dirty;
                    }

                    function updateSelection(cm) {
                        cm.display.input.showSelection(cm.display.input.prepareSelection());
                    }

                    function prepareSelection(cm, primary) {
                        if (primary === void 0) primary = true;
                        var doc = cm.doc,
                            result = {};
                        var curFragment = result.cursors = document.createDocumentFragment();
                        var selFragment = result.selection = document.createDocumentFragment();
                        var customCursor = cm.options.$customCursor;
                        if (customCursor) {
                            primary = true;
                        }
                        for (var i = 0; i < doc.sel.ranges.length; i++) {
                            if (!primary && i == doc.sel.primIndex) {
                                continue;
                            }
                            var range = doc.sel.ranges[i];
                            if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) {
                                continue;
                            }
                            var collapsed = range.empty();
                            if (customCursor) {
                                var head = customCursor(cm, range);
                                if (head) {
                                    drawSelectionCursor(cm, head, curFragment);
                                }
                            } else if (collapsed || cm.options.showCursorWhenSelecting) {
                                drawSelectionCursor(cm, range.head, curFragment);
                            }
                            if (!collapsed) {
                                drawSelectionRange(cm, range, selFragment);
                            }
                        }
                        return result;
                    }

                    // Draws a cursor for the given range
                    function drawSelectionCursor(cm, head, output) {
                        var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine);
                        var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
                        cursor.style.left = pos.left + "px";
                        cursor.style.top = pos.top + "px";
                        cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
                        if (/\bcm-fat-cursor\b/.test(cm.getWrapperElement().className)) {
                            var charPos = charCoords(cm, head, "div", null, null);
                            var width = charPos.right - charPos.left;
                            cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + "px";
                        }
                        if (pos.other) {
                            // Secondary cursor, shown when on a 'jump' in bi-directional text
                            var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
                            otherCursor.style.display = "";
                            otherCursor.style.left = pos.other.left + "px";
                            otherCursor.style.top = pos.other.top + "px";
                            otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
                        }
                    }

                    function cmpCoords(a, b) {
                        return a.top - b.top || a.left - b.left;
                    }

                    // Draws the given range as a highlighted selection
                    function drawSelectionRange(cm, range, output) {
                        var display = cm.display,
                            doc = cm.doc;
                        var fragment = document.createDocumentFragment();
                        var padding = paddingH(cm.display),
                            leftSide = padding.left;
                        var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
                        var docLTR = doc.direction == "ltr";

                        function add(left, top, width, bottom) {
                            if (top < 0) {
                                top = 0;
                            }
                            top = Math.round(top);
                            bottom = Math.round(bottom);
                            fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + "px;\n                             top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n                             height: " + (bottom - top) + "px"));
                        }

                        function drawForLine(line, fromArg, toArg) {
                            var lineObj = getLine(doc, line);
                            var lineLen = lineObj.text.length;
                            var start, end;

                            function coords(ch, bias) {
                                return charCoords(cm, Pos(line, ch), "div", lineObj, bias);
                            }

                            function wrapX(pos, dir, side) {
                                var extent = wrappedLineExtentChar(cm, lineObj, null, pos);
                                var prop = dir == "ltr" == (side == "after") ? "left" : "right";
                                var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);
                                return coords(ch, prop)[prop];
                            }
                            var order = getOrder(lineObj, doc.direction);
                            iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir, i) {
                                var ltr = dir == "ltr";
                                var fromPos = coords(from, ltr ? "left" : "right");
                                var toPos = coords(to - 1, ltr ? "right" : "left");
                                var openStart = fromArg == null && from == 0,
                                    openEnd = toArg == null && to == lineLen;
                                var first = i == 0,
                                    last = !order || i == order.length - 1;
                                if (toPos.top - fromPos.top <= 3) {
                                    // Single line
                                    var openLeft = (docLTR ? openStart : openEnd) && first;
                                    var openRight = (docLTR ? openEnd : openStart) && last;
                                    var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;
                                    var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;
                                    add(left, fromPos.top, right - left, fromPos.bottom);
                                } else {
                                    // Multiple lines
                                    var topLeft, topRight, botLeft, botRight;
                                    if (ltr) {
                                        topLeft = docLTR && openStart && first ? leftSide : fromPos.left;
                                        topRight = docLTR ? rightSide : wrapX(from, dir, "before");
                                        botLeft = docLTR ? leftSide : wrapX(to, dir, "after");
                                        botRight = docLTR && openEnd && last ? rightSide : toPos.right;
                                    } else {
                                        topLeft = !docLTR ? leftSide : wrapX(from, dir, "before");
                                        topRight = !docLTR && openStart && first ? rightSide : fromPos.right;
                                        botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;
                                        botRight = !docLTR ? rightSide : wrapX(to, dir, "after");
                                    }
                                    add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);
                                    if (fromPos.bottom < toPos.top) {
                                        add(leftSide, fromPos.bottom, null, toPos.top);
                                    }
                                    add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);
                                }
                                if (!start || cmpCoords(fromPos, start) < 0) {
                                    start = fromPos;
                                }
                                if (cmpCoords(toPos, start) < 0) {
                                    start = toPos;
                                }
                                if (!end || cmpCoords(fromPos, end) < 0) {
                                    end = fromPos;
                                }
                                if (cmpCoords(toPos, end) < 0) {
                                    end = toPos;
                                }
                            });
                            return {
                                start: start,
                                end: end
                            };
                        }
                        var sFrom = range.from(),
                            sTo = range.to();
                        if (sFrom.line == sTo.line) {
                            drawForLine(sFrom.line, sFrom.ch, sTo.ch);
                        } else {
                            var fromLine = getLine(doc, sFrom.line),
                                toLine = getLine(doc, sTo.line);
                            var singleVLine = visualLine(fromLine) == visualLine(toLine);
                            var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;
                            var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;
                            if (singleVLine) {
                                if (leftEnd.top < rightStart.top - 2) {
                                    add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
                                    add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);
                                } else {
                                    add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
                                }
                            }
                            if (leftEnd.bottom < rightStart.top) {
                                add(leftSide, leftEnd.bottom, null, rightStart.top);
                            }
                        }
                        output.appendChild(fragment);
                    }

                    // Cursor-blinking
                    function restartBlink(cm) {
                        if (!cm.state.focused) {
                            return;
                        }
                        var display = cm.display;
                        clearInterval(display.blinker);
                        var on = true;
                        display.cursorDiv.style.visibility = "";
                        if (cm.options.cursorBlinkRate > 0) {
                            display.blinker = setInterval(function() {
                                if (!cm.hasFocus()) {
                                    onBlur(cm);
                                }
                                display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";
                            }, cm.options.cursorBlinkRate);
                        } else if (cm.options.cursorBlinkRate < 0) {
                            display.cursorDiv.style.visibility = "hidden";
                        }
                    }

                    function ensureFocus(cm) {
                        if (!cm.hasFocus()) {
                            cm.display.input.focus();
                            if (!cm.state.focused) {
                                onFocus(cm);
                            }
                        }
                    }

                    function delayBlurEvent(cm) {
                        cm.state.delayingBlurEvent = true;
                        setTimeout(function() {
                            if (cm.state.delayingBlurEvent) {
                                cm.state.delayingBlurEvent = false;
                                if (cm.state.focused) {
                                    onBlur(cm);
                                }
                            }
                        }, 100);
                    }

                    function onFocus(cm, e) {
                        if (cm.state.delayingBlurEvent && !cm.state.draggingText) {
                            cm.state.delayingBlurEvent = false;
                        }
                        if (cm.options.readOnly == "nocursor") {
                            return;
                        }
                        if (!cm.state.focused) {
                            signal(cm, "focus", cm, e);
                            cm.state.focused = true;
                            addClass(cm.display.wrapper, "CodeMirror-focused");
                            // This test prevents this from firing when a context
                            // menu is closed (since the input reset would kill the
                            // select-all detection hack)
                            if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
                                cm.display.input.reset();
                                if (webkit) {
                                    setTimeout(function() {
                                        return cm.display.input.reset(true);
                                    }, 20);
                                } // Issue #1730
                            }
                            cm.display.input.receivedFocus();
                        }
                        restartBlink(cm);
                    }

                    function onBlur(cm, e) {
                        if (cm.state.delayingBlurEvent) {
                            return;
                        }
                        if (cm.state.focused) {
                            signal(cm, "blur", cm, e);
                            cm.state.focused = false;
                            rmClass(cm.display.wrapper, "CodeMirror-focused");
                        }
                        clearInterval(cm.display.blinker);
                        setTimeout(function() {
                            if (!cm.state.focused) {
                                cm.display.shift = false;
                            }
                        }, 150);
                    }

                    // Read the actual heights of the rendered lines, and update their
                    // stored heights to match.
                    function updateHeightsInViewport(cm) {
                        var display = cm.display;
                        var prevBottom = display.lineDiv.offsetTop;
                        var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top);
                        var oldHeight = display.lineDiv.getBoundingClientRect().top;
                        var mustScroll = 0;
                        for (var i = 0; i < display.view.length; i++) {
                            var cur = display.view[i],
                                wrapping = cm.options.lineWrapping;
                            var height = void 0,
                                width = 0;
                            if (cur.hidden) {
                                continue;
                            }
                            oldHeight += cur.line.height;
                            if (ie && ie_version < 8) {
                                var bot = cur.node.offsetTop + cur.node.offsetHeight;
                                height = bot - prevBottom;
                                prevBottom = bot;
                            } else {
                                var box = cur.node.getBoundingClientRect();
                                height = box.bottom - box.top;
                                // Check that lines don't extend past the right of the current
                                // editor width
                                if (!wrapping && cur.text.firstChild) {
                                    width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1;
                                }
                            }
                            var diff = cur.line.height - height;
                            if (diff > .005 || diff < -.005) {
                                if (oldHeight < viewTop) {
                                    mustScroll -= diff;
                                }
                                updateLineHeight(cur.line, height);
                                updateWidgetHeight(cur.line);
                                if (cur.rest) {
                                    for (var j = 0; j < cur.rest.length; j++) {
                                        updateWidgetHeight(cur.rest[j]);
                                    }
                                }
                            }
                            if (width > cm.display.sizerWidth) {
                                var chWidth = Math.ceil(width / charWidth(cm.display));
                                if (chWidth > cm.display.maxLineLength) {
                                    cm.display.maxLineLength = chWidth;
                                    cm.display.maxLine = cur.line;
                                    cm.display.maxLineChanged = true;
                                }
                            }
                        }
                        if (Math.abs(mustScroll) > 2) {
                            display.scroller.scrollTop += mustScroll;
                        }
                    }

                    // Read and store the height of line widgets associated with the
                    // given line.
                    function updateWidgetHeight(line) {
                        if (line.widgets) {
                            for (var i = 0; i < line.widgets.length; ++i) {
                                var w = line.widgets[i],
                                    parent = w.node.parentNode;
                                if (parent) {
                                    w.height = parent.offsetHeight;
                                }
                            }
                        }
                    }

                    // Compute the lines that are visible in a given viewport (defaults
                    // the the current scroll position). viewport may contain top,
                    // height, and ensure (see op.scrollToPos) properties.
                    function visibleLines(display, doc, viewport) {
                        var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
                        top = Math.floor(top - paddingTop(display));
                        var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;
                        var from = lineAtHeight(doc, top),
                            to = lineAtHeight(doc, bottom);
                        // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
                        // forces those lines into the viewport (if possible).
                        if (viewport && viewport.ensure) {
                            var ensureFrom = viewport.ensure.from.line,
                                ensureTo = viewport.ensure.to.line;
                            if (ensureFrom < from) {
                                from = ensureFrom;
                                to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);
                            } else if (Math.min(ensureTo, doc.lastLine()) >= to) {
                                from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);
                                to = ensureTo;
                            }
                        }
                        return {
                            from: from,
                            to: Math.max(to, from + 1)
                        };
                    }

                    // SCROLLING THINGS INTO VIEW

                    // If an editor sits on the top or bottom of the window, partially
                    // scrolled out of view, this ensures that the cursor is visible.
                    function maybeScrollWindow(cm, rect) {
                        if (signalDOMEvent(cm, "scrollCursorIntoView")) {
                            return;
                        }
                        var display = cm.display,
                            box = display.sizer.getBoundingClientRect(),
                            doScroll = null;
                        if (rect.top + box.top < 0) {
                            doScroll = true;
                        } else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) {
                            doScroll = false;
                        }
                        if (doScroll != null && !phantom) {
                            var scrollNode = elt("div", "\u200b", null, "position: absolute;\n                         top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n                         height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n                         left: " + rect.left + "px; width: " + Math.max(2, rect.right - rect.left) + "px;");
                            cm.display.lineSpace.appendChild(scrollNode);
                            scrollNode.scrollIntoView(doScroll);
                            cm.display.lineSpace.removeChild(scrollNode);
                        }
                    }

                    // Scroll a given position into view (immediately), verifying that
                    // it actually became visible (as line heights are accurately
                    // measured, the position of something may 'drift' during drawing).
                    function scrollPosIntoView(cm, pos, end, margin) {
                        if (margin == null) {
                            margin = 0;
                        }
                        var rect;
                        if (!cm.options.lineWrapping && pos == end) {
                            // Set pos and end to the cursor positions around the character pos sticks to
                            // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch
                            // If pos == Pos(_, 0, "before"), pos and end are unchanged
                            end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;
                            pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
                        }
                        for (var limit = 0; limit < 5; limit++) {
                            var changed = false;
                            var coords = cursorCoords(cm, pos);
                            var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);
                            rect = {
                                left: Math.min(coords.left, endCoords.left),
                                top: Math.min(coords.top, endCoords.top) - margin,
                                right: Math.max(coords.left, endCoords.left),
                                bottom: Math.max(coords.bottom, endCoords.bottom) + margin
                            };
                            var scrollPos = calculateScrollPos(cm, rect);
                            var startTop = cm.doc.scrollTop,
                                startLeft = cm.doc.scrollLeft;
                            if (scrollPos.scrollTop != null) {
                                updateScrollTop(cm, scrollPos.scrollTop);
                                if (Math.abs(cm.doc.scrollTop - startTop) > 1) {
                                    changed = true;
                                }
                            }
                            if (scrollPos.scrollLeft != null) {
                                setScrollLeft(cm, scrollPos.scrollLeft);
                                if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) {
                                    changed = true;
                                }
                            }
                            if (!changed) {
                                break;
                            }
                        }
                        return rect;
                    }

                    // Scroll a given set of coordinates into view (immediately).
                    function scrollIntoView(cm, rect) {
                        var scrollPos = calculateScrollPos(cm, rect);
                        if (scrollPos.scrollTop != null) {
                            updateScrollTop(cm, scrollPos.scrollTop);
                        }
                        if (scrollPos.scrollLeft != null) {
                            setScrollLeft(cm, scrollPos.scrollLeft);
                        }
                    }

                    // Calculate a new scroll position needed to scroll the given
                    // rectangle into view. Returns an object with scrollTop and
                    // scrollLeft properties. When these are undefined, the
                    // vertical/horizontal position does not need to be adjusted.
                    function calculateScrollPos(cm, rect) {
                        var display = cm.display,
                            snapMargin = textHeight(cm.display);
                        if (rect.top < 0) {
                            rect.top = 0;
                        }
                        var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;
                        var screen = displayHeight(cm),
                            result = {};
                        if (rect.bottom - rect.top > screen) {
                            rect.bottom = rect.top + screen;
                        }
                        var docBottom = cm.doc.height + paddingVert(display);
                        var atTop = rect.top < snapMargin,
                            atBottom = rect.bottom > docBottom - snapMargin;
                        if (rect.top < screentop) {
                            result.scrollTop = atTop ? 0 : rect.top;
                        } else if (rect.bottom > screentop + screen) {
                            var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);
                            if (newTop != screentop) {
                                result.scrollTop = newTop;
                            }
                        }
                        var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;
                        var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;
                        var screenw = displayWidth(cm) - display.gutters.offsetWidth;
                        var tooWide = rect.right - rect.left > screenw;
                        if (tooWide) {
                            rect.right = rect.left + screenw;
                        }
                        if (rect.left < 10) {
                            result.scrollLeft = 0;
                        } else if (rect.left < screenleft) {
                            result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10));
                        } else if (rect.right > screenw + screenleft - 3) {
                            result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw;
                        }
                        return result;
                    }

                    // Store a relative adjustment to the scroll position in the current
                    // operation (to be applied when the operation finishes).
                    function addToScrollTop(cm, top) {
                        if (top == null) {
                            return;
                        }
                        resolveScrollToPos(cm);
                        cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;
                    }

                    // Make sure that at the end of the operation the current cursor is
                    // shown.
                    function ensureCursorVisible(cm) {
                        resolveScrollToPos(cm);
                        var cur = cm.getCursor();
                        cm.curOp.scrollToPos = {
                            from: cur,
                            to: cur,
                            margin: cm.options.cursorScrollMargin
                        };
                    }

                    function scrollToCoords(cm, x, y) {
                        if (x != null || y != null) {
                            resolveScrollToPos(cm);
                        }
                        if (x != null) {
                            cm.curOp.scrollLeft = x;
                        }
                        if (y != null) {
                            cm.curOp.scrollTop = y;
                        }
                    }

                    function scrollToRange(cm, range) {
                        resolveScrollToPos(cm);
                        cm.curOp.scrollToPos = range;
                    }

                    // When an operation has its scrollToPos property set, and another
                    // scroll action is applied before the end of the operation, this
                    // 'simulates' scrolling that position into view in a cheap way, so
                    // that the effect of intermediate scroll commands is not ignored.
                    function resolveScrollToPos(cm) {
                        var range = cm.curOp.scrollToPos;
                        if (range) {
                            cm.curOp.scrollToPos = null;
                            var from = estimateCoords(cm, range.from),
                                to = estimateCoords(cm, range.to);
                            scrollToCoordsRange(cm, from, to, range.margin);
                        }
                    }

                    function scrollToCoordsRange(cm, from, to, margin) {
                        var sPos = calculateScrollPos(cm, {
                            left: Math.min(from.left, to.left),
                            top: Math.min(from.top, to.top) - margin,
                            right: Math.max(from.right, to.right),
                            bottom: Math.max(from.bottom, to.bottom) + margin
                        });
                        scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);
                    }

                    // Sync the scrollable area and scrollbars, ensure the viewport
                    // covers the visible area.
                    function updateScrollTop(cm, val) {
                        if (Math.abs(cm.doc.scrollTop - val) < 2) {
                            return;
                        }
                        if (!gecko) {
                            updateDisplaySimple(cm, {
                                top: val
                            });
                        }
                        setScrollTop(cm, val, true);
                        if (gecko) {
                            updateDisplaySimple(cm);
                        }
                        startWorker(cm, 100);
                    }

                    function setScrollTop(cm, val, forceScroll) {
                        val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));
                        if (cm.display.scroller.scrollTop == val && !forceScroll) {
                            return;
                        }
                        cm.doc.scrollTop = val;
                        cm.display.scrollbars.setScrollTop(val);
                        if (cm.display.scroller.scrollTop != val) {
                            cm.display.scroller.scrollTop = val;
                        }
                    }

                    // Sync scroller and scrollbar, ensure the gutter elements are
                    // aligned.
                    function setScrollLeft(cm, val, isScroller, forceScroll) {
                        val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));
                        if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) {
                            return;
                        }
                        cm.doc.scrollLeft = val;
                        alignHorizontally(cm);
                        if (cm.display.scroller.scrollLeft != val) {
                            cm.display.scroller.scrollLeft = val;
                        }
                        cm.display.scrollbars.setScrollLeft(val);
                    }

                    // SCROLLBARS

                    // Prepare DOM reads needed to update the scrollbars. Done in one
                    // shot to minimize update/measure roundtrips.
                    function measureForScrollbars(cm) {
                        var d = cm.display,
                            gutterW = d.gutters.offsetWidth;
                        var docH = Math.round(cm.doc.height + paddingVert(cm.display));
                        return {
                            clientHeight: d.scroller.clientHeight,
                            viewHeight: d.wrapper.clientHeight,
                            scrollWidth: d.scroller.scrollWidth,
                            clientWidth: d.scroller.clientWidth,
                            viewWidth: d.wrapper.clientWidth,
                            barLeft: cm.options.fixedGutter ? gutterW : 0,
                            docHeight: docH,
                            scrollHeight: docH + scrollGap(cm) + d.barHeight,
                            nativeBarWidth: d.nativeBarWidth,
                            gutterWidth: gutterW
                        };
                    }
                    var NativeScrollbars = function(place, scroll, cm) {
                        this.cm = cm;
                        var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
                        var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
                        vert.tabIndex = horiz.tabIndex = -1;
                        place(vert);
                        place(horiz);
                        on(vert, "scroll", function() {
                            if (vert.clientHeight) {
                                scroll(vert.scrollTop, "vertical");
                            }
                        });
                        on(horiz, "scroll", function() {
                            if (horiz.clientWidth) {
                                scroll(horiz.scrollLeft, "horizontal");
                            }
                        });
                        this.checkedZeroWidth = false;
                        // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
                        if (ie && ie_version < 8) {
                            this.horiz.style.minHeight = this.vert.style.minWidth = "18px";
                        }
                    };
                    NativeScrollbars.prototype.update = function(measure) {
                        var needsH = measure.scrollWidth > measure.clientWidth + 1;
                        var needsV = measure.scrollHeight > measure.clientHeight + 1;
                        var sWidth = measure.nativeBarWidth;
                        if (needsV) {
                            this.vert.style.display = "block";
                            this.vert.style.bottom = needsH ? sWidth + "px" : "0";
                            var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);
                            // A bug in IE8 can cause this value to be negative, so guard it.
                            this.vert.firstChild.style.height = Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";
                        } else {
                            this.vert.scrollTop = 0;
                            this.vert.style.display = "";
                            this.vert.firstChild.style.height = "0";
                        }
                        if (needsH) {
                            this.horiz.style.display = "block";
                            this.horiz.style.right = needsV ? sWidth + "px" : "0";
                            this.horiz.style.left = measure.barLeft + "px";
                            var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);
                            this.horiz.firstChild.style.width = Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px";
                        } else {
                            this.horiz.style.display = "";
                            this.horiz.firstChild.style.width = "0";
                        }
                        if (!this.checkedZeroWidth && measure.clientHeight > 0) {
                            if (sWidth == 0) {
                                this.zeroWidthHack();
                            }
                            this.checkedZeroWidth = true;
                        }
                        return {
                            right: needsV ? sWidth : 0,
                            bottom: needsH ? sWidth : 0
                        };
                    };
                    NativeScrollbars.prototype.setScrollLeft = function(pos) {
                        if (this.horiz.scrollLeft != pos) {
                            this.horiz.scrollLeft = pos;
                        }
                        if (this.disableHoriz) {
                            this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz");
                        }
                    };
                    NativeScrollbars.prototype.setScrollTop = function(pos) {
                        if (this.vert.scrollTop != pos) {
                            this.vert.scrollTop = pos;
                        }
                        if (this.disableVert) {
                            this.enableZeroWidthBar(this.vert, this.disableVert, "vert");
                        }
                    };
                    NativeScrollbars.prototype.zeroWidthHack = function() {
                        var w = mac && !mac_geMountainLion ? "12px" : "18px";
                        this.horiz.style.height = this.vert.style.width = w;
                        this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none";
                        this.disableHoriz = new Delayed();
                        this.disableVert = new Delayed();
                    };
                    NativeScrollbars.prototype.enableZeroWidthBar = function(bar, delay, type) {
                        bar.style.pointerEvents = "auto";

                        function maybeDisable() {
                            // To find out whether the scrollbar is still visible, we
                            // check whether the element under the pixel in the bottom
                            // right corner of the scrollbar box is the scrollbar box
                            // itself (when the bar is still visible) or its filler child
                            // (when the bar is hidden). If it is still visible, we keep
                            // it enabled, if it's hidden, we disable pointer events.
                            var box = bar.getBoundingClientRect();
                            var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2) : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);
                            if (elt != bar) {
                                bar.style.pointerEvents = "none";
                            } else {
                                delay.set(1000, maybeDisable);
                            }
                        }
                        delay.set(1000, maybeDisable);
                    };
                    NativeScrollbars.prototype.clear = function() {
                        var parent = this.horiz.parentNode;
                        parent.removeChild(this.horiz);
                        parent.removeChild(this.vert);
                    };
                    var NullScrollbars = function() {};
                    NullScrollbars.prototype.update = function() {
                        return {
                            bottom: 0,
                            right: 0
                        };
                    };
                    NullScrollbars.prototype.setScrollLeft = function() {};
                    NullScrollbars.prototype.setScrollTop = function() {};
                    NullScrollbars.prototype.clear = function() {};

                    function updateScrollbars(cm, measure) {
                        if (!measure) {
                            measure = measureForScrollbars(cm);
                        }
                        var startWidth = cm.display.barWidth,
                            startHeight = cm.display.barHeight;
                        updateScrollbarsInner(cm, measure);
                        for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {
                            if (startWidth != cm.display.barWidth && cm.options.lineWrapping) {
                                updateHeightsInViewport(cm);
                            }
                            updateScrollbarsInner(cm, measureForScrollbars(cm));
                            startWidth = cm.display.barWidth;
                            startHeight = cm.display.barHeight;
                        }
                    }

                    // Re-synchronize the fake scrollbars with the actual size of the
                    // content.
                    function updateScrollbarsInner(cm, measure) {
                        var d = cm.display;
                        var sizes = d.scrollbars.update(measure);
                        d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
                        d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
                        d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent";
                        if (sizes.right && sizes.bottom) {
                            d.scrollbarFiller.style.display = "block";
                            d.scrollbarFiller.style.height = sizes.bottom + "px";
                            d.scrollbarFiller.style.width = sizes.right + "px";
                        } else {
                            d.scrollbarFiller.style.display = "";
                        }
                        if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
                            d.gutterFiller.style.display = "block";
                            d.gutterFiller.style.height = sizes.bottom + "px";
                            d.gutterFiller.style.width = measure.gutterWidth + "px";
                        } else {
                            d.gutterFiller.style.display = "";
                        }
                    }
                    var scrollbarModel = {
                        "native": NativeScrollbars,
                        "null": NullScrollbars
                    };

                    function initScrollbars(cm) {
                        if (cm.display.scrollbars) {
                            cm.display.scrollbars.clear();
                            if (cm.display.scrollbars.addClass) {
                                rmClass(cm.display.wrapper, cm.display.scrollbars.addClass);
                            }
                        }
                        cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function(node) {
                            cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
                            // Prevent clicks in the scrollbars from killing focus
                            on(node, "mousedown", function() {
                                if (cm.state.focused) {
                                    setTimeout(function() {
                                        return cm.display.input.focus();
                                    }, 0);
                                }
                            });
                            node.setAttribute("cm-not-content", "true");
                        }, function(pos, axis) {
                            if (axis == "horizontal") {
                                setScrollLeft(cm, pos);
                            } else {
                                updateScrollTop(cm, pos);
                            }
                        }, cm);
                        if (cm.display.scrollbars.addClass) {
                            addClass(cm.display.wrapper, cm.display.scrollbars.addClass);
                        }
                    }

                    // Operations are used to wrap a series of changes to the editor
                    // state in such a way that each change won't have to update the
                    // cursor and display (which would be awkward, slow, and
                    // error-prone). Instead, display updates are batched and then all
                    // combined and executed at once.

                    var nextOpId = 0;
                    // Start a new operation.
                    function startOperation(cm) {
                        cm.curOp = {
                            cm: cm,
                            viewChanged: false,
                            // Flag that indicates that lines might need to be redrawn
                            startHeight: cm.doc.height,
                            // Used to detect need to update scrollbar
                            forceUpdate: false,
                            // Used to force a redraw
                            updateInput: 0,
                            // Whether to reset the input textarea
                            typing: false,
                            // Whether this reset should be careful to leave existing text (for compositing)
                            changeObjs: null,
                            // Accumulated changes, for firing change events
                            cursorActivityHandlers: null,
                            // Set of handlers to fire cursorActivity on
                            cursorActivityCalled: 0,
                            // Tracks which cursorActivity handlers have been called already
                            selectionChanged: false,
                            // Whether the selection needs to be redrawn
                            updateMaxLine: false,
                            // Set when the widest line needs to be determined anew
                            scrollLeft: null,
                            scrollTop: null,
                            // Intermediate scroll position, not pushed to DOM yet
                            scrollToPos: null,
                            // Used to scroll to a specific position
                            focus: false,
                            id: ++nextOpId,
                            // Unique ID
                            markArrays: null // Used by addMarkedSpan
                        };
                        pushOperation(cm.curOp);
                    }

                    // Finish an operation, updating the display and signalling delayed events
                    function endOperation(cm) {
                        var op = cm.curOp;
                        if (op) {
                            finishOperation(op, function(group) {
                                for (var i = 0; i < group.ops.length; i++) {
                                    group.ops[i].cm.curOp = null;
                                }
                                endOperations(group);
                            });
                        }
                    }

                    // The DOM updates done when an operation finishes are batched so
                    // that the minimum number of relayouts are required.
                    function endOperations(group) {
                        var ops = group.ops;
                        for (var i = 0; i < ops.length; i++)
                        // Read DOM
                        {
                            endOperation_R1(ops[i]);
                        }
                        for (var i$1 = 0; i$1 < ops.length; i$1++)
                        // Write DOM (maybe)
                        {
                            endOperation_W1(ops[i$1]);
                        }
                        for (var i$2 = 0; i$2 < ops.length; i$2++)
                        // Read DOM
                        {
                            endOperation_R2(ops[i$2]);
                        }
                        for (var i$3 = 0; i$3 < ops.length; i$3++)
                        // Write DOM (maybe)
                        {
                            endOperation_W2(ops[i$3]);
                        }
                        for (var i$4 = 0; i$4 < ops.length; i$4++)
                        // Read DOM
                        {
                            endOperation_finish(ops[i$4]);
                        }
                    }

                    function endOperation_R1(op) {
                        var cm = op.cm,
                            display = cm.display;
                        maybeClipScrollbars(cm);
                        if (op.updateMaxLine) {
                            findMaxLine(cm);
                        }
                        op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || op.scrollToPos.to.line >= display.viewTo) || display.maxLineChanged && cm.options.lineWrapping;
                        op.update = op.mustUpdate && new DisplayUpdate(cm, op.mustUpdate && {
                            top: op.scrollTop,
                            ensure: op.scrollToPos
                        }, op.forceUpdate);
                    }

                    function endOperation_W1(op) {
                        op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);
                    }

                    function endOperation_R2(op) {
                        var cm = op.cm,
                            display = cm.display;
                        if (op.updatedDisplay) {
                            updateHeightsInViewport(cm);
                        }
                        op.barMeasure = measureForScrollbars(cm);

                        // If the max line changed since it was last measured, measure it,
                        // and ensure the document's width matches it.
                        // updateDisplay_W2 will use these properties to do the actual resizing
                        if (display.maxLineChanged && !cm.options.lineWrapping) {
                            op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
                            cm.display.sizerWidth = op.adjustWidthTo;
                            op.barMeasure.scrollWidth = Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
                            op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
                        }
                        if (op.updatedDisplay || op.selectionChanged) {
                            op.preparedSelection = display.input.prepareSelection();
                        }
                    }

                    function endOperation_W2(op) {
                        var cm = op.cm;
                        if (op.adjustWidthTo != null) {
                            cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
                            if (op.maxScrollLeft < cm.doc.scrollLeft) {
                                setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);
                            }
                            cm.display.maxLineChanged = false;
                        }
                        var takeFocus = op.focus && op.focus == activeElt();
                        if (op.preparedSelection) {
                            cm.display.input.showSelection(op.preparedSelection, takeFocus);
                        }
                        if (op.updatedDisplay || op.startHeight != cm.doc.height) {
                            updateScrollbars(cm, op.barMeasure);
                        }
                        if (op.updatedDisplay) {
                            setDocumentHeight(cm, op.barMeasure);
                        }
                        if (op.selectionChanged) {
                            restartBlink(cm);
                        }
                        if (cm.state.focused && op.updateInput) {
                            cm.display.input.reset(op.typing);
                        }
                        if (takeFocus) {
                            ensureFocus(op.cm);
                        }
                    }

                    function endOperation_finish(op) {
                        var cm = op.cm,
                            display = cm.display,
                            doc = cm.doc;
                        if (op.updatedDisplay) {
                            postUpdateDisplay(cm, op.update);
                        }

                        // Abort mouse wheel delta measurement, when scrolling explicitly
                        if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) {
                            display.wheelStartX = display.wheelStartY = null;
                        }

                        // Propagate the scroll position to the actual DOM scroller
                        if (op.scrollTop != null) {
                            setScrollTop(cm, op.scrollTop, op.forceScroll);
                        }
                        if (op.scrollLeft != null) {
                            setScrollLeft(cm, op.scrollLeft, true, true);
                        }
                        // If we need to scroll a specific position into view, do so.
                        if (op.scrollToPos) {
                            var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);
                            maybeScrollWindow(cm, rect);
                        }

                        // Fire events for markers that are hidden/unidden by editing or
                        // undoing
                        var hidden = op.maybeHiddenMarkers,
                            unhidden = op.maybeUnhiddenMarkers;
                        if (hidden) {
                            for (var i = 0; i < hidden.length; ++i) {
                                if (!hidden[i].lines.length) {
                                    signal(hidden[i], "hide");
                                }
                            }
                        }
                        if (unhidden) {
                            for (var i$1 = 0; i$1 < unhidden.length; ++i$1) {
                                if (unhidden[i$1].lines.length) {
                                    signal(unhidden[i$1], "unhide");
                                }
                            }
                        }
                        if (display.wrapper.offsetHeight) {
                            doc.scrollTop = cm.display.scroller.scrollTop;
                        }

                        // Fire change events, and delayed event handlers
                        if (op.changeObjs) {
                            signal(cm, "changes", cm, op.changeObjs);
                        }
                        if (op.update) {
                            op.update.finish();
                        }
                    }

                    // Run the given function in an operation
                    function runInOp(cm, f) {
                        if (cm.curOp) {
                            return f();
                        }
                        startOperation(cm);
                        try {
                            return f();
                        } finally {
                            endOperation(cm);
                        }
                    }
                    // Wraps a function in an operation. Returns the wrapped function.
                    function operation(cm, f) {
                        return function() {
                            if (cm.curOp) {
                                return f.apply(cm, arguments);
                            }
                            startOperation(cm);
                            try {
                                return f.apply(cm, arguments);
                            } finally {
                                endOperation(cm);
                            }
                        };
                    }
                    // Used to add methods to editor and doc instances, wrapping them in
                    // operations.
                    function methodOp(f) {
                        return function() {
                            if (this.curOp) {
                                return f.apply(this, arguments);
                            }
                            startOperation(this);
                            try {
                                return f.apply(this, arguments);
                            } finally {
                                endOperation(this);
                            }
                        };
                    }

                    function docMethodOp(f) {
                        return function() {
                            var cm = this.cm;
                            if (!cm || cm.curOp) {
                                return f.apply(this, arguments);
                            }
                            startOperation(cm);
                            try {
                                return f.apply(this, arguments);
                            } finally {
                                endOperation(cm);
                            }
                        };
                    }

                    // HIGHLIGHT WORKER

                    function startWorker(cm, time) {
                        if (cm.doc.highlightFrontier < cm.display.viewTo) {
                            cm.state.highlight.set(time, bind(highlightWorker, cm));
                        }
                    }

                    function highlightWorker(cm) {
                        var doc = cm.doc;
                        if (doc.highlightFrontier >= cm.display.viewTo) {
                            return;
                        }
                        var end = +new Date() + cm.options.workTime;
                        var context = getContextBefore(cm, doc.highlightFrontier);
                        var changedLines = [];
                        doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) {
                            if (context.line >= cm.display.viewFrom) {
                                // Visible
                                var oldStyles = line.styles;
                                var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;
                                var highlighted = highlightLine(cm, line, context, true);
                                if (resetState) {
                                    context.state = resetState;
                                }
                                line.styles = highlighted.styles;
                                var oldCls = line.styleClasses,
                                    newCls = highlighted.classes;
                                if (newCls) {
                                    line.styleClasses = newCls;
                                } else if (oldCls) {
                                    line.styleClasses = null;
                                }
                                var ischange = !oldStyles || oldStyles.length != line.styles.length || oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);
                                for (var i = 0; !ischange && i < oldStyles.length; ++i) {
                                    ischange = oldStyles[i] != line.styles[i];
                                }
                                if (ischange) {
                                    changedLines.push(context.line);
                                }
                                line.stateAfter = context.save();
                                context.nextLine();
                            } else {
                                if (line.text.length <= cm.options.maxHighlightLength) {
                                    processLine(cm, line.text, context);
                                }
                                line.stateAfter = context.line % 5 == 0 ? context.save() : null;
                                context.nextLine();
                            }
                            if (+new Date() > end) {
                                startWorker(cm, cm.options.workDelay);
                                return true;
                            }
                        });
                        doc.highlightFrontier = context.line;
                        doc.modeFrontier = Math.max(doc.modeFrontier, context.line);
                        if (changedLines.length) {
                            runInOp(cm, function() {
                                for (var i = 0; i < changedLines.length; i++) {
                                    regLineChange(cm, changedLines[i], "text");
                                }
                            });
                        }
                    }

                    // DISPLAY DRAWING

                    var DisplayUpdate = function(cm, viewport, force) {
                        var display = cm.display;
                        this.viewport = viewport;
                        // Store some values that we'll need later (but don't want to force a relayout for)
                        this.visible = visibleLines(display, cm.doc, viewport);
                        this.editorIsHidden = !display.wrapper.offsetWidth;
                        this.wrapperHeight = display.wrapper.clientHeight;
                        this.wrapperWidth = display.wrapper.clientWidth;
                        this.oldDisplayWidth = displayWidth(cm);
                        this.force = force;
                        this.dims = getDimensions(cm);
                        this.events = [];
                    };
                    DisplayUpdate.prototype.signal = function(emitter, type) {
                        if (hasHandler(emitter, type)) {
                            this.events.push(arguments);
                        }
                    };
                    DisplayUpdate.prototype.finish = function() {
                        for (var i = 0; i < this.events.length; i++) {
                            signal.apply(null, this.events[i]);
                        }
                    };

                    function maybeClipScrollbars(cm) {
                        var display = cm.display;
                        if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
                            display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;
                            display.heightForcer.style.height = scrollGap(cm) + "px";
                            display.sizer.style.marginBottom = -display.nativeBarWidth + "px";
                            display.sizer.style.borderRightWidth = scrollGap(cm) + "px";
                            display.scrollbarsClipped = true;
                        }
                    }

                    function selectionSnapshot(cm) {
                        if (cm.hasFocus()) {
                            return null;
                        }
                        var active = activeElt();
                        if (!active || !contains(cm.display.lineDiv, active)) {
                            return null;
                        }
                        var result = {
                            activeElt: active
                        };
                        if (window.getSelection) {
                            var sel = window.getSelection();
                            if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {
                                result.anchorNode = sel.anchorNode;
                                result.anchorOffset = sel.anchorOffset;
                                result.focusNode = sel.focusNode;
                                result.focusOffset = sel.focusOffset;
                            }
                        }
                        return result;
                    }

                    function restoreSelection(snapshot) {
                        if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) {
                            return;
                        }
                        snapshot.activeElt.focus();
                        if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) && snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {
                            var sel = window.getSelection(),
                                range = document.createRange();
                            range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);
                            range.collapse(false);
                            sel.removeAllRanges();
                            sel.addRange(range);
                            sel.extend(snapshot.focusNode, snapshot.focusOffset);
                        }
                    }

                    // Does the actual updating of the line display. Bails out
                    // (returning false) when there is nothing to be done and forced is
                    // false.
                    function updateDisplayIfNeeded(cm, update) {
                        var display = cm.display,
                            doc = cm.doc;
                        if (update.editorIsHidden) {
                            resetView(cm);
                            return false;
                        }

                        // Bail out if the visible area is already rendered and nothing changed.
                        if (!update.force && update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && display.renderedView == display.view && countDirtyView(cm) == 0) {
                            return false;
                        }
                        if (maybeUpdateLineNumberWidth(cm)) {
                            resetView(cm);
                            update.dims = getDimensions(cm);
                        }

                        // Compute a suitable new viewport (from & to)
                        var end = doc.first + doc.size;
                        var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);
                        var to = Math.min(end, update.visible.to + cm.options.viewportMargin);
                        if (display.viewFrom < from && from - display.viewFrom < 20) {
                            from = Math.max(doc.first, display.viewFrom);
                        }
                        if (display.viewTo > to && display.viewTo - to < 20) {
                            to = Math.min(end, display.viewTo);
                        }
                        if (sawCollapsedSpans) {
                            from = visualLineNo(cm.doc, from);
                            to = visualLineEndNo(cm.doc, to);
                        }
                        var different = from != display.viewFrom || to != display.viewTo || display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;
                        adjustView(cm, from, to);
                        display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));
                        // Position the mover div to align with the current scroll position
                        cm.display.mover.style.top = display.viewOffset + "px";
                        var toUpdate = countDirtyView(cm);
                        if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) {
                            return false;
                        }

                        // For big changes, we hide the enclosing element during the
                        // update, since that speeds up the operations on most browsers.
                        var selSnapshot = selectionSnapshot(cm);
                        if (toUpdate > 4) {
                            display.lineDiv.style.display = "none";
                        }
                        patchDisplay(cm, display.updateLineNumbers, update.dims);
                        if (toUpdate > 4) {
                            display.lineDiv.style.display = "";
                        }
                        display.renderedView = display.view;
                        // There might have been a widget with a focused element that got
                        // hidden or updated, if so re-focus it.
                        restoreSelection(selSnapshot);

                        // Prevent selection and cursors from interfering with the scroll
                        // width and height.
                        removeChildren(display.cursorDiv);
                        removeChildren(display.selectionDiv);
                        display.gutters.style.height = display.sizer.style.minHeight = 0;
                        if (different) {
                            display.lastWrapHeight = update.wrapperHeight;
                            display.lastWrapWidth = update.wrapperWidth;
                            startWorker(cm, 400);
                        }
                        display.updateLineNumbers = null;
                        return true;
                    }

                    function postUpdateDisplay(cm, update) {
                        var viewport = update.viewport;
                        for (var first = true;; first = false) {
                            if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
                                // Clip forced viewport to actual scrollable area.
                                if (viewport && viewport.top != null) {
                                    viewport = {
                                        top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)
                                    };
                                }
                                // Updated line heights might result in the drawn area not
                                // actually covering the viewport. Keep looping until it does.
                                update.visible = visibleLines(cm.display, cm.doc, viewport);
                                if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) {
                                    break;
                                }
                            } else if (first) {
                                update.visible = visibleLines(cm.display, cm.doc, viewport);
                            }
                            if (!updateDisplayIfNeeded(cm, update)) {
                                break;
                            }
                            updateHeightsInViewport(cm);
                            var barMeasure = measureForScrollbars(cm);
                            updateSelection(cm);
                            updateScrollbars(cm, barMeasure);
                            setDocumentHeight(cm, barMeasure);
                            update.force = false;
                        }
                        update.signal(cm, "update", cm);
                        if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
                            update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
                            cm.display.reportedViewFrom = cm.display.viewFrom;
                            cm.display.reportedViewTo = cm.display.viewTo;
                        }
                    }

                    function updateDisplaySimple(cm, viewport) {
                        var update = new DisplayUpdate(cm, viewport);
                        if (updateDisplayIfNeeded(cm, update)) {
                            updateHeightsInViewport(cm);
                            postUpdateDisplay(cm, update);
                            var barMeasure = measureForScrollbars(cm);
                            updateSelection(cm);
                            updateScrollbars(cm, barMeasure);
                            setDocumentHeight(cm, barMeasure);
                            update.finish();
                        }
                    }

                    // Sync the actual display DOM structure with display.view, removing
                    // nodes for lines that are no longer in view, and creating the ones
                    // that are not there yet, and updating the ones that are out of
                    // date.
                    function patchDisplay(cm, updateNumbersFrom, dims) {
                        var display = cm.display,
                            lineNumbers = cm.options.lineNumbers;
                        var container = display.lineDiv,
                            cur = container.firstChild;

                        function rm(node) {
                            var next = node.nextSibling;
                            // Works around a throw-scroll bug in OS X Webkit
                            if (webkit && mac && cm.display.currentWheelTarget == node) {
                                node.style.display = "none";
                            } else {
                                node.parentNode.removeChild(node);
                            }
                            return next;
                        }
                        var view = display.view,
                            lineN = display.viewFrom;
                        // Loop over the elements in the view, syncing cur (the DOM nodes
                        // in display.lineDiv) with the view as we go.
                        for (var i = 0; i < view.length; i++) {
                            var lineView = view[i];
                            if (lineView.hidden);
                            else if (!lineView.node || lineView.node.parentNode != container) {
                                // Not drawn yet
                                var node = buildLineElement(cm, lineView, lineN, dims);
                                container.insertBefore(node, cur);
                            } else {
                                // Already drawn
                                while (cur != lineView.node) {
                                    cur = rm(cur);
                                }
                                var updateNumber = lineNumbers && updateNumbersFrom != null && updateNumbersFrom <= lineN && lineView.lineNumber;
                                if (lineView.changes) {
                                    if (indexOf(lineView.changes, "gutter") > -1) {
                                        updateNumber = false;
                                    }
                                    updateLineForChanges(cm, lineView, lineN, dims);
                                }
                                if (updateNumber) {
                                    removeChildren(lineView.lineNumber);
                                    lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
                                }
                                cur = lineView.node.nextSibling;
                            }
                            lineN += lineView.size;
                        }
                        while (cur) {
                            cur = rm(cur);
                        }
                    }

                    function updateGutterSpace(display) {
                        var width = display.gutters.offsetWidth;
                        display.sizer.style.marginLeft = width + "px";
                        // Send an event to consumers responding to changes in gutter width.
                        signalLater(display, "gutterChanged", display);
                    }

                    function setDocumentHeight(cm, measure) {
                        cm.display.sizer.style.minHeight = measure.docHeight + "px";
                        cm.display.heightForcer.style.top = measure.docHeight + "px";
                        cm.display.gutters.style.height = measure.docHeight + cm.display.barHeight + scrollGap(cm) + "px";
                    }

                    // Re-align line numbers and gutter marks to compensate for
                    // horizontal scrolling.
                    function alignHorizontally(cm) {
                        var display = cm.display,
                            view = display.view;
                        if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) {
                            return;
                        }
                        var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
                        var gutterW = display.gutters.offsetWidth,
                            left = comp + "px";
                        for (var i = 0; i < view.length; i++) {
                            if (!view[i].hidden) {
                                if (cm.options.fixedGutter) {
                                    if (view[i].gutter) {
                                        view[i].gutter.style.left = left;
                                    }
                                    if (view[i].gutterBackground) {
                                        view[i].gutterBackground.style.left = left;
                                    }
                                }
                                var align = view[i].alignable;
                                if (align) {
                                    for (var j = 0; j < align.length; j++) {
                                        align[j].style.left = left;
                                    }
                                }
                            }
                        }
                        if (cm.options.fixedGutter) {
                            display.gutters.style.left = comp + gutterW + "px";
                        }
                    }

                    // Used to ensure that the line number gutter is still the right
                    // size for the current document size. Returns true when an update
                    // is needed.
                    function maybeUpdateLineNumberWidth(cm) {
                        if (!cm.options.lineNumbers) {
                            return false;
                        }
                        var doc = cm.doc,
                            last = lineNumberFor(cm.options, doc.first + doc.size - 1),
                            display = cm.display;
                        if (last.length != display.lineNumChars) {
                            var test = display.measure.appendChild(elt("div", [elt("div", last)], "CodeMirror-linenumber CodeMirror-gutter-elt"));
                            var innerW = test.firstChild.offsetWidth,
                                padding = test.offsetWidth - innerW;
                            display.lineGutter.style.width = "";
                            display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;
                            display.lineNumWidth = display.lineNumInnerWidth + padding;
                            display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
                            display.lineGutter.style.width = display.lineNumWidth + "px";
                            updateGutterSpace(cm.display);
                            return true;
                        }
                        return false;
                    }

                    function getGutters(gutters, lineNumbers) {
                        var result = [],
                            sawLineNumbers = false;
                        for (var i = 0; i < gutters.length; i++) {
                            var name = gutters[i],
                                style = null;
                            if (typeof name != "string") {
                                style = name.style;
                                name = name.className;
                            }
                            if (name == "CodeMirror-linenumbers") {
                                if (!lineNumbers) {
                                    continue;
                                } else {
                                    sawLineNumbers = true;
                                }
                            }
                            result.push({
                                className: name,
                                style: style
                            });
                        }
                        if (lineNumbers && !sawLineNumbers) {
                            result.push({
                                className: "CodeMirror-linenumbers",
                                style: null
                            });
                        }
                        return result;
                    }

                    // Rebuild the gutter elements, ensure the margin to the left of the
                    // code matches their width.
                    function renderGutters(display) {
                        var gutters = display.gutters,
                            specs = display.gutterSpecs;
                        removeChildren(gutters);
                        display.lineGutter = null;
                        for (var i = 0; i < specs.length; ++i) {
                            var ref = specs[i];
                            var className = ref.className;
                            var style = ref.style;
                            var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className));
                            if (style) {
                                gElt.style.cssText = style;
                            }
                            if (className == "CodeMirror-linenumbers") {
                                display.lineGutter = gElt;
                                gElt.style.width = (display.lineNumWidth || 1) + "px";
                            }
                        }
                        gutters.style.display = specs.length ? "" : "none";
                        updateGutterSpace(display);
                    }

                    function updateGutters(cm) {
                        renderGutters(cm.display);
                        regChange(cm);
                        alignHorizontally(cm);
                    }

                    // The display handles the DOM integration, both for input reading
                    // and content drawing. It holds references to DOM nodes and
                    // display-related state.

                    function Display(place, doc, input, options) {
                        var d = this;
                        this.input = input;

                        // Covers bottom-right square when both scrollbars are present.
                        d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
                        d.scrollbarFiller.setAttribute("cm-not-content", "true");
                        // Covers bottom of gutter when coverGutterNextToScrollbar is on
                        // and h scrollbar is present.
                        d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
                        d.gutterFiller.setAttribute("cm-not-content", "true");
                        // Will contain the actual code, positioned to cover the viewport.
                        d.lineDiv = eltP("div", null, "CodeMirror-code");
                        // Elements are added to these to represent selection and cursors.
                        d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
                        d.cursorDiv = elt("div", null, "CodeMirror-cursors");
                        // A visibility: hidden element used to find the size of things.
                        d.measure = elt("div", null, "CodeMirror-measure");
                        // When lines outside of the viewport are measured, they are drawn in this.
                        d.lineMeasure = elt("div", null, "CodeMirror-measure");
                        // Wraps everything that needs to exist inside the vertically-padded coordinate system
                        d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], null, "position: relative; outline: none");
                        var lines = eltP("div", [d.lineSpace], "CodeMirror-lines");
                        // Moved around its parent to cover visible view.
                        d.mover = elt("div", [lines], null, "position: relative");
                        // Set to the height of the document, allowing scrolling.
                        d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
                        d.sizerWidth = null;
                        // Behavior of elts with overflow: auto and padding is
                        // inconsistent across browsers. This is used to ensure the
                        // scrollable area is big enough.
                        d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;");
                        // Will contain the gutters, if any.
                        d.gutters = elt("div", null, "CodeMirror-gutters");
                        d.lineGutter = null;
                        // Actual scrollable element.
                        d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
                        d.scroller.setAttribute("tabIndex", "-1");
                        // The element in which the editor lives.
                        d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");

                        // This attribute is respected by automatic translation systems such as Google Translate,
                        // and may also be respected by tools used by human translators.
                        d.wrapper.setAttribute('translate', 'no');

                        // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
                        if (ie && ie_version < 8) {
                            d.gutters.style.zIndex = -1;
                            d.scroller.style.paddingRight = 0;
                        }
                        if (!webkit && !(gecko && mobile)) {
                            d.scroller.draggable = true;
                        }
                        if (place) {
                            if (place.appendChild) {
                                place.appendChild(d.wrapper);
                            } else {
                                place(d.wrapper);
                            }
                        }

                        // Current rendered range (may be bigger than the view window).
                        d.viewFrom = d.viewTo = doc.first;
                        d.reportedViewFrom = d.reportedViewTo = doc.first;
                        // Information about the rendered lines.
                        d.view = [];
                        d.renderedView = null;
                        // Holds info about a single rendered line when it was rendered
                        // for measurement, while not in view.
                        d.externalMeasured = null;
                        // Empty space (in pixels) above the view
                        d.viewOffset = 0;
                        d.lastWrapHeight = d.lastWrapWidth = 0;
                        d.updateLineNumbers = null;
                        d.nativeBarWidth = d.barHeight = d.barWidth = 0;
                        d.scrollbarsClipped = false;

                        // Used to only resize the line number gutter when necessary (when
                        // the amount of lines crosses a boundary that makes its width change)
                        d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
                        // Set to true when a non-horizontal-scrolling line widget is
                        // added. As an optimization, line widget aligning is skipped when
                        // this is false.
                        d.alignWidgets = false;
                        d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;

                        // Tracks the maximum line length so that the horizontal scrollbar
                        // can be kept static when scrolling.
                        d.maxLine = null;
                        d.maxLineLength = 0;
                        d.maxLineChanged = false;

                        // Used for measuring wheel scrolling granularity
                        d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;

                        // True when shift is held down.
                        d.shift = false;

                        // Used to track whether anything happened since the context menu
                        // was opened.
                        d.selForContextMenu = null;
                        d.activeTouch = null;
                        d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);
                        renderGutters(d);
                        input.init(d);
                    }

                    // Since the delta values reported on mouse wheel events are
                    // unstandardized between browsers and even browser versions, and
                    // generally horribly unpredictable, this code starts by measuring
                    // the scroll effect that the first few mouse wheel events have,
                    // and, from that, detects the way it can convert deltas to pixel
                    // offsets afterwards.
                    //
                    // The reason we want to know the amount a wheel event will scroll
                    // is that it gives us a chance to update the display before the
                    // actual scrolling happens, reducing flickering.

                    var wheelSamples = 0,
                        wheelPixelsPerUnit = null;
                    // Fill in a browser-detected starting value on browsers where we
                    // know one. These don't have to be accurate -- the result of them
                    // being wrong would just be a slight flicker on the first wheel
                    // scroll (if it is large enough).
                    if (ie) {
                        wheelPixelsPerUnit = -.53;
                    } else if (gecko) {
                        wheelPixelsPerUnit = 15;
                    } else if (chrome) {
                        wheelPixelsPerUnit = -.7;
                    } else if (safari) {
                        wheelPixelsPerUnit = -1 / 3;
                    }

                    function wheelEventDelta(e) {
                        var dx = e.wheelDeltaX,
                            dy = e.wheelDeltaY;
                        if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) {
                            dx = e.detail;
                        }
                        if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) {
                            dy = e.detail;
                        } else if (dy == null) {
                            dy = e.wheelDelta;
                        }
                        return {
                            x: dx,
                            y: dy
                        };
                    }

                    function wheelEventPixels(e) {
                        var delta = wheelEventDelta(e);
                        delta.x *= wheelPixelsPerUnit;
                        delta.y *= wheelPixelsPerUnit;
                        return delta;
                    }

                    function onScrollWheel(cm, e) {
                        var delta = wheelEventDelta(e),
                            dx = delta.x,
                            dy = delta.y;
                        var pixelsPerUnit = wheelPixelsPerUnit;
                        if (e.deltaMode === 0) {
                            dx = e.deltaX;
                            dy = e.deltaY;
                            pixelsPerUnit = 1;
                        }
                        var display = cm.display,
                            scroll = display.scroller;
                        // Quit if there's nothing to scroll here
                        var canScrollX = scroll.scrollWidth > scroll.clientWidth;
                        var canScrollY = scroll.scrollHeight > scroll.clientHeight;
                        if (!(dx && canScrollX || dy && canScrollY)) {
                            return;
                        }

                        // Webkit browsers on OS X abort momentum scrolls when the target
                        // of the scroll event is removed from the scrollable element.
                        // This hack (see related code in patchDisplay) makes sure the
                        // element is kept around.
                        if (dy && mac && webkit) {
                            outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
                                for (var i = 0; i < view.length; i++) {
                                    if (view[i].node == cur) {
                                        cm.display.currentWheelTarget = cur;
                                        break outer;
                                    }
                                }
                            }
                        }

                        // On some browsers, horizontal scrolling will cause redraws to
                        // happen before the gutter has been realigned, causing it to
                        // wriggle around in a most unseemly way. When we have an
                        // estimated pixels/delta value, we just handle horizontal
                        // scrolling entirely here. It'll be slightly off from native, but
                        // better than glitching out.
                        if (dx && !gecko && !presto && pixelsPerUnit != null) {
                            if (dy && canScrollY) {
                                updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit));
                            }
                            setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit));
                            // Only prevent default scrolling if vertical scrolling is
                            // actually possible. Otherwise, it causes vertical scroll
                            // jitter on OSX trackpads when deltaX is small and deltaY
                            // is large (issue #3579)
                            if (!dy || dy && canScrollY) {
                                e_preventDefault(e);
                            }
                            display.wheelStartX = null; // Abort measurement, if in progress
                            return;
                        }

                        // 'Project' the visible viewport to cover the area that is being
                        // scrolled into view (if we know enough to estimate it).
                        if (dy && pixelsPerUnit != null) {
                            var pixels = dy * pixelsPerUnit;
                            var top = cm.doc.scrollTop,
                                bot = top + display.wrapper.clientHeight;
                            if (pixels < 0) {
                                top = Math.max(0, top + pixels - 50);
                            } else {
                                bot = Math.min(cm.doc.height, bot + pixels + 50);
                            }
                            updateDisplaySimple(cm, {
                                top: top,
                                bottom: bot
                            });
                        }
                        if (wheelSamples < 20 && e.deltaMode !== 0) {
                            if (display.wheelStartX == null) {
                                display.wheelStartX = scroll.scrollLeft;
                                display.wheelStartY = scroll.scrollTop;
                                display.wheelDX = dx;
                                display.wheelDY = dy;
                                setTimeout(function() {
                                    if (display.wheelStartX == null) {
                                        return;
                                    }
                                    var movedX = scroll.scrollLeft - display.wheelStartX;
                                    var movedY = scroll.scrollTop - display.wheelStartY;
                                    var sample = movedY && display.wheelDY && movedY / display.wheelDY || movedX && display.wheelDX && movedX / display.wheelDX;
                                    display.wheelStartX = display.wheelStartY = null;
                                    if (!sample) {
                                        return;
                                    }
                                    wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
                                    ++wheelSamples;
                                }, 200);
                            } else {
                                display.wheelDX += dx;
                                display.wheelDY += dy;
                            }
                        }
                    }

                    // Selection objects are immutable. A new one is created every time
                    // the selection changes. A selection is one or more non-overlapping
                    // (and non-touching) ranges, sorted, and an integer that indicates
                    // which one is the primary selection (the one that's scrolled into
                    // view, that getCursor returns, etc).
                    var Selection = function(ranges, primIndex) {
                        this.ranges = ranges;
                        this.primIndex = primIndex;
                    };
                    Selection.prototype.primary = function() {
                        return this.ranges[this.primIndex];
                    };
                    Selection.prototype.equals = function(other) {
                        if (other == this) {
                            return true;
                        }
                        if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) {
                            return false;
                        }
                        for (var i = 0; i < this.ranges.length; i++) {
                            var here = this.ranges[i],
                                there = other.ranges[i];
                            if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) {
                                return false;
                            }
                        }
                        return true;
                    };
                    Selection.prototype.deepCopy = function() {
                        var out = [];
                        for (var i = 0; i < this.ranges.length; i++) {
                            out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head));
                        }
                        return new Selection(out, this.primIndex);
                    };
                    Selection.prototype.somethingSelected = function() {
                        for (var i = 0; i < this.ranges.length; i++) {
                            if (!this.ranges[i].empty()) {
                                return true;
                            }
                        }
                        return false;
                    };
                    Selection.prototype.contains = function(pos, end) {
                        if (!end) {
                            end = pos;
                        }
                        for (var i = 0; i < this.ranges.length; i++) {
                            var range = this.ranges[i];
                            if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) {
                                return i;
                            }
                        }
                        return -1;
                    };
                    var Range = function(anchor, head) {
                        this.anchor = anchor;
                        this.head = head;
                    };
                    Range.prototype.from = function() {
                        return minPos(this.anchor, this.head);
                    };
                    Range.prototype.to = function() {
                        return maxPos(this.anchor, this.head);
                    };
                    Range.prototype.empty = function() {
                        return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;
                    };

                    // Take an unsorted, potentially overlapping set of ranges, and
                    // build a selection out of it. 'Consumes' ranges array (modifying
                    // it).
                    function normalizeSelection(cm, ranges, primIndex) {
                        var mayTouch = cm && cm.options.selectionsMayTouch;
                        var prim = ranges[primIndex];
                        ranges.sort(function(a, b) {
                            return cmp(a.from(), b.from());
                        });
                        primIndex = indexOf(ranges, prim);
                        for (var i = 1; i < ranges.length; i++) {
                            var cur = ranges[i],
                                prev = ranges[i - 1];
                            var diff = cmp(prev.to(), cur.from());
                            if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {
                                var from = minPos(prev.from(), cur.from()),
                                    to = maxPos(prev.to(), cur.to());
                                var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;
                                if (i <= primIndex) {
                                    --primIndex;
                                }
                                ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));
                            }
                        }
                        return new Selection(ranges, primIndex);
                    }

                    function simpleSelection(anchor, head) {
                        return new Selection([new Range(anchor, head || anchor)], 0);
                    }

                    // Compute the position of the end of a change (its 'to' property
                    // refers to the pre-change end).
                    function changeEnd(change) {
                        if (!change.text) {
                            return change.to;
                        }
                        return Pos(change.from.line + change.text.length - 1, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));
                    }

                    // Adjust a position to refer to the post-change position of the
                    // same text, or the end of the change if the change covers it.
                    function adjustForChange(pos, change) {
                        if (cmp(pos, change.from) < 0) {
                            return pos;
                        }
                        if (cmp(pos, change.to) <= 0) {
                            return changeEnd(change);
                        }
                        var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1,
                            ch = pos.ch;
                        if (pos.line == change.to.line) {
                            ch += changeEnd(change).ch - change.to.ch;
                        }
                        return Pos(line, ch);
                    }

                    function computeSelAfterChange(doc, change) {
                        var out = [];
                        for (var i = 0; i < doc.sel.ranges.length; i++) {
                            var range = doc.sel.ranges[i];
                            out.push(new Range(adjustForChange(range.anchor, change), adjustForChange(range.head, change)));
                        }
                        return normalizeSelection(doc.cm, out, doc.sel.primIndex);
                    }

                    function offsetPos(pos, old, nw) {
                        if (pos.line == old.line) {
                            return Pos(nw.line, pos.ch - old.ch + nw.ch);
                        } else {
                            return Pos(nw.line + (pos.line - old.line), pos.ch);
                        }
                    }

                    // Used by replaceSelections to allow moving the selection to the
                    // start or around the replaced test. Hint may be "start" or "around".
                    function computeReplacedSel(doc, changes, hint) {
                        var out = [];
                        var oldPrev = Pos(doc.first, 0),
                            newPrev = oldPrev;
                        for (var i = 0; i < changes.length; i++) {
                            var change = changes[i];
                            var from = offsetPos(change.from, oldPrev, newPrev);
                            var to = offsetPos(changeEnd(change), oldPrev, newPrev);
                            oldPrev = change.to;
                            newPrev = to;
                            if (hint == "around") {
                                var range = doc.sel.ranges[i],
                                    inv = cmp(range.head, range.anchor) < 0;
                                out[i] = new Range(inv ? to : from, inv ? from : to);
                            } else {
                                out[i] = new Range(from, from);
                            }
                        }
                        return new Selection(out, doc.sel.primIndex);
                    }

                    // Used to get the editor into a consistent state again when options change.

                    function loadMode(cm) {
                        cm.doc.mode = getMode(cm.options, cm.doc.modeOption);
                        resetModeState(cm);
                    }

                    function resetModeState(cm) {
                        cm.doc.iter(function(line) {
                            if (line.stateAfter) {
                                line.stateAfter = null;
                            }
                            if (line.styles) {
                                line.styles = null;
                            }
                        });
                        cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;
                        startWorker(cm, 100);
                        cm.state.modeGen++;
                        if (cm.curOp) {
                            regChange(cm);
                        }
                    }

                    // DOCUMENT DATA STRUCTURE

                    // By default, updates that start and end at the beginning of a line
                    // are treated specially, in order to make the association of line
                    // widgets and marker elements with the text behave more intuitive.
                    function isWholeLineUpdate(doc, change) {
                        return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && (!doc.cm || doc.cm.options.wholeLineUpdateBefore);
                    }

                    // Perform a change on the document data structure.
                    function updateDoc(doc, change, markedSpans, estimateHeight) {
                        function spansFor(n) {
                            return markedSpans ? markedSpans[n] : null;
                        }

                        function update(line, text, spans) {
                            updateLine(line, text, spans, estimateHeight);
                            signalLater(line, "change", line, change);
                        }

                        function linesFor(start, end) {
                            var result = [];
                            for (var i = start; i < end; ++i) {
                                result.push(new Line(text[i], spansFor(i), estimateHeight));
                            }
                            return result;
                        }
                        var from = change.from,
                            to = change.to,
                            text = change.text;
                        var firstLine = getLine(doc, from.line),
                            lastLine = getLine(doc, to.line);
                        var lastText = lst(text),
                            lastSpans = spansFor(text.length - 1),
                            nlines = to.line - from.line;

                        // Adjust the line structure
                        if (change.full) {
                            doc.insert(0, linesFor(0, text.length));
                            doc.remove(text.length, doc.size - text.length);
                        } else if (isWholeLineUpdate(doc, change)) {
                            // This is a whole-line replace. Treated specially to make
                            // sure line objects move the way they are supposed to.
                            var added = linesFor(0, text.length - 1);
                            update(lastLine, lastLine.text, lastSpans);
                            if (nlines) {
                                doc.remove(from.line, nlines);
                            }
                            if (added.length) {
                                doc.insert(from.line, added);
                            }
                        } else if (firstLine == lastLine) {
                            if (text.length == 1) {
                                update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
                            } else {
                                var added$1 = linesFor(1, text.length - 1);
                                added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
                                update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
                                doc.insert(from.line + 1, added$1);
                            }
                        } else if (text.length == 1) {
                            update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
                            doc.remove(from.line + 1, nlines);
                        } else {
                            update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
                            update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
                            var added$2 = linesFor(1, text.length - 1);
                            if (nlines > 1) {
                                doc.remove(from.line + 1, nlines - 1);
                            }
                            doc.insert(from.line + 1, added$2);
                        }
                        signalLater(doc, "change", doc, change);
                    }

                    // Call f for all linked documents.
                    function linkedDocs(doc, f, sharedHistOnly) {
                        function propagate(doc, skip, sharedHist) {
                            if (doc.linked) {
                                for (var i = 0; i < doc.linked.length; ++i) {
                                    var rel = doc.linked[i];
                                    if (rel.doc == skip) {
                                        continue;
                                    }
                                    var shared = sharedHist && rel.sharedHist;
                                    if (sharedHistOnly && !shared) {
                                        continue;
                                    }
                                    f(rel.doc, shared);
                                    propagate(rel.doc, doc, shared);
                                }
                            }
                        }
                        propagate(doc, null, true);
                    }

                    // Attach a document to an editor.
                    function attachDoc(cm, doc) {
                        if (doc.cm) {
                            throw new Error("This document is already in use.");
                        }
                        cm.doc = doc;
                        doc.cm = cm;
                        estimateLineHeights(cm);
                        loadMode(cm);
                        setDirectionClass(cm);
                        cm.options.direction = doc.direction;
                        if (!cm.options.lineWrapping) {
                            findMaxLine(cm);
                        }
                        cm.options.mode = doc.modeOption;
                        regChange(cm);
                    }

                    function setDirectionClass(cm) {
                        (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl");
                    }

                    function directionChanged(cm) {
                        runInOp(cm, function() {
                            setDirectionClass(cm);
                            regChange(cm);
                        });
                    }

                    function History(prev) {
                        // Arrays of change events and selections. Doing something adds an
                        // event to done and clears undo. Undoing moves events from done
                        // to undone, redoing moves them in the other direction.
                        this.done = [];
                        this.undone = [];
                        this.undoDepth = prev ? prev.undoDepth : Infinity;
                        // Used to track when changes can be merged into a single undo
                        // event
                        this.lastModTime = this.lastSelTime = 0;
                        this.lastOp = this.lastSelOp = null;
                        this.lastOrigin = this.lastSelOrigin = null;
                        // Used by the isClean() method
                        this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1;
                    }

                    // Create a history change event from an updateDoc-style change
                    // object.
                    function historyChangeFromChange(doc, change) {
                        var histChange = {
                            from: copyPos(change.from),
                            to: changeEnd(change),
                            text: getBetween(doc, change.from, change.to)
                        };
                        attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
                        linkedDocs(doc, function(doc) {
                            return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
                        }, true);
                        return histChange;
                    }

                    // Pop all selection events off the end of a history array. Stop at
                    // a change event.
                    function clearSelectionEvents(array) {
                        while (array.length) {
                            var last = lst(array);
                            if (last.ranges) {
                                array.pop();
                            } else {
                                break;
                            }
                        }
                    }

                    // Find the top change event in the history. Pop off selection
                    // events that are in the way.
                    function lastChangeEvent(hist, force) {
                        if (force) {
                            clearSelectionEvents(hist.done);
                            return lst(hist.done);
                        } else if (hist.done.length && !lst(hist.done).ranges) {
                            return lst(hist.done);
                        } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
                            hist.done.pop();
                            return lst(hist.done);
                        }
                    }

                    // Register a change in the history. Merges changes that are within
                    // a single operation, or are close together with an origin that
                    // allows merging (starting with "+") into a single event.
                    function addChangeToHistory(doc, change, selAfter, opId) {
                        var hist = doc.history;
                        hist.undone.length = 0;
                        var time = +new Date(),
                            cur;
                        var last;
                        if ((hist.lastOp == opId || hist.lastOrigin == change.origin && change.origin && (change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500) || change.origin.charAt(0) == "*")) && (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
                            // Merge this change into the last event
                            last = lst(cur.changes);
                            if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {
                                // Optimized case for simple insertion -- don't want to add
                                // new changesets for every character typed
                                last.to = changeEnd(change);
                            } else {
                                // Add new sub-event
                                cur.changes.push(historyChangeFromChange(doc, change));
                            }
                        } else {
                            // Can not be merged, start a new event.
                            var before = lst(hist.done);
                            if (!before || !before.ranges) {
                                pushSelectionToHistory(doc.sel, hist.done);
                            }
                            cur = {
                                changes: [historyChangeFromChange(doc, change)],
                                generation: hist.generation
                            };
                            hist.done.push(cur);
                            while (hist.done.length > hist.undoDepth) {
                                hist.done.shift();
                                if (!hist.done[0].ranges) {
                                    hist.done.shift();
                                }
                            }
                        }
                        hist.done.push(selAfter);
                        hist.generation = ++hist.maxGeneration;
                        hist.lastModTime = hist.lastSelTime = time;
                        hist.lastOp = hist.lastSelOp = opId;
                        hist.lastOrigin = hist.lastSelOrigin = change.origin;
                        if (!last) {
                            signal(doc, "historyAdded");
                        }
                    }

                    function selectionEventCanBeMerged(doc, origin, prev, sel) {
                        var ch = origin.charAt(0);
                        return ch == "*" || ch == "+" && prev.ranges.length == sel.ranges.length && prev.somethingSelected() == sel.somethingSelected() && new Date() - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500);
                    }

                    // Called whenever the selection changes, sets the new selection as
                    // the pending selection in the history, and pushes the old pending
                    // selection into the 'done' array when it was significantly
                    // different (in number of selected ranges, emptiness, or time).
                    function addSelectionToHistory(doc, sel, opId, options) {
                        var hist = doc.history,
                            origin = options && options.origin;

                        // A new event is started when the previous origin does not match
                        // the current, or the origins don't allow matching. Origins
                        // starting with * are always merged, those starting with + are
                        // merged when similar and close together in time.
                        if (opId == hist.lastSelOp || origin && hist.lastSelOrigin == origin && (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))) {
                            hist.done[hist.done.length - 1] = sel;
                        } else {
                            pushSelectionToHistory(sel, hist.done);
                        }
                        hist.lastSelTime = +new Date();
                        hist.lastSelOrigin = origin;
                        hist.lastSelOp = opId;
                        if (options && options.clearRedo !== false) {
                            clearSelectionEvents(hist.undone);
                        }
                    }

                    function pushSelectionToHistory(sel, dest) {
                        var top = lst(dest);
                        if (!(top && top.ranges && top.equals(sel))) {
                            dest.push(sel);
                        }
                    }

                    // Used to store marked span information in the history.
                    function attachLocalSpans(doc, change, from, to) {
                        var existing = change["spans_" + doc.id],
                            n = 0;
                        doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {
                            if (line.markedSpans) {
                                (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans;
                            }
                            ++n;
                        });
                    }

                    // When un/re-doing restores text containing marked spans, those
                    // that have been explicitly cleared should not be restored.
                    function removeClearedSpans(spans) {
                        if (!spans) {
                            return null;
                        }
                        var out;
                        for (var i = 0; i < spans.length; ++i) {
                            if (spans[i].marker.explicitlyCleared) {
                                if (!out) {
                                    out = spans.slice(0, i);
                                }
                            } else if (out) {
                                out.push(spans[i]);
                            }
                        }
                        return !out ? spans : out.length ? out : null;
                    }

                    // Retrieve and filter the old marked spans stored in a change event.
                    function getOldSpans(doc, change) {
                        var found = change["spans_" + doc.id];
                        if (!found) {
                            return null;
                        }
                        var nw = [];
                        for (var i = 0; i < change.text.length; ++i) {
                            nw.push(removeClearedSpans(found[i]));
                        }
                        return nw;
                    }

                    // Used for un/re-doing changes from the history. Combines the
                    // result of computing the existing spans with the set of spans that
                    // existed in the history (so that deleting around a span and then
                    // undoing brings back the span).
                    function mergeOldSpans(doc, change) {
                        var old = getOldSpans(doc, change);
                        var stretched = stretchSpansOverChange(doc, change);
                        if (!old) {
                            return stretched;
                        }
                        if (!stretched) {
                            return old;
                        }
                        for (var i = 0; i < old.length; ++i) {
                            var oldCur = old[i],
                                stretchCur = stretched[i];
                            if (oldCur && stretchCur) {
                                spans: for (var j = 0; j < stretchCur.length; ++j) {
                                    var span = stretchCur[j];
                                    for (var k = 0; k < oldCur.length; ++k) {
                                        if (oldCur[k].marker == span.marker) {
                                            continue spans;
                                        }
                                    }
                                    oldCur.push(span);
                                }
                            }
                            else if (stretchCur) {
                                old[i] = stretchCur;
                            }
                        }
                        return old;
                    }

                    // Used both to provide a JSON-safe object in .getHistory, and, when
                    // detaching a document, to split the history in two
                    function copyHistoryArray(events, newGroup, instantiateSel) {
                        var copy = [];
                        for (var i = 0; i < events.length; ++i) {
                            var event = events[i];
                            if (event.ranges) {
                                copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);
                                continue;
                            }
                            var changes = event.changes,
                                newChanges = [];
                            copy.push({
                                changes: newChanges
                            });
                            for (var j = 0; j < changes.length; ++j) {
                                var change = changes[j],
                                    m = void 0;
                                newChanges.push({
                                    from: change.from,
                                    to: change.to,
                                    text: change.text
                                });
                                if (newGroup) {
                                    for (var prop in change) {
                                        if (m = prop.match(/^spans_(\d+)$/)) {
                                            if (indexOf(newGroup, Number(m[1])) > -1) {
                                                lst(newChanges)[prop] = change[prop];
                                                delete change[prop];
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        return copy;
                    }

                    // The 'scroll' parameter given to many of these indicated whether
                    // the new cursor position should be scrolled into view after
                    // modifying the selection.

                    // If shift is held or the extend flag is set, extends a range to
                    // include a given position (and optionally a second position).
                    // Otherwise, simply returns the range between the given positions.
                    // Used for cursor motion and such.
                    function extendRange(range, head, other, extend) {
                        if (extend) {
                            var anchor = range.anchor;
                            if (other) {
                                var posBefore = cmp(head, anchor) < 0;
                                if (posBefore != cmp(other, anchor) < 0) {
                                    anchor = head;
                                    head = other;
                                } else if (posBefore != cmp(head, other) < 0) {
                                    head = other;
                                }
                            }
                            return new Range(anchor, head);
                        } else {
                            return new Range(other || head, head);
                        }
                    }

                    // Extend the primary selection range, discard the rest.
                    function extendSelection(doc, head, other, options, extend) {
                        if (extend == null) {
                            extend = doc.cm && (doc.cm.display.shift || doc.extend);
                        }
                        setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);
                    }

                    // Extend all selections (pos is an array of selections with length
                    // equal the number of selections)
                    function extendSelections(doc, heads, options) {
                        var out = [];
                        var extend = doc.cm && (doc.cm.display.shift || doc.extend);
                        for (var i = 0; i < doc.sel.ranges.length; i++) {
                            out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend);
                        }
                        var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);
                        setSelection(doc, newSel, options);
                    }

                    // Updates a single range in the selection.
                    function replaceOneSelection(doc, i, range, options) {
                        var ranges = doc.sel.ranges.slice(0);
                        ranges[i] = range;
                        setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);
                    }

                    // Reset the selection to a single range.
                    function setSimpleSelection(doc, anchor, head, options) {
                        setSelection(doc, simpleSelection(anchor, head), options);
                    }

                    // Give beforeSelectionChange handlers a change to influence a
                    // selection update.
                    function filterSelectionChange(doc, sel, options) {
                        var obj = {
                            ranges: sel.ranges,
                            update: function(ranges) {
                                this.ranges = [];
                                for (var i = 0; i < ranges.length; i++) {
                                    this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), clipPos(doc, ranges[i].head));
                                }
                            },
                            origin: options && options.origin
                        };
                        signal(doc, "beforeSelectionChange", doc, obj);
                        if (doc.cm) {
                            signal(doc.cm, "beforeSelectionChange", doc.cm, obj);
                        }
                        if (obj.ranges != sel.ranges) {
                            return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1);
                        } else {
                            return sel;
                        }
                    }

                    function setSelectionReplaceHistory(doc, sel, options) {
                        var done = doc.history.done,
                            last = lst(done);
                        if (last && last.ranges) {
                            done[done.length - 1] = sel;
                            setSelectionNoUndo(doc, sel, options);
                        } else {
                            setSelection(doc, sel, options);
                        }
                    }

                    // Set a new selection.
                    function setSelection(doc, sel, options) {
                        setSelectionNoUndo(doc, sel, options);
                        addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);
                    }

                    function setSelectionNoUndo(doc, sel, options) {
                        if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) {
                            sel = filterSelectionChange(doc, sel, options);
                        }
                        var bias = options && options.bias || (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
                        setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
                        if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption("readOnly") != "nocursor") {
                            ensureCursorVisible(doc.cm);
                        }
                    }

                    function setSelectionInner(doc, sel) {
                        if (sel.equals(doc.sel)) {
                            return;
                        }
                        doc.sel = sel;
                        if (doc.cm) {
                            doc.cm.curOp.updateInput = 1;
                            doc.cm.curOp.selectionChanged = true;
                            signalCursorActivity(doc.cm);
                        }
                        signalLater(doc, "cursorActivity", doc);
                    }

                    // Verify that the selection does not partially select any atomic
                    // marked ranges.
                    function reCheckSelection(doc) {
                        setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));
                    }

                    // Return a selection that does not partially select any atomic
                    // ranges.
                    function skipAtomicInSelection(doc, sel, bias, mayClear) {
                        var out;
                        for (var i = 0; i < sel.ranges.length; i++) {
                            var range = sel.ranges[i];
                            var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];
                            var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);
                            var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);
                            if (out || newAnchor != range.anchor || newHead != range.head) {
                                if (!out) {
                                    out = sel.ranges.slice(0, i);
                                }
                                out[i] = new Range(newAnchor, newHead);
                            }
                        }
                        return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel;
                    }

                    function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
                        var line = getLine(doc, pos.line);
                        if (line.markedSpans) {
                            for (var i = 0; i < line.markedSpans.length; ++i) {
                                var sp = line.markedSpans[i],
                                    m = sp.marker;

                                // Determine if we should prevent the cursor being placed to the left/right of an atomic marker
                                // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it
                                // is with selectLeft/Right
                                var preventCursorLeft = "selectLeft" in m ? !m.selectLeft : m.inclusiveLeft;
                                var preventCursorRight = "selectRight" in m ? !m.selectRight : m.inclusiveRight;
                                if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) && (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
                                    if (mayClear) {
                                        signal(m, "beforeCursorEnter");
                                        if (m.explicitlyCleared) {
                                            if (!line.markedSpans) {
                                                break;
                                            } else {
                                                --i;
                                                continue;
                                            }
                                        }
                                    }
                                    if (!m.atomic) {
                                        continue;
                                    }
                                    if (oldPos) {
                                        var near = m.find(dir < 0 ? 1 : -1),
                                            diff = void 0;
                                        if (dir < 0 ? preventCursorRight : preventCursorLeft) {
                                            near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null);
                                        }
                                        if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0)) {
                                            return skipAtomicInner(doc, near, pos, dir, mayClear);
                                        }
                                    }
                                    var far = m.find(dir < 0 ? -1 : 1);
                                    if (dir < 0 ? preventCursorLeft : preventCursorRight) {
                                        far = movePos(doc, far, dir, far.line == pos.line ? line : null);
                                    }
                                    return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null;
                                }
                            }
                        }
                        return pos;
                    }

                    // Ensure a given position is not inside an atomic range.
                    function skipAtomic(doc, pos, oldPos, bias, mayClear) {
                        var dir = bias || 1;
                        var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) || !mayClear && skipAtomicInner(doc, pos, oldPos, dir, true) || skipAtomicInner(doc, pos, oldPos, -dir, mayClear) || !mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true);
                        if (!found) {
                            doc.cantEdit = true;
                            return Pos(doc.first, 0);
                        }
                        return found;
                    }

                    function movePos(doc, pos, dir, line) {
                        if (dir < 0 && pos.ch == 0) {
                            if (pos.line > doc.first) {
                                return clipPos(doc, Pos(pos.line - 1));
                            } else {
                                return null;
                            }
                        } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {
                            if (pos.line < doc.first + doc.size - 1) {
                                return Pos(pos.line + 1, 0);
                            } else {
                                return null;
                            }
                        } else {
                            return new Pos(pos.line, pos.ch + dir);
                        }
                    }

                    function selectAll(cm) {
                        cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);
                    }

                    // UPDATING

                    // Allow "beforeChange" event handlers to influence a change
                    function filterChange(doc, change, update) {
                        var obj = {
                            canceled: false,
                            from: change.from,
                            to: change.to,
                            text: change.text,
                            origin: change.origin,
                            cancel: function() {
                                return obj.canceled = true;
                            }
                        };
                        if (update) {
                            obj.update = function(from, to, text, origin) {
                                if (from) {
                                    obj.from = clipPos(doc, from);
                                }
                                if (to) {
                                    obj.to = clipPos(doc, to);
                                }
                                if (text) {
                                    obj.text = text;
                                }
                                if (origin !== undefined) {
                                    obj.origin = origin;
                                }
                            };
                        }
                        signal(doc, "beforeChange", doc, obj);
                        if (doc.cm) {
                            signal(doc.cm, "beforeChange", doc.cm, obj);
                        }
                        if (obj.canceled) {
                            if (doc.cm) {
                                doc.cm.curOp.updateInput = 2;
                            }
                            return null;
                        }
                        return {
                            from: obj.from,
                            to: obj.to,
                            text: obj.text,
                            origin: obj.origin
                        };
                    }

                    // Apply a change to a document, and add it to the document's
                    // history, and propagating it to all linked documents.
                    function makeChange(doc, change, ignoreReadOnly) {
                        if (doc.cm) {
                            if (!doc.cm.curOp) {
                                return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);
                            }
                            if (doc.cm.state.suppressEdits) {
                                return;
                            }
                        }
                        if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
                            change = filterChange(doc, change, true);
                            if (!change) {
                                return;
                            }
                        }

                        // Possibly split or suppress the update based on the presence
                        // of read-only spans in its range.
                        var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
                        if (split) {
                            for (var i = split.length - 1; i >= 0; --i) {
                                makeChangeInner(doc, {
                                    from: split[i].from,
                                    to: split[i].to,
                                    text: i ? [""] : change.text,
                                    origin: change.origin
                                });
                            }
                        } else {
                            makeChangeInner(doc, change);
                        }
                    }

                    function makeChangeInner(doc, change) {
                        if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) {
                            return;
                        }
                        var selAfter = computeSelAfterChange(doc, change);
                        addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
                        makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
                        var rebased = [];
                        linkedDocs(doc, function(doc, sharedHist) {
                            if (!sharedHist && indexOf(rebased, doc.history) == -1) {
                                rebaseHist(doc.history, change);
                                rebased.push(doc.history);
                            }
                            makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
                        });
                    }

                    // Revert a change stored in a document's history.
                    function makeChangeFromHistory(doc, type, allowSelectionOnly) {
                        var suppress = doc.cm && doc.cm.state.suppressEdits;
                        if (suppress && !allowSelectionOnly) {
                            return;
                        }
                        var hist = doc.history,
                            event,
                            selAfter = doc.sel;
                        var source = type == "undo" ? hist.done : hist.undone,
                            dest = type == "undo" ? hist.undone : hist.done;

                        // Verify that there is a useable event (so that ctrl-z won't
                        // needlessly clear selection events)
                        var i = 0;
                        for (; i < source.length; i++) {
                            event = source[i];
                            if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) {
                                break;
                            }
                        }
                        if (i == source.length) {
                            return;
                        }
                        hist.lastOrigin = hist.lastSelOrigin = null;
                        for (;;) {
                            event = source.pop();
                            if (event.ranges) {
                                pushSelectionToHistory(event, dest);
                                if (allowSelectionOnly && !event.equals(doc.sel)) {
                                    setSelection(doc, event, {
                                        clearRedo: false
                                    });
                                    return;
                                }
                                selAfter = event;
                            } else if (suppress) {
                                source.push(event);
                                return;
                            } else {
                                break;
                            }
                        }

                        // Build up a reverse change object to add to the opposite history
                        // stack (redo when undoing, and vice versa).
                        var antiChanges = [];
                        pushSelectionToHistory(selAfter, dest);
                        dest.push({
                            changes: antiChanges,
                            generation: hist.generation
                        });
                        hist.generation = event.generation || ++hist.maxGeneration;
                        var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
                        var loop = function(i) {
                            var change = event.changes[i];
                            change.origin = type;
                            if (filter && !filterChange(doc, change, false)) {
                                source.length = 0;
                                return {};
                            }
                            antiChanges.push(historyChangeFromChange(doc, change));
                            var after = i ? computeSelAfterChange(doc, change) : lst(source);
                            makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
                            if (!i && doc.cm) {
                                doc.cm.scrollIntoView({
                                    from: change.from,
                                    to: changeEnd(change)
                                });
                            }
                            var rebased = [];

                            // Propagate to the linked documents
                            linkedDocs(doc, function(doc, sharedHist) {
                                if (!sharedHist && indexOf(rebased, doc.history) == -1) {
                                    rebaseHist(doc.history, change);
                                    rebased.push(doc.history);
                                }
                                makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
                            });
                        };
                        for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {
                            var returned = loop(i$1);
                            if (returned) return returned.v;
                        }
                    }

                    // Sub-views need their line numbers shifted when text is added
                    // above or below them in the parent document.
                    function shiftDoc(doc, distance) {
                        if (distance == 0) {
                            return;
                        }
                        doc.first += distance;
                        doc.sel = new Selection(map(doc.sel.ranges, function(range) {
                            return new Range(Pos(range.anchor.line + distance, range.anchor.ch), Pos(range.head.line + distance, range.head.ch));
                        }), doc.sel.primIndex);
                        if (doc.cm) {
                            regChange(doc.cm, doc.first, doc.first - distance, distance);
                            for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) {
                                regLineChange(doc.cm, l, "gutter");
                            }
                        }
                    }

                    // More lower-level change function, handling only a single document
                    // (not linked ones).
                    function makeChangeSingleDoc(doc, change, selAfter, spans) {
                        if (doc.cm && !doc.cm.curOp) {
                            return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);
                        }
                        if (change.to.line < doc.first) {
                            shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
                            return;
                        }
                        if (change.from.line > doc.lastLine()) {
                            return;
                        }

                        // Clip the change to the size of this doc
                        if (change.from.line < doc.first) {
                            var shift = change.text.length - 1 - (doc.first - change.from.line);
                            shiftDoc(doc, shift);
                            change = {
                                from: Pos(doc.first, 0),
                                to: Pos(change.to.line + shift, change.to.ch),
                                text: [lst(change.text)],
                                origin: change.origin
                            };
                        }
                        var last = doc.lastLine();
                        if (change.to.line > last) {
                            change = {
                                from: change.from,
                                to: Pos(last, getLine(doc, last).text.length),
                                text: [change.text[0]],
                                origin: change.origin
                            };
                        }
                        change.removed = getBetween(doc, change.from, change.to);
                        if (!selAfter) {
                            selAfter = computeSelAfterChange(doc, change);
                        }
                        if (doc.cm) {
                            makeChangeSingleDocInEditor(doc.cm, change, spans);
                        } else {
                            updateDoc(doc, change, spans);
                        }
                        setSelectionNoUndo(doc, selAfter, sel_dontScroll);
                        if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0))) {
                            doc.cantEdit = false;
                        }
                    }

                    // Handle the interaction of a change to a document with the editor
                    // that this document is part of.
                    function makeChangeSingleDocInEditor(cm, change, spans) {
                        var doc = cm.doc,
                            display = cm.display,
                            from = change.from,
                            to = change.to;
                        var recomputeMaxLength = false,
                            checkWidthStart = from.line;
                        if (!cm.options.lineWrapping) {
                            checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));
                            doc.iter(checkWidthStart, to.line + 1, function(line) {
                                if (line == display.maxLine) {
                                    recomputeMaxLength = true;
                                    return true;
                                }
                            });
                        }
                        if (doc.sel.contains(change.from, change.to) > -1) {
                            signalCursorActivity(cm);
                        }
                        updateDoc(doc, change, spans, estimateHeight(cm));
                        if (!cm.options.lineWrapping) {
                            doc.iter(checkWidthStart, from.line + change.text.length, function(line) {
                                var len = lineLength(line);
                                if (len > display.maxLineLength) {
                                    display.maxLine = line;
                                    display.maxLineLength = len;
                                    display.maxLineChanged = true;
                                    recomputeMaxLength = false;
                                }
                            });
                            if (recomputeMaxLength) {
                                cm.curOp.updateMaxLine = true;
                            }
                        }
                        retreatFrontier(doc, from.line);
                        startWorker(cm, 400);
                        var lendiff = change.text.length - (to.line - from.line) - 1;
                        // Remember that these lines changed, for updating the display
                        if (change.full) {
                            regChange(cm);
                        } else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) {
                            regLineChange(cm, from.line, "text");
                        } else {
                            regChange(cm, from.line, to.line + 1, lendiff);
                        }
                        var changesHandler = hasHandler(cm, "changes"),
                            changeHandler = hasHandler(cm, "change");
                        if (changeHandler || changesHandler) {
                            var obj = {
                                from: from,
                                to: to,
                                text: change.text,
                                removed: change.removed,
                                origin: change.origin
                            };
                            if (changeHandler) {
                                signalLater(cm, "change", cm, obj);
                            }
                            if (changesHandler) {
                                (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj);
                            }
                        }
                        cm.display.selForContextMenu = null;
                    }

                    function replaceRange(doc, code, from, to, origin) {
                        var assign;
                        if (!to) {
                            to = from;
                        }
                        if (cmp(to, from) < 0) {
                            assign = [to, from], from = assign[0], to = assign[1];
                        }
                        if (typeof code == "string") {
                            code = doc.splitLines(code);
                        }
                        makeChange(doc, {
                            from: from,
                            to: to,
                            text: code,
                            origin: origin
                        });
                    }

                    // Rebasing/resetting history to deal with externally-sourced changes

                    function rebaseHistSelSingle(pos, from, to, diff) {
                        if (to < pos.line) {
                            pos.line += diff;
                        } else if (from < pos.line) {
                            pos.line = from;
                            pos.ch = 0;
                        }
                    }

                    // Tries to rebase an array of history events given a change in the
                    // document. If the change touches the same lines as the event, the
                    // event, and everything 'behind' it, is discarded. If the change is
                    // before the event, the event's positions are updated. Uses a
                    // copy-on-write scheme for the positions, to avoid having to
                    // reallocate them all on every rebase, but also avoid problems with
                    // shared position objects being unsafely updated.
                    function rebaseHistArray(array, from, to, diff) {
                        for (var i = 0; i < array.length; ++i) {
                            var sub = array[i],
                                ok = true;
                            if (sub.ranges) {
                                if (!sub.copied) {
                                    sub = array[i] = sub.deepCopy();
                                    sub.copied = true;
                                }
                                for (var j = 0; j < sub.ranges.length; j++) {
                                    rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);
                                    rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);
                                }
                                continue;
                            }
                            for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {
                                var cur = sub.changes[j$1];
                                if (to < cur.from.line) {
                                    cur.from = Pos(cur.from.line + diff, cur.from.ch);
                                    cur.to = Pos(cur.to.line + diff, cur.to.ch);
                                } else if (from <= cur.to.line) {
                                    ok = false;
                                    break;
                                }
                            }
                            if (!ok) {
                                array.splice(0, i + 1);
                                i = 0;
                            }
                        }
                    }

                    function rebaseHist(hist, change) {
                        var from = change.from.line,
                            to = change.to.line,
                            diff = change.text.length - (to - from) - 1;
                        rebaseHistArray(hist.done, from, to, diff);
                        rebaseHistArray(hist.undone, from, to, diff);
                    }

                    // Utility for applying a change to a line by handle or number,
                    // returning the number and optionally registering the line as
                    // changed.
                    function changeLine(doc, handle, changeType, op) {
                        var no = handle,
                            line = handle;
                        if (typeof handle == "number") {
                            line = getLine(doc, clipLine(doc, handle));
                        } else {
                            no = lineNo(handle);
                        }
                        if (no == null) {
                            return null;
                        }
                        if (op(line, no) && doc.cm) {
                            regLineChange(doc.cm, no, changeType);
                        }
                        return line;
                    }

                    // The document is represented as a BTree consisting of leaves, with
                    // chunk of lines in them, and branches, with up to ten leaves or
                    // other branch nodes below them. The top node is always a branch
                    // node, and is the document object itself (meaning it has
                    // additional methods and properties).
                    //
                    // All nodes have parent links. The tree is used both to go from
                    // line numbers to line objects, and to go from objects to numbers.
                    // It also indexes by height, and is used to convert between height
                    // and line object, and to find the total height of the document.
                    //
                    // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html

                    function LeafChunk(lines) {
                        this.lines = lines;
                        this.parent = null;
                        var height = 0;
                        for (var i = 0; i < lines.length; ++i) {
                            lines[i].parent = this;
                            height += lines[i].height;
                        }
                        this.height = height;
                    }
                    LeafChunk.prototype = {
                        chunkSize: function() {
                            return this.lines.length;
                        },
                        // Remove the n lines at offset 'at'.
                        removeInner: function(at, n) {
                            for (var i = at, e = at + n; i < e; ++i) {
                                var line = this.lines[i];
                                this.height -= line.height;
                                cleanUpLine(line);
                                signalLater(line, "delete");
                            }
                            this.lines.splice(at, n);
                        },
                        // Helper used to collapse a small branch into a single leaf.
                        collapse: function(lines) {
                            lines.push.apply(lines, this.lines);
                        },
                        // Insert the given array of lines at offset 'at', count them as
                        // having the given height.
                        insertInner: function(at, lines, height) {
                            this.height += height;
                            this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
                            for (var i = 0; i < lines.length; ++i) {
                                lines[i].parent = this;
                            }
                        },
                        // Used to iterate over a part of the tree.
                        iterN: function(at, n, op) {
                            for (var e = at + n; at < e; ++at) {
                                if (op(this.lines[at])) {
                                    return true;
                                }
                            }
                        }
                    };

                    function BranchChunk(children) {
                        this.children = children;
                        var size = 0,
                            height = 0;
                        for (var i = 0; i < children.length; ++i) {
                            var ch = children[i];
                            size += ch.chunkSize();
                            height += ch.height;
                            ch.parent = this;
                        }
                        this.size = size;
                        this.height = height;
                        this.parent = null;
                    }
                    BranchChunk.prototype = {
                        chunkSize: function() {
                            return this.size;
                        },
                        removeInner: function(at, n) {
                            this.size -= n;
                            for (var i = 0; i < this.children.length; ++i) {
                                var child = this.children[i],
                                    sz = child.chunkSize();
                                if (at < sz) {
                                    var rm = Math.min(n, sz - at),
                                        oldHeight = child.height;
                                    child.removeInner(at, rm);
                                    this.height -= oldHeight - child.height;
                                    if (sz == rm) {
                                        this.children.splice(i--, 1);
                                        child.parent = null;
                                    }
                                    if ((n -= rm) == 0) {
                                        break;
                                    }
                                    at = 0;
                                } else {
                                    at -= sz;
                                }
                            }
                            // If the result is smaller than 25 lines, ensure that it is a
                            // single leaf node.
                            if (this.size - n < 25 && (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {
                                var lines = [];
                                this.collapse(lines);
                                this.children = [new LeafChunk(lines)];
                                this.children[0].parent = this;
                            }
                        },
                        collapse: function(lines) {
                            for (var i = 0; i < this.children.length; ++i) {
                                this.children[i].collapse(lines);
                            }
                        },
                        insertInner: function(at, lines, height) {
                            this.size += lines.length;
                            this.height += height;
                            for (var i = 0; i < this.children.length; ++i) {
                                var child = this.children[i],
                                    sz = child.chunkSize();
                                if (at <= sz) {
                                    child.insertInner(at, lines, height);
                                    if (child.lines && child.lines.length > 50) {
                                        // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.
                                        // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.
                                        var remaining = child.lines.length % 25 + 25;
                                        for (var pos = remaining; pos < child.lines.length;) {
                                            var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));
                                            child.height -= leaf.height;
                                            this.children.splice(++i, 0, leaf);
                                            leaf.parent = this;
                                        }
                                        child.lines = child.lines.slice(0, remaining);
                                        this.maybeSpill();
                                    }
                                    break;
                                }
                                at -= sz;
                            }
                        },
                        // When a node has grown, check whether it should be split.
                        maybeSpill: function() {
                            if (this.children.length <= 10) {
                                return;
                            }
                            var me = this;
                            do {
                                var spilled = me.children.splice(me.children.length - 5, 5);
                                var sibling = new BranchChunk(spilled);
                                if (!me.parent) {
                                    // Become the parent node
                                    var copy = new BranchChunk(me.children);
                                    copy.parent = me;
                                    me.children = [copy, sibling];
                                    me = copy;
                                } else {
                                    me.size -= sibling.size;
                                    me.height -= sibling.height;
                                    var myIndex = indexOf(me.parent.children, me);
                                    me.parent.children.splice(myIndex + 1, 0, sibling);
                                }
                                sibling.parent = me.parent;
                            } while (me.children.length > 10);
                            me.parent.maybeSpill();
                        },
                        iterN: function(at, n, op) {
                            for (var i = 0; i < this.children.length; ++i) {
                                var child = this.children[i],
                                    sz = child.chunkSize();
                                if (at < sz) {
                                    var used = Math.min(n, sz - at);
                                    if (child.iterN(at, used, op)) {
                                        return true;
                                    }
                                    if ((n -= used) == 0) {
                                        break;
                                    }
                                    at = 0;
                                } else {
                                    at -= sz;
                                }
                            }
                        }
                    };

                    // Line widgets are block elements displayed above or below a line.

                    var LineWidget = function(doc, node, options) {
                        if (options) {
                            for (var opt in options) {
                                if (options.hasOwnProperty(opt)) {
                                    this[opt] = options[opt];
                                }
                            }
                        }
                        this.doc = doc;
                        this.node = node;
                    };
                    LineWidget.prototype.clear = function() {
                        var cm = this.doc.cm,
                            ws = this.line.widgets,
                            line = this.line,
                            no = lineNo(line);
                        if (no == null || !ws) {
                            return;
                        }
                        for (var i = 0; i < ws.length; ++i) {
                            if (ws[i] == this) {
                                ws.splice(i--, 1);
                            }
                        }
                        if (!ws.length) {
                            line.widgets = null;
                        }
                        var height = widgetHeight(this);
                        updateLineHeight(line, Math.max(0, line.height - height));
                        if (cm) {
                            runInOp(cm, function() {
                                adjustScrollWhenAboveVisible(cm, line, -height);
                                regLineChange(cm, no, "widget");
                            });
                            signalLater(cm, "lineWidgetCleared", cm, this, no);
                        }
                    };
                    LineWidget.prototype.changed = function() {
                        var this$1 = this;
                        var oldH = this.height,
                            cm = this.doc.cm,
                            line = this.line;
                        this.height = null;
                        var diff = widgetHeight(this) - oldH;
                        if (!diff) {
                            return;
                        }
                        if (!lineIsHidden(this.doc, line)) {
                            updateLineHeight(line, line.height + diff);
                        }
                        if (cm) {
                            runInOp(cm, function() {
                                cm.curOp.forceUpdate = true;
                                adjustScrollWhenAboveVisible(cm, line, diff);
                                signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line));
                            });
                        }
                    };
                    eventMixin(LineWidget);

                    function adjustScrollWhenAboveVisible(cm, line, diff) {
                        if (heightAtLine(line) < (cm.curOp && cm.curOp.scrollTop || cm.doc.scrollTop)) {
                            addToScrollTop(cm, diff);
                        }
                    }

                    function addLineWidget(doc, handle, node, options) {
                        var widget = new LineWidget(doc, node, options);
                        var cm = doc.cm;
                        if (cm && widget.noHScroll) {
                            cm.display.alignWidgets = true;
                        }
                        changeLine(doc, handle, "widget", function(line) {
                            var widgets = line.widgets || (line.widgets = []);
                            if (widget.insertAt == null) {
                                widgets.push(widget);
                            } else {
                                widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget);
                            }
                            widget.line = line;
                            if (cm && !lineIsHidden(doc, line)) {
                                var aboveVisible = heightAtLine(line) < doc.scrollTop;
                                updateLineHeight(line, line.height + widgetHeight(widget));
                                if (aboveVisible) {
                                    addToScrollTop(cm, widget.height);
                                }
                                cm.curOp.forceUpdate = true;
                            }
                            return true;
                        });
                        if (cm) {
                            signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle));
                        }
                        return widget;
                    }

                    // TEXTMARKERS

                    // Created with markText and setBookmark methods. A TextMarker is a
                    // handle that can be used to clear or find a marked position in the
                    // document. Line objects hold arrays (markedSpans) containing
                    // {from, to, marker} object pointing to such marker objects, and
                    // indicating that such a marker is present on that line. Multiple
                    // lines may point to the same marker when it spans across lines.
                    // The spans will have null for their from/to properties when the
                    // marker continues beyond the start/end of the line. Markers have
                    // links back to the lines they currently touch.

                    // Collapsed markers have unique ids, in order to be able to order
                    // them, which is needed for uniquely determining an outer marker
                    // when they overlap (they may nest, but not partially overlap).
                    var nextMarkerId = 0;
                    var TextMarker = function(doc, type) {
                        this.lines = [];
                        this.type = type;
                        this.doc = doc;
                        this.id = ++nextMarkerId;
                    };

                    // Clear the marker.
                    TextMarker.prototype.clear = function() {
                        if (this.explicitlyCleared) {
                            return;
                        }
                        var cm = this.doc.cm,
                            withOp = cm && !cm.curOp;
                        if (withOp) {
                            startOperation(cm);
                        }
                        if (hasHandler(this, "clear")) {
                            var found = this.find();
                            if (found) {
                                signalLater(this, "clear", found.from, found.to);
                            }
                        }
                        var min = null,
                            max = null;
                        for (var i = 0; i < this.lines.length; ++i) {
                            var line = this.lines[i];
                            var span = getMarkedSpanFor(line.markedSpans, this);
                            if (cm && !this.collapsed) {
                                regLineChange(cm, lineNo(line), "text");
                            } else if (cm) {
                                if (span.to != null) {
                                    max = lineNo(line);
                                }
                                if (span.from != null) {
                                    min = lineNo(line);
                                }
                            }
                            line.markedSpans = removeMarkedSpan(line.markedSpans, span);
                            if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) {
                                updateLineHeight(line, textHeight(cm.display));
                            }
                        }
                        if (cm && this.collapsed && !cm.options.lineWrapping) {
                            for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {
                                var visual = visualLine(this.lines[i$1]),
                                    len = lineLength(visual);
                                if (len > cm.display.maxLineLength) {
                                    cm.display.maxLine = visual;
                                    cm.display.maxLineLength = len;
                                    cm.display.maxLineChanged = true;
                                }
                            }
                        }
                        if (min != null && cm && this.collapsed) {
                            regChange(cm, min, max + 1);
                        }
                        this.lines.length = 0;
                        this.explicitlyCleared = true;
                        if (this.atomic && this.doc.cantEdit) {
                            this.doc.cantEdit = false;
                            if (cm) {
                                reCheckSelection(cm.doc);
                            }
                        }
                        if (cm) {
                            signalLater(cm, "markerCleared", cm, this, min, max);
                        }
                        if (withOp) {
                            endOperation(cm);
                        }
                        if (this.parent) {
                            this.parent.clear();
                        }
                    };

                    // Find the position of the marker in the document. Returns a {from,
                    // to} object by default. Side can be passed to get a specific side
                    // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the
                    // Pos objects returned contain a line object, rather than a line
                    // number (used to prevent looking up the same line twice).
                    TextMarker.prototype.find = function(side, lineObj) {
                        if (side == null && this.type == "bookmark") {
                            side = 1;
                        }
                        var from, to;
                        for (var i = 0; i < this.lines.length; ++i) {
                            var line = this.lines[i];
                            var span = getMarkedSpanFor(line.markedSpans, this);
                            if (span.from != null) {
                                from = Pos(lineObj ? line : lineNo(line), span.from);
                                if (side == -1) {
                                    return from;
                                }
                            }
                            if (span.to != null) {
                                to = Pos(lineObj ? line : lineNo(line), span.to);
                                if (side == 1) {
                                    return to;
                                }
                            }
                        }
                        return from && {
                            from: from,
                            to: to
                        };
                    };

                    // Signals that the marker's widget changed, and surrounding layout
                    // should be recomputed.
                    TextMarker.prototype.changed = function() {
                        var this$1 = this;
                        var pos = this.find(-1, true),
                            widget = this,
                            cm = this.doc.cm;
                        if (!pos || !cm) {
                            return;
                        }
                        runInOp(cm, function() {
                            var line = pos.line,
                                lineN = lineNo(pos.line);
                            var view = findViewForLine(cm, lineN);
                            if (view) {
                                clearLineMeasurementCacheFor(view);
                                cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;
                            }
                            cm.curOp.updateMaxLine = true;
                            if (!lineIsHidden(widget.doc, line) && widget.height != null) {
                                var oldHeight = widget.height;
                                widget.height = null;
                                var dHeight = widgetHeight(widget) - oldHeight;
                                if (dHeight) {
                                    updateLineHeight(line, line.height + dHeight);
                                }
                            }
                            signalLater(cm, "markerChanged", cm, this$1);
                        });
                    };
                    TextMarker.prototype.attachLine = function(line) {
                        if (!this.lines.length && this.doc.cm) {
                            var op = this.doc.cm.curOp;
                            if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) {
                                (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);
                            }
                        }
                        this.lines.push(line);
                    };
                    TextMarker.prototype.detachLine = function(line) {
                        this.lines.splice(indexOf(this.lines, line), 1);
                        if (!this.lines.length && this.doc.cm) {
                            var op = this.doc.cm.curOp;
                            (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
                        }
                    };
                    eventMixin(TextMarker);

                    // Create a marker, wire it up to the right lines, and
                    function markText(doc, from, to, options, type) {
                        // Shared markers (across linked documents) are handled separately
                        // (markTextShared will call out to this again, once per
                        // document).
                        if (options && options.shared) {
                            return markTextShared(doc, from, to, options, type);
                        }
                        // Ensure we are in an operation.
                        if (doc.cm && !doc.cm.curOp) {
                            return operation(doc.cm, markText)(doc, from, to, options, type);
                        }
                        var marker = new TextMarker(doc, type),
                            diff = cmp(from, to);
                        if (options) {
                            copyObj(options, marker, false);
                        }
                        // Don't connect empty markers unless clearWhenEmpty is false
                        if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) {
                            return marker;
                        }
                        if (marker.replacedWith) {
                            // Showing up as a widget implies collapsed (widget replaces text)
                            marker.collapsed = true;
                            marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget");
                            if (!options.handleMouseEvents) {
                                marker.widgetNode.setAttribute("cm-ignore-events", "true");
                            }
                            if (options.insertLeft) {
                                marker.widgetNode.insertLeft = true;
                            }
                        }
                        if (marker.collapsed) {
                            if (conflictingCollapsedRange(doc, from.line, from, to, marker) || from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) {
                                throw new Error("Inserting collapsed marker partially overlapping an existing one");
                            }
                            seeCollapsedSpans();
                        }
                        if (marker.addToHistory) {
                            addChangeToHistory(doc, {
                                from: from,
                                to: to,
                                origin: "markText"
                            }, doc.sel, NaN);
                        }
                        var curLine = from.line,
                            cm = doc.cm,
                            updateMaxLine;
                        doc.iter(curLine, to.line + 1, function(line) {
                            if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) {
                                updateMaxLine = true;
                            }
                            if (marker.collapsed && curLine != from.line) {
                                updateLineHeight(line, 0);
                            }
                            addMarkedSpan(line, new MarkedSpan(marker, curLine == from.line ? from.ch : null, curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp);
                            ++curLine;
                        });
                        // lineIsHidden depends on the presence of the spans, so needs a second pass
                        if (marker.collapsed) {
                            doc.iter(from.line, to.line + 1, function(line) {
                                if (lineIsHidden(doc, line)) {
                                    updateLineHeight(line, 0);
                                }
                            });
                        }
                        if (marker.clearOnEnter) {
                            on(marker, "beforeCursorEnter", function() {
                                return marker.clear();
                            });
                        }
                        if (marker.readOnly) {
                            seeReadOnlySpans();
                            if (doc.history.done.length || doc.history.undone.length) {
                                doc.clearHistory();
                            }
                        }
                        if (marker.collapsed) {
                            marker.id = ++nextMarkerId;
                            marker.atomic = true;
                        }
                        if (cm) {
                            // Sync editor state
                            if (updateMaxLine) {
                                cm.curOp.updateMaxLine = true;
                            }
                            if (marker.collapsed) {
                                regChange(cm, from.line, to.line + 1);
                            } else if (marker.className || marker.startStyle || marker.endStyle || marker.css || marker.attributes || marker.title) {
                                for (var i = from.line; i <= to.line; i++) {
                                    regLineChange(cm, i, "text");
                                }
                            }
                            if (marker.atomic) {
                                reCheckSelection(cm.doc);
                            }
                            signalLater(cm, "markerAdded", cm, marker);
                        }
                        return marker;
                    }

                    // SHARED TEXTMARKERS

                    // A shared marker spans multiple linked documents. It is
                    // implemented as a meta-marker-object controlling multiple normal
                    // markers.
                    var SharedTextMarker = function(markers, primary) {
                        this.markers = markers;
                        this.primary = primary;
                        for (var i = 0; i < markers.length; ++i) {
                            markers[i].parent = this;
                        }
                    };
                    SharedTextMarker.prototype.clear = function() {
                        if (this.explicitlyCleared) {
                            return;
                        }
                        this.explicitlyCleared = true;
                        for (var i = 0; i < this.markers.length; ++i) {
                            this.markers[i].clear();
                        }
                        signalLater(this, "clear");
                    };
                    SharedTextMarker.prototype.find = function(side, lineObj) {
                        return this.primary.find(side, lineObj);
                    };
                    eventMixin(SharedTextMarker);

                    function markTextShared(doc, from, to, options, type) {
                        options = copyObj(options);
                        options.shared = false;
                        var markers = [markText(doc, from, to, options, type)],
                            primary = markers[0];
                        var widget = options.widgetNode;
                        linkedDocs(doc, function(doc) {
                            if (widget) {
                                options.widgetNode = widget.cloneNode(true);
                            }
                            markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
                            for (var i = 0; i < doc.linked.length; ++i) {
                                if (doc.linked[i].isParent) {
                                    return;
                                }
                            }
                            primary = lst(markers);
                        });
                        return new SharedTextMarker(markers, primary);
                    }

                    function findSharedMarkers(doc) {
                        return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function(m) {
                            return m.parent;
                        });
                    }

                    function copySharedMarkers(doc, markers) {
                        for (var i = 0; i < markers.length; i++) {
                            var marker = markers[i],
                                pos = marker.find();
                            var mFrom = doc.clipPos(pos.from),
                                mTo = doc.clipPos(pos.to);
                            if (cmp(mFrom, mTo)) {
                                var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);
                                marker.markers.push(subMark);
                                subMark.parent = marker;
                            }
                        }
                    }

                    function detachSharedMarkers(markers) {
                        var loop = function(i) {
                            var marker = markers[i],
                                linked = [marker.primary.doc];
                            linkedDocs(marker.primary.doc, function(d) {
                                return linked.push(d);
                            });
                            for (var j = 0; j < marker.markers.length; j++) {
                                var subMarker = marker.markers[j];
                                if (indexOf(linked, subMarker.doc) == -1) {
                                    subMarker.parent = null;
                                    marker.markers.splice(j--, 1);
                                }
                            }
                        };
                        for (var i = 0; i < markers.length; i++) loop(i);
                    }
                    var nextDocId = 0;
                    var Doc = function(text, mode, firstLine, lineSep, direction) {
                        if (!(this instanceof Doc)) {
                            return new Doc(text, mode, firstLine, lineSep, direction);
                        }
                        if (firstLine == null) {
                            firstLine = 0;
                        }
                        BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
                        this.first = firstLine;
                        this.scrollTop = this.scrollLeft = 0;
                        this.cantEdit = false;
                        this.cleanGeneration = 1;
                        this.modeFrontier = this.highlightFrontier = firstLine;
                        var start = Pos(firstLine, 0);
                        this.sel = simpleSelection(start);
                        this.history = new History(null);
                        this.id = ++nextDocId;
                        this.modeOption = mode;
                        this.lineSep = lineSep;
                        this.direction = direction == "rtl" ? "rtl" : "ltr";
                        this.extend = false;
                        if (typeof text == "string") {
                            text = this.splitLines(text);
                        }
                        updateDoc(this, {
                            from: start,
                            to: start,
                            text: text
                        });
                        setSelection(this, simpleSelection(start), sel_dontScroll);
                    };
                    Doc.prototype = createObj(BranchChunk.prototype, {
                        constructor: Doc,
                        // Iterate over the document. Supports two forms -- with only one
                        // argument, it calls that for each line in the document. With
                        // three, it iterates over the range given by the first two (with
                        // the second being non-inclusive).
                        iter: function(from, to, op) {
                            if (op) {
                                this.iterN(from - this.first, to - from, op);
                            } else {
                                this.iterN(this.first, this.first + this.size, from);
                            }
                        },
                        // Non-public interface for adding and removing lines.
                        insert: function(at, lines) {
                            var height = 0;
                            for (var i = 0; i < lines.length; ++i) {
                                height += lines[i].height;
                            }
                            this.insertInner(at - this.first, lines, height);
                        },
                        remove: function(at, n) {
                            this.removeInner(at - this.first, n);
                        },
                        // From here, the methods are part of the public interface. Most
                        // are also available from CodeMirror (editor) instances.

                        getValue: function(lineSep) {
                            var lines = getLines(this, this.first, this.first + this.size);
                            if (lineSep === false) {
                                return lines;
                            }
                            return lines.join(lineSep || this.lineSeparator());
                        },
                        setValue: docMethodOp(function(code) {
                            var top = Pos(this.first, 0),
                                last = this.first + this.size - 1;
                            makeChange(this, {
                                from: top,
                                to: Pos(last, getLine(this, last).text.length),
                                text: this.splitLines(code),
                                origin: "setValue",
                                full: true
                            }, true);
                            if (this.cm) {
                                scrollToCoords(this.cm, 0, 0);
                            }
                            setSelection(this, simpleSelection(top), sel_dontScroll);
                        }),
                        replaceRange: function(code, from, to, origin) {
                            from = clipPos(this, from);
                            to = to ? clipPos(this, to) : from;
                            replaceRange(this, code, from, to, origin);
                        },
                        getRange: function(from, to, lineSep) {
                            var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
                            if (lineSep === false) {
                                return lines;
                            }
                            if (lineSep === '') {
                                return lines.join('');
                            }
                            return lines.join(lineSep || this.lineSeparator());
                        },
                        getLine: function(line) {
                            var l = this.getLineHandle(line);
                            return l && l.text;
                        },
                        getLineHandle: function(line) {
                            if (isLine(this, line)) {
                                return getLine(this, line);
                            }
                        },
                        getLineNumber: function(line) {
                            return lineNo(line);
                        },
                        getLineHandleVisualStart: function(line) {
                            if (typeof line == "number") {
                                line = getLine(this, line);
                            }
                            return visualLine(line);
                        },
                        lineCount: function() {
                            return this.size;
                        },
                        firstLine: function() {
                            return this.first;
                        },
                        lastLine: function() {
                            return this.first + this.size - 1;
                        },
                        clipPos: function(pos) {
                            return clipPos(this, pos);
                        },
                        getCursor: function(start) {
                            var range = this.sel.primary(),
                                pos;
                            if (start == null || start == "head") {
                                pos = range.head;
                            } else if (start == "anchor") {
                                pos = range.anchor;
                            } else if (start == "end" || start == "to" || start === false) {
                                pos = range.to();
                            } else {
                                pos = range.from();
                            }
                            return pos;
                        },
                        listSelections: function() {
                            return this.sel.ranges;
                        },
                        somethingSelected: function() {
                            return this.sel.somethingSelected();
                        },
                        setCursor: docMethodOp(function(line, ch, options) {
                            setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options);
                        }),
                        setSelection: docMethodOp(function(anchor, head, options) {
                            setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);
                        }),
                        extendSelection: docMethodOp(function(head, other, options) {
                            extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);
                        }),
                        extendSelections: docMethodOp(function(heads, options) {
                            extendSelections(this, clipPosArray(this, heads), options);
                        }),
                        extendSelectionsBy: docMethodOp(function(f, options) {
                            var heads = map(this.sel.ranges, f);
                            extendSelections(this, clipPosArray(this, heads), options);
                        }),
                        setSelections: docMethodOp(function(ranges, primary, options) {
                            if (!ranges.length) {
                                return;
                            }
                            var out = [];
                            for (var i = 0; i < ranges.length; i++) {
                                out[i] = new Range(clipPos(this, ranges[i].anchor), clipPos(this, ranges[i].head || ranges[i].anchor));
                            }
                            if (primary == null) {
                                primary = Math.min(ranges.length - 1, this.sel.primIndex);
                            }
                            setSelection(this, normalizeSelection(this.cm, out, primary), options);
                        }),
                        addSelection: docMethodOp(function(anchor, head, options) {
                            var ranges = this.sel.ranges.slice(0);
                            ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));
                            setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);
                        }),
                        getSelection: function(lineSep) {
                            var ranges = this.sel.ranges,
                                lines;
                            for (var i = 0; i < ranges.length; i++) {
                                var sel = getBetween(this, ranges[i].from(), ranges[i].to());
                                lines = lines ? lines.concat(sel) : sel;
                            }
                            if (lineSep === false) {
                                return lines;
                            } else {
                                return lines.join(lineSep || this.lineSeparator());
                            }
                        },
                        getSelections: function(lineSep) {
                            var parts = [],
                                ranges = this.sel.ranges;
                            for (var i = 0; i < ranges.length; i++) {
                                var sel = getBetween(this, ranges[i].from(), ranges[i].to());
                                if (lineSep !== false) {
                                    sel = sel.join(lineSep || this.lineSeparator());
                                }
                                parts[i] = sel;
                            }
                            return parts;
                        },
                        replaceSelection: function(code, collapse, origin) {
                            var dup = [];
                            for (var i = 0; i < this.sel.ranges.length; i++) {
                                dup[i] = code;
                            }
                            this.replaceSelections(dup, collapse, origin || "+input");
                        },
                        replaceSelections: docMethodOp(function(code, collapse, origin) {
                            var changes = [],
                                sel = this.sel;
                            for (var i = 0; i < sel.ranges.length; i++) {
                                var range = sel.ranges[i];
                                changes[i] = {
                                    from: range.from(),
                                    to: range.to(),
                                    text: this.splitLines(code[i]),
                                    origin: origin
                                };
                            }
                            var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);
                            for (var i$1 = changes.length - 1; i$1 >= 0; i$1--) {
                                makeChange(this, changes[i$1]);
                            }
                            if (newSel) {
                                setSelectionReplaceHistory(this, newSel);
                            } else if (this.cm) {
                                ensureCursorVisible(this.cm);
                            }
                        }),
                        undo: docMethodOp(function() {
                            makeChangeFromHistory(this, "undo");
                        }),
                        redo: docMethodOp(function() {
                            makeChangeFromHistory(this, "redo");
                        }),
                        undoSelection: docMethodOp(function() {
                            makeChangeFromHistory(this, "undo", true);
                        }),
                        redoSelection: docMethodOp(function() {
                            makeChangeFromHistory(this, "redo", true);
                        }),
                        setExtending: function(val) {
                            this.extend = val;
                        },
                        getExtending: function() {
                            return this.extend;
                        },
                        historySize: function() {
                            var hist = this.history,
                                done = 0,
                                undone = 0;
                            for (var i = 0; i < hist.done.length; i++) {
                                if (!hist.done[i].ranges) {
                                    ++done;
                                }
                            }
                            for (var i$1 = 0; i$1 < hist.undone.length; i$1++) {
                                if (!hist.undone[i$1].ranges) {
                                    ++undone;
                                }
                            }
                            return {
                                undo: done,
                                redo: undone
                            };
                        },
                        clearHistory: function() {
                            var this$1 = this;
                            this.history = new History(this.history);
                            linkedDocs(this, function(doc) {
                                return doc.history = this$1.history;
                            }, true);
                        },
                        markClean: function() {
                            this.cleanGeneration = this.changeGeneration(true);
                        },
                        changeGeneration: function(forceSplit) {
                            if (forceSplit) {
                                this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null;
                            }
                            return this.history.generation;
                        },
                        isClean: function(gen) {
                            return this.history.generation == (gen || this.cleanGeneration);
                        },
                        getHistory: function() {
                            return {
                                done: copyHistoryArray(this.history.done),
                                undone: copyHistoryArray(this.history.undone)
                            };
                        },
                        setHistory: function(histData) {
                            var hist = this.history = new History(this.history);
                            hist.done = copyHistoryArray(histData.done.slice(0), null, true);
                            hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);
                        },
                        setGutterMarker: docMethodOp(function(line, gutterID, value) {
                            return changeLine(this, line, "gutter", function(line) {
                                var markers = line.gutterMarkers || (line.gutterMarkers = {});
                                markers[gutterID] = value;
                                if (!value && isEmpty(markers)) {
                                    line.gutterMarkers = null;
                                }
                                return true;
                            });
                        }),
                        clearGutter: docMethodOp(function(gutterID) {
                            var this$1 = this;
                            this.iter(function(line) {
                                if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
                                    changeLine(this$1, line, "gutter", function() {
                                        line.gutterMarkers[gutterID] = null;
                                        if (isEmpty(line.gutterMarkers)) {
                                            line.gutterMarkers = null;
                                        }
                                        return true;
                                    });
                                }
                            });
                        }),
                        lineInfo: function(line) {
                            var n;
                            if (typeof line == "number") {
                                if (!isLine(this, line)) {
                                    return null;
                                }
                                n = line;
                                line = getLine(this, line);
                                if (!line) {
                                    return null;
                                }
                            } else {
                                n = lineNo(line);
                                if (n == null) {
                                    return null;
                                }
                            }
                            return {
                                line: n,
                                handle: line,
                                text: line.text,
                                gutterMarkers: line.gutterMarkers,
                                textClass: line.textClass,
                                bgClass: line.bgClass,
                                wrapClass: line.wrapClass,
                                widgets: line.widgets
                            };
                        },
                        addLineClass: docMethodOp(function(handle, where, cls) {
                            return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) {
                                var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : where == "gutter" ? "gutterClass" : "wrapClass";
                                if (!line[prop]) {
                                    line[prop] = cls;
                                } else if (classTest(cls).test(line[prop])) {
                                    return false;
                                } else {
                                    line[prop] += " " + cls;
                                }
                                return true;
                            });
                        }),
                        removeLineClass: docMethodOp(function(handle, where, cls) {
                            return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) {
                                var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : where == "gutter" ? "gutterClass" : "wrapClass";
                                var cur = line[prop];
                                if (!cur) {
                                    return false;
                                } else if (cls == null) {
                                    line[prop] = null;
                                } else {
                                    var found = cur.match(classTest(cls));
                                    if (!found) {
                                        return false;
                                    }
                                    var end = found.index + found[0].length;
                                    line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
                                }
                                return true;
                            });
                        }),
                        addLineWidget: docMethodOp(function(handle, node, options) {
                            return addLineWidget(this, handle, node, options);
                        }),
                        removeLineWidget: function(widget) {
                            widget.clear();
                        },
                        markText: function(from, to, options) {
                            return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range");
                        },
                        setBookmark: function(pos, options) {
                            var realOpts = {
                                replacedWith: options && (options.nodeType == null ? options.widget : options),
                                insertLeft: options && options.insertLeft,
                                clearWhenEmpty: false,
                                shared: options && options.shared,
                                handleMouseEvents: options && options.handleMouseEvents
                            };
                            pos = clipPos(this, pos);
                            return markText(this, pos, pos, realOpts, "bookmark");
                        },
                        findMarksAt: function(pos) {
                            pos = clipPos(this, pos);
                            var markers = [],
                                spans = getLine(this, pos.line).markedSpans;
                            if (spans) {
                                for (var i = 0; i < spans.length; ++i) {
                                    var span = spans[i];
                                    if ((span.from == null || span.from <= pos.ch) && (span.to == null || span.to >= pos.ch)) {
                                        markers.push(span.marker.parent || span.marker);
                                    }
                                }
                            }
                            return markers;
                        },
                        findMarks: function(from, to, filter) {
                            from = clipPos(this, from);
                            to = clipPos(this, to);
                            var found = [],
                                lineNo = from.line;
                            this.iter(from.line, to.line + 1, function(line) {
                                var spans = line.markedSpans;
                                if (spans) {
                                    for (var i = 0; i < spans.length; i++) {
                                        var span = spans[i];
                                        if (!(span.to != null && lineNo == from.line && from.ch >= span.to || span.from == null && lineNo != from.line || span.from != null && lineNo == to.line && span.from >= to.ch) && (!filter || filter(span.marker))) {
                                            found.push(span.marker.parent || span.marker);
                                        }
                                    }
                                }
                                ++lineNo;
                            });
                            return found;
                        },
                        getAllMarks: function() {
                            var markers = [];
                            this.iter(function(line) {
                                var sps = line.markedSpans;
                                if (sps) {
                                    for (var i = 0; i < sps.length; ++i) {
                                        if (sps[i].from != null) {
                                            markers.push(sps[i].marker);
                                        }
                                    }
                                }
                            });
                            return markers;
                        },
                        posFromIndex: function(off) {
                            var ch,
                                lineNo = this.first,
                                sepSize = this.lineSeparator().length;
                            this.iter(function(line) {
                                var sz = line.text.length + sepSize;
                                if (sz > off) {
                                    ch = off;
                                    return true;
                                }
                                off -= sz;
                                ++lineNo;
                            });
                            return clipPos(this, Pos(lineNo, ch));
                        },
                        indexFromPos: function(coords) {
                            coords = clipPos(this, coords);
                            var index = coords.ch;
                            if (coords.line < this.first || coords.ch < 0) {
                                return 0;
                            }
                            var sepSize = this.lineSeparator().length;
                            this.iter(this.first, coords.line, function(line) {
                                // iter aborts when callback returns a truthy value
                                index += line.text.length + sepSize;
                            });
                            return index;
                        },
                        copy: function(copyHistory) {
                            var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first, this.lineSep, this.direction);
                            doc.scrollTop = this.scrollTop;
                            doc.scrollLeft = this.scrollLeft;
                            doc.sel = this.sel;
                            doc.extend = false;
                            if (copyHistory) {
                                doc.history.undoDepth = this.history.undoDepth;
                                doc.setHistory(this.getHistory());
                            }
                            return doc;
                        },
                        linkedDoc: function(options) {
                            if (!options) {
                                options = {};
                            }
                            var from = this.first,
                                to = this.first + this.size;
                            if (options.from != null && options.from > from) {
                                from = options.from;
                            }
                            if (options.to != null && options.to < to) {
                                to = options.to;
                            }
                            var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);
                            if (options.sharedHist) {
                                copy.history = this.history;
                            }
                            (this.linked || (this.linked = [])).push({
                                doc: copy,
                                sharedHist: options.sharedHist
                            });
                            copy.linked = [{
                                doc: this,
                                isParent: true,
                                sharedHist: options.sharedHist
                            }];
                            copySharedMarkers(copy, findSharedMarkers(this));
                            return copy;
                        },
                        unlinkDoc: function(other) {
                            if (other instanceof CodeMirror) {
                                other = other.doc;
                            }
                            if (this.linked) {
                                for (var i = 0; i < this.linked.length; ++i) {
                                    var link = this.linked[i];
                                    if (link.doc != other) {
                                        continue;
                                    }
                                    this.linked.splice(i, 1);
                                    other.unlinkDoc(this);
                                    detachSharedMarkers(findSharedMarkers(this));
                                    break;
                                }
                            }
                            // If the histories were shared, split them again
                            if (other.history == this.history) {
                                var splitIds = [other.id];
                                linkedDocs(other, function(doc) {
                                    return splitIds.push(doc.id);
                                }, true);
                                other.history = new History(null);
                                other.history.done = copyHistoryArray(this.history.done, splitIds);
                                other.history.undone = copyHistoryArray(this.history.undone, splitIds);
                            }
                        },
                        iterLinkedDocs: function(f) {
                            linkedDocs(this, f);
                        },
                        getMode: function() {
                            return this.mode;
                        },
                        getEditor: function() {
                            return this.cm;
                        },
                        splitLines: function(str) {
                            if (this.lineSep) {
                                return str.split(this.lineSep);
                            }
                            return splitLinesAuto(str);
                        },
                        lineSeparator: function() {
                            return this.lineSep || "\n";
                        },
                        setDirection: docMethodOp(function(dir) {
                            if (dir != "rtl") {
                                dir = "ltr";
                            }
                            if (dir == this.direction) {
                                return;
                            }
                            this.direction = dir;
                            this.iter(function(line) {
                                return line.order = null;
                            });
                            if (this.cm) {
                                directionChanged(this.cm);
                            }
                        })
                    });

                    // Public alias.
                    Doc.prototype.eachLine = Doc.prototype.iter;

                    // Kludge to work around strange IE behavior where it'll sometimes
                    // re-fire a series of drag-related events right after the drop (#1551)
                    var lastDrop = 0;

                    function onDrop(e) {
                        var cm = this;
                        clearDragCursor(cm);
                        if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) {
                            return;
                        }
                        e_preventDefault(e);
                        if (ie) {
                            lastDrop = +new Date();
                        }
                        var pos = posFromMouse(cm, e, true),
                            files = e.dataTransfer.files;
                        if (!pos || cm.isReadOnly()) {
                            return;
                        }
                        // Might be a file drop, in which case we simply extract the text
                        // and insert it.
                        if (files && files.length && window.FileReader && window.File) {
                            var n = files.length,
                                text = Array(n),
                                read = 0;
                            var markAsReadAndPasteIfAllFilesAreRead = function() {
                                if (++read == n) {
                                    operation(cm, function() {
                                        pos = clipPos(cm.doc, pos);
                                        var change = {
                                            from: pos,
                                            to: pos,
                                            text: cm.doc.splitLines(text.filter(function(t) {
                                                return t != null;
                                            }).join(cm.doc.lineSeparator())),
                                            origin: "paste"
                                        };
                                        makeChange(cm.doc, change);
                                        setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));
                                    })();
                                }
                            };
                            var readTextFromFile = function(file, i) {
                                if (cm.options.allowDropFileTypes && indexOf(cm.options.allowDropFileTypes, file.type) == -1) {
                                    markAsReadAndPasteIfAllFilesAreRead();
                                    return;
                                }
                                var reader = new FileReader();
                                reader.onerror = function() {
                                    return markAsReadAndPasteIfAllFilesAreRead();
                                };
                                reader.onload = function() {
                                    var content = reader.result;
                                    if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) {
                                        markAsReadAndPasteIfAllFilesAreRead();
                                        return;
                                    }
                                    text[i] = content;
                                    markAsReadAndPasteIfAllFilesAreRead();
                                };
                                reader.readAsText(file);
                            };
                            for (var i = 0; i < files.length; i++) {
                                readTextFromFile(files[i], i);
                            }
                        } else {
                            // Normal drop
                            // Don't do a replace if the drop happened inside of the selected text.
                            if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
                                cm.state.draggingText(e);
                                // Ensure the editor is re-focused
                                setTimeout(function() {
                                    return cm.display.input.focus();
                                }, 20);
                                return;
                            }
                            try {
                                var text$1 = e.dataTransfer.getData("Text");
                                if (text$1) {
                                    var selected;
                                    if (cm.state.draggingText && !cm.state.draggingText.copy) {
                                        selected = cm.listSelections();
                                    }
                                    setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
                                    if (selected) {
                                        for (var i$1 = 0; i$1 < selected.length; ++i$1) {
                                            replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag");
                                        }
                                    }
                                    cm.replaceSelection(text$1, "around", "paste");
                                    cm.display.input.focus();
                                }
                            } catch (e$1) {}
                        }
                    }

                    function onDragStart(cm, e) {
                        if (ie && (!cm.state.draggingText || +new Date() - lastDrop < 100)) {
                            e_stop(e);
                            return;
                        }
                        if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) {
                            return;
                        }
                        e.dataTransfer.setData("Text", cm.getSelection());
                        e.dataTransfer.effectAllowed = "copyMove";

                        // Use dummy image instead of default browsers image.
                        // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
                        if (e.dataTransfer.setDragImage && !safari) {
                            var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
                            img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
                            if (presto) {
                                img.width = img.height = 1;
                                cm.display.wrapper.appendChild(img);
                                // Force a relayout, or Opera won't use our image for some obscure reason
                                img._top = img.offsetTop;
                            }
                            e.dataTransfer.setDragImage(img, 0, 0);
                            if (presto) {
                                img.parentNode.removeChild(img);
                            }
                        }
                    }

                    function onDragOver(cm, e) {
                        var pos = posFromMouse(cm, e);
                        if (!pos) {
                            return;
                        }
                        var frag = document.createDocumentFragment();
                        drawSelectionCursor(cm, pos, frag);
                        if (!cm.display.dragCursor) {
                            cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors");
                            cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);
                        }
                        removeChildrenAndAdd(cm.display.dragCursor, frag);
                    }

                    function clearDragCursor(cm) {
                        if (cm.display.dragCursor) {
                            cm.display.lineSpace.removeChild(cm.display.dragCursor);
                            cm.display.dragCursor = null;
                        }
                    }

                    // These must be handled carefully, because naively registering a
                    // handler for each editor will cause the editors to never be
                    // garbage collected.

                    function forEachCodeMirror(f) {
                        if (!document.getElementsByClassName) {
                            return;
                        }
                        var byClass = document.getElementsByClassName("CodeMirror"),
                            editors = [];
                        for (var i = 0; i < byClass.length; i++) {
                            var cm = byClass[i].CodeMirror;
                            if (cm) {
                                editors.push(cm);
                            }
                        }
                        if (editors.length) {
                            editors[0].operation(function() {
                                for (var i = 0; i < editors.length; i++) {
                                    f(editors[i]);
                                }
                            });
                        }
                    }
                    var globalsRegistered = false;

                    function ensureGlobalHandlers() {
                        if (globalsRegistered) {
                            return;
                        }
                        registerGlobalHandlers();
                        globalsRegistered = true;
                    }

                    function registerGlobalHandlers() {
                        // When the window resizes, we need to refresh active editors.
                        var resizeTimer;
                        on(window, "resize", function() {
                            if (resizeTimer == null) {
                                resizeTimer = setTimeout(function() {
                                    resizeTimer = null;
                                    forEachCodeMirror(onResize);
                                }, 100);
                            }
                        });
                        // When the window loses focus, we want to show the editor as blurred
                        on(window, "blur", function() {
                            return forEachCodeMirror(onBlur);
                        });
                    }
                    // Called when the window resizes
                    function onResize(cm) {
                        var d = cm.display;
                        // Might be a text scaling operation, clear size caches.
                        d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
                        d.scrollbarsClipped = false;
                        cm.setSize();
                    }
                    var keyNames = {
                        3: "Pause",
                        8: "Backspace",
                        9: "Tab",
                        13: "Enter",
                        16: "Shift",
                        17: "Ctrl",
                        18: "Alt",
                        19: "Pause",
                        20: "CapsLock",
                        27: "Esc",
                        32: "Space",
                        33: "PageUp",
                        34: "PageDown",
                        35: "End",
                        36: "Home",
                        37: "Left",
                        38: "Up",
                        39: "Right",
                        40: "Down",
                        44: "PrintScrn",
                        45: "Insert",
                        46: "Delete",
                        59: ";",
                        61: "=",
                        91: "Mod",
                        92: "Mod",
                        93: "Mod",
                        106: "*",
                        107: "=",
                        109: "-",
                        110: ".",
                        111: "/",
                        145: "ScrollLock",
                        173: "-",
                        186: ";",
                        187: "=",
                        188: ",",
                        189: "-",
                        190: ".",
                        191: "/",
                        192: "`",
                        219: "[",
                        220: "\\",
                        221: "]",
                        222: "'",
                        224: "Mod",
                        63232: "Up",
                        63233: "Down",
                        63234: "Left",
                        63235: "Right",
                        63272: "Delete",
                        63273: "Home",
                        63275: "End",
                        63276: "PageUp",
                        63277: "PageDown",
                        63302: "Insert"
                    };

                    // Number keys
                    for (var i = 0; i < 10; i++) {
                        keyNames[i + 48] = keyNames[i + 96] = String(i);
                    }
                    // Alphabetic keys
                    for (var i$1 = 65; i$1 <= 90; i$1++) {
                        keyNames[i$1] = String.fromCharCode(i$1);
                    }
                    // Function keys
                    for (var i$2 = 1; i$2 <= 12; i$2++) {
                        keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2;
                    }
                    var keyMap = {};
                    keyMap.basic = {
                        "Left": "goCharLeft",
                        "Right": "goCharRight",
                        "Up": "goLineUp",
                        "Down": "goLineDown",
                        "End": "goLineEnd",
                        "Home": "goLineStartSmart",
                        "PageUp": "goPageUp",
                        "PageDown": "goPageDown",
                        "Delete": "delCharAfter",
                        "Backspace": "delCharBefore",
                        "Shift-Backspace": "delCharBefore",
                        "Tab": "defaultTab",
                        "Shift-Tab": "indentAuto",
                        "Enter": "newlineAndIndent",
                        "Insert": "toggleOverwrite",
                        "Esc": "singleSelection"
                    };
                    // Note that the save and find-related commands aren't defined by
                    // default. User code or addons can define them. Unknown commands
                    // are simply ignored.
                    keyMap.pcDefault = {
                        "Ctrl-A": "selectAll",
                        "Ctrl-D": "deleteLine",
                        "Ctrl-Z": "undo",
                        "Shift-Ctrl-Z": "redo",
                        "Ctrl-Y": "redo",
                        "Ctrl-Home": "goDocStart",
                        "Ctrl-End": "goDocEnd",
                        "Ctrl-Up": "goLineUp",
                        "Ctrl-Down": "goLineDown",
                        "Ctrl-Left": "goGroupLeft",
                        "Ctrl-Right": "goGroupRight",
                        "Alt-Left": "goLineStart",
                        "Alt-Right": "goLineEnd",
                        "Ctrl-Backspace": "delGroupBefore",
                        "Ctrl-Delete": "delGroupAfter",
                        "Ctrl-S": "save",
                        "Ctrl-F": "find",
                        "Ctrl-G": "findNext",
                        "Shift-Ctrl-G": "findPrev",
                        "Shift-Ctrl-F": "replace",
                        "Shift-Ctrl-R": "replaceAll",
                        "Ctrl-[": "indentLess",
                        "Ctrl-]": "indentMore",
                        "Ctrl-U": "undoSelection",
                        "Shift-Ctrl-U": "redoSelection",
                        "Alt-U": "redoSelection",
                        "fallthrough": "basic"
                    };
                    // Very basic readline/emacs-style bindings, which are standard on Mac.
                    keyMap.emacsy = {
                        "Ctrl-F": "goCharRight",
                        "Ctrl-B": "goCharLeft",
                        "Ctrl-P": "goLineUp",
                        "Ctrl-N": "goLineDown",
                        "Ctrl-A": "goLineStart",
                        "Ctrl-E": "goLineEnd",
                        "Ctrl-V": "goPageDown",
                        "Shift-Ctrl-V": "goPageUp",
                        "Ctrl-D": "delCharAfter",
                        "Ctrl-H": "delCharBefore",
                        "Alt-Backspace": "delWordBefore",
                        "Ctrl-K": "killLine",
                        "Ctrl-T": "transposeChars",
                        "Ctrl-O": "openLine"
                    };
                    keyMap.macDefault = {
                        "Cmd-A": "selectAll",
                        "Cmd-D": "deleteLine",
                        "Cmd-Z": "undo",
                        "Shift-Cmd-Z": "redo",
                        "Cmd-Y": "redo",
                        "Cmd-Home": "goDocStart",
                        "Cmd-Up": "goDocStart",
                        "Cmd-End": "goDocEnd",
                        "Cmd-Down": "goDocEnd",
                        "Alt-Left": "goGroupLeft",
                        "Alt-Right": "goGroupRight",
                        "Cmd-Left": "goLineLeft",
                        "Cmd-Right": "goLineRight",
                        "Alt-Backspace": "delGroupBefore",
                        "Ctrl-Alt-Backspace": "delGroupAfter",
                        "Alt-Delete": "delGroupAfter",
                        "Cmd-S": "save",
                        "Cmd-F": "find",
                        "Cmd-G": "findNext",
                        "Shift-Cmd-G": "findPrev",
                        "Cmd-Alt-F": "replace",
                        "Shift-Cmd-Alt-F": "replaceAll",
                        "Cmd-[": "indentLess",
                        "Cmd-]": "indentMore",
                        "Cmd-Backspace": "delWrappedLineLeft",
                        "Cmd-Delete": "delWrappedLineRight",
                        "Cmd-U": "undoSelection",
                        "Shift-Cmd-U": "redoSelection",
                        "Ctrl-Up": "goDocStart",
                        "Ctrl-Down": "goDocEnd",
                        "fallthrough": ["basic", "emacsy"]
                    };
                    keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;

                    // KEYMAP DISPATCH

                    function normalizeKeyName(name) {
                        var parts = name.split(/-(?!$)/);
                        name = parts[parts.length - 1];
                        var alt, ctrl, shift, cmd;
                        for (var i = 0; i < parts.length - 1; i++) {
                            var mod = parts[i];
                            if (/^(cmd|meta|m)$/i.test(mod)) {
                                cmd = true;
                            } else if (/^a(lt)?$/i.test(mod)) {
                                alt = true;
                            } else if (/^(c|ctrl|control)$/i.test(mod)) {
                                ctrl = true;
                            } else if (/^s(hift)?$/i.test(mod)) {
                                shift = true;
                            } else {
                                throw new Error("Unrecognized modifier name: " + mod);
                            }
                        }
                        if (alt) {
                            name = "Alt-" + name;
                        }
                        if (ctrl) {
                            name = "Ctrl-" + name;
                        }
                        if (cmd) {
                            name = "Cmd-" + name;
                        }
                        if (shift) {
                            name = "Shift-" + name;
                        }
                        return name;
                    }

                    // This is a kludge to keep keymaps mostly working as raw objects
                    // (backwards compatibility) while at the same time support features
                    // like normalization and multi-stroke key bindings. It compiles a
                    // new normalized keymap, and then updates the old object to reflect
                    // this.
                    function normalizeKeyMap(keymap) {
                        var copy = {};
                        for (var keyname in keymap) {
                            if (keymap.hasOwnProperty(keyname)) {
                                var value = keymap[keyname];
                                if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) {
                                    continue;
                                }
                                if (value == "...") {
                                    delete keymap[keyname];
                                    continue;
                                }
                                var keys = map(keyname.split(" "), normalizeKeyName);
                                for (var i = 0; i < keys.length; i++) {
                                    var val = void 0,
                                        name = void 0;
                                    if (i == keys.length - 1) {
                                        name = keys.join(" ");
                                        val = value;
                                    } else {
                                        name = keys.slice(0, i + 1).join(" ");
                                        val = "...";
                                    }
                                    var prev = copy[name];
                                    if (!prev) {
                                        copy[name] = val;
                                    } else if (prev != val) {
                                        throw new Error("Inconsistent bindings for " + name);
                                    }
                                }
                                delete keymap[keyname];
                            }
                        }
                        for (var prop in copy) {
                            keymap[prop] = copy[prop];
                        }
                        return keymap;
                    }

                    function lookupKey(key, map, handle, context) {
                        map = getKeyMap(map);
                        var found = map.call ? map.call(key, context) : map[key];
                        if (found === false) {
                            return "nothing";
                        }
                        if (found === "...") {
                            return "multi";
                        }
                        if (found != null && handle(found)) {
                            return "handled";
                        }
                        if (map.fallthrough) {
                            if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") {
                                return lookupKey(key, map.fallthrough, handle, context);
                            }
                            for (var i = 0; i < map.fallthrough.length; i++) {
                                var result = lookupKey(key, map.fallthrough[i], handle, context);
                                if (result) {
                                    return result;
                                }
                            }
                        }
                    }

                    // Modifier key presses don't count as 'real' key presses for the
                    // purpose of keymap fallthrough.
                    function isModifierKey(value) {
                        var name = typeof value == "string" ? value : keyNames[value.keyCode];
                        return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod";
                    }

                    function addModifierNames(name, event, noShift) {
                        var base = name;
                        if (event.altKey && base != "Alt") {
                            name = "Alt-" + name;
                        }
                        if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") {
                            name = "Ctrl-" + name;
                        }
                        if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") {
                            name = "Cmd-" + name;
                        }
                        if (!noShift && event.shiftKey && base != "Shift") {
                            name = "Shift-" + name;
                        }
                        return name;
                    }

                    // Look up the name of a key as indicated by an event object.
                    function keyName(event, noShift) {
                        if (presto && event.keyCode == 34 && event["char"]) {
                            return false;
                        }
                        var name = keyNames[event.keyCode];
                        if (name == null || event.altGraphKey) {
                            return false;
                        }
                        // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
                        // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
                        if (event.keyCode == 3 && event.code) {
                            name = event.code;
                        }
                        return addModifierNames(name, event, noShift);
                    }

                    function getKeyMap(val) {
                        return typeof val == "string" ? keyMap[val] : val;
                    }

                    // Helper for deleting text near the selection(s), used to implement
                    // backspace, delete, and similar functionality.
                    function deleteNearSelection(cm, compute) {
                        var ranges = cm.doc.sel.ranges,
                            kill = [];
                        // Build up a set of ranges to kill first, merging overlapping
                        // ranges.
                        for (var i = 0; i < ranges.length; i++) {
                            var toKill = compute(ranges[i]);
                            while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {
                                var replaced = kill.pop();
                                if (cmp(replaced.from, toKill.from) < 0) {
                                    toKill.from = replaced.from;
                                    break;
                                }
                            }
                            kill.push(toKill);
                        }
                        // Next, remove those actual ranges.
                        runInOp(cm, function() {
                            for (var i = kill.length - 1; i >= 0; i--) {
                                replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete");
                            }
                            ensureCursorVisible(cm);
                        });
                    }

                    function moveCharLogically(line, ch, dir) {
                        var target = skipExtendingChars(line.text, ch + dir, dir);
                        return target < 0 || target > line.text.length ? null : target;
                    }

                    function moveLogically(line, start, dir) {
                        var ch = moveCharLogically(line, start.ch, dir);
                        return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before");
                    }

                    function endOfLine(visually, cm, lineObj, lineNo, dir) {
                        if (visually) {
                            if (cm.doc.direction == "rtl") {
                                dir = -dir;
                            }
                            var order = getOrder(lineObj, cm.doc.direction);
                            if (order) {
                                var part = dir < 0 ? lst(order) : order[0];
                                var moveInStorageOrder = dir < 0 == (part.level == 1);
                                var sticky = moveInStorageOrder ? "after" : "before";
                                var ch;
                                // With a wrapped rtl chunk (possibly spanning multiple bidi parts),
                                // it could be that the last bidi part is not on the last visual line,
                                // since visual lines contain content order-consecutive chunks.
                                // Thus, in rtl, we are looking for the first (content-order) character
                                // in the rtl chunk that is on the last line (that is, the same line
                                // as the last (content-order) character).
                                if (part.level > 0 || cm.doc.direction == "rtl") {
                                    var prep = prepareMeasureForLine(cm, lineObj);
                                    ch = dir < 0 ? lineObj.text.length - 1 : 0;
                                    var targetTop = measureCharPrepared(cm, prep, ch).top;
                                    ch = findFirst(function(ch) {
                                        return measureCharPrepared(cm, prep, ch).top == targetTop;
                                    }, dir < 0 == (part.level == 1) ? part.from : part.to - 1, ch);
                                    if (sticky == "before") {
                                        ch = moveCharLogically(lineObj, ch, 1);
                                    }
                                } else {
                                    ch = dir < 0 ? part.to : part.from;
                                }
                                return new Pos(lineNo, ch, sticky);
                            }
                        }
                        return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after");
                    }

                    function moveVisually(cm, line, start, dir) {
                        var bidi = getOrder(line, cm.doc.direction);
                        if (!bidi) {
                            return moveLogically(line, start, dir);
                        }
                        if (start.ch >= line.text.length) {
                            start.ch = line.text.length;
                            start.sticky = "before";
                        } else if (start.ch <= 0) {
                            start.ch = 0;
                            start.sticky = "after";
                        }
                        var partPos = getBidiPartAt(bidi, start.ch, start.sticky),
                            part = bidi[partPos];
                        if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {
                            // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,
                            // nothing interesting happens.
                            return moveLogically(line, start, dir);
                        }
                        var mv = function(pos, dir) {
                            return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir);
                        };
                        var prep;
                        var getWrappedLineExtent = function(ch) {
                            if (!cm.options.lineWrapping) {
                                return {
                                    begin: 0,
                                    end: line.text.length
                                };
                            }
                            prep = prep || prepareMeasureForLine(cm, line);
                            return wrappedLineExtentChar(cm, line, prep, ch);
                        };
                        var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch);
                        if (cm.doc.direction == "rtl" || part.level == 1) {
                            var moveInStorageOrder = part.level == 1 == dir < 0;
                            var ch = mv(start, moveInStorageOrder ? 1 : -1);
                            if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {
                                // Case 2: We move within an rtl part or in an rtl editor on the same visual line
                                var sticky = moveInStorageOrder ? "before" : "after";
                                return new Pos(start.line, ch, sticky);
                            }
                        }

                        // Case 3: Could not move within this bidi part in this visual line, so leave
                        // the current bidi part

                        var searchInVisualLine = function(partPos, dir, wrappedLineExtent) {
                            var getRes = function(ch, moveInStorageOrder) {
                                return moveInStorageOrder ? new Pos(start.line, mv(ch, 1), "before") : new Pos(start.line, ch, "after");
                            };
                            for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {
                                var part = bidi[partPos];
                                var moveInStorageOrder = dir > 0 == (part.level != 1);
                                var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);
                                if (part.from <= ch && ch < part.to) {
                                    return getRes(ch, moveInStorageOrder);
                                }
                                ch = moveInStorageOrder ? part.from : mv(part.to, -1);
                                if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) {
                                    return getRes(ch, moveInStorageOrder);
                                }
                            }
                        };

                        // Case 3a: Look for other bidi parts on the same visual line
                        var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);
                        if (res) {
                            return res;
                        }

                        // Case 3b: Look for other bidi parts on the next visual line
                        var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);
                        if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {
                            res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));
                            if (res) {
                                return res;
                            }
                        }

                        // Case 4: Nowhere to move
                        return null;
                    }

                    // Commands are parameter-less actions that can be performed on an
                    // editor, mostly used for keybindings.
                    var commands = {
                        selectAll: selectAll,
                        singleSelection: function(cm) {
                            return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll);
                        },
                        killLine: function(cm) {
                            return deleteNearSelection(cm, function(range) {
                                if (range.empty()) {
                                    var len = getLine(cm.doc, range.head.line).text.length;
                                    if (range.head.ch == len && range.head.line < cm.lastLine()) {
                                        return {
                                            from: range.head,
                                            to: Pos(range.head.line + 1, 0)
                                        };
                                    } else {
                                        return {
                                            from: range.head,
                                            to: Pos(range.head.line, len)
                                        };
                                    }
                                } else {
                                    return {
                                        from: range.from(),
                                        to: range.to()
                                    };
                                }
                            });
                        },
                        deleteLine: function(cm) {
                            return deleteNearSelection(cm, function(range) {
                                return {
                                    from: Pos(range.from().line, 0),
                                    to: clipPos(cm.doc, Pos(range.to().line + 1, 0))
                                };
                            });
                        },
                        delLineLeft: function(cm) {
                            return deleteNearSelection(cm, function(range) {
                                return {
                                    from: Pos(range.from().line, 0),
                                    to: range.from()
                                };
                            });
                        },
                        delWrappedLineLeft: function(cm) {
                            return deleteNearSelection(cm, function(range) {
                                var top = cm.charCoords(range.head, "div").top + 5;
                                var leftPos = cm.coordsChar({
                                    left: 0,
                                    top: top
                                }, "div");
                                return {
                                    from: leftPos,
                                    to: range.from()
                                };
                            });
                        },
                        delWrappedLineRight: function(cm) {
                            return deleteNearSelection(cm, function(range) {
                                var top = cm.charCoords(range.head, "div").top + 5;
                                var rightPos = cm.coordsChar({
                                    left: cm.display.lineDiv.offsetWidth + 100,
                                    top: top
                                }, "div");
                                return {
                                    from: range.from(),
                                    to: rightPos
                                };
                            });
                        },
                        undo: function(cm) {
                            return cm.undo();
                        },
                        redo: function(cm) {
                            return cm.redo();
                        },
                        undoSelection: function(cm) {
                            return cm.undoSelection();
                        },
                        redoSelection: function(cm) {
                            return cm.redoSelection();
                        },
                        goDocStart: function(cm) {
                            return cm.extendSelection(Pos(cm.firstLine(), 0));
                        },
                        goDocEnd: function(cm) {
                            return cm.extendSelection(Pos(cm.lastLine()));
                        },
                        goLineStart: function(cm) {
                            return cm.extendSelectionsBy(function(range) {
                                return lineStart(cm, range.head.line);
                            }, {
                                origin: "+move",
                                bias: 1
                            });
                        },
                        goLineStartSmart: function(cm) {
                            return cm.extendSelectionsBy(function(range) {
                                return lineStartSmart(cm, range.head);
                            }, {
                                origin: "+move",
                                bias: 1
                            });
                        },
                        goLineEnd: function(cm) {
                            return cm.extendSelectionsBy(function(range) {
                                return lineEnd(cm, range.head.line);
                            }, {
                                origin: "+move",
                                bias: -1
                            });
                        },
                        goLineRight: function(cm) {
                            return cm.extendSelectionsBy(function(range) {
                                var top = cm.cursorCoords(range.head, "div").top + 5;
                                return cm.coordsChar({
                                    left: cm.display.lineDiv.offsetWidth + 100,
                                    top: top
                                }, "div");
                            }, sel_move);
                        },
                        goLineLeft: function(cm) {
                            return cm.extendSelectionsBy(function(range) {
                                var top = cm.cursorCoords(range.head, "div").top + 5;
                                return cm.coordsChar({
                                    left: 0,
                                    top: top
                                }, "div");
                            }, sel_move);
                        },
                        goLineLeftSmart: function(cm) {
                            return cm.extendSelectionsBy(function(range) {
                                var top = cm.cursorCoords(range.head, "div").top + 5;
                                var pos = cm.coordsChar({
                                    left: 0,
                                    top: top
                                }, "div");
                                if (pos.ch < cm.getLine(pos.line).search(/\S/)) {
                                    return lineStartSmart(cm, range.head);
                                }
                                return pos;
                            }, sel_move);
                        },
                        goLineUp: function(cm) {
                            return cm.moveV(-1, "line");
                        },
                        goLineDown: function(cm) {
                            return cm.moveV(1, "line");
                        },
                        goPageUp: function(cm) {
                            return cm.moveV(-1, "page");
                        },
                        goPageDown: function(cm) {
                            return cm.moveV(1, "page");
                        },
                        goCharLeft: function(cm) {
                            return cm.moveH(-1, "char");
                        },
                        goCharRight: function(cm) {
                            return cm.moveH(1, "char");
                        },
                        goColumnLeft: function(cm) {
                            return cm.moveH(-1, "column");
                        },
                        goColumnRight: function(cm) {
                            return cm.moveH(1, "column");
                        },
                        goWordLeft: function(cm) {
                            return cm.moveH(-1, "word");
                        },
                        goGroupRight: function(cm) {
                            return cm.moveH(1, "group");
                        },
                        goGroupLeft: function(cm) {
                            return cm.moveH(-1, "group");
                        },
                        goWordRight: function(cm) {
                            return cm.moveH(1, "word");
                        },
                        delCharBefore: function(cm) {
                            return cm.deleteH(-1, "codepoint");
                        },
                        delCharAfter: function(cm) {
                            return cm.deleteH(1, "char");
                        },
                        delWordBefore: function(cm) {
                            return cm.deleteH(-1, "word");
                        },
                        delWordAfter: function(cm) {
                            return cm.deleteH(1, "word");
                        },
                        delGroupBefore: function(cm) {
                            return cm.deleteH(-1, "group");
                        },
                        delGroupAfter: function(cm) {
                            return cm.deleteH(1, "group");
                        },
                        indentAuto: function(cm) {
                            return cm.indentSelection("smart");
                        },
                        indentMore: function(cm) {
                            return cm.indentSelection("add");
                        },
                        indentLess: function(cm) {
                            return cm.indentSelection("subtract");
                        },
                        insertTab: function(cm) {
                            return cm.replaceSelection("\t");
                        },
                        insertSoftTab: function(cm) {
                            var spaces = [],
                                ranges = cm.listSelections(),
                                tabSize = cm.options.tabSize;
                            for (var i = 0; i < ranges.length; i++) {
                                var pos = ranges[i].from();
                                var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
                                spaces.push(spaceStr(tabSize - col % tabSize));
                            }
                            cm.replaceSelections(spaces);
                        },
                        defaultTab: function(cm) {
                            if (cm.somethingSelected()) {
                                cm.indentSelection("add");
                            } else {
                                cm.execCommand("insertTab");
                            }
                        },
                        // Swap the two chars left and right of each selection's head.
                        // Move cursor behind the two swapped characters afterwards.
                        //
                        // Doesn't consider line feeds a character.
                        // Doesn't scan more than one line above to find a character.
                        // Doesn't do anything on an empty line.
                        // Doesn't do anything with non-empty selections.
                        transposeChars: function(cm) {
                            return runInOp(cm, function() {
                                var ranges = cm.listSelections(),
                                    newSel = [];
                                for (var i = 0; i < ranges.length; i++) {
                                    if (!ranges[i].empty()) {
                                        continue;
                                    }
                                    var cur = ranges[i].head,
                                        line = getLine(cm.doc, cur.line).text;
                                    if (line) {
                                        if (cur.ch == line.length) {
                                            cur = new Pos(cur.line, cur.ch - 1);
                                        }
                                        if (cur.ch > 0) {
                                            cur = new Pos(cur.line, cur.ch + 1);
                                            cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), Pos(cur.line, cur.ch - 2), cur, "+transpose");
                                        } else if (cur.line > cm.doc.first) {
                                            var prev = getLine(cm.doc, cur.line - 1).text;
                                            if (prev) {
                                                cur = new Pos(cur.line, 1);
                                                cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() + prev.charAt(prev.length - 1), Pos(cur.line - 1, prev.length - 1), cur, "+transpose");
                                            }
                                        }
                                    }
                                    newSel.push(new Range(cur, cur));
                                }
                                cm.setSelections(newSel);
                            });
                        },
                        newlineAndIndent: function(cm) {
                            return runInOp(cm, function() {
                                var sels = cm.listSelections();
                                for (var i = sels.length - 1; i >= 0; i--) {
                                    cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input");
                                }
                                sels = cm.listSelections();
                                for (var i$1 = 0; i$1 < sels.length; i$1++) {
                                    cm.indentLine(sels[i$1].from().line, null, true);
                                }
                                ensureCursorVisible(cm);
                            });
                        },
                        openLine: function(cm) {
                            return cm.replaceSelection("\n", "start");
                        },
                        toggleOverwrite: function(cm) {
                            return cm.toggleOverwrite();
                        }
                    };

                    function lineStart(cm, lineN) {
                        var line = getLine(cm.doc, lineN);
                        var visual = visualLine(line);
                        if (visual != line) {
                            lineN = lineNo(visual);
                        }
                        return endOfLine(true, cm, visual, lineN, 1);
                    }

                    function lineEnd(cm, lineN) {
                        var line = getLine(cm.doc, lineN);
                        var visual = visualLineEnd(line);
                        if (visual != line) {
                            lineN = lineNo(visual);
                        }
                        return endOfLine(true, cm, line, lineN, -1);
                    }

                    function lineStartSmart(cm, pos) {
                        var start = lineStart(cm, pos.line);
                        var line = getLine(cm.doc, start.line);
                        var order = getOrder(line, cm.doc.direction);
                        if (!order || order[0].level == 0) {
                            var firstNonWS = Math.max(start.ch, line.text.search(/\S/));
                            var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;
                            return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky);
                        }
                        return start;
                    }

                    // Run a handler that was bound to a key.
                    function doHandleBinding(cm, bound, dropShift) {
                        if (typeof bound == "string") {
                            bound = commands[bound];
                            if (!bound) {
                                return false;
                            }
                        }
                        // Ensure previous input has been read, so that the handler sees a
                        // consistent view of the document
                        cm.display.input.ensurePolled();
                        var prevShift = cm.display.shift,
                            done = false;
                        try {
                            if (cm.isReadOnly()) {
                                cm.state.suppressEdits = true;
                            }
                            if (dropShift) {
                                cm.display.shift = false;
                            }
                            done = bound(cm) != Pass;
                        } finally {
                            cm.display.shift = prevShift;
                            cm.state.suppressEdits = false;
                        }
                        return done;
                    }

                    function lookupKeyForEditor(cm, name, handle) {
                        for (var i = 0; i < cm.state.keyMaps.length; i++) {
                            var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);
                            if (result) {
                                return result;
                            }
                        }
                        return cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm) || lookupKey(name, cm.options.keyMap, handle, cm);
                    }

                    // Note that, despite the name, this function is also used to check
                    // for bound mouse clicks.

                    var stopSeq = new Delayed();

                    function dispatchKey(cm, name, e, handle) {
                        var seq = cm.state.keySeq;
                        if (seq) {
                            if (isModifierKey(name)) {
                                return "handled";
                            }
                            if (/\'$/.test(name)) {
                                cm.state.keySeq = null;
                            } else {
                                stopSeq.set(50, function() {
                                    if (cm.state.keySeq == seq) {
                                        cm.state.keySeq = null;
                                        cm.display.input.reset();
                                    }
                                });
                            }
                            if (dispatchKeyInner(cm, seq + " " + name, e, handle)) {
                                return true;
                            }
                        }
                        return dispatchKeyInner(cm, name, e, handle);
                    }

                    function dispatchKeyInner(cm, name, e, handle) {
                        var result = lookupKeyForEditor(cm, name, handle);
                        if (result == "multi") {
                            cm.state.keySeq = name;
                        }
                        if (result == "handled") {
                            signalLater(cm, "keyHandled", cm, name, e);
                        }
                        if (result == "handled" || result == "multi") {
                            e_preventDefault(e);
                            restartBlink(cm);
                        }
                        return !!result;
                    }

                    // Handle a key from the keydown event.
                    function handleKeyBinding(cm, e) {
                        var name = keyName(e, true);
                        if (!name) {
                            return false;
                        }
                        if (e.shiftKey && !cm.state.keySeq) {
                            // First try to resolve full name (including 'Shift-'). Failing
                            // that, see if there is a cursor-motion command (starting with
                            // 'go') bound to the keyname without 'Shift-'.
                            return dispatchKey(cm, "Shift-" + name, e, function(b) {
                                return doHandleBinding(cm, b, true);
                            }) || dispatchKey(cm, name, e, function(b) {
                                if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) {
                                    return doHandleBinding(cm, b);
                                }
                            });
                        } else {
                            return dispatchKey(cm, name, e, function(b) {
                                return doHandleBinding(cm, b);
                            });
                        }
                    }

                    // Handle a key from the keypress event
                    function handleCharBinding(cm, e, ch) {
                        return dispatchKey(cm, "'" + ch + "'", e, function(b) {
                            return doHandleBinding(cm, b, true);
                        });
                    }
                    var lastStoppedKey = null;

                    function onKeyDown(e) {
                        var cm = this;
                        if (e.target && e.target != cm.display.input.getField()) {
                            return;
                        }
                        cm.curOp.focus = activeElt();
                        if (signalDOMEvent(cm, e)) {
                            return;
                        }
                        // IE does strange things with escape.
                        if (ie && ie_version < 11 && e.keyCode == 27) {
                            e.returnValue = false;
                        }
                        var code = e.keyCode;
                        cm.display.shift = code == 16 || e.shiftKey;
                        var handled = handleKeyBinding(cm, e);
                        if (presto) {
                            lastStoppedKey = handled ? code : null;
                            // Opera has no cut event... we try to at least catch the key combo
                            if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) {
                                cm.replaceSelection("", null, "cut");
                            }
                        }
                        if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand) {
                            document.execCommand("cut");
                        }

                        // Turn mouse into crosshair when Alt is held on Mac.
                        if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) {
                            showCrossHair(cm);
                        }
                    }

                    function showCrossHair(cm) {
                        var lineDiv = cm.display.lineDiv;
                        addClass(lineDiv, "CodeMirror-crosshair");

                        function up(e) {
                            if (e.keyCode == 18 || !e.altKey) {
                                rmClass(lineDiv, "CodeMirror-crosshair");
                                off(document, "keyup", up);
                                off(document, "mouseover", up);
                            }
                        }
                        on(document, "keyup", up);
                        on(document, "mouseover", up);
                    }

                    function onKeyUp(e) {
                        if (e.keyCode == 16) {
                            this.doc.sel.shift = false;
                        }
                        signalDOMEvent(this, e);
                    }

                    function onKeyPress(e) {
                        var cm = this;
                        if (e.target && e.target != cm.display.input.getField()) {
                            return;
                        }
                        if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) {
                            return;
                        }
                        var keyCode = e.keyCode,
                            charCode = e.charCode;
                        if (presto && keyCode == lastStoppedKey) {
                            lastStoppedKey = null;
                            e_preventDefault(e);
                            return;
                        }
                        if (presto && (!e.which || e.which < 10) && handleKeyBinding(cm, e)) {
                            return;
                        }
                        var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
                        // Some browsers fire keypress events for backspace
                        if (ch == "\x08") {
                            return;
                        }
                        if (handleCharBinding(cm, e, ch)) {
                            return;
                        }
                        cm.display.input.onKeyPress(e);
                    }
                    var DOUBLECLICK_DELAY = 400;
                    var PastClick = function(time, pos, button) {
                        this.time = time;
                        this.pos = pos;
                        this.button = button;
                    };
                    PastClick.prototype.compare = function(time, pos, button) {
                        return this.time + DOUBLECLICK_DELAY > time && cmp(pos, this.pos) == 0 && button == this.button;
                    };
                    var lastClick, lastDoubleClick;

                    function clickRepeat(pos, button) {
                        var now = +new Date();
                        if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {
                            lastClick = lastDoubleClick = null;
                            return "triple";
                        } else if (lastClick && lastClick.compare(now, pos, button)) {
                            lastDoubleClick = new PastClick(now, pos, button);
                            lastClick = null;
                            return "double";
                        } else {
                            lastClick = new PastClick(now, pos, button);
                            lastDoubleClick = null;
                            return "single";
                        }
                    }

                    // A mouse down can be a single click, double click, triple click,
                    // start of selection drag, start of text drag, new cursor
                    // (ctrl-click), rectangle drag (alt-drag), or xwin
                    // middle-click-paste. Or it might be a click on something we should
                    // not interfere with, such as a scrollbar or widget.
                    function onMouseDown(e) {
                        var cm = this,
                            display = cm.display;
                        if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) {
                            return;
                        }
                        display.input.ensurePolled();
                        display.shift = e.shiftKey;
                        if (eventInWidget(display, e)) {
                            if (!webkit) {
                                // Briefly turn off draggability, to allow widgets to do
                                // normal dragging things.
                                display.scroller.draggable = false;
                                setTimeout(function() {
                                    return display.scroller.draggable = true;
                                }, 100);
                            }
                            return;
                        }
                        if (clickInGutter(cm, e)) {
                            return;
                        }
                        var pos = posFromMouse(cm, e),
                            button = e_button(e),
                            repeat = pos ? clickRepeat(pos, button) : "single";
                        window.focus();

                        // #3261: make sure, that we're not starting a second selection
                        if (button == 1 && cm.state.selectingText) {
                            cm.state.selectingText(e);
                        }
                        if (pos && handleMappedButton(cm, button, pos, repeat, e)) {
                            return;
                        }
                        if (button == 1) {
                            if (pos) {
                                leftButtonDown(cm, pos, repeat, e);
                            } else if (e_target(e) == display.scroller) {
                                e_preventDefault(e);
                            }
                        } else if (button == 2) {
                            if (pos) {
                                extendSelection(cm.doc, pos);
                            }
                            setTimeout(function() {
                                return display.input.focus();
                            }, 20);
                        } else if (button == 3) {
                            if (captureRightClick) {
                                cm.display.input.onContextMenu(e);
                            } else {
                                delayBlurEvent(cm);
                            }
                        }
                    }

                    function handleMappedButton(cm, button, pos, repeat, event) {
                        var name = "Click";
                        if (repeat == "double") {
                            name = "Double" + name;
                        } else if (repeat == "triple") {
                            name = "Triple" + name;
                        }
                        name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name;
                        return dispatchKey(cm, addModifierNames(name, event), event, function(bound) {
                            if (typeof bound == "string") {
                                bound = commands[bound];
                            }
                            if (!bound) {
                                return false;
                            }
                            var done = false;
                            try {
                                if (cm.isReadOnly()) {
                                    cm.state.suppressEdits = true;
                                }
                                done = bound(cm, pos) != Pass;
                            } finally {
                                cm.state.suppressEdits = false;
                            }
                            return done;
                        });
                    }

                    function configureMouse(cm, repeat, event) {
                        var option = cm.getOption("configureMouse");
                        var value = option ? option(cm, repeat, event) : {};
                        if (value.unit == null) {
                            var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;
                            value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line";
                        }
                        if (value.extend == null || cm.doc.extend) {
                            value.extend = cm.doc.extend || event.shiftKey;
                        }
                        if (value.addNew == null) {
                            value.addNew = mac ? event.metaKey : event.ctrlKey;
                        }
                        if (value.moveOnDrag == null) {
                            value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey);
                        }
                        return value;
                    }

                    function leftButtonDown(cm, pos, repeat, event) {
                        if (ie) {
                            setTimeout(bind(ensureFocus, cm), 0);
                        } else {
                            cm.curOp.focus = activeElt();
                        }
                        var behavior = configureMouse(cm, repeat, event);
                        var sel = cm.doc.sel,
                            contained;
                        if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() && repeat == "single" && (contained = sel.contains(pos)) > -1 && (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) && (cmp(contained.to(), pos) > 0 || pos.xRel < 0)) {
                            leftButtonStartDrag(cm, event, pos, behavior);
                        } else {
                            leftButtonSelect(cm, event, pos, behavior);
                        }
                    }

                    // Start a text drag. When it ends, see if any dragging actually
                    // happen, and treat as a click if it didn't.
                    function leftButtonStartDrag(cm, event, pos, behavior) {
                        var display = cm.display,
                            moved = false;
                        var dragEnd = operation(cm, function(e) {
                            if (webkit) {
                                display.scroller.draggable = false;
                            }
                            cm.state.draggingText = false;
                            if (cm.state.delayingBlurEvent) {
                                if (cm.hasFocus()) {
                                    cm.state.delayingBlurEvent = false;
                                } else {
                                    delayBlurEvent(cm);
                                }
                            }
                            off(display.wrapper.ownerDocument, "mouseup", dragEnd);
                            off(display.wrapper.ownerDocument, "mousemove", mouseMove);
                            off(display.scroller, "dragstart", dragStart);
                            off(display.scroller, "drop", dragEnd);
                            if (!moved) {
                                e_preventDefault(e);
                                if (!behavior.addNew) {
                                    extendSelection(cm.doc, pos, null, null, behavior.extend);
                                }
                                // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
                                if (webkit && !safari || ie && ie_version == 9) {
                                    setTimeout(function() {
                                        display.wrapper.ownerDocument.body.focus({
                                            preventScroll: true
                                        });
                                        display.input.focus();
                                    }, 20);
                                } else {
                                    display.input.focus();
                                }
                            }
                        });
                        var mouseMove = function(e2) {
                            moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;
                        };
                        var dragStart = function() {
                            return moved = true;
                        };
                        // Let the drag handler handle this.
                        if (webkit) {
                            display.scroller.draggable = true;
                        }
                        cm.state.draggingText = dragEnd;
                        dragEnd.copy = !behavior.moveOnDrag;
                        on(display.wrapper.ownerDocument, "mouseup", dragEnd);
                        on(display.wrapper.ownerDocument, "mousemove", mouseMove);
                        on(display.scroller, "dragstart", dragStart);
                        on(display.scroller, "drop", dragEnd);
                        cm.state.delayingBlurEvent = true;
                        setTimeout(function() {
                            return display.input.focus();
                        }, 20);
                        // IE's approach to draggable
                        if (display.scroller.dragDrop) {
                            display.scroller.dragDrop();
                        }
                    }

                    function rangeForUnit(cm, pos, unit) {
                        if (unit == "char") {
                            return new Range(pos, pos);
                        }
                        if (unit == "word") {
                            return cm.findWordAt(pos);
                        }
                        if (unit == "line") {
                            return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0)));
                        }
                        var result = unit(cm, pos);
                        return new Range(result.from, result.to);
                    }

                    // Normal selection, as opposed to text dragging.
                    function leftButtonSelect(cm, event, start, behavior) {
                        if (ie) {
                            delayBlurEvent(cm);
                        }
                        var display = cm.display,
                            doc = cm.doc;
                        e_preventDefault(event);
                        var ourRange,
                            ourIndex,
                            startSel = doc.sel,
                            ranges = startSel.ranges;
                        if (behavior.addNew && !behavior.extend) {
                            ourIndex = doc.sel.contains(start);
                            if (ourIndex > -1) {
                                ourRange = ranges[ourIndex];
                            } else {
                                ourRange = new Range(start, start);
                            }
                        } else {
                            ourRange = doc.sel.primary();
                            ourIndex = doc.sel.primIndex;
                        }
                        if (behavior.unit == "rectangle") {
                            if (!behavior.addNew) {
                                ourRange = new Range(start, start);
                            }
                            start = posFromMouse(cm, event, true, true);
                            ourIndex = -1;
                        } else {
                            var range = rangeForUnit(cm, start, behavior.unit);
                            if (behavior.extend) {
                                ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend);
                            } else {
                                ourRange = range;
                            }
                        }
                        if (!behavior.addNew) {
                            ourIndex = 0;
                            setSelection(doc, new Selection([ourRange], 0), sel_mouse);
                            startSel = doc.sel;
                        } else if (ourIndex == -1) {
                            ourIndex = ranges.length;
                            setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex), {
                                scroll: false,
                                origin: "*mouse"
                            });
                        } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) {
                            setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0), {
                                scroll: false,
                                origin: "*mouse"
                            });
                            startSel = doc.sel;
                        } else {
                            replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
                        }
                        var lastPos = start;

                        function extendTo(pos) {
                            if (cmp(lastPos, pos) == 0) {
                                return;
                            }
                            lastPos = pos;
                            if (behavior.unit == "rectangle") {
                                var ranges = [],
                                    tabSize = cm.options.tabSize;
                                var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
                                var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
                                var left = Math.min(startCol, posCol),
                                    right = Math.max(startCol, posCol);
                                for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); line <= end; line++) {
                                    var text = getLine(doc, line).text,
                                        leftPos = findColumn(text, left, tabSize);
                                    if (left == right) {
                                        ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos)));
                                    } else if (text.length > leftPos) {
                                        ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize))));
                                    }
                                }
                                if (!ranges.length) {
                                    ranges.push(new Range(start, start));
                                }
                                setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), {
                                    origin: "*mouse",
                                    scroll: false
                                });
                                cm.scrollIntoView(pos);
                            } else {
                                var oldRange = ourRange;
                                var range = rangeForUnit(cm, pos, behavior.unit);
                                var anchor = oldRange.anchor,
                                    head;
                                if (cmp(range.anchor, anchor) > 0) {
                                    head = range.head;
                                    anchor = minPos(oldRange.from(), range.anchor);
                                } else {
                                    head = range.anchor;
                                    anchor = maxPos(oldRange.to(), range.head);
                                }
                                var ranges$1 = startSel.ranges.slice(0);
                                ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));
                                setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
                            }
                        }
                        var editorSize = display.wrapper.getBoundingClientRect();
                        // Used to ensure timeout re-tries don't fire when another extend
                        // happened in the meantime (clearTimeout isn't reliable -- at
                        // least on Chrome, the timeouts still happen even when cleared,
                        // if the clear happens after their scheduled firing time).
                        var counter = 0;

                        function extend(e) {
                            var curCount = ++counter;
                            var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle");
                            if (!cur) {
                                return;
                            }
                            if (cmp(cur, lastPos) != 0) {
                                cm.curOp.focus = activeElt();
                                extendTo(cur);
                                var visible = visibleLines(display, doc);
                                if (cur.line >= visible.to || cur.line < visible.from) {
                                    setTimeout(operation(cm, function() {
                                        if (counter == curCount) {
                                            extend(e);
                                        }
                                    }), 150);
                                }
                            } else {
                                var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
                                if (outside) {
                                    setTimeout(operation(cm, function() {
                                        if (counter != curCount) {
                                            return;
                                        }
                                        display.scroller.scrollTop += outside;
                                        extend(e);
                                    }), 50);
                                }
                            }
                        }

                        function done(e) {
                            cm.state.selectingText = false;
                            counter = Infinity;
                            // If e is null or undefined we interpret this as someone trying
                            // to explicitly cancel the selection rather than the user
                            // letting go of the mouse button.
                            if (e) {
                                e_preventDefault(e);
                                display.input.focus();
                            }
                            off(display.wrapper.ownerDocument, "mousemove", move);
                            off(display.wrapper.ownerDocument, "mouseup", up);
                            doc.history.lastSelOrigin = null;
                        }
                        var move = operation(cm, function(e) {
                            if (e.buttons === 0 || !e_button(e)) {
                                done(e);
                            } else {
                                extend(e);
                            }
                        });
                        var up = operation(cm, done);
                        cm.state.selectingText = up;
                        on(display.wrapper.ownerDocument, "mousemove", move);
                        on(display.wrapper.ownerDocument, "mouseup", up);
                    }

                    // Used when mouse-selecting to adjust the anchor to the proper side
                    // of a bidi jump depending on the visual position of the head.
                    function bidiSimplify(cm, range) {
                        var anchor = range.anchor;
                        var head = range.head;
                        var anchorLine = getLine(cm.doc, anchor.line);
                        if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) {
                            return range;
                        }
                        var order = getOrder(anchorLine);
                        if (!order) {
                            return range;
                        }
                        var index = getBidiPartAt(order, anchor.ch, anchor.sticky),
                            part = order[index];
                        if (part.from != anchor.ch && part.to != anchor.ch) {
                            return range;
                        }
                        var boundary = index + (part.from == anchor.ch == (part.level != 1) ? 0 : 1);
                        if (boundary == 0 || boundary == order.length) {
                            return range;
                        }

                        // Compute the relative visual position of the head compared to the
                        // anchor (<0 is to the left, >0 to the right)
                        var leftSide;
                        if (head.line != anchor.line) {
                            leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0;
                        } else {
                            var headIndex = getBidiPartAt(order, head.ch, head.sticky);
                            var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);
                            if (headIndex == boundary - 1 || headIndex == boundary) {
                                leftSide = dir < 0;
                            } else {
                                leftSide = dir > 0;
                            }
                        }
                        var usePart = order[boundary + (leftSide ? -1 : 0)];
                        var from = leftSide == (usePart.level == 1);
                        var ch = from ? usePart.from : usePart.to,
                            sticky = from ? "after" : "before";
                        return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head);
                    }

                    // Determines whether an event happened in the gutter, and fires the
                    // handlers for the corresponding event.
                    function gutterEvent(cm, e, type, prevent) {
                        var mX, mY;
                        if (e.touches) {
                            mX = e.touches[0].clientX;
                            mY = e.touches[0].clientY;
                        } else {
                            try {
                                mX = e.clientX;
                                mY = e.clientY;
                            } catch (e$1) {
                                return false;
                            }
                        }
                        if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) {
                            return false;
                        }
                        if (prevent) {
                            e_preventDefault(e);
                        }
                        var display = cm.display;
                        var lineBox = display.lineDiv.getBoundingClientRect();
                        if (mY > lineBox.bottom || !hasHandler(cm, type)) {
                            return e_defaultPrevented(e);
                        }
                        mY -= lineBox.top - display.viewOffset;
                        for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {
                            var g = display.gutters.childNodes[i];
                            if (g && g.getBoundingClientRect().right >= mX) {
                                var line = lineAtHeight(cm.doc, mY);
                                var gutter = cm.display.gutterSpecs[i];
                                signal(cm, type, cm, line, gutter.className, e);
                                return e_defaultPrevented(e);
                            }
                        }
                    }

                    function clickInGutter(cm, e) {
                        return gutterEvent(cm, e, "gutterClick", true);
                    }

                    // CONTEXT MENU HANDLING

                    // To make the context menu work, we need to briefly unhide the
                    // textarea (making it as unobtrusive as possible) to let the
                    // right-click take effect on it.
                    function onContextMenu(cm, e) {
                        if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) {
                            return;
                        }
                        if (signalDOMEvent(cm, e, "contextmenu")) {
                            return;
                        }
                        if (!captureRightClick) {
                            cm.display.input.onContextMenu(e);
                        }
                    }

                    function contextMenuInGutter(cm, e) {
                        if (!hasHandler(cm, "gutterContextMenu")) {
                            return false;
                        }
                        return gutterEvent(cm, e, "gutterContextMenu", false);
                    }

                    function themeChanged(cm) {
                        cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
                        clearCaches(cm);
                    }
                    var Init = {
                        toString: function() {
                            return "CodeMirror.Init";
                        }
                    };
                    var defaults = {};
                    var optionHandlers = {};

                    function defineOptions(CodeMirror) {
                        var optionHandlers = CodeMirror.optionHandlers;

                        function option(name, deflt, handle, notOnInit) {
                            CodeMirror.defaults[name] = deflt;
                            if (handle) {
                                optionHandlers[name] = notOnInit ? function(cm, val, old) {
                                    if (old != Init) {
                                        handle(cm, val, old);
                                    }
                                } : handle;
                            }
                        }
                        CodeMirror.defineOption = option;

                        // Passed to option handlers when there is no old value.
                        CodeMirror.Init = Init;

                        // These two are, on init, called from the constructor because they
                        // have to be initialized before the editor can start at all.
                        option("value", "", function(cm, val) {
                            return cm.setValue(val);
                        }, true);
                        option("mode", null, function(cm, val) {
                            cm.doc.modeOption = val;
                            loadMode(cm);
                        }, true);
                        option("indentUnit", 2, loadMode, true);
                        option("indentWithTabs", false);
                        option("smartIndent", true);
                        option("tabSize", 4, function(cm) {
                            resetModeState(cm);
                            clearCaches(cm);
                            regChange(cm);
                        }, true);
                        option("lineSeparator", null, function(cm, val) {
                            cm.doc.lineSep = val;
                            if (!val) {
                                return;
                            }
                            var newBreaks = [],
                                lineNo = cm.doc.first;
                            cm.doc.iter(function(line) {
                                for (var pos = 0;;) {
                                    var found = line.text.indexOf(val, pos);
                                    if (found == -1) {
                                        break;
                                    }
                                    pos = found + val.length;
                                    newBreaks.push(Pos(lineNo, found));
                                }
                                lineNo++;
                            });
                            for (var i = newBreaks.length - 1; i >= 0; i--) {
                                replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length));
                            }
                        });
                        option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function(cm, val, old) {
                            cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
                            if (old != Init) {
                                cm.refresh();
                            }
                        });
                        option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {
                            return cm.refresh();
                        }, true);
                        option("electricChars", true);
                        option("inputStyle", mobile ? "contenteditable" : "textarea", function() {
                            throw new Error("inputStyle can not (yet) be changed in a running editor"); // FIXME
                        }, true);
                        option("spellcheck", false, function(cm, val) {
                            return cm.getInputField().spellcheck = val;
                        }, true);
                        option("autocorrect", false, function(cm, val) {
                            return cm.getInputField().autocorrect = val;
                        }, true);
                        option("autocapitalize", false, function(cm, val) {
                            return cm.getInputField().autocapitalize = val;
                        }, true);
                        option("rtlMoveVisually", !windows);
                        option("wholeLineUpdateBefore", true);
                        option("theme", "default", function(cm) {
                            themeChanged(cm);
                            updateGutters(cm);
                        }, true);
                        option("keyMap", "default", function(cm, val, old) {
                            var next = getKeyMap(val);
                            var prev = old != Init && getKeyMap(old);
                            if (prev && prev.detach) {
                                prev.detach(cm, next);
                            }
                            if (next.attach) {
                                next.attach(cm, prev || null);
                            }
                        });
                        option("extraKeys", null);
                        option("configureMouse", null);
                        option("lineWrapping", false, wrappingChanged, true);
                        option("gutters", [], function(cm, val) {
                            cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);
                            updateGutters(cm);
                        }, true);
                        option("fixedGutter", true, function(cm, val) {
                            cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
                            cm.refresh();
                        }, true);
                        option("coverGutterNextToScrollbar", false, function(cm) {
                            return updateScrollbars(cm);
                        }, true);
                        option("scrollbarStyle", "native", function(cm) {
                            initScrollbars(cm);
                            updateScrollbars(cm);
                            cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);
                            cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);
                        }, true);
                        option("lineNumbers", false, function(cm, val) {
                            cm.display.gutterSpecs = getGutters(cm.options.gutters, val);
                            updateGutters(cm);
                        }, true);
                        option("firstLineNumber", 1, updateGutters, true);
                        option("lineNumberFormatter", function(integer) {
                            return integer;
                        }, updateGutters, true);
                        option("showCursorWhenSelecting", false, updateSelection, true);
                        option("resetSelectionOnContextMenu", true);
                        option("lineWiseCopyCut", true);
                        option("pasteLinesPerSelection", true);
                        option("selectionsMayTouch", false);
                        option("readOnly", false, function(cm, val) {
                            if (val == "nocursor") {
                                onBlur(cm);
                                cm.display.input.blur();
                            }
                            cm.display.input.readOnlyChanged(val);
                        });
                        option("screenReaderLabel", null, function(cm, val) {
                            val = val === '' ? null : val;
                            cm.display.input.screenReaderLabelChanged(val);
                        });
                        option("disableInput", false, function(cm, val) {
                            if (!val) {
                                cm.display.input.reset();
                            }
                        }, true);
                        option("dragDrop", true, dragDropChanged);
                        option("allowDropFileTypes", null);
                        option("cursorBlinkRate", 530);
                        option("cursorScrollMargin", 0);
                        option("cursorHeight", 1, updateSelection, true);
                        option("singleCursorHeightPerLine", true, updateSelection, true);
                        option("workTime", 100);
                        option("workDelay", 100);
                        option("flattenSpans", true, resetModeState, true);
                        option("addModeClass", false, resetModeState, true);
                        option("pollInterval", 100);
                        option("undoDepth", 200, function(cm, val) {
                            return cm.doc.history.undoDepth = val;
                        });
                        option("historyEventDelay", 1250);
                        option("viewportMargin", 10, function(cm) {
                            return cm.refresh();
                        }, true);
                        option("maxHighlightLength", 10000, resetModeState, true);
                        option("moveInputWithCursor", true, function(cm, val) {
                            if (!val) {
                                cm.display.input.resetPosition();
                            }
                        });
                        option("tabindex", null, function(cm, val) {
                            return cm.display.input.getField().tabIndex = val || "";
                        });
                        option("autofocus", null);
                        option("direction", "ltr", function(cm, val) {
                            return cm.doc.setDirection(val);
                        }, true);
                        option("phrases", null);
                    }

                    function dragDropChanged(cm, value, old) {
                        var wasOn = old && old != Init;
                        if (!value != !wasOn) {
                            var funcs = cm.display.dragFunctions;
                            var toggle = value ? on : off;
                            toggle(cm.display.scroller, "dragstart", funcs.start);
                            toggle(cm.display.scroller, "dragenter", funcs.enter);
                            toggle(cm.display.scroller, "dragover", funcs.over);
                            toggle(cm.display.scroller, "dragleave", funcs.leave);
                            toggle(cm.display.scroller, "drop", funcs.drop);
                        }
                    }

                    function wrappingChanged(cm) {
                        if (cm.options.lineWrapping) {
                            addClass(cm.display.wrapper, "CodeMirror-wrap");
                            cm.display.sizer.style.minWidth = "";
                            cm.display.sizerWidth = null;
                        } else {
                            rmClass(cm.display.wrapper, "CodeMirror-wrap");
                            findMaxLine(cm);
                        }
                        estimateLineHeights(cm);
                        regChange(cm);
                        clearCaches(cm);
                        setTimeout(function() {
                            return updateScrollbars(cm);
                        }, 100);
                    }

                    // A CodeMirror instance represents an editor. This is the object
                    // that user code is usually dealing with.

                    function CodeMirror(place, options) {
                        var this$1 = this;
                        if (!(this instanceof CodeMirror)) {
                            return new CodeMirror(place, options);
                        }
                        this.options = options = options ? copyObj(options) : {};
                        // Determine effective options based on given values and defaults.
                        copyObj(defaults, options, false);
                        var doc = options.value;
                        if (typeof doc == "string") {
                            doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction);
                        } else if (options.mode) {
                            doc.modeOption = options.mode;
                        }
                        this.doc = doc;
                        var input = new CodeMirror.inputStyles[options.inputStyle](this);
                        var display = this.display = new Display(place, doc, input, options);
                        display.wrapper.CodeMirror = this;
                        themeChanged(this);
                        if (options.lineWrapping) {
                            this.display.wrapper.className += " CodeMirror-wrap";
                        }
                        initScrollbars(this);
                        this.state = {
                            keyMaps: [],
                            // stores maps added by addKeyMap
                            overlays: [],
                            // highlighting overlays, as added by addOverlay
                            modeGen: 0,
                            // bumped when mode/overlay changes, used to invalidate highlighting info
                            overwrite: false,
                            delayingBlurEvent: false,
                            focused: false,
                            suppressEdits: false,
                            // used to disable editing during key handlers when in readOnly mode
                            pasteIncoming: -1,
                            cutIncoming: -1,
                            // help recognize paste/cut edits in input.poll
                            selectingText: false,
                            draggingText: false,
                            highlight: new Delayed(),
                            // stores highlight worker timeout
                            keySeq: null,
                            // Unfinished key sequence
                            specialChars: null
                        };
                        if (options.autofocus && !mobile) {
                            display.input.focus();
                        }

                        // Override magic textarea content restore that IE sometimes does
                        // on our hidden textarea on reload
                        if (ie && ie_version < 11) {
                            setTimeout(function() {
                                return this$1.display.input.reset(true);
                            }, 20);
                        }
                        registerEventHandlers(this);
                        ensureGlobalHandlers();
                        startOperation(this);
                        this.curOp.forceUpdate = true;
                        attachDoc(this, doc);
                        if (options.autofocus && !mobile || this.hasFocus()) {
                            setTimeout(function() {
                                if (this$1.hasFocus() && !this$1.state.focused) {
                                    onFocus(this$1);
                                }
                            }, 20);
                        } else {
                            onBlur(this);
                        }
                        for (var opt in optionHandlers) {
                            if (optionHandlers.hasOwnProperty(opt)) {
                                optionHandlers[opt](this, options[opt], Init);
                            }
                        }
                        maybeUpdateLineNumberWidth(this);
                        if (options.finishInit) {
                            options.finishInit(this);
                        }
                        for (var i = 0; i < initHooks.length; ++i) {
                            initHooks[i](this);
                        }
                        endOperation(this);
                        // Suppress optimizelegibility in Webkit, since it breaks text
                        // measuring on line wrapping boundaries.
                        if (webkit && options.lineWrapping && getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") {
                            display.lineDiv.style.textRendering = "auto";
                        }
                    }

                    // The default configuration options.
                    CodeMirror.defaults = defaults;
                    // Functions to run when options are changed.
                    CodeMirror.optionHandlers = optionHandlers;

                    // Attach the necessary event handlers when initializing the editor
                    function registerEventHandlers(cm) {
                        var d = cm.display;
                        on(d.scroller, "mousedown", operation(cm, onMouseDown));
                        // Older IE's will not fire a second mousedown for a double click
                        if (ie && ie_version < 11) {
                            on(d.scroller, "dblclick", operation(cm, function(e) {
                                if (signalDOMEvent(cm, e)) {
                                    return;
                                }
                                var pos = posFromMouse(cm, e);
                                if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) {
                                    return;
                                }
                                e_preventDefault(e);
                                var word = cm.findWordAt(pos);
                                extendSelection(cm.doc, word.anchor, word.head);
                            }));
                        } else {
                            on(d.scroller, "dblclick", function(e) {
                                return signalDOMEvent(cm, e) || e_preventDefault(e);
                            });
                        }
                        // Some browsers fire contextmenu *after* opening the menu, at
                        // which point we can't mess with it anymore. Context menu is
                        // handled in onMouseDown for these browsers.
                        on(d.scroller, "contextmenu", function(e) {
                            return onContextMenu(cm, e);
                        });
                        on(d.input.getField(), "contextmenu", function(e) {
                            if (!d.scroller.contains(e.target)) {
                                onContextMenu(cm, e);
                            }
                        });

                        // Used to suppress mouse event handling when a touch happens
                        var touchFinished,
                            prevTouch = {
                                end: 0
                            };

                        function finishTouch() {
                            if (d.activeTouch) {
                                touchFinished = setTimeout(function() {
                                    return d.activeTouch = null;
                                }, 1000);
                                prevTouch = d.activeTouch;
                                prevTouch.end = +new Date();
                            }
                        }

                        function isMouseLikeTouchEvent(e) {
                            if (e.touches.length != 1) {
                                return false;
                            }
                            var touch = e.touches[0];
                            return touch.radiusX <= 1 && touch.radiusY <= 1;
                        }

                        function farAway(touch, other) {
                            if (other.left == null) {
                                return true;
                            }
                            var dx = other.left - touch.left,
                                dy = other.top - touch.top;
                            return dx * dx + dy * dy > 20 * 20;
                        }
                        on(d.scroller, "touchstart", function(e) {
                            if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {
                                d.input.ensurePolled();
                                clearTimeout(touchFinished);
                                var now = +new Date();
                                d.activeTouch = {
                                    start: now,
                                    moved: false,
                                    prev: now - prevTouch.end <= 300 ? prevTouch : null
                                };
                                if (e.touches.length == 1) {
                                    d.activeTouch.left = e.touches[0].pageX;
                                    d.activeTouch.top = e.touches[0].pageY;
                                }
                            }
                        });
                        on(d.scroller, "touchmove", function() {
                            if (d.activeTouch) {
                                d.activeTouch.moved = true;
                            }
                        });
                        on(d.scroller, "touchend", function(e) {
                            var touch = d.activeTouch;
                            if (touch && !eventInWidget(d, e) && touch.left != null && !touch.moved && new Date() - touch.start < 300) {
                                var pos = cm.coordsChar(d.activeTouch, "page"),
                                    range;
                                if (!touch.prev || farAway(touch, touch.prev))
                                // Single tap
                                {
                                    range = new Range(pos, pos);
                                } else if (!touch.prev.prev || farAway(touch, touch.prev.prev))
                                // Double tap
                                {
                                    range = cm.findWordAt(pos);
                                } else
                                // Triple tap
                                {
                                    range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0)));
                                }
                                cm.setSelection(range.anchor, range.head);
                                cm.focus();
                                e_preventDefault(e);
                            }
                            finishTouch();
                        });
                        on(d.scroller, "touchcancel", finishTouch);

                        // Sync scrolling between fake scrollbars and real scrollable
                        // area, ensure viewport is updated when scrolling.
                        on(d.scroller, "scroll", function() {
                            if (d.scroller.clientHeight) {
                                updateScrollTop(cm, d.scroller.scrollTop);
                                setScrollLeft(cm, d.scroller.scrollLeft, true);
                                signal(cm, "scroll", cm);
                            }
                        });

                        // Listen to wheel events in order to try and update the viewport on time.
                        on(d.scroller, "mousewheel", function(e) {
                            return onScrollWheel(cm, e);
                        });
                        on(d.scroller, "DOMMouseScroll", function(e) {
                            return onScrollWheel(cm, e);
                        });

                        // Prevent wrapper from ever scrolling
                        on(d.wrapper, "scroll", function() {
                            return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0;
                        });
                        d.dragFunctions = {
                            enter: function(e) {
                                if (!signalDOMEvent(cm, e)) {
                                    e_stop(e);
                                }
                            },
                            over: function(e) {
                                if (!signalDOMEvent(cm, e)) {
                                    onDragOver(cm, e);
                                    e_stop(e);
                                }
                            },
                            start: function(e) {
                                return onDragStart(cm, e);
                            },
                            drop: operation(cm, onDrop),
                            leave: function(e) {
                                if (!signalDOMEvent(cm, e)) {
                                    clearDragCursor(cm);
                                }
                            }
                        };
                        var inp = d.input.getField();
                        on(inp, "keyup", function(e) {
                            return onKeyUp.call(cm, e);
                        });
                        on(inp, "keydown", operation(cm, onKeyDown));
                        on(inp, "keypress", operation(cm, onKeyPress));
                        on(inp, "focus", function(e) {
                            return onFocus(cm, e);
                        });
                        on(inp, "blur", function(e) {
                            return onBlur(cm, e);
                        });
                    }
                    var initHooks = [];
                    CodeMirror.defineInitHook = function(f) {
                        return initHooks.push(f);
                    };

                    // Indent the given line. The how parameter can be "smart",
                    // "add"/null, "subtract", or "prev". When aggressive is false
                    // (typically set to true for forced single-line indents), empty
                    // lines are not indented, and places where the mode returns Pass
                    // are left alone.
                    function indentLine(cm, n, how, aggressive) {
                        var doc = cm.doc,
                            state;
                        if (how == null) {
                            how = "add";
                        }
                        if (how == "smart") {
                            // Fall back to "prev" when the mode doesn't have an indentation
                            // method.
                            if (!doc.mode.indent) {
                                how = "prev";
                            } else {
                                state = getContextBefore(cm, n).state;
                            }
                        }
                        var tabSize = cm.options.tabSize;
                        var line = getLine(doc, n),
                            curSpace = countColumn(line.text, null, tabSize);
                        if (line.stateAfter) {
                            line.stateAfter = null;
                        }
                        var curSpaceString = line.text.match(/^\s*/)[0],
                            indentation;
                        if (!aggressive && !/\S/.test(line.text)) {
                            indentation = 0;
                            how = "not";
                        } else if (how == "smart") {
                            indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
                            if (indentation == Pass || indentation > 150) {
                                if (!aggressive) {
                                    return;
                                }
                                how = "prev";
                            }
                        }
                        if (how == "prev") {
                            if (n > doc.first) {
                                indentation = countColumn(getLine(doc, n - 1).text, null, tabSize);
                            } else {
                                indentation = 0;
                            }
                        } else if (how == "add") {
                            indentation = curSpace + cm.options.indentUnit;
                        } else if (how == "subtract") {
                            indentation = curSpace - cm.options.indentUnit;
                        } else if (typeof how == "number") {
                            indentation = curSpace + how;
                        }
                        indentation = Math.max(0, indentation);
                        var indentString = "",
                            pos = 0;
                        if (cm.options.indentWithTabs) {
                            for (var i = Math.floor(indentation / tabSize); i; --i) {
                                pos += tabSize;
                                indentString += "\t";
                            }
                        }
                        if (pos < indentation) {
                            indentString += spaceStr(indentation - pos);
                        }
                        if (indentString != curSpaceString) {
                            replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
                            line.stateAfter = null;
                            return true;
                        } else {
                            // Ensure that, if the cursor was in the whitespace at the start
                            // of the line, it is moved to the end of that space.
                            for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {
                                var range = doc.sel.ranges[i$1];
                                if (range.head.line == n && range.head.ch < curSpaceString.length) {
                                    var pos$1 = Pos(n, curSpaceString.length);
                                    replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));
                                    break;
                                }
                            }
                        }
                    }

                    // This will be set to a {lineWise: bool, text: [string]} object, so
                    // that, when pasting, we know what kind of selections the copied
                    // text was made out of.
                    var lastCopied = null;

                    function setLastCopied(newLastCopied) {
                        lastCopied = newLastCopied;
                    }

                    function applyTextInput(cm, inserted, deleted, sel, origin) {
                        var doc = cm.doc;
                        cm.display.shift = false;
                        if (!sel) {
                            sel = doc.sel;
                        }
                        var recent = +new Date() - 200;
                        var paste = origin == "paste" || cm.state.pasteIncoming > recent;
                        var textLines = splitLinesAuto(inserted),
                            multiPaste = null;
                        // When pasting N lines into N selections, insert one line per selection
                        if (paste && sel.ranges.length > 1) {
                            if (lastCopied && lastCopied.text.join("\n") == inserted) {
                                if (sel.ranges.length % lastCopied.text.length == 0) {
                                    multiPaste = [];
                                    for (var i = 0; i < lastCopied.text.length; i++) {
                                        multiPaste.push(doc.splitLines(lastCopied.text[i]));
                                    }
                                }
                            } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {
                                multiPaste = map(textLines, function(l) {
                                    return [l];
                                });
                            }
                        }
                        var updateInput = cm.curOp.updateInput;
                        // Normal behavior is to insert the new text into every selection
                        for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {
                            var range = sel.ranges[i$1];
                            var from = range.from(),
                                to = range.to();
                            if (range.empty()) {
                                if (deleted && deleted > 0)
                                // Handle deletion
                                {
                                    from = Pos(from.line, from.ch - deleted);
                                } else if (cm.state.overwrite && !paste)
                                // Handle overwrite
                                {
                                    to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));
                                } else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n")) {
                                    from = to = Pos(from.line, 0);
                                }
                            }
                            var changeEvent = {
                                from: from,
                                to: to,
                                text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
                                origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")
                            };
                            makeChange(cm.doc, changeEvent);
                            signalLater(cm, "inputRead", cm, changeEvent);
                        }
                        if (inserted && !paste) {
                            triggerElectric(cm, inserted);
                        }
                        ensureCursorVisible(cm);
                        if (cm.curOp.updateInput < 2) {
                            cm.curOp.updateInput = updateInput;
                        }
                        cm.curOp.typing = true;
                        cm.state.pasteIncoming = cm.state.cutIncoming = -1;
                    }

                    function handlePaste(e, cm) {
                        var pasted = e.clipboardData && e.clipboardData.getData("Text");
                        if (pasted) {
                            e.preventDefault();
                            if (!cm.isReadOnly() && !cm.options.disableInput) {
                                runInOp(cm, function() {
                                    return applyTextInput(cm, pasted, 0, null, "paste");
                                });
                            }
                            return true;
                        }
                    }

                    function triggerElectric(cm, inserted) {
                        // When an 'electric' character is inserted, immediately trigger a reindent
                        if (!cm.options.electricChars || !cm.options.smartIndent) {
                            return;
                        }
                        var sel = cm.doc.sel;
                        for (var i = sel.ranges.length - 1; i >= 0; i--) {
                            var range = sel.ranges[i];
                            if (range.head.ch > 100 || i && sel.ranges[i - 1].head.line == range.head.line) {
                                continue;
                            }
                            var mode = cm.getModeAt(range.head);
                            var indented = false;
                            if (mode.electricChars) {
                                for (var j = 0; j < mode.electricChars.length; j++) {
                                    if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
                                        indented = indentLine(cm, range.head.line, "smart");
                                        break;
                                    }
                                }
                            } else if (mode.electricInput) {
                                if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) {
                                    indented = indentLine(cm, range.head.line, "smart");
                                }
                            }
                            if (indented) {
                                signalLater(cm, "electricInput", cm, range.head.line);
                            }
                        }
                    }

                    function copyableRanges(cm) {
                        var text = [],
                            ranges = [];
                        for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
                            var line = cm.doc.sel.ranges[i].head.line;
                            var lineRange = {
                                anchor: Pos(line, 0),
                                head: Pos(line + 1, 0)
                            };
                            ranges.push(lineRange);
                            text.push(cm.getRange(lineRange.anchor, lineRange.head));
                        }
                        return {
                            text: text,
                            ranges: ranges
                        };
                    }

                    function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {
                        field.setAttribute("autocorrect", autocorrect ? "" : "off");
                        field.setAttribute("autocapitalize", autocapitalize ? "" : "off");
                        field.setAttribute("spellcheck", !!spellcheck);
                    }

                    function hiddenTextarea() {
                        var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none");
                        var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
                        // The textarea is kept positioned near the cursor to prevent the
                        // fact that it'll be scrolled into view on input from scrolling
                        // our fake cursor out of view. On webkit, when wrap=off, paste is
                        // very slow. So make the area wide instead.
                        if (webkit) {
                            te.style.width = "1000px";
                        } else {
                            te.setAttribute("wrap", "off");
                        }
                        // If border: 0; -- iOS fails to open keyboard (issue #1287)
                        if (ios) {
                            te.style.border = "1px solid black";
                        }
                        disableBrowserMagic(te);
                        return div;
                    }

                    // The publicly visible API. Note that methodOp(f) means
                    // 'wrap f in an operation, performed on its `this` parameter'.

                    // This is not the complete set of editor methods. Most of the
                    // methods defined on the Doc type are also injected into
                    // CodeMirror.prototype, for backwards compatibility and
                    // convenience.

                    function addEditorMethods(CodeMirror) {
                        var optionHandlers = CodeMirror.optionHandlers;
                        var helpers = CodeMirror.helpers = {};
                        CodeMirror.prototype = {
                            constructor: CodeMirror,
                            focus: function() {
                                window.focus();
                                this.display.input.focus();
                            },
                            setOption: function(option, value) {
                                var options = this.options,
                                    old = options[option];
                                if (options[option] == value && option != "mode") {
                                    return;
                                }
                                options[option] = value;
                                if (optionHandlers.hasOwnProperty(option)) {
                                    operation(this, optionHandlers[option])(this, value, old);
                                }
                                signal(this, "optionChange", this, option);
                            },
                            getOption: function(option) {
                                return this.options[option];
                            },
                            getDoc: function() {
                                return this.doc;
                            },
                            addKeyMap: function(map, bottom) {
                                this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map));
                            },
                            removeKeyMap: function(map) {
                                var maps = this.state.keyMaps;
                                for (var i = 0; i < maps.length; ++i) {
                                    if (maps[i] == map || maps[i].name == map) {
                                        maps.splice(i, 1);
                                        return true;
                                    }
                                }
                            },
                            addOverlay: methodOp(function(spec, options) {
                                var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
                                if (mode.startState) {
                                    throw new Error("Overlays may not be stateful.");
                                }
                                insertSorted(this.state.overlays, {
                                    mode: mode,
                                    modeSpec: spec,
                                    opaque: options && options.opaque,
                                    priority: options && options.priority || 0
                                }, function(overlay) {
                                    return overlay.priority;
                                });
                                this.state.modeGen++;
                                regChange(this);
                            }),
                            removeOverlay: methodOp(function(spec) {
                                var overlays = this.state.overlays;
                                for (var i = 0; i < overlays.length; ++i) {
                                    var cur = overlays[i].modeSpec;
                                    if (cur == spec || typeof spec == "string" && cur.name == spec) {
                                        overlays.splice(i, 1);
                                        this.state.modeGen++;
                                        regChange(this);
                                        return;
                                    }
                                }
                            }),
                            indentLine: methodOp(function(n, dir, aggressive) {
                                if (typeof dir != "string" && typeof dir != "number") {
                                    if (dir == null) {
                                        dir = this.options.smartIndent ? "smart" : "prev";
                                    } else {
                                        dir = dir ? "add" : "subtract";
                                    }
                                }
                                if (isLine(this.doc, n)) {
                                    indentLine(this, n, dir, aggressive);
                                }
                            }),
                            indentSelection: methodOp(function(how) {
                                var ranges = this.doc.sel.ranges,
                                    end = -1;
                                for (var i = 0; i < ranges.length; i++) {
                                    var range = ranges[i];
                                    if (!range.empty()) {
                                        var from = range.from(),
                                            to = range.to();
                                        var start = Math.max(end, from.line);
                                        end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;
                                        for (var j = start; j < end; ++j) {
                                            indentLine(this, j, how);
                                        }
                                        var newRanges = this.doc.sel.ranges;
                                        if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) {
                                            replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll);
                                        }
                                    } else if (range.head.line > end) {
                                        indentLine(this, range.head.line, how, true);
                                        end = range.head.line;
                                        if (i == this.doc.sel.primIndex) {
                                            ensureCursorVisible(this);
                                        }
                                    }
                                }
                            }),
                            // Fetch the parser token for a given character. Useful for hacks
                            // that want to inspect the mode state (say, for completion).
                            getTokenAt: function(pos, precise) {
                                return takeToken(this, pos, precise);
                            },
                            getLineTokens: function(line, precise) {
                                return takeToken(this, Pos(line), precise, true);
                            },
                            getTokenTypeAt: function(pos) {
                                pos = clipPos(this.doc, pos);
                                var styles = getLineStyles(this, getLine(this.doc, pos.line));
                                var before = 0,
                                    after = (styles.length - 1) / 2,
                                    ch = pos.ch;
                                var type;
                                if (ch == 0) {
                                    type = styles[2];
                                } else {
                                    for (;;) {
                                        var mid = before + after >> 1;
                                        if ((mid ? styles[mid * 2 - 1] : 0) >= ch) {
                                            after = mid;
                                        } else if (styles[mid * 2 + 1] < ch) {
                                            before = mid + 1;
                                        } else {
                                            type = styles[mid * 2 + 2];
                                            break;
                                        }
                                    }
                                }
                                var cut = type ? type.indexOf("overlay ") : -1;
                                return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1);
                            },
                            getModeAt: function(pos) {
                                var mode = this.doc.mode;
                                if (!mode.innerMode) {
                                    return mode;
                                }
                                return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;
                            },
                            getHelper: function(pos, type) {
                                return this.getHelpers(pos, type)[0];
                            },
                            getHelpers: function(pos, type) {
                                var found = [];
                                if (!helpers.hasOwnProperty(type)) {
                                    return found;
                                }
                                var help = helpers[type],
                                    mode = this.getModeAt(pos);
                                if (typeof mode[type] == "string") {
                                    if (help[mode[type]]) {
                                        found.push(help[mode[type]]);
                                    }
                                } else if (mode[type]) {
                                    for (var i = 0; i < mode[type].length; i++) {
                                        var val = help[mode[type][i]];
                                        if (val) {
                                            found.push(val);
                                        }
                                    }
                                } else if (mode.helperType && help[mode.helperType]) {
                                    found.push(help[mode.helperType]);
                                } else if (help[mode.name]) {
                                    found.push(help[mode.name]);
                                }
                                for (var i$1 = 0; i$1 < help._global.length; i$1++) {
                                    var cur = help._global[i$1];
                                    if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) {
                                        found.push(cur.val);
                                    }
                                }
                                return found;
                            },
                            getStateAfter: function(line, precise) {
                                var doc = this.doc;
                                line = clipLine(doc, line == null ? doc.first + doc.size - 1 : line);
                                return getContextBefore(this, line + 1, precise).state;
                            },
                            cursorCoords: function(start, mode) {
                                var pos,
                                    range = this.doc.sel.primary();
                                if (start == null) {
                                    pos = range.head;
                                } else if (typeof start == "object") {
                                    pos = clipPos(this.doc, start);
                                } else {
                                    pos = start ? range.from() : range.to();
                                }
                                return cursorCoords(this, pos, mode || "page");
                            },
                            charCoords: function(pos, mode) {
                                return charCoords(this, clipPos(this.doc, pos), mode || "page");
                            },
                            coordsChar: function(coords, mode) {
                                coords = fromCoordSystem(this, coords, mode || "page");
                                return coordsChar(this, coords.left, coords.top);
                            },
                            lineAtHeight: function(height, mode) {
                                height = fromCoordSystem(this, {
                                    top: height,
                                    left: 0
                                }, mode || "page").top;
                                return lineAtHeight(this.doc, height + this.display.viewOffset);
                            },
                            heightAtLine: function(line, mode, includeWidgets) {
                                var end = false,
                                    lineObj;
                                if (typeof line == "number") {
                                    var last = this.doc.first + this.doc.size - 1;
                                    if (line < this.doc.first) {
                                        line = this.doc.first;
                                    } else if (line > last) {
                                        line = last;
                                        end = true;
                                    }
                                    lineObj = getLine(this.doc, line);
                                } else {
                                    lineObj = line;
                                }
                                return intoCoordSystem(this, lineObj, {
                                    top: 0,
                                    left: 0
                                }, mode || "page", includeWidgets || end).top + (end ? this.doc.height - heightAtLine(lineObj) : 0);
                            },
                            defaultTextHeight: function() {
                                return textHeight(this.display);
                            },
                            defaultCharWidth: function() {
                                return charWidth(this.display);
                            },
                            getViewport: function() {
                                return {
                                    from: this.display.viewFrom,
                                    to: this.display.viewTo
                                };
                            },
                            addWidget: function(pos, node, scroll, vert, horiz) {
                                var display = this.display;
                                pos = cursorCoords(this, clipPos(this.doc, pos));
                                var top = pos.bottom,
                                    left = pos.left;
                                node.style.position = "absolute";
                                node.setAttribute("cm-ignore-events", "true");
                                this.display.input.setUneditable(node);
                                display.sizer.appendChild(node);
                                if (vert == "over") {
                                    top = pos.top;
                                } else if (vert == "above" || vert == "near") {
                                    var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
                                        hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
                                    // Default to positioning above (if specified and possible); otherwise default to positioning below
                                    if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) {
                                        top = pos.top - node.offsetHeight;
                                    } else if (pos.bottom + node.offsetHeight <= vspace) {
                                        top = pos.bottom;
                                    }
                                    if (left + node.offsetWidth > hspace) {
                                        left = hspace - node.offsetWidth;
                                    }
                                }
                                node.style.top = top + "px";
                                node.style.left = node.style.right = "";
                                if (horiz == "right") {
                                    left = display.sizer.clientWidth - node.offsetWidth;
                                    node.style.right = "0px";
                                } else {
                                    if (horiz == "left") {
                                        left = 0;
                                    } else if (horiz == "middle") {
                                        left = (display.sizer.clientWidth - node.offsetWidth) / 2;
                                    }
                                    node.style.left = left + "px";
                                }
                                if (scroll) {
                                    scrollIntoView(this, {
                                        left: left,
                                        top: top,
                                        right: left + node.offsetWidth,
                                        bottom: top + node.offsetHeight
                                    });
                                }
                            },
                            triggerOnKeyDown: methodOp(onKeyDown),
                            triggerOnKeyPress: methodOp(onKeyPress),
                            triggerOnKeyUp: onKeyUp,
                            triggerOnMouseDown: methodOp(onMouseDown),
                            execCommand: function(cmd) {
                                if (commands.hasOwnProperty(cmd)) {
                                    return commands[cmd].call(null, this);
                                }
                            },
                            triggerElectric: methodOp(function(text) {
                                triggerElectric(this, text);
                            }),
                            findPosH: function(from, amount, unit, visually) {
                                var dir = 1;
                                if (amount < 0) {
                                    dir = -1;
                                    amount = -amount;
                                }
                                var cur = clipPos(this.doc, from);
                                for (var i = 0; i < amount; ++i) {
                                    cur = findPosH(this.doc, cur, dir, unit, visually);
                                    if (cur.hitSide) {
                                        break;
                                    }
                                }
                                return cur;
                            },
                            moveH: methodOp(function(dir, unit) {
                                var this$1 = this;
                                this.extendSelectionsBy(function(range) {
                                    if (this$1.display.shift || this$1.doc.extend || range.empty()) {
                                        return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually);
                                    } else {
                                        return dir < 0 ? range.from() : range.to();
                                    }
                                }, sel_move);
                            }),
                            deleteH: methodOp(function(dir, unit) {
                                var sel = this.doc.sel,
                                    doc = this.doc;
                                if (sel.somethingSelected()) {
                                    doc.replaceSelection("", null, "+delete");
                                } else {
                                    deleteNearSelection(this, function(range) {
                                        var other = findPosH(doc, range.head, dir, unit, false);
                                        return dir < 0 ? {
                                            from: other,
                                            to: range.head
                                        } : {
                                            from: range.head,
                                            to: other
                                        };
                                    });
                                }
                            }),
                            findPosV: function(from, amount, unit, goalColumn) {
                                var dir = 1,
                                    x = goalColumn;
                                if (amount < 0) {
                                    dir = -1;
                                    amount = -amount;
                                }
                                var cur = clipPos(this.doc, from);
                                for (var i = 0; i < amount; ++i) {
                                    var coords = cursorCoords(this, cur, "div");
                                    if (x == null) {
                                        x = coords.left;
                                    } else {
                                        coords.left = x;
                                    }
                                    cur = findPosV(this, coords, dir, unit);
                                    if (cur.hitSide) {
                                        break;
                                    }
                                }
                                return cur;
                            },
                            moveV: methodOp(function(dir, unit) {
                                var this$1 = this;
                                var doc = this.doc,
                                    goals = [];
                                var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();
                                doc.extendSelectionsBy(function(range) {
                                    if (collapse) {
                                        return dir < 0 ? range.from() : range.to();
                                    }
                                    var headPos = cursorCoords(this$1, range.head, "div");
                                    if (range.goalColumn != null) {
                                        headPos.left = range.goalColumn;
                                    }
                                    goals.push(headPos.left);
                                    var pos = findPosV(this$1, headPos, dir, unit);
                                    if (unit == "page" && range == doc.sel.primary()) {
                                        addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top);
                                    }
                                    return pos;
                                }, sel_move);
                                if (goals.length) {
                                    for (var i = 0; i < doc.sel.ranges.length; i++) {
                                        doc.sel.ranges[i].goalColumn = goals[i];
                                    }
                                }
                            }),
                            // Find the word at the given position (as returned by coordsChar).
                            findWordAt: function(pos) {
                                var doc = this.doc,
                                    line = getLine(doc, pos.line).text;
                                var start = pos.ch,
                                    end = pos.ch;
                                if (line) {
                                    var helper = this.getHelper(pos, "wordChars");
                                    if ((pos.sticky == "before" || end == line.length) && start) {
                                        --start;
                                    } else {
                                        ++end;
                                    }
                                    var startChar = line.charAt(start);
                                    var check = isWordChar(startChar, helper) ? function(ch) {
                                        return isWordChar(ch, helper);
                                    } : /\s/.test(startChar) ? function(ch) {
                                        return /\s/.test(ch);
                                    } : function(ch) {
                                        return !/\s/.test(ch) && !isWordChar(ch);
                                    };
                                    while (start > 0 && check(line.charAt(start - 1))) {
                                        --start;
                                    }
                                    while (end < line.length && check(line.charAt(end))) {
                                        ++end;
                                    }
                                }
                                return new Range(Pos(pos.line, start), Pos(pos.line, end));
                            },
                            toggleOverwrite: function(value) {
                                if (value != null && value == this.state.overwrite) {
                                    return;
                                }
                                if (this.state.overwrite = !this.state.overwrite) {
                                    addClass(this.display.cursorDiv, "CodeMirror-overwrite");
                                } else {
                                    rmClass(this.display.cursorDiv, "CodeMirror-overwrite");
                                }
                                signal(this, "overwriteToggle", this, this.state.overwrite);
                            },
                            hasFocus: function() {
                                return this.display.input.getField() == activeElt();
                            },
                            isReadOnly: function() {
                                return !!(this.options.readOnly || this.doc.cantEdit);
                            },
                            scrollTo: methodOp(function(x, y) {
                                scrollToCoords(this, x, y);
                            }),
                            getScrollInfo: function() {
                                var scroller = this.display.scroller;
                                return {
                                    left: scroller.scrollLeft,
                                    top: scroller.scrollTop,
                                    height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,
                                    width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,
                                    clientHeight: displayHeight(this),
                                    clientWidth: displayWidth(this)
                                };
                            },
                            scrollIntoView: methodOp(function(range, margin) {
                                if (range == null) {
                                    range = {
                                        from: this.doc.sel.primary().head,
                                        to: null
                                    };
                                    if (margin == null) {
                                        margin = this.options.cursorScrollMargin;
                                    }
                                } else if (typeof range == "number") {
                                    range = {
                                        from: Pos(range, 0),
                                        to: null
                                    };
                                } else if (range.from == null) {
                                    range = {
                                        from: range,
                                        to: null
                                    };
                                }
                                if (!range.to) {
                                    range.to = range.from;
                                }
                                range.margin = margin || 0;
                                if (range.from.line != null) {
                                    scrollToRange(this, range);
                                } else {
                                    scrollToCoordsRange(this, range.from, range.to, range.margin);
                                }
                            }),
                            setSize: methodOp(function(width, height) {
                                var this$1 = this;
                                var interpret = function(val) {
                                    return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val;
                                };
                                if (width != null) {
                                    this.display.wrapper.style.width = interpret(width);
                                }
                                if (height != null) {
                                    this.display.wrapper.style.height = interpret(height);
                                }
                                if (this.options.lineWrapping) {
                                    clearLineMeasurementCache(this);
                                }
                                var lineNo = this.display.viewFrom;
                                this.doc.iter(lineNo, this.display.viewTo, function(line) {
                                    if (line.widgets) {
                                        for (var i = 0; i < line.widgets.length; i++) {
                                            if (line.widgets[i].noHScroll) {
                                                regLineChange(this$1, lineNo, "widget");
                                                break;
                                            }
                                        }
                                    }
                                    ++lineNo;
                                });
                                this.curOp.forceUpdate = true;
                                signal(this, "refresh", this);
                            }),
                            operation: function(f) {
                                return runInOp(this, f);
                            },
                            startOperation: function() {
                                return startOperation(this);
                            },
                            endOperation: function() {
                                return endOperation(this);
                            },
                            refresh: methodOp(function() {
                                var oldHeight = this.display.cachedTextHeight;
                                regChange(this);
                                this.curOp.forceUpdate = true;
                                clearCaches(this);
                                scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);
                                updateGutterSpace(this.display);
                                if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping) {
                                    estimateLineHeights(this);
                                }
                                signal(this, "refresh", this);
                            }),
                            swapDoc: methodOp(function(doc) {
                                var old = this.doc;
                                old.cm = null;
                                // Cancel the current text selection if any (#5821)
                                if (this.state.selectingText) {
                                    this.state.selectingText();
                                }
                                attachDoc(this, doc);
                                clearCaches(this);
                                this.display.input.reset();
                                scrollToCoords(this, doc.scrollLeft, doc.scrollTop);
                                this.curOp.forceScroll = true;
                                signalLater(this, "swapDoc", this, old);
                                return old;
                            }),
                            phrase: function(phraseText) {
                                var phrases = this.options.phrases;
                                return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText;
                            },
                            getInputField: function() {
                                return this.display.input.getField();
                            },
                            getWrapperElement: function() {
                                return this.display.wrapper;
                            },
                            getScrollerElement: function() {
                                return this.display.scroller;
                            },
                            getGutterElement: function() {
                                return this.display.gutters;
                            }
                        };
                        eventMixin(CodeMirror);
                        CodeMirror.registerHelper = function(type, name, value) {
                            if (!helpers.hasOwnProperty(type)) {
                                helpers[type] = CodeMirror[type] = {
                                    _global: []
                                };
                            }
                            helpers[type][name] = value;
                        };
                        CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {
                            CodeMirror.registerHelper(type, name, value);
                            helpers[type]._global.push({
                                pred: predicate,
                                val: value
                            });
                        };
                    }

                    // Used for horizontal relative motion. Dir is -1 or 1 (left or
                    // right), unit can be "codepoint", "char", "column" (like char, but
                    // doesn't cross line boundaries), "word" (across next word), or
                    // "group" (to the start of next group of word or
                    // non-word-non-whitespace chars). The visually param controls
                    // whether, in right-to-left text, direction 1 means to move towards
                    // the next index in the string, or towards the character to the right
                    // of the current position. The resulting position will have a
                    // hitSide=true property if it reached the end of the document.
                    function findPosH(doc, pos, dir, unit, visually) {
                        var oldPos = pos;
                        var origDir = dir;
                        var lineObj = getLine(doc, pos.line);
                        var lineDir = visually && doc.direction == "rtl" ? -dir : dir;

                        function findNextLine() {
                            var l = pos.line + lineDir;
                            if (l < doc.first || l >= doc.first + doc.size) {
                                return false;
                            }
                            pos = new Pos(l, pos.ch, pos.sticky);
                            return lineObj = getLine(doc, l);
                        }

                        function moveOnce(boundToLine) {
                            var next;
                            if (unit == "codepoint") {
                                var ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1));
                                if (isNaN(ch)) {
                                    next = null;
                                } else {
                                    var astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF;
                                    next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir);
                                }
                            } else if (visually) {
                                next = moveVisually(doc.cm, lineObj, pos, dir);
                            } else {
                                next = moveLogically(lineObj, pos, dir);
                            }
                            if (next == null) {
                                if (!boundToLine && findNextLine()) {
                                    pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir);
                                } else {
                                    return false;
                                }
                            } else {
                                pos = next;
                            }
                            return true;
                        }
                        if (unit == "char" || unit == "codepoint") {
                            moveOnce();
                        } else if (unit == "column") {
                            moveOnce(true);
                        } else if (unit == "word" || unit == "group") {
                            var sawType = null,
                                group = unit == "group";
                            var helper = doc.cm && doc.cm.getHelper(pos, "wordChars");
                            for (var first = true;; first = false) {
                                if (dir < 0 && !moveOnce(!first)) {
                                    break;
                                }
                                var cur = lineObj.text.charAt(pos.ch) || "\n";
                                var type = isWordChar(cur, helper) ? "w" : group && cur == "\n" ? "n" : !group || /\s/.test(cur) ? null : "p";
                                if (group && !first && !type) {
                                    type = "s";
                                }
                                if (sawType && sawType != type) {
                                    if (dir < 0) {
                                        dir = 1;
                                        moveOnce();
                                        pos.sticky = "after";
                                    }
                                    break;
                                }
                                if (type) {
                                    sawType = type;
                                }
                                if (dir > 0 && !moveOnce(!first)) {
                                    break;
                                }
                            }
                        }
                        var result = skipAtomic(doc, pos, oldPos, origDir, true);
                        if (equalCursorPos(oldPos, result)) {
                            result.hitSide = true;
                        }
                        return result;
                    }

                    // For relative vertical movement. Dir may be -1 or 1. Unit can be
                    // "page" or "line". The resulting position will have a hitSide=true
                    // property if it reached the end of the document.
                    function findPosV(cm, pos, dir, unit) {
                        var doc = cm.doc,
                            x = pos.left,
                            y;
                        if (unit == "page") {
                            var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
                            var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
                            y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;
                        } else if (unit == "line") {
                            y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
                        }
                        var target;
                        for (;;) {
                            target = coordsChar(cm, x, y);
                            if (!target.outside) {
                                break;
                            }
                            if (dir < 0 ? y <= 0 : y >= doc.height) {
                                target.hitSide = true;
                                break;
                            }
                            y += dir * 5;
                        }
                        return target;
                    }

                    // CONTENTEDITABLE INPUT STYLE

                    var ContentEditableInput = function(cm) {
                        this.cm = cm;
                        this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;
                        this.polling = new Delayed();
                        this.composing = null;
                        this.gracePeriod = false;
                        this.readDOMTimeout = null;
                    };
                    ContentEditableInput.prototype.init = function(display) {
                        var this$1 = this;
                        var input = this,
                            cm = input.cm;
                        var div = input.div = display.lineDiv;
                        div.contentEditable = true;
                        disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);

                        function belongsToInput(e) {
                            for (var t = e.target; t; t = t.parentNode) {
                                if (t == div) {
                                    return true;
                                }
                                if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) {
                                    break;
                                }
                            }
                            return false;
                        }
                        on(div, "paste", function(e) {
                            if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) {
                                return;
                            }
                            // IE doesn't fire input events, so we schedule a read for the pasted content in this way
                            if (ie_version <= 11) {
                                setTimeout(operation(cm, function() {
                                    return this$1.updateFromDOM();
                                }), 20);
                            }
                        });
                        on(div, "compositionstart", function(e) {
                            this$1.composing = {
                                data: e.data,
                                done: false
                            };
                        });
                        on(div, "compositionupdate", function(e) {
                            if (!this$1.composing) {
                                this$1.composing = {
                                    data: e.data,
                                    done: false
                                };
                            }
                        });
                        on(div, "compositionend", function(e) {
                            if (this$1.composing) {
                                if (e.data != this$1.composing.data) {
                                    this$1.readFromDOMSoon();
                                }
                                this$1.composing.done = true;
                            }
                        });
                        on(div, "touchstart", function() {
                            return input.forceCompositionEnd();
                        });
                        on(div, "input", function() {
                            if (!this$1.composing) {
                                this$1.readFromDOMSoon();
                            }
                        });

                        function onCopyCut(e) {
                            if (!belongsToInput(e) || signalDOMEvent(cm, e)) {
                                return;
                            }
                            if (cm.somethingSelected()) {
                                setLastCopied({
                                    lineWise: false,
                                    text: cm.getSelections()
                                });
                                if (e.type == "cut") {
                                    cm.replaceSelection("", null, "cut");
                                }
                            } else if (!cm.options.lineWiseCopyCut) {
                                return;
                            } else {
                                var ranges = copyableRanges(cm);
                                setLastCopied({
                                    lineWise: true,
                                    text: ranges.text
                                });
                                if (e.type == "cut") {
                                    cm.operation(function() {
                                        cm.setSelections(ranges.ranges, 0, sel_dontScroll);
                                        cm.replaceSelection("", null, "cut");
                                    });
                                }
                            }
                            if (e.clipboardData) {
                                e.clipboardData.clearData();
                                var content = lastCopied.text.join("\n");
                                // iOS exposes the clipboard API, but seems to discard content inserted into it
                                e.clipboardData.setData("Text", content);
                                if (e.clipboardData.getData("Text") == content) {
                                    e.preventDefault();
                                    return;
                                }
                            }
                            // Old-fashioned briefly-focus-a-textarea hack
                            var kludge = hiddenTextarea(),
                                te = kludge.firstChild;
                            cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
                            te.value = lastCopied.text.join("\n");
                            var hadFocus = activeElt();
                            selectInput(te);
                            setTimeout(function() {
                                cm.display.lineSpace.removeChild(kludge);
                                hadFocus.focus();
                                if (hadFocus == div) {
                                    input.showPrimarySelection();
                                }
                            }, 50);
                        }
                        on(div, "copy", onCopyCut);
                        on(div, "cut", onCopyCut);
                    };
                    ContentEditableInput.prototype.screenReaderLabelChanged = function(label) {
                        // Label for screenreaders, accessibility
                        if (label) {
                            this.div.setAttribute('aria-label', label);
                        } else {
                            this.div.removeAttribute('aria-label');
                        }
                    };
                    ContentEditableInput.prototype.prepareSelection = function() {
                        var result = prepareSelection(this.cm, false);
                        result.focus = activeElt() == this.div;
                        return result;
                    };
                    ContentEditableInput.prototype.showSelection = function(info, takeFocus) {
                        if (!info || !this.cm.display.view.length) {
                            return;
                        }
                        if (info.focus || takeFocus) {
                            this.showPrimarySelection();
                        }
                        this.showMultipleSelections(info);
                    };
                    ContentEditableInput.prototype.getSelection = function() {
                        return this.cm.display.wrapper.ownerDocument.getSelection();
                    };
                    ContentEditableInput.prototype.showPrimarySelection = function() {
                        var sel = this.getSelection(),
                            cm = this.cm,
                            prim = cm.doc.sel.primary();
                        var from = prim.from(),
                            to = prim.to();
                        if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
                            sel.removeAllRanges();
                            return;
                        }
                        var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
                        var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);
                        if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && cmp(minPos(curAnchor, curFocus), from) == 0 && cmp(maxPos(curAnchor, curFocus), to) == 0) {
                            return;
                        }
                        var view = cm.display.view;
                        var start = from.line >= cm.display.viewFrom && posToDOM(cm, from) || {
                            node: view[0].measure.map[2],
                            offset: 0
                        };
                        var end = to.line < cm.display.viewTo && posToDOM(cm, to);
                        if (!end) {
                            var measure = view[view.length - 1].measure;
                            var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;
                            end = {
                                node: map[map.length - 1],
                                offset: map[map.length - 2] - map[map.length - 3]
                            };
                        }
                        if (!start || !end) {
                            sel.removeAllRanges();
                            return;
                        }
                        var old = sel.rangeCount && sel.getRangeAt(0),
                            rng;
                        try {
                            rng = range(start.node, start.offset, end.offset, end.node);
                        } catch (e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible
                        if (rng) {
                            if (!gecko && cm.state.focused) {
                                sel.collapse(start.node, start.offset);
                                if (!rng.collapsed) {
                                    sel.removeAllRanges();
                                    sel.addRange(rng);
                                }
                            } else {
                                sel.removeAllRanges();
                                sel.addRange(rng);
                            }
                            if (old && sel.anchorNode == null) {
                                sel.addRange(old);
                            } else if (gecko) {
                                this.startGracePeriod();
                            }
                        }
                        this.rememberSelection();
                    };
                    ContentEditableInput.prototype.startGracePeriod = function() {
                        var this$1 = this;
                        clearTimeout(this.gracePeriod);
                        this.gracePeriod = setTimeout(function() {
                            this$1.gracePeriod = false;
                            if (this$1.selectionChanged()) {
                                this$1.cm.operation(function() {
                                    return this$1.cm.curOp.selectionChanged = true;
                                });
                            }
                        }, 20);
                    };
                    ContentEditableInput.prototype.showMultipleSelections = function(info) {
                        removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);
                        removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);
                    };
                    ContentEditableInput.prototype.rememberSelection = function() {
                        var sel = this.getSelection();
                        this.lastAnchorNode = sel.anchorNode;
                        this.lastAnchorOffset = sel.anchorOffset;
                        this.lastFocusNode = sel.focusNode;
                        this.lastFocusOffset = sel.focusOffset;
                    };
                    ContentEditableInput.prototype.selectionInEditor = function() {
                        var sel = this.getSelection();
                        if (!sel.rangeCount) {
                            return false;
                        }
                        var node = sel.getRangeAt(0).commonAncestorContainer;
                        return contains(this.div, node);
                    };
                    ContentEditableInput.prototype.focus = function() {
                        if (this.cm.options.readOnly != "nocursor") {
                            if (!this.selectionInEditor() || activeElt() != this.div) {
                                this.showSelection(this.prepareSelection(), true);
                            }
                            this.div.focus();
                        }
                    };
                    ContentEditableInput.prototype.blur = function() {
                        this.div.blur();
                    };
                    ContentEditableInput.prototype.getField = function() {
                        return this.div;
                    };
                    ContentEditableInput.prototype.supportsTouch = function() {
                        return true;
                    };
                    ContentEditableInput.prototype.receivedFocus = function() {
                        var this$1 = this;
                        var input = this;
                        if (this.selectionInEditor()) {
                            setTimeout(function() {
                                return this$1.pollSelection();
                            }, 20);
                        } else {
                            runInOp(this.cm, function() {
                                return input.cm.curOp.selectionChanged = true;
                            });
                        }

                        function poll() {
                            if (input.cm.state.focused) {
                                input.pollSelection();
                                input.polling.set(input.cm.options.pollInterval, poll);
                            }
                        }
                        this.polling.set(this.cm.options.pollInterval, poll);
                    };
                    ContentEditableInput.prototype.selectionChanged = function() {
                        var sel = this.getSelection();
                        return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset;
                    };
                    ContentEditableInput.prototype.pollSelection = function() {
                        if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) {
                            return;
                        }
                        var sel = this.getSelection(),
                            cm = this.cm;
                        // On Android Chrome (version 56, at least), backspacing into an
                        // uneditable block element will put the cursor in that element,
                        // and then, because it's not editable, hide the virtual keyboard.
                        // Because Android doesn't allow us to actually detect backspace
                        // presses in a sane way, this code checks for when that happens
                        // and simulates a backspace press in this case.
                        if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {
                            this.cm.triggerOnKeyDown({
                                type: "keydown",
                                keyCode: 8,
                                preventDefault: Math.abs
                            });
                            this.blur();
                            this.focus();
                            return;
                        }
                        if (this.composing) {
                            return;
                        }
                        this.rememberSelection();
                        var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
                        var head = domToPos(cm, sel.focusNode, sel.focusOffset);
                        if (anchor && head) {
                            runInOp(cm, function() {
                                setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);
                                if (anchor.bad || head.bad) {
                                    cm.curOp.selectionChanged = true;
                                }
                            });
                        }
                    };
                    ContentEditableInput.prototype.pollContent = function() {
                        if (this.readDOMTimeout != null) {
                            clearTimeout(this.readDOMTimeout);
                            this.readDOMTimeout = null;
                        }
                        var cm = this.cm,
                            display = cm.display,
                            sel = cm.doc.sel.primary();
                        var from = sel.from(),
                            to = sel.to();
                        if (from.ch == 0 && from.line > cm.firstLine()) {
                            from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length);
                        }
                        if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine()) {
                            to = Pos(to.line + 1, 0);
                        }
                        if (from.line < display.viewFrom || to.line > display.viewTo - 1) {
                            return false;
                        }
                        var fromIndex, fromLine, fromNode;
                        if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
                            fromLine = lineNo(display.view[0].line);
                            fromNode = display.view[0].node;
                        } else {
                            fromLine = lineNo(display.view[fromIndex].line);
                            fromNode = display.view[fromIndex - 1].node.nextSibling;
                        }
                        var toIndex = findViewIndex(cm, to.line);
                        var toLine, toNode;
                        if (toIndex == display.view.length - 1) {
                            toLine = display.viewTo - 1;
                            toNode = display.lineDiv.lastChild;
                        } else {
                            toLine = lineNo(display.view[toIndex + 1].line) - 1;
                            toNode = display.view[toIndex + 1].node.previousSibling;
                        }
                        if (!fromNode) {
                            return false;
                        }
                        var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
                        var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
                        while (newText.length > 1 && oldText.length > 1) {
                            if (lst(newText) == lst(oldText)) {
                                newText.pop();
                                oldText.pop();
                                toLine--;
                            } else if (newText[0] == oldText[0]) {
                                newText.shift();
                                oldText.shift();
                                fromLine++;
                            } else {
                                break;
                            }
                        }
                        var cutFront = 0,
                            cutEnd = 0;
                        var newTop = newText[0],
                            oldTop = oldText[0],
                            maxCutFront = Math.min(newTop.length, oldTop.length);
                        while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) {
                            ++cutFront;
                        }
                        var newBot = lst(newText),
                            oldBot = lst(oldText);
                        var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), oldBot.length - (oldText.length == 1 ? cutFront : 0));
                        while (cutEnd < maxCutEnd && newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
                            ++cutEnd;
                        }
                        // Try to move start of change to start of selection if ambiguous
                        if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {
                            while (cutFront && cutFront > from.ch && newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
                                cutFront--;
                                cutEnd++;
                            }
                        }
                        newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, "");
                        newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "");
                        var chFrom = Pos(fromLine, cutFront);
                        var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);
                        if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {
                            replaceRange(cm.doc, newText, chFrom, chTo, "+input");
                            return true;
                        }
                    };
                    ContentEditableInput.prototype.ensurePolled = function() {
                        this.forceCompositionEnd();
                    };
                    ContentEditableInput.prototype.reset = function() {
                        this.forceCompositionEnd();
                    };
                    ContentEditableInput.prototype.forceCompositionEnd = function() {
                        if (!this.composing) {
                            return;
                        }
                        clearTimeout(this.readDOMTimeout);
                        this.composing = null;
                        this.updateFromDOM();
                        this.div.blur();
                        this.div.focus();
                    };
                    ContentEditableInput.prototype.readFromDOMSoon = function() {
                        var this$1 = this;
                        if (this.readDOMTimeout != null) {
                            return;
                        }
                        this.readDOMTimeout = setTimeout(function() {
                            this$1.readDOMTimeout = null;
                            if (this$1.composing) {
                                if (this$1.composing.done) {
                                    this$1.composing = null;
                                } else {
                                    return;
                                }
                            }
                            this$1.updateFromDOM();
                        }, 80);
                    };
                    ContentEditableInput.prototype.updateFromDOM = function() {
                        var this$1 = this;
                        if (this.cm.isReadOnly() || !this.pollContent()) {
                            runInOp(this.cm, function() {
                                return regChange(this$1.cm);
                            });
                        }
                    };
                    ContentEditableInput.prototype.setUneditable = function(node) {
                        node.contentEditable = "false";
                    };
                    ContentEditableInput.prototype.onKeyPress = function(e) {
                        if (e.charCode == 0 || this.composing) {
                            return;
                        }
                        e.preventDefault();
                        if (!this.cm.isReadOnly()) {
                            operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0);
                        }
                    };
                    ContentEditableInput.prototype.readOnlyChanged = function(val) {
                        this.div.contentEditable = String(val != "nocursor");
                    };
                    ContentEditableInput.prototype.onContextMenu = function() {};
                    ContentEditableInput.prototype.resetPosition = function() {};
                    ContentEditableInput.prototype.needsContentAttribute = true;

                    function posToDOM(cm, pos) {
                        var view = findViewForLine(cm, pos.line);
                        if (!view || view.hidden) {
                            return null;
                        }
                        var line = getLine(cm.doc, pos.line);
                        var info = mapFromLineView(view, line, pos.line);
                        var order = getOrder(line, cm.doc.direction),
                            side = "left";
                        if (order) {
                            var partPos = getBidiPartAt(order, pos.ch);
                            side = partPos % 2 ? "right" : "left";
                        }
                        var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);
                        result.offset = result.collapse == "right" ? result.end : result.start;
                        return result;
                    }

                    function isInGutter(node) {
                        for (var scan = node; scan; scan = scan.parentNode) {
                            if (/CodeMirror-gutter-wrapper/.test(scan.className)) {
                                return true;
                            }
                        }
                        return false;
                    }

                    function badPos(pos, bad) {
                        if (bad) {
                            pos.bad = true;
                        }
                        return pos;
                    }

                    function domTextBetween(cm, from, to, fromLine, toLine) {
                        var text = "",
                            closing = false,
                            lineSep = cm.doc.lineSeparator(),
                            extraLinebreak = false;

                        function recognizeMarker(id) {
                            return function(marker) {
                                return marker.id == id;
                            };
                        }

                        function close() {
                            if (closing) {
                                text += lineSep;
                                if (extraLinebreak) {
                                    text += lineSep;
                                }
                                closing = extraLinebreak = false;
                            }
                        }

                        function addText(str) {
                            if (str) {
                                close();
                                text += str;
                            }
                        }

                        function walk(node) {
                            if (node.nodeType == 1) {
                                var cmText = node.getAttribute("cm-text");
                                if (cmText) {
                                    addText(cmText);
                                    return;
                                }
                                var markerID = node.getAttribute("cm-marker"),
                                    range;
                                if (markerID) {
                                    var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
                                    if (found.length && (range = found[0].find(0))) {
                                        addText(getBetween(cm.doc, range.from, range.to).join(lineSep));
                                    }
                                    return;
                                }
                                if (node.getAttribute("contenteditable") == "false") {
                                    return;
                                }
                                var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);
                                if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) {
                                    return;
                                }
                                if (isBlock) {
                                    close();
                                }
                                for (var i = 0; i < node.childNodes.length; i++) {
                                    walk(node.childNodes[i]);
                                }
                                if (/^(pre|p)$/i.test(node.nodeName)) {
                                    extraLinebreak = true;
                                }
                                if (isBlock) {
                                    closing = true;
                                }
                            } else if (node.nodeType == 3) {
                                addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
                            }
                        }
                        for (;;) {
                            walk(from);
                            if (from == to) {
                                break;
                            }
                            from = from.nextSibling;
                            extraLinebreak = false;
                        }
                        return text;
                    }

                    function domToPos(cm, node, offset) {
                        var lineNode;
                        if (node == cm.display.lineDiv) {
                            lineNode = cm.display.lineDiv.childNodes[offset];
                            if (!lineNode) {
                                return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true);
                            }
                            node = null;
                            offset = 0;
                        } else {
                            for (lineNode = node;; lineNode = lineNode.parentNode) {
                                if (!lineNode || lineNode == cm.display.lineDiv) {
                                    return null;
                                }
                                if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) {
                                    break;
                                }
                            }
                        }
                        for (var i = 0; i < cm.display.view.length; i++) {
                            var lineView = cm.display.view[i];
                            if (lineView.node == lineNode) {
                                return locateNodeInLineView(lineView, node, offset);
                            }
                        }
                    }

                    function locateNodeInLineView(lineView, node, offset) {
                        var wrapper = lineView.text.firstChild,
                            bad = false;
                        if (!node || !contains(wrapper, node)) {
                            return badPos(Pos(lineNo(lineView.line), 0), true);
                        }
                        if (node == wrapper) {
                            bad = true;
                            node = wrapper.childNodes[offset];
                            offset = 0;
                            if (!node) {
                                var line = lineView.rest ? lst(lineView.rest) : lineView.line;
                                return badPos(Pos(lineNo(line), line.text.length), bad);
                            }
                        }
                        var textNode = node.nodeType == 3 ? node : null,
                            topNode = node;
                        if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
                            textNode = node.firstChild;
                            if (offset) {
                                offset = textNode.nodeValue.length;
                            }
                        }
                        while (topNode.parentNode != wrapper) {
                            topNode = topNode.parentNode;
                        }
                        var measure = lineView.measure,
                            maps = measure.maps;

                        function find(textNode, topNode, offset) {
                            for (var i = -1; i < (maps ? maps.length : 0); i++) {
                                var map = i < 0 ? measure.map : maps[i];
                                for (var j = 0; j < map.length; j += 3) {
                                    var curNode = map[j + 2];
                                    if (curNode == textNode || curNode == topNode) {
                                        var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);
                                        var ch = map[j] + offset;
                                        if (offset < 0 || curNode != textNode) {
                                            ch = map[j + (offset ? 1 : 0)];
                                        }
                                        return Pos(line, ch);
                                    }
                                }
                            }
                        }
                        var found = find(textNode, topNode, offset);
                        if (found) {
                            return badPos(found, bad);
                        }

                        // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems
                        for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {
                            found = find(after, after.firstChild, 0);
                            if (found) {
                                return badPos(Pos(found.line, found.ch - dist), bad);
                            } else {
                                dist += after.textContent.length;
                            }
                        }
                        for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {
                            found = find(before, before.firstChild, -1);
                            if (found) {
                                return badPos(Pos(found.line, found.ch + dist$1), bad);
                            } else {
                                dist$1 += before.textContent.length;
                            }
                        }
                    }

                    // TEXTAREA INPUT STYLE

                    var TextareaInput = function(cm) {
                        this.cm = cm;
                        // See input.poll and input.reset
                        this.prevInput = "";

                        // Flag that indicates whether we expect input to appear real soon
                        // now (after some event like 'keypress' or 'input') and are
                        // polling intensively.
                        this.pollingFast = false;
                        // Self-resetting timeout for the poller
                        this.polling = new Delayed();
                        // Used to work around IE issue with selection being forgotten when focus moves away from textarea
                        this.hasSelection = false;
                        this.composing = null;
                    };
                    TextareaInput.prototype.init = function(display) {
                        var this$1 = this;
                        var input = this,
                            cm = this.cm;
                        this.createField(display);
                        var te = this.textarea;
                        display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);

                        // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
                        if (ios) {
                            te.style.width = "0px";
                        }
                        on(te, "input", function() {
                            if (ie && ie_version >= 9 && this$1.hasSelection) {
                                this$1.hasSelection = null;
                            }
                            input.poll();
                        });
                        on(te, "paste", function(e) {
                            if (signalDOMEvent(cm, e) || handlePaste(e, cm)) {
                                return;
                            }
                            cm.state.pasteIncoming = +new Date();
                            input.fastPoll();
                        });

                        function prepareCopyCut(e) {
                            if (signalDOMEvent(cm, e)) {
                                return;
                            }
                            if (cm.somethingSelected()) {
                                setLastCopied({
                                    lineWise: false,
                                    text: cm.getSelections()
                                });
                            } else if (!cm.options.lineWiseCopyCut) {
                                return;
                            } else {
                                var ranges = copyableRanges(cm);
                                setLastCopied({
                                    lineWise: true,
                                    text: ranges.text
                                });
                                if (e.type == "cut") {
                                    cm.setSelections(ranges.ranges, null, sel_dontScroll);
                                } else {
                                    input.prevInput = "";
                                    te.value = ranges.text.join("\n");
                                    selectInput(te);
                                }
                            }
                            if (e.type == "cut") {
                                cm.state.cutIncoming = +new Date();
                            }
                        }
                        on(te, "cut", prepareCopyCut);
                        on(te, "copy", prepareCopyCut);
                        on(display.scroller, "paste", function(e) {
                            if (eventInWidget(display, e) || signalDOMEvent(cm, e)) {
                                return;
                            }
                            if (!te.dispatchEvent) {
                                cm.state.pasteIncoming = +new Date();
                                input.focus();
                                return;
                            }

                            // Pass the `paste` event to the textarea so it's handled by its event listener.
                            var event = new Event("paste");
                            event.clipboardData = e.clipboardData;
                            te.dispatchEvent(event);
                        });

                        // Prevent normal selection in the editor (we handle our own)
                        on(display.lineSpace, "selectstart", function(e) {
                            if (!eventInWidget(display, e)) {
                                e_preventDefault(e);
                            }
                        });
                        on(te, "compositionstart", function() {
                            var start = cm.getCursor("from");
                            if (input.composing) {
                                input.composing.range.clear();
                            }
                            input.composing = {
                                start: start,
                                range: cm.markText(start, cm.getCursor("to"), {
                                    className: "CodeMirror-composing"
                                })
                            };
                        });
                        on(te, "compositionend", function() {
                            if (input.composing) {
                                input.poll();
                                input.composing.range.clear();
                                input.composing = null;
                            }
                        });
                    };
                    TextareaInput.prototype.createField = function(_display) {
                        // Wraps and hides input textarea
                        this.wrapper = hiddenTextarea();
                        // The semihidden textarea that is focused when the editor is
                        // focused, and receives input.
                        this.textarea = this.wrapper.firstChild;
                    };
                    TextareaInput.prototype.screenReaderLabelChanged = function(label) {
                        // Label for screenreaders, accessibility
                        if (label) {
                            this.textarea.setAttribute('aria-label', label);
                        } else {
                            this.textarea.removeAttribute('aria-label');
                        }
                    };
                    TextareaInput.prototype.prepareSelection = function() {
                        // Redraw the selection and/or cursor
                        var cm = this.cm,
                            display = cm.display,
                            doc = cm.doc;
                        var result = prepareSelection(cm);

                        // Move the hidden textarea near the cursor to prevent scrolling artifacts
                        if (cm.options.moveInputWithCursor) {
                            var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
                            var wrapOff = display.wrapper.getBoundingClientRect(),
                                lineOff = display.lineDiv.getBoundingClientRect();
                            result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, headPos.top + lineOff.top - wrapOff.top));
                            result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, headPos.left + lineOff.left - wrapOff.left));
                        }
                        return result;
                    };
                    TextareaInput.prototype.showSelection = function(drawn) {
                        var cm = this.cm,
                            display = cm.display;
                        removeChildrenAndAdd(display.cursorDiv, drawn.cursors);
                        removeChildrenAndAdd(display.selectionDiv, drawn.selection);
                        if (drawn.teTop != null) {
                            this.wrapper.style.top = drawn.teTop + "px";
                            this.wrapper.style.left = drawn.teLeft + "px";
                        }
                    };

                    // Reset the input to correspond to the selection (or to be empty,
                    // when not typing and nothing is selected)
                    TextareaInput.prototype.reset = function(typing) {
                        if (this.contextMenuPending || this.composing) {
                            return;
                        }
                        var cm = this.cm;
                        if (cm.somethingSelected()) {
                            this.prevInput = "";
                            var content = cm.getSelection();
                            this.textarea.value = content;
                            if (cm.state.focused) {
                                selectInput(this.textarea);
                            }
                            if (ie && ie_version >= 9) {
                                this.hasSelection = content;
                            }
                        } else if (!typing) {
                            this.prevInput = this.textarea.value = "";
                            if (ie && ie_version >= 9) {
                                this.hasSelection = null;
                            }
                        }
                    };
                    TextareaInput.prototype.getField = function() {
                        return this.textarea;
                    };
                    TextareaInput.prototype.supportsTouch = function() {
                        return false;
                    };
                    TextareaInput.prototype.focus = function() {
                        if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
                            try {
                                this.textarea.focus();
                            } catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
                        }
                    };
                    TextareaInput.prototype.blur = function() {
                        this.textarea.blur();
                    };
                    TextareaInput.prototype.resetPosition = function() {
                        this.wrapper.style.top = this.wrapper.style.left = 0;
                    };
                    TextareaInput.prototype.receivedFocus = function() {
                        this.slowPoll();
                    };

                    // Poll for input changes, using the normal rate of polling. This
                    // runs as long as the editor is focused.
                    TextareaInput.prototype.slowPoll = function() {
                        var this$1 = this;
                        if (this.pollingFast) {
                            return;
                        }
                        this.polling.set(this.cm.options.pollInterval, function() {
                            this$1.poll();
                            if (this$1.cm.state.focused) {
                                this$1.slowPoll();
                            }
                        });
                    };

                    // When an event has just come in that is likely to add or change
                    // something in the input textarea, we poll faster, to ensure that
                    // the change appears on the screen quickly.
                    TextareaInput.prototype.fastPoll = function() {
                        var missed = false,
                            input = this;
                        input.pollingFast = true;

                        function p() {
                            var changed = input.poll();
                            if (!changed && !missed) {
                                missed = true;
                                input.polling.set(60, p);
                            } else {
                                input.pollingFast = false;
                                input.slowPoll();
                            }
                        }
                        input.polling.set(20, p);
                    };

                    // Read input from the textarea, and update the document to match.
                    // When something is selected, it is present in the textarea, and
                    // selected (unless it is huge, in which case a placeholder is
                    // used). When nothing is selected, the cursor sits after previously
                    // seen text (can be empty), which is stored in prevInput (we must
                    // not reset the textarea when typing, because that breaks IME).
                    TextareaInput.prototype.poll = function() {
                        var this$1 = this;
                        var cm = this.cm,
                            input = this.textarea,
                            prevInput = this.prevInput;
                        // Since this is called a *lot*, try to bail out as cheaply as
                        // possible when it is clear that nothing happened. hasSelection
                        // will be the case when there is a lot of text in the textarea,
                        // in which case reading its value would be expensive.
                        if (this.contextMenuPending || !cm.state.focused || hasSelection(input) && !prevInput && !this.composing || cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq) {
                            return false;
                        }
                        var text = input.value;
                        // If nothing changed, bail.
                        if (text == prevInput && !cm.somethingSelected()) {
                            return false;
                        }
                        // Work around nonsensical selection resetting in IE9/10, and
                        // inexplicable appearance of private area unicode characters on
                        // some key combos in Mac (#2689).
                        if (ie && ie_version >= 9 && this.hasSelection === text || mac && /[\uf700-\uf7ff]/.test(text)) {
                            cm.display.input.reset();
                            return false;
                        }
                        if (cm.doc.sel == cm.display.selForContextMenu) {
                            var first = text.charCodeAt(0);
                            if (first == 0x200b && !prevInput) {
                                prevInput = "\u200b";
                            }
                            if (first == 0x21da) {
                                this.reset();
                                return this.cm.execCommand("undo");
                            }
                        }
                        // Find the part of the input that is actually new
                        var same = 0,
                            l = Math.min(prevInput.length, text.length);
                        while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) {
                            ++same;
                        }
                        runInOp(cm, function() {
                            applyTextInput(cm, text.slice(same), prevInput.length - same, null, this$1.composing ? "*compose" : null);

                            // Don't leave long text in the textarea, since it makes further polling slow
                            if (text.length > 1000 || text.indexOf("\n") > -1) {
                                input.value = this$1.prevInput = "";
                            } else {
                                this$1.prevInput = text;
                            }
                            if (this$1.composing) {
                                this$1.composing.range.clear();
                                this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"), {
                                    className: "CodeMirror-composing"
                                });
                            }
                        });
                        return true;
                    };
                    TextareaInput.prototype.ensurePolled = function() {
                        if (this.pollingFast && this.poll()) {
                            this.pollingFast = false;
                        }
                    };
                    TextareaInput.prototype.onKeyPress = function() {
                        if (ie && ie_version >= 9) {
                            this.hasSelection = null;
                        }
                        this.fastPoll();
                    };
                    TextareaInput.prototype.onContextMenu = function(e) {
                        var input = this,
                            cm = input.cm,
                            display = cm.display,
                            te = input.textarea;
                        if (input.contextMenuPending) {
                            input.contextMenuPending();
                        }
                        var pos = posFromMouse(cm, e),
                            scrollPos = display.scroller.scrollTop;
                        if (!pos || presto) {
                            return;
                        } // Opera is difficult.

                        // Reset the current text selection only if the click is done outside of the selection
                        // and 'resetSelectionOnContextMenu' option is true.
                        var reset = cm.options.resetSelectionOnContextMenu;
                        if (reset && cm.doc.sel.contains(pos) == -1) {
                            operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);
                        }
                        var oldCSS = te.style.cssText,
                            oldWrapperCSS = input.wrapper.style.cssText;
                        var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();
                        input.wrapper.style.cssText = "position: static";
                        te.style.cssText = "position: absolute; width: 30px; height: 30px;\n      top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n      z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
                        var oldScrollY;
                        if (webkit) {
                            oldScrollY = window.scrollY;
                        } // Work around Chrome issue (#2712)
                        display.input.focus();
                        if (webkit) {
                            window.scrollTo(null, oldScrollY);
                        }
                        display.input.reset();
                        // Adds "Select all" to context menu in FF
                        if (!cm.somethingSelected()) {
                            te.value = input.prevInput = " ";
                        }
                        input.contextMenuPending = rehide;
                        display.selForContextMenu = cm.doc.sel;
                        clearTimeout(display.detectingSelectAll);

                        // Select-all will be greyed out if there's nothing to select, so
                        // this adds a zero-width space so that we can later check whether
                        // it got selected.
                        function prepareSelectAllHack() {
                            if (te.selectionStart != null) {
                                var selected = cm.somethingSelected();
                                var extval = "\u200b" + (selected ? te.value : "");
                                te.value = "\u21da"; // Used to catch context-menu undo
                                te.value = extval;
                                input.prevInput = selected ? "" : "\u200b";
                                te.selectionStart = 1;
                                te.selectionEnd = extval.length;
                                // Re-set this, in case some other handler touched the
                                // selection in the meantime.
                                display.selForContextMenu = cm.doc.sel;
                            }
                        }

                        function rehide() {
                            if (input.contextMenuPending != rehide) {
                                return;
                            }
                            input.contextMenuPending = false;
                            input.wrapper.style.cssText = oldWrapperCSS;
                            te.style.cssText = oldCSS;
                            if (ie && ie_version < 9) {
                                display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);
                            }

                            // Try to detect the user choosing select-all
                            if (te.selectionStart != null) {
                                if (!ie || ie && ie_version < 9) {
                                    prepareSelectAllHack();
                                }
                                var i = 0,
                                    poll = function() {
                                        if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && te.selectionEnd > 0 && input.prevInput == "\u200b") {
                                            operation(cm, selectAll)(cm);
                                        } else if (i++ < 10) {
                                            display.detectingSelectAll = setTimeout(poll, 500);
                                        } else {
                                            display.selForContextMenu = null;
                                            display.input.reset();
                                        }
                                    };
                                display.detectingSelectAll = setTimeout(poll, 200);
                            }
                        }
                        if (ie && ie_version >= 9) {
                            prepareSelectAllHack();
                        }
                        if (captureRightClick) {
                            e_stop(e);
                            var mouseup = function() {
                                off(window, "mouseup", mouseup);
                                setTimeout(rehide, 20);
                            };
                            on(window, "mouseup", mouseup);
                        } else {
                            setTimeout(rehide, 50);
                        }
                    };
                    TextareaInput.prototype.readOnlyChanged = function(val) {
                        if (!val) {
                            this.reset();
                        }
                        this.textarea.disabled = val == "nocursor";
                        this.textarea.readOnly = !!val;
                    };
                    TextareaInput.prototype.setUneditable = function() {};
                    TextareaInput.prototype.needsContentAttribute = false;

                    function fromTextArea(textarea, options) {
                        options = options ? copyObj(options) : {};
                        options.value = textarea.value;
                        if (!options.tabindex && textarea.tabIndex) {
                            options.tabindex = textarea.tabIndex;
                        }
                        if (!options.placeholder && textarea.placeholder) {
                            options.placeholder = textarea.placeholder;
                        }
                        // Set autofocus to true if this textarea is focused, or if it has
                        // autofocus and no other element is focused.
                        if (options.autofocus == null) {
                            var hasFocus = activeElt();
                            options.autofocus = hasFocus == textarea || textarea.getAttribute("autofocus") != null && hasFocus == document.body;
                        }

                        function save() {
                            textarea.value = cm.getValue();
                        }
                        var realSubmit;
                        if (textarea.form) {
                            on(textarea.form, "submit", save);
                            // Deplorable hack to make the submit method do the right thing.
                            if (!options.leaveSubmitMethodAlone) {
                                var form = textarea.form;
                                realSubmit = form.submit;
                                try {
                                    var wrappedSubmit = form.submit = function() {
                                        save();
                                        form.submit = realSubmit;
                                        form.submit();
                                        form.submit = wrappedSubmit;
                                    };
                                } catch (e) {}
                            }
                        }
                        options.finishInit = function(cm) {
                            cm.save = save;
                            cm.getTextArea = function() {
                                return textarea;
                            };
                            cm.toTextArea = function() {
                                cm.toTextArea = isNaN; // Prevent this from being ran twice
                                save();
                                textarea.parentNode.removeChild(cm.getWrapperElement());
                                textarea.style.display = "";
                                if (textarea.form) {
                                    off(textarea.form, "submit", save);
                                    if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function") {
                                        textarea.form.submit = realSubmit;
                                    }
                                }
                            };
                        };
                        textarea.style.display = "none";
                        var cm = CodeMirror(function(node) {
                            return textarea.parentNode.insertBefore(node, textarea.nextSibling);
                        }, options);
                        return cm;
                    }

                    function addLegacyProps(CodeMirror) {
                        CodeMirror.off = off;
                        CodeMirror.on = on;
                        CodeMirror.wheelEventPixels = wheelEventPixels;
                        CodeMirror.Doc = Doc;
                        CodeMirror.splitLines = splitLinesAuto;
                        CodeMirror.countColumn = countColumn;
                        CodeMirror.findColumn = findColumn;
                        CodeMirror.isWordChar = isWordCharBasic;
                        CodeMirror.Pass = Pass;
                        CodeMirror.signal = signal;
                        CodeMirror.Line = Line;
                        CodeMirror.changeEnd = changeEnd;
                        CodeMirror.scrollbarModel = scrollbarModel;
                        CodeMirror.Pos = Pos;
                        CodeMirror.cmpPos = cmp;
                        CodeMirror.modes = modes;
                        CodeMirror.mimeModes = mimeModes;
                        CodeMirror.resolveMode = resolveMode;
                        CodeMirror.getMode = getMode;
                        CodeMirror.modeExtensions = modeExtensions;
                        CodeMirror.extendMode = extendMode;
                        CodeMirror.copyState = copyState;
                        CodeMirror.startState = startState;
                        CodeMirror.innerMode = innerMode;
                        CodeMirror.commands = commands;
                        CodeMirror.keyMap = keyMap;
                        CodeMirror.keyName = keyName;
                        CodeMirror.isModifierKey = isModifierKey;
                        CodeMirror.lookupKey = lookupKey;
                        CodeMirror.normalizeKeyMap = normalizeKeyMap;
                        CodeMirror.StringStream = StringStream;
                        CodeMirror.SharedTextMarker = SharedTextMarker;
                        CodeMirror.TextMarker = TextMarker;
                        CodeMirror.LineWidget = LineWidget;
                        CodeMirror.e_preventDefault = e_preventDefault;
                        CodeMirror.e_stopPropagation = e_stopPropagation;
                        CodeMirror.e_stop = e_stop;
                        CodeMirror.addClass = addClass;
                        CodeMirror.contains = contains;
                        CodeMirror.rmClass = rmClass;
                        CodeMirror.keyNames = keyNames;
                    }

                    // EDITOR CONSTRUCTOR

                    defineOptions(CodeMirror);
                    addEditorMethods(CodeMirror);

                    // Set up methods on CodeMirror's prototype to redirect to the editor's document.
                    var dontDelegate = "iter insert remove copy getEditor constructor".split(" ");
                    for (var prop in Doc.prototype) {
                        if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) {
                            CodeMirror.prototype[prop] = function(method) {
                                return function() {
                                    return method.apply(this.doc, arguments);
                                };
                            }(Doc.prototype[prop]);
                        }
                    }
                    eventMixin(Doc);
                    CodeMirror.inputStyles = {
                        "textarea": TextareaInput,
                        "contenteditable": ContentEditableInput
                    };

                    // Extra arguments are stored as the mode's dependencies, which is
                    // used by (legacy) mechanisms like loadmode.js to automatically
                    // load a mode. (Preferred mechanism is the require/define calls.)
                    CodeMirror.defineMode = function(name /*, mode, …*/ ) {
                        if (!CodeMirror.defaults.mode && name != "null") {
                            CodeMirror.defaults.mode = name;
                        }
                        defineMode.apply(this, arguments);
                    };
                    CodeMirror.defineMIME = defineMIME;

                    // Minimal default mode.
                    CodeMirror.defineMode("null", function() {
                        return {
                            token: function(stream) {
                                return stream.skipToEnd();
                            }
                        };
                    });
                    CodeMirror.defineMIME("text/plain", "null");

                    // EXTENSIONS

                    CodeMirror.defineExtension = function(name, func) {
                        CodeMirror.prototype[name] = func;
                    };
                    CodeMirror.defineDocExtension = function(name, func) {
                        Doc.prototype[name] = func;
                    };
                    CodeMirror.fromTextArea = fromTextArea;
                    addLegacyProps(CodeMirror);
                    CodeMirror.version = "5.65.3";
                    return CodeMirror;
                });

                /***/
            }),

        /***/
        "../../../node_modules/codemirror/mode/javascript/javascript.js":
            /*!**********************************************************************!*\
              !*** ../../../node_modules/codemirror/mode/javascript/javascript.js ***!
              \**********************************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                // CodeMirror, copyright (c) by Marijn Haverbeke and others
                // Distributed under an MIT license: https://codemirror.net/LICENSE

                (function(mod) {
                    if (true)
                        // CommonJS
                        mod(__webpack_require__( /*! ../../lib/codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                    else {}
                })(function(CodeMirror) {
                    "use strict";

                    CodeMirror.defineMode("javascript", function(config, parserConfig) {
                        var indentUnit = config.indentUnit;
                        var statementIndent = parserConfig.statementIndent;
                        var jsonldMode = parserConfig.jsonld;
                        var jsonMode = parserConfig.json || jsonldMode;
                        var trackScope = parserConfig.trackScope !== false;
                        var isTS = parserConfig.typescript;
                        var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;

                        // Tokenizer

                        var keywords = function() {
                            function kw(type) {
                                return {
                                    type: type,
                                    style: "keyword"
                                };
                            }
                            var A = kw("keyword a"),
                                B = kw("keyword b"),
                                C = kw("keyword c"),
                                D = kw("keyword d");
                            var operator = kw("operator"),
                                atom = {
                                    type: "atom",
                                    style: "atom"
                                };
                            return {
                                "if": kw("if"),
                                "while": A,
                                "with": A,
                                "else": B,
                                "do": B,
                                "try": B,
                                "finally": B,
                                "return": D,
                                "break": D,
                                "continue": D,
                                "new": kw("new"),
                                "delete": C,
                                "void": C,
                                "throw": C,
                                "debugger": kw("debugger"),
                                "var": kw("var"),
                                "const": kw("var"),
                                "let": kw("var"),
                                "function": kw("function"),
                                "catch": kw("catch"),
                                "for": kw("for"),
                                "switch": kw("switch"),
                                "case": kw("case"),
                                "default": kw("default"),
                                "in": operator,
                                "typeof": operator,
                                "instanceof": operator,
                                "true": atom,
                                "false": atom,
                                "null": atom,
                                "undefined": atom,
                                "NaN": atom,
                                "Infinity": atom,
                                "this": kw("this"),
                                "class": kw("class"),
                                "super": kw("atom"),
                                "yield": C,
                                "export": kw("export"),
                                "import": kw("import"),
                                "extends": C,
                                "await": C
                            };
                        }();
                        var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
                        var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;

                        function readRegexp(stream) {
                            var escaped = false,
                                next,
                                inSet = false;
                            while ((next = stream.next()) != null) {
                                if (!escaped) {
                                    if (next == "/" && !inSet) return;
                                    if (next == "[") inSet = true;
                                    else if (inSet && next == "]") inSet = false;
                                }
                                escaped = !escaped && next == "\\";
                            }
                        }

                        // Used as scratch variables to communicate multiple values without
                        // consing up tons of objects.
                        var type, content;

                        function ret(tp, style, cont) {
                            type = tp;
                            content = cont;
                            return style;
                        }

                        function tokenBase(stream, state) {
                            var ch = stream.next();
                            if (ch == '"' || ch == "'") {
                                state.tokenize = tokenString(ch);
                                return state.tokenize(stream, state);
                            } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) {
                                return ret("number", "number");
                            } else if (ch == "." && stream.match("..")) {
                                return ret("spread", "meta");
                            } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
                                return ret(ch);
                            } else if (ch == "=" && stream.eat(">")) {
                                return ret("=>", "operator");
                            } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {
                                return ret("number", "number");
                            } else if (/\d/.test(ch)) {
                                stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/);
                                return ret("number", "number");
                            } else if (ch == "/") {
                                if (stream.eat("*")) {
                                    state.tokenize = tokenComment;
                                    return tokenComment(stream, state);
                                } else if (stream.eat("/")) {
                                    stream.skipToEnd();
                                    return ret("comment", "comment");
                                } else if (expressionAllowed(stream, state, 1)) {
                                    readRegexp(stream);
                                    stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
                                    return ret("regexp", "string-2");
                                } else {
                                    stream.eat("=");
                                    return ret("operator", "operator", stream.current());
                                }
                            } else if (ch == "`") {
                                state.tokenize = tokenQuasi;
                                return tokenQuasi(stream, state);
                            } else if (ch == "#" && stream.peek() == "!") {
                                stream.skipToEnd();
                                return ret("meta", "meta");
                            } else if (ch == "#" && stream.eatWhile(wordRE)) {
                                return ret("variable", "property");
                            } else if (ch == "<" && stream.match("!--") || ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start))) {
                                stream.skipToEnd();
                                return ret("comment", "comment");
                            } else if (isOperatorChar.test(ch)) {
                                if (ch != ">" || !state.lexical || state.lexical.type != ">") {
                                    if (stream.eat("=")) {
                                        if (ch == "!" || ch == "=") stream.eat("=");
                                    } else if (/[<>*+\-|&?]/.test(ch)) {
                                        stream.eat(ch);
                                        if (ch == ">") stream.eat(ch);
                                    }
                                }
                                if (ch == "?" && stream.eat(".")) return ret(".");
                                return ret("operator", "operator", stream.current());
                            } else if (wordRE.test(ch)) {
                                stream.eatWhile(wordRE);
                                var word = stream.current();
                                if (state.lastType != ".") {
                                    if (keywords.propertyIsEnumerable(word)) {
                                        var kw = keywords[word];
                                        return ret(kw.type, kw.style, word);
                                    }
                                    if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false)) return ret("async", "keyword", word);
                                }
                                return ret("variable", "variable", word);
                            }
                        }

                        function tokenString(quote) {
                            return function(stream, state) {
                                var escaped = false,
                                    next;
                                if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)) {
                                    state.tokenize = tokenBase;
                                    return ret("jsonld-keyword", "meta");
                                }
                                while ((next = stream.next()) != null) {
                                    if (next == quote && !escaped) break;
                                    escaped = !escaped && next == "\\";
                                }
                                if (!escaped) state.tokenize = tokenBase;
                                return ret("string", "string");
                            };
                        }

                        function tokenComment(stream, state) {
                            var maybeEnd = false,
                                ch;
                            while (ch = stream.next()) {
                                if (ch == "/" && maybeEnd) {
                                    state.tokenize = tokenBase;
                                    break;
                                }
                                maybeEnd = ch == "*";
                            }
                            return ret("comment", "comment");
                        }

                        function tokenQuasi(stream, state) {
                            var escaped = false,
                                next;
                            while ((next = stream.next()) != null) {
                                if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
                                    state.tokenize = tokenBase;
                                    break;
                                }
                                escaped = !escaped && next == "\\";
                            }
                            return ret("quasi", "string-2", stream.current());
                        }
                        var brackets = "([{}])";
                        // This is a crude lookahead trick to try and notice that we're
                        // parsing the argument patterns for a fat-arrow function before we
                        // actually hit the arrow token. It only works if the arrow is on
                        // the same line as the arguments and there's no strange noise
                        // (comments) in between. Fallback is to only notice when we hit the
                        // arrow, and not declare the arguments as locals for the arrow
                        // body.
                        function findFatArrow(stream, state) {
                            if (state.fatArrowAt) state.fatArrowAt = null;
                            var arrow = stream.string.indexOf("=>", stream.start);
                            if (arrow < 0) return;
                            if (isTS) {
                                // Try to skip TypeScript return type declarations after the arguments
                                var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow));
                                if (m) arrow = m.index;
                            }
                            var depth = 0,
                                sawSomething = false;
                            for (var pos = arrow - 1; pos >= 0; --pos) {
                                var ch = stream.string.charAt(pos);
                                var bracket = brackets.indexOf(ch);
                                if (bracket >= 0 && bracket < 3) {
                                    if (!depth) {
                                        ++pos;
                                        break;
                                    }
                                    if (--depth == 0) {
                                        if (ch == "(") sawSomething = true;
                                        break;
                                    }
                                } else if (bracket >= 3 && bracket < 6) {
                                    ++depth;
                                } else if (wordRE.test(ch)) {
                                    sawSomething = true;
                                } else if (/["'\/`]/.test(ch)) {
                                    for (;; --pos) {
                                        if (pos == 0) return;
                                        var next = stream.string.charAt(pos - 1);
                                        if (next == ch && stream.string.charAt(pos - 2) != "\\") {
                                            pos--;
                                            break;
                                        }
                                    }
                                } else if (sawSomething && !depth) {
                                    ++pos;
                                    break;
                                }
                            }
                            if (sawSomething && !depth) state.fatArrowAt = pos;
                        }

                        // Parser

                        var atomicTypes = {
                            "atom": true,
                            "number": true,
                            "variable": true,
                            "string": true,
                            "regexp": true,
                            "this": true,
                            "import": true,
                            "jsonld-keyword": true
                        };

                        function JSLexical(indented, column, type, align, prev, info) {
                            this.indented = indented;
                            this.column = column;
                            this.type = type;
                            this.prev = prev;
                            this.info = info;
                            if (align != null) this.align = align;
                        }

                        function inScope(state, varname) {
                            if (!trackScope) return false;
                            for (var v = state.localVars; v; v = v.next)
                                if (v.name == varname) return true;
                            for (var cx = state.context; cx; cx = cx.prev) {
                                for (var v = cx.vars; v; v = v.next)
                                    if (v.name == varname) return true;
                            }
                        }

                        function parseJS(state, style, type, content, stream) {
                            var cc = state.cc;
                            // Communicate our context to the combinators.
                            // (Less wasteful than consing up a hundred closures on every call.)
                            cx.state = state;
                            cx.stream = stream;
                            cx.marked = null, cx.cc = cc;
                            cx.style = style;
                            if (!state.lexical.hasOwnProperty("align")) state.lexical.align = true;
                            while (true) {
                                var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
                                if (combinator(type, content)) {
                                    while (cc.length && cc[cc.length - 1].lex) cc.pop()();
                                    if (cx.marked) return cx.marked;
                                    if (type == "variable" && inScope(state, content)) return "variable-2";
                                    return style;
                                }
                            }
                        }

                        // Combinator utils

                        var cx = {
                            state: null,
                            column: null,
                            marked: null,
                            cc: null
                        };

                        function pass() {
                            for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
                        }

                        function cont() {
                            pass.apply(null, arguments);
                            return true;
                        }

                        function inList(name, list) {
                            for (var v = list; v; v = v.next)
                                if (v.name == name) return true;
                            return false;
                        }

                        function register(varname) {
                            var state = cx.state;
                            cx.marked = "def";
                            if (!trackScope) return;
                            if (state.context) {
                                if (state.lexical.info == "var" && state.context && state.context.block) {
                                    // FIXME function decls are also not block scoped
                                    var newContext = registerVarScoped(varname, state.context);
                                    if (newContext != null) {
                                        state.context = newContext;
                                        return;
                                    }
                                } else if (!inList(varname, state.localVars)) {
                                    state.localVars = new Var(varname, state.localVars);
                                    return;
                                }
                            }
                            // Fall through means this is global
                            if (parserConfig.globalVars && !inList(varname, state.globalVars)) state.globalVars = new Var(varname, state.globalVars);
                        }

                        function registerVarScoped(varname, context) {
                            if (!context) {
                                return null;
                            } else if (context.block) {
                                var inner = registerVarScoped(varname, context.prev);
                                if (!inner) return null;
                                if (inner == context.prev) return context;
                                return new Context(inner, context.vars, true);
                            } else if (inList(varname, context.vars)) {
                                return context;
                            } else {
                                return new Context(context.prev, new Var(varname, context.vars), false);
                            }
                        }

                        function isModifier(name) {
                            return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly";
                        }

                        // Combinators

                        function Context(prev, vars, block) {
                            this.prev = prev;
                            this.vars = vars;
                            this.block = block;
                        }

                        function Var(name, next) {
                            this.name = name;
                            this.next = next;
                        }
                        var defaultVars = new Var("this", new Var("arguments", null));

                        function pushcontext() {
                            cx.state.context = new Context(cx.state.context, cx.state.localVars, false);
                            cx.state.localVars = defaultVars;
                        }

                        function pushblockcontext() {
                            cx.state.context = new Context(cx.state.context, cx.state.localVars, true);
                            cx.state.localVars = null;
                        }
                        pushcontext.lex = pushblockcontext.lex = true;

                        function popcontext() {
                            cx.state.localVars = cx.state.context.vars;
                            cx.state.context = cx.state.context.prev;
                        }
                        popcontext.lex = true;

                        function pushlex(type, info) {
                            var result = function() {
                                var state = cx.state,
                                    indent = state.indented;
                                if (state.lexical.type == "stat") indent = state.lexical.indented;
                                else
                                    for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev) indent = outer.indented;
                                state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
                            };
                            result.lex = true;
                            return result;
                        }

                        function poplex() {
                            var state = cx.state;
                            if (state.lexical.prev) {
                                if (state.lexical.type == ")") state.indented = state.lexical.indented;
                                state.lexical = state.lexical.prev;
                            }
                        }
                        poplex.lex = true;

                        function expect(wanted) {
                            function exp(type) {
                                if (type == wanted) return cont();
                                else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
                                else return cont(exp);
                            };
                            return exp;
                        }

                        function statement(type, value) {
                            if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
                            if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
                            if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
                            if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
                            if (type == "debugger") return cont(expect(";"));
                            if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
                            if (type == ";") return cont();
                            if (type == "if") {
                                if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex) cx.state.cc.pop()();
                                return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
                            }
                            if (type == "function") return cont(functiondef);
                            if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);
                            if (type == "class" || isTS && value == "interface") {
                                cx.marked = "keyword";
                                return cont(pushlex("form", type == "class" ? type : value), className, poplex);
                            }
                            if (type == "variable") {
                                if (isTS && value == "declare") {
                                    cx.marked = "keyword";
                                    return cont(statement);
                                } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
                                    cx.marked = "keyword";
                                    if (value == "enum") return cont(enumdef);
                                    else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";"));
                                    else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex);
                                } else if (isTS && value == "namespace") {
                                    cx.marked = "keyword";
                                    return cont(pushlex("form"), expression, statement, poplex);
                                } else if (isTS && value == "abstract") {
                                    cx.marked = "keyword";
                                    return cont(statement);
                                } else {
                                    return cont(pushlex("stat"), maybelabel);
                                }
                            }
                            if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext, block, poplex, poplex, popcontext);
                            if (type == "case") return cont(expression, expect(":"));
                            if (type == "default") return cont(expect(":"));
                            if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
                            if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
                            if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
                            if (type == "async") return cont(statement);
                            if (value == "@") return cont(expression, statement);
                            return pass(pushlex("stat"), expression, expect(";"), poplex);
                        }

                        function maybeCatchBinding(type) {
                            if (type == "(") return cont(funarg, expect(")"));
                        }

                        function expression(type, value) {
                            return expressionInner(type, value, false);
                        }

                        function expressionNoComma(type, value) {
                            return expressionInner(type, value, true);
                        }

                        function parenExpr(type) {
                            if (type != "(") return pass();
                            return cont(pushlex(")"), maybeexpression, expect(")"), poplex);
                        }

                        function expressionInner(type, value, noComma) {
                            if (cx.state.fatArrowAt == cx.stream.start) {
                                var body = noComma ? arrowBodyNoComma : arrowBody;
                                if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
                                else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
                            }
                            var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
                            if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
                            if (type == "function") return cont(functiondef, maybeop);
                            if (type == "class" || isTS && value == "interface") {
                                cx.marked = "keyword";
                                return cont(pushlex("form"), classExpression, poplex);
                            }
                            if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
                            if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
                            if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
                            if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
                            if (type == "{") return contCommasep(objprop, "}", null, maybeop);
                            if (type == "quasi") return pass(quasi, maybeop);
                            if (type == "new") return cont(maybeTarget(noComma));
                            return cont();
                        }

                        function maybeexpression(type) {
                            if (type.match(/[;\}\)\],]/)) return pass();
                            return pass(expression);
                        }

                        function maybeoperatorComma(type, value) {
                            if (type == ",") return cont(maybeexpression);
                            return maybeoperatorNoComma(type, value, false);
                        }

                        function maybeoperatorNoComma(type, value, noComma) {
                            var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
                            var expr = noComma == false ? expression : expressionNoComma;
                            if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
                            if (type == "operator") {
                                if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
                                if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false)) return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
                                if (value == "?") return cont(expression, expect(":"), expr);
                                return cont(expr);
                            }
                            if (type == "quasi") {
                                return pass(quasi, me);
                            }
                            if (type == ";") return;
                            if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
                            if (type == ".") return cont(property, me);
                            if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
                            if (isTS && value == "as") {
                                cx.marked = "keyword";
                                return cont(typeexpr, me);
                            }
                            if (type == "regexp") {
                                cx.state.lastType = cx.marked = "operator";
                                cx.stream.backUp(cx.stream.pos - cx.stream.start - 1);
                                return cont(expr);
                            }
                        }

                        function quasi(type, value) {
                            if (type != "quasi") return pass();
                            if (value.slice(value.length - 2) != "${") return cont(quasi);
                            return cont(maybeexpression, continueQuasi);
                        }

                        function continueQuasi(type) {
                            if (type == "}") {
                                cx.marked = "string-2";
                                cx.state.tokenize = tokenQuasi;
                                return cont(quasi);
                            }
                        }

                        function arrowBody(type) {
                            findFatArrow(cx.stream, cx.state);
                            return pass(type == "{" ? statement : expression);
                        }

                        function arrowBodyNoComma(type) {
                            findFatArrow(cx.stream, cx.state);
                            return pass(type == "{" ? statement : expressionNoComma);
                        }

                        function maybeTarget(noComma) {
                            return function(type) {
                                if (type == ".") return cont(noComma ? targetNoComma : target);
                                else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma);
                                else return pass(noComma ? expressionNoComma : expression);
                            };
                        }

                        function target(_, value) {
                            if (value == "target") {
                                cx.marked = "keyword";
                                return cont(maybeoperatorComma);
                            }
                        }

                        function targetNoComma(_, value) {
                            if (value == "target") {
                                cx.marked = "keyword";
                                return cont(maybeoperatorNoComma);
                            }
                        }

                        function maybelabel(type) {
                            if (type == ":") return cont(poplex, statement);
                            return pass(maybeoperatorComma, expect(";"), poplex);
                        }

                        function property(type) {
                            if (type == "variable") {
                                cx.marked = "property";
                                return cont();
                            }
                        }

                        function objprop(type, value) {
                            if (type == "async") {
                                cx.marked = "property";
                                return cont(objprop);
                            } else if (type == "variable" || cx.style == "keyword") {
                                cx.marked = "property";
                                if (value == "get" || value == "set") return cont(getterSetter);
                                var m; // Work around fat-arrow-detection complication for detecting typescript typed arrow params
                                if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false))) cx.state.fatArrowAt = cx.stream.pos + m[0].length;
                                return cont(afterprop);
                            } else if (type == "number" || type == "string") {
                                cx.marked = jsonldMode ? "property" : cx.style + " property";
                                return cont(afterprop);
                            } else if (type == "jsonld-keyword") {
                                return cont(afterprop);
                            } else if (isTS && isModifier(value)) {
                                cx.marked = "keyword";
                                return cont(objprop);
                            } else if (type == "[") {
                                return cont(expression, maybetype, expect("]"), afterprop);
                            } else if (type == "spread") {
                                return cont(expressionNoComma, afterprop);
                            } else if (value == "*") {
                                cx.marked = "keyword";
                                return cont(objprop);
                            } else if (type == ":") {
                                return pass(afterprop);
                            }
                        }

                        function getterSetter(type) {
                            if (type != "variable") return pass(afterprop);
                            cx.marked = "property";
                            return cont(functiondef);
                        }

                        function afterprop(type) {
                            if (type == ":") return cont(expressionNoComma);
                            if (type == "(") return pass(functiondef);
                        }

                        function commasep(what, end, sep) {
                            function proceed(type, value) {
                                if (sep ? sep.indexOf(type) > -1 : type == ",") {
                                    var lex = cx.state.lexical;
                                    if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
                                    return cont(function(type, value) {
                                        if (type == end || value == end) return pass();
                                        return pass(what);
                                    }, proceed);
                                }
                                if (type == end || value == end) return cont();
                                if (sep && sep.indexOf(";") > -1) return pass(what);
                                return cont(expect(end));
                            }
                            return function(type, value) {
                                if (type == end || value == end) return cont();
                                return pass(what, proceed);
                            };
                        }

                        function contCommasep(what, end, info) {
                            for (var i = 3; i < arguments.length; i++) cx.cc.push(arguments[i]);
                            return cont(pushlex(end, info), commasep(what, end), poplex);
                        }

                        function block(type) {
                            if (type == "}") return cont();
                            return pass(statement, block);
                        }

                        function maybetype(type, value) {
                            if (isTS) {
                                if (type == ":") return cont(typeexpr);
                                if (value == "?") return cont(maybetype);
                            }
                        }

                        function maybetypeOrIn(type, value) {
                            if (isTS && (type == ":" || value == "in")) return cont(typeexpr);
                        }

                        function mayberettype(type) {
                            if (isTS && type == ":") {
                                if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr);
                                else return cont(typeexpr);
                            }
                        }

                        function isKW(_, value) {
                            if (value == "is") {
                                cx.marked = "keyword";
                                return cont();
                            }
                        }

                        function typeexpr(type, value) {
                            if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") {
                                cx.marked = "keyword";
                                return cont(value == "typeof" ? expressionNoComma : typeexpr);
                            }
                            if (type == "variable" || value == "void") {
                                cx.marked = "type";
                                return cont(afterType);
                            }
                            if (value == "|" || value == "&") return cont(typeexpr);
                            if (type == "string" || type == "number" || type == "atom") return cont(afterType);
                            if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType);
                            if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType);
                            if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType);
                            if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr);
                            if (type == "quasi") {
                                return pass(quasiType, afterType);
                            }
                        }

                        function maybeReturnType(type) {
                            if (type == "=>") return cont(typeexpr);
                        }

                        function typeprops(type) {
                            if (type.match(/[\}\)\]]/)) return cont();
                            if (type == "," || type == ";") return cont(typeprops);
                            return pass(typeprop, typeprops);
                        }

                        function typeprop(type, value) {
                            if (type == "variable" || cx.style == "keyword") {
                                cx.marked = "property";
                                return cont(typeprop);
                            } else if (value == "?" || type == "number" || type == "string") {
                                return cont(typeprop);
                            } else if (type == ":") {
                                return cont(typeexpr);
                            } else if (type == "[") {
                                return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop);
                            } else if (type == "(") {
                                return pass(functiondecl, typeprop);
                            } else if (!type.match(/[;\}\)\],]/)) {
                                return cont();
                            }
                        }

                        function quasiType(type, value) {
                            if (type != "quasi") return pass();
                            if (value.slice(value.length - 2) != "${") return cont(quasiType);
                            return cont(typeexpr, continueQuasiType);
                        }

                        function continueQuasiType(type) {
                            if (type == "}") {
                                cx.marked = "string-2";
                                cx.state.tokenize = tokenQuasi;
                                return cont(quasiType);
                            }
                        }

                        function typearg(type, value) {
                            if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg);
                            if (type == ":") return cont(typeexpr);
                            if (type == "spread") return cont(typearg);
                            return pass(typeexpr);
                        }

                        function afterType(type, value) {
                            if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType);
                            if (value == "|" || type == "." || value == "&") return cont(typeexpr);
                            if (type == "[") return cont(typeexpr, expect("]"), afterType);
                            if (value == "extends" || value == "implements") {
                                cx.marked = "keyword";
                                return cont(typeexpr);
                            }
                            if (value == "?") return cont(typeexpr, expect(":"), typeexpr);
                        }

                        function maybeTypeArgs(_, value) {
                            if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType);
                        }

                        function typeparam() {
                            return pass(typeexpr, maybeTypeDefault);
                        }

                        function maybeTypeDefault(_, value) {
                            if (value == "=") return cont(typeexpr);
                        }

                        function vardef(_, value) {
                            if (value == "enum") {
                                cx.marked = "keyword";
                                return cont(enumdef);
                            }
                            return pass(pattern, maybetype, maybeAssign, vardefCont);
                        }

                        function pattern(type, value) {
                            if (isTS && isModifier(value)) {
                                cx.marked = "keyword";
                                return cont(pattern);
                            }
                            if (type == "variable") {
                                register(value);
                                return cont();
                            }
                            if (type == "spread") return cont(pattern);
                            if (type == "[") return contCommasep(eltpattern, "]");
                            if (type == "{") return contCommasep(proppattern, "}");
                        }

                        function proppattern(type, value) {
                            if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
                                register(value);
                                return cont(maybeAssign);
                            }
                            if (type == "variable") cx.marked = "property";
                            if (type == "spread") return cont(pattern);
                            if (type == "}") return pass();
                            if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern);
                            return cont(expect(":"), pattern, maybeAssign);
                        }

                        function eltpattern() {
                            return pass(pattern, maybeAssign);
                        }

                        function maybeAssign(_type, value) {
                            if (value == "=") return cont(expressionNoComma);
                        }

                        function vardefCont(type) {
                            if (type == ",") return cont(vardef);
                        }

                        function maybeelse(type, value) {
                            if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
                        }

                        function forspec(type, value) {
                            if (value == "await") return cont(forspec);
                            if (type == "(") return cont(pushlex(")"), forspec1, poplex);
                        }

                        function forspec1(type) {
                            if (type == "var") return cont(vardef, forspec2);
                            if (type == "variable") return cont(forspec2);
                            return pass(forspec2);
                        }

                        function forspec2(type, value) {
                            if (type == ")") return cont();
                            if (type == ";") return cont(forspec2);
                            if (value == "in" || value == "of") {
                                cx.marked = "keyword";
                                return cont(expression, forspec2);
                            }
                            return pass(expression, forspec2);
                        }

                        function functiondef(type, value) {
                            if (value == "*") {
                                cx.marked = "keyword";
                                return cont(functiondef);
                            }
                            if (type == "variable") {
                                register(value);
                                return cont(functiondef);
                            }
                            if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
                            if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef);
                        }

                        function functiondecl(type, value) {
                            if (value == "*") {
                                cx.marked = "keyword";
                                return cont(functiondecl);
                            }
                            if (type == "variable") {
                                register(value);
                                return cont(functiondecl);
                            }
                            if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext);
                            if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl);
                        }

                        function typename(type, value) {
                            if (type == "keyword" || type == "variable") {
                                cx.marked = "type";
                                return cont(typename);
                            } else if (value == "<") {
                                return cont(pushlex(">"), commasep(typeparam, ">"), poplex);
                            }
                        }

                        function funarg(type, value) {
                            if (value == "@") cont(expression, funarg);
                            if (type == "spread") return cont(funarg);
                            if (isTS && isModifier(value)) {
                                cx.marked = "keyword";
                                return cont(funarg);
                            }
                            if (isTS && type == "this") return cont(maybetype, maybeAssign);
                            return pass(pattern, maybetype, maybeAssign);
                        }

                        function classExpression(type, value) {
                            // Class expressions may have an optional name.
                            if (type == "variable") return className(type, value);
                            return classNameAfter(type, value);
                        }

                        function className(type, value) {
                            if (type == "variable") {
                                register(value);
                                return cont(classNameAfter);
                            }
                        }

                        function classNameAfter(type, value) {
                            if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter);
                            if (value == "extends" || value == "implements" || isTS && type == ",") {
                                if (value == "implements") cx.marked = "keyword";
                                return cont(isTS ? typeexpr : expression, classNameAfter);
                            }
                            if (type == "{") return cont(pushlex("}"), classBody, poplex);
                        }

                        function classBody(type, value) {
                            if (type == "async" || type == "variable" && (value == "static" || value == "get" || value == "set" || isTS && isModifier(value)) && cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false)) {
                                cx.marked = "keyword";
                                return cont(classBody);
                            }
                            if (type == "variable" || cx.style == "keyword") {
                                cx.marked = "property";
                                return cont(classfield, classBody);
                            }
                            if (type == "number" || type == "string") return cont(classfield, classBody);
                            if (type == "[") return cont(expression, maybetype, expect("]"), classfield, classBody);
                            if (value == "*") {
                                cx.marked = "keyword";
                                return cont(classBody);
                            }
                            if (isTS && type == "(") return pass(functiondecl, classBody);
                            if (type == ";" || type == ",") return cont(classBody);
                            if (type == "}") return cont();
                            if (value == "@") return cont(expression, classBody);
                        }

                        function classfield(type, value) {
                            if (value == "!") return cont(classfield);
                            if (value == "?") return cont(classfield);
                            if (type == ":") return cont(typeexpr, maybeAssign);
                            if (value == "=") return cont(expressionNoComma);
                            var context = cx.state.lexical.prev,
                                isInterface = context && context.info == "interface";
                            return pass(isInterface ? functiondecl : functiondef);
                        }

                        function afterExport(type, value) {
                            if (value == "*") {
                                cx.marked = "keyword";
                                return cont(maybeFrom, expect(";"));
                            }
                            if (value == "default") {
                                cx.marked = "keyword";
                                return cont(expression, expect(";"));
                            }
                            if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
                            return pass(statement);
                        }

                        function exportField(type, value) {
                            if (value == "as") {
                                cx.marked = "keyword";
                                return cont(expect("variable"));
                            }
                            if (type == "variable") return pass(expressionNoComma, exportField);
                        }

                        function afterImport(type) {
                            if (type == "string") return cont();
                            if (type == "(") return pass(expression);
                            if (type == ".") return pass(maybeoperatorComma);
                            return pass(importSpec, maybeMoreImports, maybeFrom);
                        }

                        function importSpec(type, value) {
                            if (type == "{") return contCommasep(importSpec, "}");
                            if (type == "variable") register(value);
                            if (value == "*") cx.marked = "keyword";
                            return cont(maybeAs);
                        }

                        function maybeMoreImports(type) {
                            if (type == ",") return cont(importSpec, maybeMoreImports);
                        }

                        function maybeAs(_type, value) {
                            if (value == "as") {
                                cx.marked = "keyword";
                                return cont(importSpec);
                            }
                        }

                        function maybeFrom(_type, value) {
                            if (value == "from") {
                                cx.marked = "keyword";
                                return cont(expression);
                            }
                        }

                        function arrayLiteral(type) {
                            if (type == "]") return cont();
                            return pass(commasep(expressionNoComma, "]"));
                        }

                        function enumdef() {
                            return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex);
                        }

                        function enummember() {
                            return pass(pattern, maybeAssign);
                        }

                        function isContinuedStatement(state, textAfter) {
                            return state.lastType == "operator" || state.lastType == "," || isOperatorChar.test(textAfter.charAt(0)) || /[,.]/.test(textAfter.charAt(0));
                        }

                        function expressionAllowed(stream, state, backUp) {
                            return state.tokenize == tokenBase && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) || state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0)));
                        }

                        // Interface

                        return {
                            startState: function(basecolumn) {
                                var state = {
                                    tokenize: tokenBase,
                                    lastType: "sof",
                                    cc: [],
                                    lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
                                    localVars: parserConfig.localVars,
                                    context: parserConfig.localVars && new Context(null, null, false),
                                    indented: basecolumn || 0
                                };
                                if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") state.globalVars = parserConfig.globalVars;
                                return state;
                            },
                            token: function(stream, state) {
                                if (stream.sol()) {
                                    if (!state.lexical.hasOwnProperty("align")) state.lexical.align = false;
                                    state.indented = stream.indentation();
                                    findFatArrow(stream, state);
                                }
                                if (state.tokenize != tokenComment && stream.eatSpace()) return null;
                                var style = state.tokenize(stream, state);
                                if (type == "comment") return style;
                                state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
                                return parseJS(state, style, type, content, stream);
                            },
                            indent: function(state, textAfter) {
                                if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;
                                if (state.tokenize != tokenBase) return 0;
                                var firstChar = textAfter && textAfter.charAt(0),
                                    lexical = state.lexical,
                                    top;
                                // Kludge to prevent 'maybelse' from blocking lexical scope pops
                                if (!/^\s*else\b/.test(textAfter))
                                    for (var i = state.cc.length - 1; i >= 0; --i) {
                                        var c = state.cc[i];
                                        if (c == poplex) lexical = lexical.prev;
                                        else if (c != maybeelse && c != popcontext) break;
                                    }
                                while ((lexical.type == "stat" || lexical.type == "form") && (firstChar == "}" || (top = state.cc[state.cc.length - 1]) && (top == maybeoperatorComma || top == maybeoperatorNoComma) && !/^[,\.=+\-*:?[\(]/.test(textAfter))) lexical = lexical.prev;
                                if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") lexical = lexical.prev;
                                var type = lexical.type,
                                    closing = firstChar == type;
                                if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
                                else if (type == "form" && firstChar == "{") return lexical.indented;
                                else if (type == "form") return lexical.indented + indentUnit;
                                else if (type == "stat") return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
                                else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
                                else if (lexical.align) return lexical.column + (closing ? 0 : 1);
                                else return lexical.indented + (closing ? 0 : indentUnit);
                            },
                            electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
                            blockCommentStart: jsonMode ? null : "/*",
                            blockCommentEnd: jsonMode ? null : "*/",
                            blockCommentContinue: jsonMode ? null : " * ",
                            lineComment: jsonMode ? null : "//",
                            fold: "brace",
                            closeBrackets: "()[]{}''\"\"``",
                            helperType: jsonMode ? "json" : "javascript",
                            jsonldMode: jsonldMode,
                            jsonMode: jsonMode,
                            expressionAllowed: expressionAllowed,
                            skipExpression: function(state) {
                                parseJS(state, "atom", "atom", "true", new CodeMirror.StringStream("", 2, null));
                            }
                        };
                    });
                    CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
                    CodeMirror.defineMIME("text/javascript", "javascript");
                    CodeMirror.defineMIME("text/ecmascript", "javascript");
                    CodeMirror.defineMIME("application/javascript", "javascript");
                    CodeMirror.defineMIME("application/x-javascript", "javascript");
                    CodeMirror.defineMIME("application/ecmascript", "javascript");
                    CodeMirror.defineMIME("application/json", {
                        name: "javascript",
                        json: true
                    });
                    CodeMirror.defineMIME("application/x-json", {
                        name: "javascript",
                        json: true
                    });
                    CodeMirror.defineMIME("application/manifest+json", {
                        name: "javascript",
                        json: true
                    });
                    CodeMirror.defineMIME("application/ld+json", {
                        name: "javascript",
                        jsonld: true
                    });
                    CodeMirror.defineMIME("text/typescript", {
                        name: "javascript",
                        typescript: true
                    });
                    CodeMirror.defineMIME("application/typescript", {
                        name: "javascript",
                        typescript: true
                    });
                });

                /***/
            }),

        /***/
        "../../../node_modules/copy-to-clipboard/index.js":
            /*!********************************************************!*\
              !*** ../../../node_modules/copy-to-clipboard/index.js ***!
              \********************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var deselectCurrent = __webpack_require__( /*! toggle-selection */ "../../../node_modules/toggle-selection/index.js");
                var clipboardToIE11Formatting = {
                    "text/plain": "Text",
                    "text/html": "Url",
                    "default": "Text"
                };
                var defaultMessage = "Copy to clipboard: #{key}, Enter";

                function format(message) {
                    var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
                    return message.replace(/#{\s*key\s*}/g, copyKey);
                }

                function copy(text, options) {
                    var debug,
                        message,
                        reselectPrevious,
                        range,
                        selection,
                        mark,
                        success = false;
                    if (!options) {
                        options = {};
                    }
                    debug = options.debug || false;
                    try {
                        reselectPrevious = deselectCurrent();
                        range = document.createRange();
                        selection = document.getSelection();
                        mark = document.createElement("span");
                        mark.textContent = text;
                        // avoid screen readers from reading out loud the text
                        mark.ariaHidden = "true";
                        // reset user styles for span element
                        mark.style.all = "unset";
                        // prevents scrolling to the end of the page
                        mark.style.position = "fixed";
                        mark.style.top = 0;
                        mark.style.clip = "rect(0, 0, 0, 0)";
                        // used to preserve spaces and line breaks
                        mark.style.whiteSpace = "pre";
                        // do not inherit user-select (it may be `none`)
                        mark.style.webkitUserSelect = "text";
                        mark.style.MozUserSelect = "text";
                        mark.style.msUserSelect = "text";
                        mark.style.userSelect = "text";
                        mark.addEventListener("copy", function(e) {
                            e.stopPropagation();
                            if (options.format) {
                                e.preventDefault();
                                if (typeof e.clipboardData === "undefined") {
                                    // IE 11
                                    debug && console.warn("unable to use e.clipboardData");
                                    debug && console.warn("trying IE specific stuff");
                                    window.clipboardData.clearData();
                                    var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"];
                                    window.clipboardData.setData(format, text);
                                } else {
                                    // all other browsers
                                    e.clipboardData.clearData();
                                    e.clipboardData.setData(options.format, text);
                                }
                            }
                            if (options.onCopy) {
                                e.preventDefault();
                                options.onCopy(e.clipboardData);
                            }
                        });
                        document.body.appendChild(mark);
                        range.selectNodeContents(mark);
                        selection.addRange(range);
                        var successful = document.execCommand("copy");
                        if (!successful) {
                            throw new Error("copy command was unsuccessful");
                        }
                        success = true;
                    } catch (err) {
                        debug && console.error("unable to copy using execCommand: ", err);
                        debug && console.warn("trying IE specific stuff");
                        try {
                            window.clipboardData.setData(options.format || "text", text);
                            options.onCopy && options.onCopy(window.clipboardData);
                            success = true;
                        } catch (err) {
                            debug && console.error("unable to copy using clipboardData: ", err);
                            debug && console.error("falling back to prompt");
                            message = format("message" in options ? options.message : defaultMessage);
                            window.prompt(message, text);
                        }
                    } finally {
                        if (selection) {
                            if (typeof selection.removeRange == "function") {
                                selection.removeRange(range);
                            } else {
                                selection.removeAllRanges();
                            }
                        }
                        if (mark) {
                            document.body.removeChild(mark);
                        }
                        reselectPrevious();
                    }
                    return success;
                }
                module.exports = copy;

                /***/
            }),

        /***/
        "../../../node_modules/detect-node-es/esm/browser.js":
            /*!***********************************************************!*\
              !*** ../../../node_modules/detect-node-es/esm/browser.js ***!
              \***********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isNode = void 0;
                const isNode = exports.isNode = false;

                /***/
            }),

        /***/
        "../../../node_modules/entities/lib/decode.js":
            /*!****************************************************!*\
              !*** ../../../node_modules/entities/lib/decode.js ***!
              \****************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function(o, m, k, k2) {
                    if (k2 === undefined) k2 = k;
                    var desc = Object.getOwnPropertyDescriptor(m, k);
                    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                        desc = {
                            enumerable: true,
                            get: function() {
                                return m[k];
                            }
                        };
                    }
                    Object.defineProperty(o, k2, desc);
                } : function(o, m, k, k2) {
                    if (k2 === undefined) k2 = k;
                    o[k2] = m[k];
                });
                var __setModuleDefault = void 0 && (void 0).__setModuleDefault || (Object.create ? function(o, v) {
                    Object.defineProperty(o, "default", {
                        enumerable: true,
                        value: v
                    });
                } : function(o, v) {
                    o["default"] = v;
                });
                var __importStar = void 0 && (void 0).__importStar || function(mod) {
                    if (mod && mod.__esModule) return mod;
                    var result = {};
                    if (mod != null)
                        for (var k in mod)
                            if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
                    __setModuleDefault(result, mod);
                    return result;
                };
                var __importDefault = void 0 && (void 0).__importDefault || function(mod) {
                    return mod && mod.__esModule ? mod : {
                        "default": mod
                    };
                };
                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0;
                var decode_data_html_js_1 = __importDefault(__webpack_require__( /*! ./generated/decode-data-html.js */ "../../../node_modules/entities/lib/generated/decode-data-html.js"));
                exports.htmlDecodeTree = decode_data_html_js_1.default;
                var decode_data_xml_js_1 = __importDefault(__webpack_require__( /*! ./generated/decode-data-xml.js */ "../../../node_modules/entities/lib/generated/decode-data-xml.js"));
                exports.xmlDecodeTree = decode_data_xml_js_1.default;
                var decode_codepoint_js_1 = __importStar(__webpack_require__( /*! ./decode_codepoint.js */ "../../../node_modules/entities/lib/decode_codepoint.js"));
                exports.decodeCodePoint = decode_codepoint_js_1.default;
                var decode_codepoint_js_2 = __webpack_require__( /*! ./decode_codepoint.js */ "../../../node_modules/entities/lib/decode_codepoint.js");
                Object.defineProperty(exports, "replaceCodePoint", ({
                    enumerable: true,
                    get: function() {
                        return decode_codepoint_js_2.replaceCodePoint;
                    }
                }));
                Object.defineProperty(exports, "fromCodePoint", ({
                    enumerable: true,
                    get: function() {
                        return decode_codepoint_js_2.fromCodePoint;
                    }
                }));
                var CharCodes;
                (function(CharCodes) {
                    CharCodes[CharCodes["NUM"] = 35] = "NUM";
                    CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
                    CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
                    CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
                    CharCodes[CharCodes["NINE"] = 57] = "NINE";
                    CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
                    CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
                    CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
                    CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
                    CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
                    CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
                    CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
                })(CharCodes || (CharCodes = {}));
                /** Bit that needs to be set to convert an upper case ASCII character to lower case */
                var TO_LOWER_BIT = 32;
                var BinTrieFlags;
                (function(BinTrieFlags) {
                    BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
                    BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
                    BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
                })(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {}));

                function isNumber(code) {
                    return code >= CharCodes.ZERO && code <= CharCodes.NINE;
                }

                function isHexadecimalCharacter(code) {
                    return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;
                }

                function isAsciiAlphaNumeric(code) {
                    return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code);
                }
                /**
                 * Checks if the given character is a valid end character for an entity in an attribute.
                 *
                 * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
                 * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
                 */
                function isEntityInAttributeInvalidEnd(code) {
                    return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
                }
                var EntityDecoderState;
                (function(EntityDecoderState) {
                    EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
                    EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
                    EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
                    EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
                    EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
                })(EntityDecoderState || (EntityDecoderState = {}));
                var DecodingMode;
                (function(DecodingMode) {
                    /** Entities in text nodes that can end with any character. */
                    DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
                    /** Only allow entities terminated with a semicolon. */
                    DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
                    /** Entities in attributes have limitations on ending characters. */
                    DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
                })(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {}));
                /**
                 * Token decoder with support of writing partial entities.
                 */
                var EntityDecoder = /** @class */ function() {
                    function EntityDecoder( /** The tree used to decode entities. */
                        decodeTree,
                        /**
                         * The function that is called when a codepoint is decoded.
                         *
                         * For multi-byte named entities, this will be called multiple times,
                         * with the second codepoint, and the same `consumed` value.
                         *
                         * @param codepoint The decoded codepoint.
                         * @param consumed The number of bytes consumed by the decoder.
                         */
                        emitCodePoint, /** An object that is used to produce errors. */
                        errors) {
                        this.decodeTree = decodeTree;
                        this.emitCodePoint = emitCodePoint;
                        this.errors = errors;
                        /** The current state of the decoder. */
                        this.state = EntityDecoderState.EntityStart;
                        /** Characters that were consumed while parsing an entity. */
                        this.consumed = 1;
                        /**
                         * The result of the entity.
                         *
                         * Either the result index of a numeric entity, or the codepoint of a
                         * numeric entity.
                         */
                        this.result = 0;
                        /** The current index in the decode tree. */
                        this.treeIndex = 0;
                        /** The number of characters that were consumed in excess. */
                        this.excess = 1;
                        /** The mode in which the decoder is operating. */
                        this.decodeMode = DecodingMode.Strict;
                    }
                    /** Resets the instance to make it reusable. */
                    EntityDecoder.prototype.startEntity = function(decodeMode) {
                        this.decodeMode = decodeMode;
                        this.state = EntityDecoderState.EntityStart;
                        this.result = 0;
                        this.treeIndex = 0;
                        this.excess = 1;
                        this.consumed = 1;
                    };
                    /**
                     * Write an entity to the decoder. This can be called multiple times with partial entities.
                     * If the entity is incomplete, the decoder will return -1.
                     *
                     * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
                     * entity is incomplete, and resume when the next string is written.
                     *
                     * @param string The string containing the entity (or a continuation of the entity).
                     * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
                     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
                     */
                    EntityDecoder.prototype.write = function(str, offset) {
                        switch (this.state) {
                            case EntityDecoderState.EntityStart: {
                                if (str.charCodeAt(offset) === CharCodes.NUM) {
                                    this.state = EntityDecoderState.NumericStart;
                                    this.consumed += 1;
                                    return this.stateNumericStart(str, offset + 1);
                                }
                                this.state = EntityDecoderState.NamedEntity;
                                return this.stateNamedEntity(str, offset);
                            }
                            case EntityDecoderState.NumericStart: {
                                return this.stateNumericStart(str, offset);
                            }
                            case EntityDecoderState.NumericDecimal: {
                                return this.stateNumericDecimal(str, offset);
                            }
                            case EntityDecoderState.NumericHex: {
                                return this.stateNumericHex(str, offset);
                            }
                            case EntityDecoderState.NamedEntity: {
                                return this.stateNamedEntity(str, offset);
                            }
                        }
                    };
                    /**
                     * Switches between the numeric decimal and hexadecimal states.
                     *
                     * Equivalent to the `Numeric character reference state` in the HTML spec.
                     *
                     * @param str The string containing the entity (or a continuation of the entity).
                     * @param offset The current offset.
                     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
                     */
                    EntityDecoder.prototype.stateNumericStart = function(str, offset) {
                        if (offset >= str.length) {
                            return -1;
                        }
                        if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
                            this.state = EntityDecoderState.NumericHex;
                            this.consumed += 1;
                            return this.stateNumericHex(str, offset + 1);
                        }
                        this.state = EntityDecoderState.NumericDecimal;
                        return this.stateNumericDecimal(str, offset);
                    };
                    EntityDecoder.prototype.addToNumericResult = function(str, start, end, base) {
                        if (start !== end) {
                            var digitCount = end - start;
                            this.result = this.result * Math.pow(base, digitCount) + parseInt(str.substr(start, digitCount), base);
                            this.consumed += digitCount;
                        }
                    };
                    /**
                     * Parses a hexadecimal numeric entity.
                     *
                     * Equivalent to the `Hexademical character reference state` in the HTML spec.
                     *
                     * @param str The string containing the entity (or a continuation of the entity).
                     * @param offset The current offset.
                     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
                     */
                    EntityDecoder.prototype.stateNumericHex = function(str, offset) {
                        var startIdx = offset;
                        while (offset < str.length) {
                            var char = str.charCodeAt(offset);
                            if (isNumber(char) || isHexadecimalCharacter(char)) {
                                offset += 1;
                            } else {
                                this.addToNumericResult(str, startIdx, offset, 16);
                                return this.emitNumericEntity(char, 3);
                            }
                        }
                        this.addToNumericResult(str, startIdx, offset, 16);
                        return -1;
                    };
                    /**
                     * Parses a decimal numeric entity.
                     *
                     * Equivalent to the `Decimal character reference state` in the HTML spec.
                     *
                     * @param str The string containing the entity (or a continuation of the entity).
                     * @param offset The current offset.
                     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
                     */
                    EntityDecoder.prototype.stateNumericDecimal = function(str, offset) {
                        var startIdx = offset;
                        while (offset < str.length) {
                            var char = str.charCodeAt(offset);
                            if (isNumber(char)) {
                                offset += 1;
                            } else {
                                this.addToNumericResult(str, startIdx, offset, 10);
                                return this.emitNumericEntity(char, 2);
                            }
                        }
                        this.addToNumericResult(str, startIdx, offset, 10);
                        return -1;
                    };
                    /**
                     * Validate and emit a numeric entity.
                     *
                     * Implements the logic from the `Hexademical character reference start
                     * state` and `Numeric character reference end state` in the HTML spec.
                     *
                     * @param lastCp The last code point of the entity. Used to see if the
                     *               entity was terminated with a semicolon.
                     * @param expectedLength The minimum number of characters that should be
                     *                       consumed. Used to validate that at least one digit
                     *                       was consumed.
                     * @returns The number of characters that were consumed.
                     */
                    EntityDecoder.prototype.emitNumericEntity = function(lastCp, expectedLength) {
                        var _a;
                        // Ensure we consumed at least one digit.
                        if (this.consumed <= expectedLength) {
                            (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
                            return 0;
                        }
                        // Figure out if this is a legit end of the entity
                        if (lastCp === CharCodes.SEMI) {
                            this.consumed += 1;
                        } else if (this.decodeMode === DecodingMode.Strict) {
                            return 0;
                        }
                        this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed);
                        if (this.errors) {
                            if (lastCp !== CharCodes.SEMI) {
                                this.errors.missingSemicolonAfterCharacterReference();
                            }
                            this.errors.validateNumericCharacterReference(this.result);
                        }
                        return this.consumed;
                    };
                    /**
                     * Parses a named entity.
                     *
                     * Equivalent to the `Named character reference state` in the HTML spec.
                     *
                     * @param str The string containing the entity (or a continuation of the entity).
                     * @param offset The current offset.
                     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
                     */
                    EntityDecoder.prototype.stateNamedEntity = function(str, offset) {
                        var decodeTree = this.decodeTree;
                        var current = decodeTree[this.treeIndex];
                        // The mask is the number of bytes of the value, including the current byte.
                        var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
                        for (; offset < str.length; offset++, this.excess++) {
                            var char = str.charCodeAt(offset);
                            this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
                            if (this.treeIndex < 0) {
                                return this.result === 0 ||
                                    // If we are parsing an attribute
                                    this.decodeMode === DecodingMode.Attribute && (
                                        // We shouldn't have consumed any characters after the entity,
                                        valueLength === 0 ||
                                        // And there should be no invalid characters.
                                        isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
                            }
                            current = decodeTree[this.treeIndex];
                            valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
                            // If the branch is a value, store it and continue
                            if (valueLength !== 0) {
                                // If the entity is terminated by a semicolon, we are done.
                                if (char === CharCodes.SEMI) {
                                    return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
                                }
                                // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.
                                if (this.decodeMode !== DecodingMode.Strict) {
                                    this.result = this.treeIndex;
                                    this.consumed += this.excess;
                                    this.excess = 0;
                                }
                            }
                        }
                        return -1;
                    };
                    /**
                     * Emit a named entity that was not terminated with a semicolon.
                     *
                     * @returns The number of characters consumed.
                     */
                    EntityDecoder.prototype.emitNotTerminatedNamedEntity = function() {
                        var _a;
                        var _b = this,
                            result = _b.result,
                            decodeTree = _b.decodeTree;
                        var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
                        this.emitNamedEntityData(result, valueLength, this.consumed);
                        (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();
                        return this.consumed;
                    };
                    /**
                     * Emit a named entity.
                     *
                     * @param result The index of the entity in the decode tree.
                     * @param valueLength The number of bytes in the entity.
                     * @param consumed The number of characters consumed.
                     *
                     * @returns The number of characters consumed.
                     */
                    EntityDecoder.prototype.emitNamedEntityData = function(result, valueLength, consumed) {
                        var decodeTree = this.decodeTree;
                        this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
                        if (valueLength === 3) {
                            // For multi-byte values, we need to emit the second byte.
                            this.emitCodePoint(decodeTree[result + 2], consumed);
                        }
                        return consumed;
                    };
                    /**
                     * Signal to the parser that the end of the input was reached.
                     *
                     * Remaining data will be emitted and relevant errors will be produced.
                     *
                     * @returns The number of characters consumed.
                     */
                    EntityDecoder.prototype.end = function() {
                        var _a;
                        switch (this.state) {
                            case EntityDecoderState.NamedEntity: {
                                // Emit a named entity if we have one.
                                return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
                            }
                            // Otherwise, emit a numeric entity if we have one.
                            case EntityDecoderState.NumericDecimal: {
                                return this.emitNumericEntity(0, 2);
                            }
                            case EntityDecoderState.NumericHex: {
                                return this.emitNumericEntity(0, 3);
                            }
                            case EntityDecoderState.NumericStart: {
                                (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
                                return 0;
                            }
                            case EntityDecoderState.EntityStart: {
                                // Return 0 if we have no entity.
                                return 0;
                            }
                        }
                    };
                    return EntityDecoder;
                }();
                exports.EntityDecoder = EntityDecoder;
                /**
                 * Creates a function that decodes entities in a string.
                 *
                 * @param decodeTree The decode tree.
                 * @returns A function that decodes entities in a string.
                 */
                function getDecoder(decodeTree) {
                    var ret = "";
                    var decoder = new EntityDecoder(decodeTree, function(str) {
                        return ret += (0, decode_codepoint_js_1.fromCodePoint)(str);
                    });
                    return function decodeWithTrie(str, decodeMode) {
                        var lastIndex = 0;
                        var offset = 0;
                        while ((offset = str.indexOf("&", offset)) >= 0) {
                            ret += str.slice(lastIndex, offset);
                            decoder.startEntity(decodeMode);
                            var len = decoder.write(str,
                                // Skip the "&"
                                offset + 1);
                            if (len < 0) {
                                lastIndex = offset + decoder.end();
                                break;
                            }
                            lastIndex = offset + len;
                            // If `len` is 0, skip the current `&` and continue.
                            offset = len === 0 ? lastIndex + 1 : lastIndex;
                        }
                        var result = ret + str.slice(lastIndex);
                        // Make sure we don't keep a reference to the final string.
                        ret = "";
                        return result;
                    };
                }
                /**
                 * Determines the branch of the current node that is taken given the current
                 * character. This function is used to traverse the trie.
                 *
                 * @param decodeTree The trie.
                 * @param current The current node.
                 * @param nodeIdx The index right after the current node and its value.
                 * @param char The current character.
                 * @returns The index of the next node, or -1 if no branch is taken.
                 */
                function determineBranch(decodeTree, current, nodeIdx, char) {
                    var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
                    var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
                    // Case 1: Single branch encoded in jump offset
                    if (branchCount === 0) {
                        return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;
                    }
                    // Case 2: Multiple branches encoded in jump table
                    if (jumpOffset) {
                        var value = char - jumpOffset;
                        return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
                    }
                    // Case 3: Multiple branches encoded in dictionary
                    // Binary search for the character.
                    var lo = nodeIdx;
                    var hi = lo + branchCount - 1;
                    while (lo <= hi) {
                        var mid = lo + hi >>> 1;
                        var midVal = decodeTree[mid];
                        if (midVal < char) {
                            lo = mid + 1;
                        } else if (midVal > char) {
                            hi = mid - 1;
                        } else {
                            return decodeTree[mid + branchCount];
                        }
                    }
                    return -1;
                }
                exports.determineBranch = determineBranch;
                var htmlDecoder = getDecoder(decode_data_html_js_1.default);
                var xmlDecoder = getDecoder(decode_data_xml_js_1.default);
                /**
                 * Decodes an HTML string.
                 *
                 * @param str The string to decode.
                 * @param mode The decoding mode.
                 * @returns The decoded string.
                 */
                function decodeHTML(str, mode) {
                    if (mode === void 0) {
                        mode = DecodingMode.Legacy;
                    }
                    return htmlDecoder(str, mode);
                }
                exports.decodeHTML = decodeHTML;
                /**
                 * Decodes an HTML string in an attribute.
                 *
                 * @param str The string to decode.
                 * @returns The decoded string.
                 */
                function decodeHTMLAttribute(str) {
                    return htmlDecoder(str, DecodingMode.Attribute);
                }
                exports.decodeHTMLAttribute = decodeHTMLAttribute;
                /**
                 * Decodes an HTML string, requiring all entities to be terminated by a semicolon.
                 *
                 * @param str The string to decode.
                 * @returns The decoded string.
                 */
                function decodeHTMLStrict(str) {
                    return htmlDecoder(str, DecodingMode.Strict);
                }
                exports.decodeHTMLStrict = decodeHTMLStrict;
                /**
                 * Decodes an XML string, requiring all entities to be terminated by a semicolon.
                 *
                 * @param str The string to decode.
                 * @returns The decoded string.
                 */
                function decodeXML(str) {
                    return xmlDecoder(str, DecodingMode.Strict);
                }
                exports.decodeXML = decodeXML;

                /***/
            }),

        /***/
        "../../../node_modules/entities/lib/decode_codepoint.js":
            /*!**************************************************************!*\
              !*** ../../../node_modules/entities/lib/decode_codepoint.js ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                // Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134
                var _a;
                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.replaceCodePoint = exports.fromCodePoint = void 0;
                var decodeMap = new Map([
                    [0, 65533],
                    // C1 Unicode control character reference replacements
                    [128, 8364],
                    [130, 8218],
                    [131, 402],
                    [132, 8222],
                    [133, 8230],
                    [134, 8224],
                    [135, 8225],
                    [136, 710],
                    [137, 8240],
                    [138, 352],
                    [139, 8249],
                    [140, 338],
                    [142, 381],
                    [145, 8216],
                    [146, 8217],
                    [147, 8220],
                    [148, 8221],
                    [149, 8226],
                    [150, 8211],
                    [151, 8212],
                    [152, 732],
                    [153, 8482],
                    [154, 353],
                    [155, 8250],
                    [156, 339],
                    [158, 382],
                    [159, 376]
                ]);
                /**
                 * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.
                 */
                exports.fromCodePoint =
                    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
                    (_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function(codePoint) {
                        var output = "";
                        if (codePoint > 0xffff) {
                            codePoint -= 0x10000;
                            output += String.fromCharCode(codePoint >>> 10 & 0x3ff | 0xd800);
                            codePoint = 0xdc00 | codePoint & 0x3ff;
                        }
                        output += String.fromCharCode(codePoint);
                        return output;
                    };
                /**
                 * Replace the given code point with a replacement character if it is a
                 * surrogate or is outside the valid range. Otherwise return the code
                 * point unchanged.
                 */
                function replaceCodePoint(codePoint) {
                    var _a;
                    if (codePoint >= 0xd800 && codePoint <= 0xdfff || codePoint > 0x10ffff) {
                        return 0xfffd;
                    }
                    return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;
                }
                exports.replaceCodePoint = replaceCodePoint;
                /**
                 * Replace the code point if relevant, then convert it to a string.
                 *
                 * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.
                 * @param codePoint The code point to decode.
                 * @returns The decoded code point.
                 */
                function decodeCodePoint(codePoint) {
                    return (0, exports.fromCodePoint)(replaceCodePoint(codePoint));
                }
                exports["default"] = decodeCodePoint;

                /***/
            }),

        /***/
        "../../../node_modules/entities/lib/encode.js":
            /*!****************************************************!*\
              !*** ../../../node_modules/entities/lib/encode.js ***!
              \****************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                var __importDefault = void 0 && (void 0).__importDefault || function(mod) {
                    return mod && mod.__esModule ? mod : {
                        "default": mod
                    };
                };
                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.encodeNonAsciiHTML = exports.encodeHTML = void 0;
                var encode_html_js_1 = __importDefault(__webpack_require__( /*! ./generated/encode-html.js */ "../../../node_modules/entities/lib/generated/encode-html.js"));
                var escape_js_1 = __webpack_require__( /*! ./escape.js */ "../../../node_modules/entities/lib/escape.js");
                var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
                /**
                 * Encodes all characters in the input using HTML entities. This includes
                 * characters that are valid ASCII characters in HTML documents, such as `#`.
                 *
                 * To get a more compact output, consider using the `encodeNonAsciiHTML`
                 * function, which will only encode characters that are not valid in HTML
                 * documents, as well as non-ASCII characters.
                 *
                 * If a character has no equivalent entity, a numeric hexadecimal reference
                 * (eg. `&#xfc;`) will be used.
                 */
                function encodeHTML(data) {
                    return encodeHTMLTrieRe(htmlReplacer, data);
                }
                exports.encodeHTML = encodeHTML;
                /**
                 * Encodes all non-ASCII characters, as well as characters not valid in HTML
                 * documents using HTML entities. This function will not encode characters that
                 * are valid in HTML documents, such as `#`.
                 *
                 * If a character has no equivalent entity, a numeric hexadecimal reference
                 * (eg. `&#xfc;`) will be used.
                 */
                function encodeNonAsciiHTML(data) {
                    return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);
                }
                exports.encodeNonAsciiHTML = encodeNonAsciiHTML;

                function encodeHTMLTrieRe(regExp, str) {
                    var ret = "";
                    var lastIdx = 0;
                    var match;
                    while ((match = regExp.exec(str)) !== null) {
                        var i = match.index;
                        ret += str.substring(lastIdx, i);
                        var char = str.charCodeAt(i);
                        var next = encode_html_js_1.default.get(char);
                        if (typeof next === "object") {
                            // We are in a branch. Try to match the next char.
                            if (i + 1 < str.length) {
                                var nextChar = str.charCodeAt(i + 1);
                                var value = typeof next.n === "number" ? next.n === nextChar ? next.o : undefined : next.n.get(nextChar);
                                if (value !== undefined) {
                                    ret += value;
                                    lastIdx = regExp.lastIndex += 1;
                                    continue;
                                }
                            }
                            next = next.v;
                        }
                        // We might have a tree node without a value; skip and use a numeric entity.
                        if (next !== undefined) {
                            ret += next;
                            lastIdx = i + 1;
                        } else {
                            var cp = (0, escape_js_1.getCodePoint)(str, i);
                            ret += "&#x".concat(cp.toString(16), ";");
                            // Increase by 1 if we have a surrogate pair
                            lastIdx = regExp.lastIndex += Number(cp !== char);
                        }
                    }
                    return ret + str.substr(lastIdx);
                }

                /***/
            }),

        /***/
        "../../../node_modules/entities/lib/escape.js":
            /*!****************************************************!*\
              !*** ../../../node_modules/entities/lib/escape.js ***!
              \****************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0;
                exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
                var xmlCodeMap = new Map([
                    [34, "&quot;"],
                    [38, "&amp;"],
                    [39, "&apos;"],
                    [60, "&lt;"],
                    [62, "&gt;"]
                ]);
                // For compatibility with node < 4, we wrap `codePointAt`
                exports.getCodePoint =
                    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                    String.prototype.codePointAt != null ? function(str, index) {
                        return str.codePointAt(index);
                    } :
                    // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
                    function(c, index) {
                        return (c.charCodeAt(index) & 0xfc00) === 0xd800 ? (c.charCodeAt(index) - 0xd800) * 0x400 + c.charCodeAt(index + 1) - 0xdc00 + 0x10000 : c.charCodeAt(index);
                    };
                /**
                 * Encodes all non-ASCII characters, as well as characters not valid in XML
                 * documents using XML entities.
                 *
                 * If a character has no equivalent entity, a
                 * numeric hexadecimal reference (eg. `&#xfc;`) will be used.
                 */
                function encodeXML(str) {
                    var ret = "";
                    var lastIdx = 0;
                    var match;
                    while ((match = exports.xmlReplacer.exec(str)) !== null) {
                        var i = match.index;
                        var char = str.charCodeAt(i);
                        var next = xmlCodeMap.get(char);
                        if (next !== undefined) {
                            ret += str.substring(lastIdx, i) + next;
                            lastIdx = i + 1;
                        } else {
                            ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";");
                            // Increase by 1 if we have a surrogate pair
                            lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);
                        }
                    }
                    return ret + str.substr(lastIdx);
                }
                exports.encodeXML = encodeXML;
                /**
                 * Encodes all non-ASCII characters, as well as characters not valid in XML
                 * documents using numeric hexadecimal reference (eg. `&#xfc;`).
                 *
                 * Have a look at `escapeUTF8` if you want a more concise output at the expense
                 * of reduced transportability.
                 *
                 * @param data String to escape.
                 */
                exports.escape = encodeXML;
                /**
                 * Creates a function that escapes all characters matched by the given regular
                 * expression using the given map of characters to escape to their entities.
                 *
                 * @param regex Regular expression to match characters to escape.
                 * @param map Map of characters to escape to their entities.
                 *
                 * @returns Function that escapes all characters matched by the given regular
                 * expression using the given map of characters to escape to their entities.
                 */
                function getEscaper(regex, map) {
                    return function escape(data) {
                        var match;
                        var lastIdx = 0;
                        var result = "";
                        while (match = regex.exec(data)) {
                            if (lastIdx !== match.index) {
                                result += data.substring(lastIdx, match.index);
                            }
                            // We know that this character will be in the map.
                            result += map.get(match[0].charCodeAt(0));
                            // Every match will be of length 1
                            lastIdx = match.index + 1;
                        }
                        return result + data.substring(lastIdx);
                    };
                }
                /**
                 * Encodes all characters not valid in XML documents using XML entities.
                 *
                 * Note that the output will be character-set dependent.
                 *
                 * @param data String to escape.
                 */
                exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
                /**
                 * Encodes all characters that have to be escaped in HTML attributes,
                 * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
                 *
                 * @param data String to escape.
                 */
                exports.escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([
                    [34, "&quot;"],
                    [38, "&amp;"],
                    [160, "&nbsp;"]
                ]));
                /**
                 * Encodes all characters that have to be escaped in HTML text,
                 * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
                 *
                 * @param data String to escape.
                 */
                exports.escapeText = getEscaper(/[&<>\u00A0]/g, new Map([
                    [38, "&amp;"],
                    [60, "&lt;"],
                    [62, "&gt;"],
                    [160, "&nbsp;"]
                ]));

                /***/
            }),

        /***/
        "../../../node_modules/entities/lib/generated/decode-data-html.js":
            /*!************************************************************************!*\
              !*** ../../../node_modules/entities/lib/generated/decode-data-html.js ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                // Generated using scripts/write-decode-map.ts
                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = new Uint16Array(
                    // prettier-ignore
                    "\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c".split("").map(function(c) {
                        return c.charCodeAt(0);
                    }));

                /***/
            }),

        /***/
        "../../../node_modules/entities/lib/generated/decode-data-xml.js":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/entities/lib/generated/decode-data-xml.js ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                // Generated using scripts/write-decode-map.ts
                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = new Uint16Array(
                    // prettier-ignore
                    "\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022".split("").map(function(c) {
                        return c.charCodeAt(0);
                    }));

                /***/
            }),

        /***/
        "../../../node_modules/entities/lib/generated/encode-html.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/entities/lib/generated/encode-html.js ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                // Generated using scripts/write-encode-map.ts
                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));

                function restoreDiff(arr) {
                    for (var i = 1; i < arr.length; i++) {
                        arr[i][0] += arr[i - 1][0] + 1;
                    }
                    return arr;
                }
                // prettier-ignore
                exports["default"] = new Map( /* #__PURE__ */ restoreDiff([
                    [9, "&Tab;"],
                    [0, "&NewLine;"],
                    [22, "&excl;"],
                    [0, "&quot;"],
                    [0, "&num;"],
                    [0, "&dollar;"],
                    [0, "&percnt;"],
                    [0, "&amp;"],
                    [0, "&apos;"],
                    [0, "&lpar;"],
                    [0, "&rpar;"],
                    [0, "&ast;"],
                    [0, "&plus;"],
                    [0, "&comma;"],
                    [1, "&period;"],
                    [0, "&sol;"],
                    [10, "&colon;"],
                    [0, "&semi;"],
                    [0, {
                        v: "&lt;",
                        n: 8402,
                        o: "&nvlt;"
                    }],
                    [0, {
                        v: "&equals;",
                        n: 8421,
                        o: "&bne;"
                    }],
                    [0, {
                        v: "&gt;",
                        n: 8402,
                        o: "&nvgt;"
                    }],
                    [0, "&quest;"],
                    [0, "&commat;"],
                    [26, "&lbrack;"],
                    [0, "&bsol;"],
                    [0, "&rbrack;"],
                    [0, "&Hat;"],
                    [0, "&lowbar;"],
                    [0, "&DiacriticalGrave;"],
                    [5, {
                        n: 106,
                        o: "&fjlig;"
                    }],
                    [20, "&lbrace;"],
                    [0, "&verbar;"],
                    [0, "&rbrace;"],
                    [34, "&nbsp;"],
                    [0, "&iexcl;"],
                    [0, "&cent;"],
                    [0, "&pound;"],
                    [0, "&curren;"],
                    [0, "&yen;"],
                    [0, "&brvbar;"],
                    [0, "&sect;"],
                    [0, "&die;"],
                    [0, "&copy;"],
                    [0, "&ordf;"],
                    [0, "&laquo;"],
                    [0, "&not;"],
                    [0, "&shy;"],
                    [0, "&circledR;"],
                    [0, "&macr;"],
                    [0, "&deg;"],
                    [0, "&PlusMinus;"],
                    [0, "&sup2;"],
                    [0, "&sup3;"],
                    [0, "&acute;"],
                    [0, "&micro;"],
                    [0, "&para;"],
                    [0, "&centerdot;"],
                    [0, "&cedil;"],
                    [0, "&sup1;"],
                    [0, "&ordm;"],
                    [0, "&raquo;"],
                    [0, "&frac14;"],
                    [0, "&frac12;"],
                    [0, "&frac34;"],
                    [0, "&iquest;"],
                    [0, "&Agrave;"],
                    [0, "&Aacute;"],
                    [0, "&Acirc;"],
                    [0, "&Atilde;"],
                    [0, "&Auml;"],
                    [0, "&angst;"],
                    [0, "&AElig;"],
                    [0, "&Ccedil;"],
                    [0, "&Egrave;"],
                    [0, "&Eacute;"],
                    [0, "&Ecirc;"],
                    [0, "&Euml;"],
                    [0, "&Igrave;"],
                    [0, "&Iacute;"],
                    [0, "&Icirc;"],
                    [0, "&Iuml;"],
                    [0, "&ETH;"],
                    [0, "&Ntilde;"],
                    [0, "&Ograve;"],
                    [0, "&Oacute;"],
                    [0, "&Ocirc;"],
                    [0, "&Otilde;"],
                    [0, "&Ouml;"],
                    [0, "&times;"],
                    [0, "&Oslash;"],
                    [0, "&Ugrave;"],
                    [0, "&Uacute;"],
                    [0, "&Ucirc;"],
                    [0, "&Uuml;"],
                    [0, "&Yacute;"],
                    [0, "&THORN;"],
                    [0, "&szlig;"],
                    [0, "&agrave;"],
                    [0, "&aacute;"],
                    [0, "&acirc;"],
                    [0, "&atilde;"],
                    [0, "&auml;"],
                    [0, "&aring;"],
                    [0, "&aelig;"],
                    [0, "&ccedil;"],
                    [0, "&egrave;"],
                    [0, "&eacute;"],
                    [0, "&ecirc;"],
                    [0, "&euml;"],
                    [0, "&igrave;"],
                    [0, "&iacute;"],
                    [0, "&icirc;"],
                    [0, "&iuml;"],
                    [0, "&eth;"],
                    [0, "&ntilde;"],
                    [0, "&ograve;"],
                    [0, "&oacute;"],
                    [0, "&ocirc;"],
                    [0, "&otilde;"],
                    [0, "&ouml;"],
                    [0, "&div;"],
                    [0, "&oslash;"],
                    [0, "&ugrave;"],
                    [0, "&uacute;"],
                    [0, "&ucirc;"],
                    [0, "&uuml;"],
                    [0, "&yacute;"],
                    [0, "&thorn;"],
                    [0, "&yuml;"],
                    [0, "&Amacr;"],
                    [0, "&amacr;"],
                    [0, "&Abreve;"],
                    [0, "&abreve;"],
                    [0, "&Aogon;"],
                    [0, "&aogon;"],
                    [0, "&Cacute;"],
                    [0, "&cacute;"],
                    [0, "&Ccirc;"],
                    [0, "&ccirc;"],
                    [0, "&Cdot;"],
                    [0, "&cdot;"],
                    [0, "&Ccaron;"],
                    [0, "&ccaron;"],
                    [0, "&Dcaron;"],
                    [0, "&dcaron;"],
                    [0, "&Dstrok;"],
                    [0, "&dstrok;"],
                    [0, "&Emacr;"],
                    [0, "&emacr;"],
                    [2, "&Edot;"],
                    [0, "&edot;"],
                    [0, "&Eogon;"],
                    [0, "&eogon;"],
                    [0, "&Ecaron;"],
                    [0, "&ecaron;"],
                    [0, "&Gcirc;"],
                    [0, "&gcirc;"],
                    [0, "&Gbreve;"],
                    [0, "&gbreve;"],
                    [0, "&Gdot;"],
                    [0, "&gdot;"],
                    [0, "&Gcedil;"],
                    [1, "&Hcirc;"],
                    [0, "&hcirc;"],
                    [0, "&Hstrok;"],
                    [0, "&hstrok;"],
                    [0, "&Itilde;"],
                    [0, "&itilde;"],
                    [0, "&Imacr;"],
                    [0, "&imacr;"],
                    [2, "&Iogon;"],
                    [0, "&iogon;"],
                    [0, "&Idot;"],
                    [0, "&imath;"],
                    [0, "&IJlig;"],
                    [0, "&ijlig;"],
                    [0, "&Jcirc;"],
                    [0, "&jcirc;"],
                    [0, "&Kcedil;"],
                    [0, "&kcedil;"],
                    [0, "&kgreen;"],
                    [0, "&Lacute;"],
                    [0, "&lacute;"],
                    [0, "&Lcedil;"],
                    [0, "&lcedil;"],
                    [0, "&Lcaron;"],
                    [0, "&lcaron;"],
                    [0, "&Lmidot;"],
                    [0, "&lmidot;"],
                    [0, "&Lstrok;"],
                    [0, "&lstrok;"],
                    [0, "&Nacute;"],
                    [0, "&nacute;"],
                    [0, "&Ncedil;"],
                    [0, "&ncedil;"],
                    [0, "&Ncaron;"],
                    [0, "&ncaron;"],
                    [0, "&napos;"],
                    [0, "&ENG;"],
                    [0, "&eng;"],
                    [0, "&Omacr;"],
                    [0, "&omacr;"],
                    [2, "&Odblac;"],
                    [0, "&odblac;"],
                    [0, "&OElig;"],
                    [0, "&oelig;"],
                    [0, "&Racute;"],
                    [0, "&racute;"],
                    [0, "&Rcedil;"],
                    [0, "&rcedil;"],
                    [0, "&Rcaron;"],
                    [0, "&rcaron;"],
                    [0, "&Sacute;"],
                    [0, "&sacute;"],
                    [0, "&Scirc;"],
                    [0, "&scirc;"],
                    [0, "&Scedil;"],
                    [0, "&scedil;"],
                    [0, "&Scaron;"],
                    [0, "&scaron;"],
                    [0, "&Tcedil;"],
                    [0, "&tcedil;"],
                    [0, "&Tcaron;"],
                    [0, "&tcaron;"],
                    [0, "&Tstrok;"],
                    [0, "&tstrok;"],
                    [0, "&Utilde;"],
                    [0, "&utilde;"],
                    [0, "&Umacr;"],
                    [0, "&umacr;"],
                    [0, "&Ubreve;"],
                    [0, "&ubreve;"],
                    [0, "&Uring;"],
                    [0, "&uring;"],
                    [0, "&Udblac;"],
                    [0, "&udblac;"],
                    [0, "&Uogon;"],
                    [0, "&uogon;"],
                    [0, "&Wcirc;"],
                    [0, "&wcirc;"],
                    [0, "&Ycirc;"],
                    [0, "&ycirc;"],
                    [0, "&Yuml;"],
                    [0, "&Zacute;"],
                    [0, "&zacute;"],
                    [0, "&Zdot;"],
                    [0, "&zdot;"],
                    [0, "&Zcaron;"],
                    [0, "&zcaron;"],
                    [19, "&fnof;"],
                    [34, "&imped;"],
                    [63, "&gacute;"],
                    [65, "&jmath;"],
                    [142, "&circ;"],
                    [0, "&caron;"],
                    [16, "&breve;"],
                    [0, "&DiacriticalDot;"],
                    [0, "&ring;"],
                    [0, "&ogon;"],
                    [0, "&DiacriticalTilde;"],
                    [0, "&dblac;"],
                    [51, "&DownBreve;"],
                    [127, "&Alpha;"],
                    [0, "&Beta;"],
                    [0, "&Gamma;"],
                    [0, "&Delta;"],
                    [0, "&Epsilon;"],
                    [0, "&Zeta;"],
                    [0, "&Eta;"],
                    [0, "&Theta;"],
                    [0, "&Iota;"],
                    [0, "&Kappa;"],
                    [0, "&Lambda;"],
                    [0, "&Mu;"],
                    [0, "&Nu;"],
                    [0, "&Xi;"],
                    [0, "&Omicron;"],
                    [0, "&Pi;"],
                    [0, "&Rho;"],
                    [1, "&Sigma;"],
                    [0, "&Tau;"],
                    [0, "&Upsilon;"],
                    [0, "&Phi;"],
                    [0, "&Chi;"],
                    [0, "&Psi;"],
                    [0, "&ohm;"],
                    [7, "&alpha;"],
                    [0, "&beta;"],
                    [0, "&gamma;"],
                    [0, "&delta;"],
                    [0, "&epsi;"],
                    [0, "&zeta;"],
                    [0, "&eta;"],
                    [0, "&theta;"],
                    [0, "&iota;"],
                    [0, "&kappa;"],
                    [0, "&lambda;"],
                    [0, "&mu;"],
                    [0, "&nu;"],
                    [0, "&xi;"],
                    [0, "&omicron;"],
                    [0, "&pi;"],
                    [0, "&rho;"],
                    [0, "&sigmaf;"],
                    [0, "&sigma;"],
                    [0, "&tau;"],
                    [0, "&upsi;"],
                    [0, "&phi;"],
                    [0, "&chi;"],
                    [0, "&psi;"],
                    [0, "&omega;"],
                    [7, "&thetasym;"],
                    [0, "&Upsi;"],
                    [2, "&phiv;"],
                    [0, "&piv;"],
                    [5, "&Gammad;"],
                    [0, "&digamma;"],
                    [18, "&kappav;"],
                    [0, "&rhov;"],
                    [3, "&epsiv;"],
                    [0, "&backepsilon;"],
                    [10, "&IOcy;"],
                    [0, "&DJcy;"],
                    [0, "&GJcy;"],
                    [0, "&Jukcy;"],
                    [0, "&DScy;"],
                    [0, "&Iukcy;"],
                    [0, "&YIcy;"],
                    [0, "&Jsercy;"],
                    [0, "&LJcy;"],
                    [0, "&NJcy;"],
                    [0, "&TSHcy;"],
                    [0, "&KJcy;"],
                    [1, "&Ubrcy;"],
                    [0, "&DZcy;"],
                    [0, "&Acy;"],
                    [0, "&Bcy;"],
                    [0, "&Vcy;"],
                    [0, "&Gcy;"],
                    [0, "&Dcy;"],
                    [0, "&IEcy;"],
                    [0, "&ZHcy;"],
                    [0, "&Zcy;"],
                    [0, "&Icy;"],
                    [0, "&Jcy;"],
                    [0, "&Kcy;"],
                    [0, "&Lcy;"],
                    [0, "&Mcy;"],
                    [0, "&Ncy;"],
                    [0, "&Ocy;"],
                    [0, "&Pcy;"],
                    [0, "&Rcy;"],
                    [0, "&Scy;"],
                    [0, "&Tcy;"],
                    [0, "&Ucy;"],
                    [0, "&Fcy;"],
                    [0, "&KHcy;"],
                    [0, "&TScy;"],
                    [0, "&CHcy;"],
                    [0, "&SHcy;"],
                    [0, "&SHCHcy;"],
                    [0, "&HARDcy;"],
                    [0, "&Ycy;"],
                    [0, "&SOFTcy;"],
                    [0, "&Ecy;"],
                    [0, "&YUcy;"],
                    [0, "&YAcy;"],
                    [0, "&acy;"],
                    [0, "&bcy;"],
                    [0, "&vcy;"],
                    [0, "&gcy;"],
                    [0, "&dcy;"],
                    [0, "&iecy;"],
                    [0, "&zhcy;"],
                    [0, "&zcy;"],
                    [0, "&icy;"],
                    [0, "&jcy;"],
                    [0, "&kcy;"],
                    [0, "&lcy;"],
                    [0, "&mcy;"],
                    [0, "&ncy;"],
                    [0, "&ocy;"],
                    [0, "&pcy;"],
                    [0, "&rcy;"],
                    [0, "&scy;"],
                    [0, "&tcy;"],
                    [0, "&ucy;"],
                    [0, "&fcy;"],
                    [0, "&khcy;"],
                    [0, "&tscy;"],
                    [0, "&chcy;"],
                    [0, "&shcy;"],
                    [0, "&shchcy;"],
                    [0, "&hardcy;"],
                    [0, "&ycy;"],
                    [0, "&softcy;"],
                    [0, "&ecy;"],
                    [0, "&yucy;"],
                    [0, "&yacy;"],
                    [1, "&iocy;"],
                    [0, "&djcy;"],
                    [0, "&gjcy;"],
                    [0, "&jukcy;"],
                    [0, "&dscy;"],
                    [0, "&iukcy;"],
                    [0, "&yicy;"],
                    [0, "&jsercy;"],
                    [0, "&ljcy;"],
                    [0, "&njcy;"],
                    [0, "&tshcy;"],
                    [0, "&kjcy;"],
                    [1, "&ubrcy;"],
                    [0, "&dzcy;"],
                    [7074, "&ensp;"],
                    [0, "&emsp;"],
                    [0, "&emsp13;"],
                    [0, "&emsp14;"],
                    [1, "&numsp;"],
                    [0, "&puncsp;"],
                    [0, "&ThinSpace;"],
                    [0, "&hairsp;"],
                    [0, "&NegativeMediumSpace;"],
                    [0, "&zwnj;"],
                    [0, "&zwj;"],
                    [0, "&lrm;"],
                    [0, "&rlm;"],
                    [0, "&dash;"],
                    [2, "&ndash;"],
                    [0, "&mdash;"],
                    [0, "&horbar;"],
                    [0, "&Verbar;"],
                    [1, "&lsquo;"],
                    [0, "&CloseCurlyQuote;"],
                    [0, "&lsquor;"],
                    [1, "&ldquo;"],
                    [0, "&CloseCurlyDoubleQuote;"],
                    [0, "&bdquo;"],
                    [1, "&dagger;"],
                    [0, "&Dagger;"],
                    [0, "&bull;"],
                    [2, "&nldr;"],
                    [0, "&hellip;"],
                    [9, "&permil;"],
                    [0, "&pertenk;"],
                    [0, "&prime;"],
                    [0, "&Prime;"],
                    [0, "&tprime;"],
                    [0, "&backprime;"],
                    [3, "&lsaquo;"],
                    [0, "&rsaquo;"],
                    [3, "&oline;"],
                    [2, "&caret;"],
                    [1, "&hybull;"],
                    [0, "&frasl;"],
                    [10, "&bsemi;"],
                    [7, "&qprime;"],
                    [7, {
                        v: "&MediumSpace;",
                        n: 8202,
                        o: "&ThickSpace;"
                    }],
                    [0, "&NoBreak;"],
                    [0, "&af;"],
                    [0, "&InvisibleTimes;"],
                    [0, "&ic;"],
                    [72, "&euro;"],
                    [46, "&tdot;"],
                    [0, "&DotDot;"],
                    [37, "&complexes;"],
                    [2, "&incare;"],
                    [4, "&gscr;"],
                    [0, "&hamilt;"],
                    [0, "&Hfr;"],
                    [0, "&Hopf;"],
                    [0, "&planckh;"],
                    [0, "&hbar;"],
                    [0, "&imagline;"],
                    [0, "&Ifr;"],
                    [0, "&lagran;"],
                    [0, "&ell;"],
                    [1, "&naturals;"],
                    [0, "&numero;"],
                    [0, "&copysr;"],
                    [0, "&weierp;"],
                    [0, "&Popf;"],
                    [0, "&Qopf;"],
                    [0, "&realine;"],
                    [0, "&real;"],
                    [0, "&reals;"],
                    [0, "&rx;"],
                    [3, "&trade;"],
                    [1, "&integers;"],
                    [2, "&mho;"],
                    [0, "&zeetrf;"],
                    [0, "&iiota;"],
                    [2, "&bernou;"],
                    [0, "&Cayleys;"],
                    [1, "&escr;"],
                    [0, "&Escr;"],
                    [0, "&Fouriertrf;"],
                    [1, "&Mellintrf;"],
                    [0, "&order;"],
                    [0, "&alefsym;"],
                    [0, "&beth;"],
                    [0, "&gimel;"],
                    [0, "&daleth;"],
                    [12, "&CapitalDifferentialD;"],
                    [0, "&dd;"],
                    [0, "&ee;"],
                    [0, "&ii;"],
                    [10, "&frac13;"],
                    [0, "&frac23;"],
                    [0, "&frac15;"],
                    [0, "&frac25;"],
                    [0, "&frac35;"],
                    [0, "&frac45;"],
                    [0, "&frac16;"],
                    [0, "&frac56;"],
                    [0, "&frac18;"],
                    [0, "&frac38;"],
                    [0, "&frac58;"],
                    [0, "&frac78;"],
                    [49, "&larr;"],
                    [0, "&ShortUpArrow;"],
                    [0, "&rarr;"],
                    [0, "&darr;"],
                    [0, "&harr;"],
                    [0, "&updownarrow;"],
                    [0, "&nwarr;"],
                    [0, "&nearr;"],
                    [0, "&LowerRightArrow;"],
                    [0, "&LowerLeftArrow;"],
                    [0, "&nlarr;"],
                    [0, "&nrarr;"],
                    [1, {
                        v: "&rarrw;",
                        n: 824,
                        o: "&nrarrw;"
                    }],
                    [0, "&Larr;"],
                    [0, "&Uarr;"],
                    [0, "&Rarr;"],
                    [0, "&Darr;"],
                    [0, "&larrtl;"],
                    [0, "&rarrtl;"],
                    [0, "&LeftTeeArrow;"],
                    [0, "&mapstoup;"],
                    [0, "&map;"],
                    [0, "&DownTeeArrow;"],
                    [1, "&hookleftarrow;"],
                    [0, "&hookrightarrow;"],
                    [0, "&larrlp;"],
                    [0, "&looparrowright;"],
                    [0, "&harrw;"],
                    [0, "&nharr;"],
                    [1, "&lsh;"],
                    [0, "&rsh;"],
                    [0, "&ldsh;"],
                    [0, "&rdsh;"],
                    [1, "&crarr;"],
                    [0, "&cularr;"],
                    [0, "&curarr;"],
                    [2, "&circlearrowleft;"],
                    [0, "&circlearrowright;"],
                    [0, "&leftharpoonup;"],
                    [0, "&DownLeftVector;"],
                    [0, "&RightUpVector;"],
                    [0, "&LeftUpVector;"],
                    [0, "&rharu;"],
                    [0, "&DownRightVector;"],
                    [0, "&dharr;"],
                    [0, "&dharl;"],
                    [0, "&RightArrowLeftArrow;"],
                    [0, "&udarr;"],
                    [0, "&LeftArrowRightArrow;"],
                    [0, "&leftleftarrows;"],
                    [0, "&upuparrows;"],
                    [0, "&rightrightarrows;"],
                    [0, "&ddarr;"],
                    [0, "&leftrightharpoons;"],
                    [0, "&Equilibrium;"],
                    [0, "&nlArr;"],
                    [0, "&nhArr;"],
                    [0, "&nrArr;"],
                    [0, "&DoubleLeftArrow;"],
                    [0, "&DoubleUpArrow;"],
                    [0, "&DoubleRightArrow;"],
                    [0, "&dArr;"],
                    [0, "&DoubleLeftRightArrow;"],
                    [0, "&DoubleUpDownArrow;"],
                    [0, "&nwArr;"],
                    [0, "&neArr;"],
                    [0, "&seArr;"],
                    [0, "&swArr;"],
                    [0, "&lAarr;"],
                    [0, "&rAarr;"],
                    [1, "&zigrarr;"],
                    [6, "&larrb;"],
                    [0, "&rarrb;"],
                    [15, "&DownArrowUpArrow;"],
                    [7, "&loarr;"],
                    [0, "&roarr;"],
                    [0, "&hoarr;"],
                    [0, "&forall;"],
                    [0, "&comp;"],
                    [0, {
                        v: "&part;",
                        n: 824,
                        o: "&npart;"
                    }],
                    [0, "&exist;"],
                    [0, "&nexist;"],
                    [0, "&empty;"],
                    [1, "&Del;"],
                    [0, "&Element;"],
                    [0, "&NotElement;"],
                    [1, "&ni;"],
                    [0, "&notni;"],
                    [2, "&prod;"],
                    [0, "&coprod;"],
                    [0, "&sum;"],
                    [0, "&minus;"],
                    [0, "&MinusPlus;"],
                    [0, "&dotplus;"],
                    [1, "&Backslash;"],
                    [0, "&lowast;"],
                    [0, "&compfn;"],
                    [1, "&radic;"],
                    [2, "&prop;"],
                    [0, "&infin;"],
                    [0, "&angrt;"],
                    [0, {
                        v: "&ang;",
                        n: 8402,
                        o: "&nang;"
                    }],
                    [0, "&angmsd;"],
                    [0, "&angsph;"],
                    [0, "&mid;"],
                    [0, "&nmid;"],
                    [0, "&DoubleVerticalBar;"],
                    [0, "&NotDoubleVerticalBar;"],
                    [0, "&and;"],
                    [0, "&or;"],
                    [0, {
                        v: "&cap;",
                        n: 65024,
                        o: "&caps;"
                    }],
                    [0, {
                        v: "&cup;",
                        n: 65024,
                        o: "&cups;"
                    }],
                    [0, "&int;"],
                    [0, "&Int;"],
                    [0, "&iiint;"],
                    [0, "&conint;"],
                    [0, "&Conint;"],
                    [0, "&Cconint;"],
                    [0, "&cwint;"],
                    [0, "&ClockwiseContourIntegral;"],
                    [0, "&awconint;"],
                    [0, "&there4;"],
                    [0, "&becaus;"],
                    [0, "&ratio;"],
                    [0, "&Colon;"],
                    [0, "&dotminus;"],
                    [1, "&mDDot;"],
                    [0, "&homtht;"],
                    [0, {
                        v: "&sim;",
                        n: 8402,
                        o: "&nvsim;"
                    }],
                    [0, {
                        v: "&backsim;",
                        n: 817,
                        o: "&race;"
                    }],
                    [0, {
                        v: "&ac;",
                        n: 819,
                        o: "&acE;"
                    }],
                    [0, "&acd;"],
                    [0, "&VerticalTilde;"],
                    [0, "&NotTilde;"],
                    [0, {
                        v: "&eqsim;",
                        n: 824,
                        o: "&nesim;"
                    }],
                    [0, "&sime;"],
                    [0, "&NotTildeEqual;"],
                    [0, "&cong;"],
                    [0, "&simne;"],
                    [0, "&ncong;"],
                    [0, "&ap;"],
                    [0, "&nap;"],
                    [0, "&ape;"],
                    [0, {
                        v: "&apid;",
                        n: 824,
                        o: "&napid;"
                    }],
                    [0, "&backcong;"],
                    [0, {
                        v: "&asympeq;",
                        n: 8402,
                        o: "&nvap;"
                    }],
                    [0, {
                        v: "&bump;",
                        n: 824,
                        o: "&nbump;"
                    }],
                    [0, {
                        v: "&bumpe;",
                        n: 824,
                        o: "&nbumpe;"
                    }],
                    [0, {
                        v: "&doteq;",
                        n: 824,
                        o: "&nedot;"
                    }],
                    [0, "&doteqdot;"],
                    [0, "&efDot;"],
                    [0, "&erDot;"],
                    [0, "&Assign;"],
                    [0, "&ecolon;"],
                    [0, "&ecir;"],
                    [0, "&circeq;"],
                    [1, "&wedgeq;"],
                    [0, "&veeeq;"],
                    [1, "&triangleq;"],
                    [2, "&equest;"],
                    [0, "&ne;"],
                    [0, {
                        v: "&Congruent;",
                        n: 8421,
                        o: "&bnequiv;"
                    }],
                    [0, "&nequiv;"],
                    [1, {
                        v: "&le;",
                        n: 8402,
                        o: "&nvle;"
                    }],
                    [0, {
                        v: "&ge;",
                        n: 8402,
                        o: "&nvge;"
                    }],
                    [0, {
                        v: "&lE;",
                        n: 824,
                        o: "&nlE;"
                    }],
                    [0, {
                        v: "&gE;",
                        n: 824,
                        o: "&ngE;"
                    }],
                    [0, {
                        v: "&lnE;",
                        n: 65024,
                        o: "&lvertneqq;"
                    }],
                    [0, {
                        v: "&gnE;",
                        n: 65024,
                        o: "&gvertneqq;"
                    }],
                    [0, {
                        v: "&ll;",
                        n: new Map( /* #__PURE__ */ restoreDiff([
                            [824, "&nLtv;"],
                            [7577, "&nLt;"]
                        ]))
                    }],
                    [0, {
                        v: "&gg;",
                        n: new Map( /* #__PURE__ */ restoreDiff([
                            [824, "&nGtv;"],
                            [7577, "&nGt;"]
                        ]))
                    }],
                    [0, "&between;"],
                    [0, "&NotCupCap;"],
                    [0, "&nless;"],
                    [0, "&ngt;"],
                    [0, "&nle;"],
                    [0, "&nge;"],
                    [0, "&lesssim;"],
                    [0, "&GreaterTilde;"],
                    [0, "&nlsim;"],
                    [0, "&ngsim;"],
                    [0, "&LessGreater;"],
                    [0, "&gl;"],
                    [0, "&NotLessGreater;"],
                    [0, "&NotGreaterLess;"],
                    [0, "&pr;"],
                    [0, "&sc;"],
                    [0, "&prcue;"],
                    [0, "&sccue;"],
                    [0, "&PrecedesTilde;"],
                    [0, {
                        v: "&scsim;",
                        n: 824,
                        o: "&NotSucceedsTilde;"
                    }],
                    [0, "&NotPrecedes;"],
                    [0, "&NotSucceeds;"],
                    [0, {
                        v: "&sub;",
                        n: 8402,
                        o: "&NotSubset;"
                    }],
                    [0, {
                        v: "&sup;",
                        n: 8402,
                        o: "&NotSuperset;"
                    }],
                    [0, "&nsub;"],
                    [0, "&nsup;"],
                    [0, "&sube;"],
                    [0, "&supe;"],
                    [0, "&NotSubsetEqual;"],
                    [0, "&NotSupersetEqual;"],
                    [0, {
                        v: "&subne;",
                        n: 65024,
                        o: "&varsubsetneq;"
                    }],
                    [0, {
                        v: "&supne;",
                        n: 65024,
                        o: "&varsupsetneq;"
                    }],
                    [1, "&cupdot;"],
                    [0, "&UnionPlus;"],
                    [0, {
                        v: "&sqsub;",
                        n: 824,
                        o: "&NotSquareSubset;"
                    }],
                    [0, {
                        v: "&sqsup;",
                        n: 824,
                        o: "&NotSquareSuperset;"
                    }],
                    [0, "&sqsube;"],
                    [0, "&sqsupe;"],
                    [0, {
                        v: "&sqcap;",
                        n: 65024,
                        o: "&sqcaps;"
                    }],
                    [0, {
                        v: "&sqcup;",
                        n: 65024,
                        o: "&sqcups;"
                    }],
                    [0, "&CirclePlus;"],
                    [0, "&CircleMinus;"],
                    [0, "&CircleTimes;"],
                    [0, "&osol;"],
                    [0, "&CircleDot;"],
                    [0, "&circledcirc;"],
                    [0, "&circledast;"],
                    [1, "&circleddash;"],
                    [0, "&boxplus;"],
                    [0, "&boxminus;"],
                    [0, "&boxtimes;"],
                    [0, "&dotsquare;"],
                    [0, "&RightTee;"],
                    [0, "&dashv;"],
                    [0, "&DownTee;"],
                    [0, "&bot;"],
                    [1, "&models;"],
                    [0, "&DoubleRightTee;"],
                    [0, "&Vdash;"],
                    [0, "&Vvdash;"],
                    [0, "&VDash;"],
                    [0, "&nvdash;"],
                    [0, "&nvDash;"],
                    [0, "&nVdash;"],
                    [0, "&nVDash;"],
                    [0, "&prurel;"],
                    [1, "&LeftTriangle;"],
                    [0, "&RightTriangle;"],
                    [0, {
                        v: "&LeftTriangleEqual;",
                        n: 8402,
                        o: "&nvltrie;"
                    }],
                    [0, {
                        v: "&RightTriangleEqual;",
                        n: 8402,
                        o: "&nvrtrie;"
                    }],
                    [0, "&origof;"],
                    [0, "&imof;"],
                    [0, "&multimap;"],
                    [0, "&hercon;"],
                    [0, "&intcal;"],
                    [0, "&veebar;"],
                    [1, "&barvee;"],
                    [0, "&angrtvb;"],
                    [0, "&lrtri;"],
                    [0, "&bigwedge;"],
                    [0, "&bigvee;"],
                    [0, "&bigcap;"],
                    [0, "&bigcup;"],
                    [0, "&diam;"],
                    [0, "&sdot;"],
                    [0, "&sstarf;"],
                    [0, "&divideontimes;"],
                    [0, "&bowtie;"],
                    [0, "&ltimes;"],
                    [0, "&rtimes;"],
                    [0, "&leftthreetimes;"],
                    [0, "&rightthreetimes;"],
                    [0, "&backsimeq;"],
                    [0, "&curlyvee;"],
                    [0, "&curlywedge;"],
                    [0, "&Sub;"],
                    [0, "&Sup;"],
                    [0, "&Cap;"],
                    [0, "&Cup;"],
                    [0, "&fork;"],
                    [0, "&epar;"],
                    [0, "&lessdot;"],
                    [0, "&gtdot;"],
                    [0, {
                        v: "&Ll;",
                        n: 824,
                        o: "&nLl;"
                    }],
                    [0, {
                        v: "&Gg;",
                        n: 824,
                        o: "&nGg;"
                    }],
                    [0, {
                        v: "&leg;",
                        n: 65024,
                        o: "&lesg;"
                    }],
                    [0, {
                        v: "&gel;",
                        n: 65024,
                        o: "&gesl;"
                    }],
                    [2, "&cuepr;"],
                    [0, "&cuesc;"],
                    [0, "&NotPrecedesSlantEqual;"],
                    [0, "&NotSucceedsSlantEqual;"],
                    [0, "&NotSquareSubsetEqual;"],
                    [0, "&NotSquareSupersetEqual;"],
                    [2, "&lnsim;"],
                    [0, "&gnsim;"],
                    [0, "&precnsim;"],
                    [0, "&scnsim;"],
                    [0, "&nltri;"],
                    [0, "&NotRightTriangle;"],
                    [0, "&nltrie;"],
                    [0, "&NotRightTriangleEqual;"],
                    [0, "&vellip;"],
                    [0, "&ctdot;"],
                    [0, "&utdot;"],
                    [0, "&dtdot;"],
                    [0, "&disin;"],
                    [0, "&isinsv;"],
                    [0, "&isins;"],
                    [0, {
                        v: "&isindot;",
                        n: 824,
                        o: "&notindot;"
                    }],
                    [0, "&notinvc;"],
                    [0, "&notinvb;"],
                    [1, {
                        v: "&isinE;",
                        n: 824,
                        o: "&notinE;"
                    }],
                    [0, "&nisd;"],
                    [0, "&xnis;"],
                    [0, "&nis;"],
                    [0, "&notnivc;"],
                    [0, "&notnivb;"],
                    [6, "&barwed;"],
                    [0, "&Barwed;"],
                    [1, "&lceil;"],
                    [0, "&rceil;"],
                    [0, "&LeftFloor;"],
                    [0, "&rfloor;"],
                    [0, "&drcrop;"],
                    [0, "&dlcrop;"],
                    [0, "&urcrop;"],
                    [0, "&ulcrop;"],
                    [0, "&bnot;"],
                    [1, "&profline;"],
                    [0, "&profsurf;"],
                    [1, "&telrec;"],
                    [0, "&target;"],
                    [5, "&ulcorn;"],
                    [0, "&urcorn;"],
                    [0, "&dlcorn;"],
                    [0, "&drcorn;"],
                    [2, "&frown;"],
                    [0, "&smile;"],
                    [9, "&cylcty;"],
                    [0, "&profalar;"],
                    [7, "&topbot;"],
                    [6, "&ovbar;"],
                    [1, "&solbar;"],
                    [60, "&angzarr;"],
                    [51, "&lmoustache;"],
                    [0, "&rmoustache;"],
                    [2, "&OverBracket;"],
                    [0, "&bbrk;"],
                    [0, "&bbrktbrk;"],
                    [37, "&OverParenthesis;"],
                    [0, "&UnderParenthesis;"],
                    [0, "&OverBrace;"],
                    [0, "&UnderBrace;"],
                    [2, "&trpezium;"],
                    [4, "&elinters;"],
                    [59, "&blank;"],
                    [164, "&circledS;"],
                    [55, "&boxh;"],
                    [1, "&boxv;"],
                    [9, "&boxdr;"],
                    [3, "&boxdl;"],
                    [3, "&boxur;"],
                    [3, "&boxul;"],
                    [3, "&boxvr;"],
                    [7, "&boxvl;"],
                    [7, "&boxhd;"],
                    [7, "&boxhu;"],
                    [7, "&boxvh;"],
                    [19, "&boxH;"],
                    [0, "&boxV;"],
                    [0, "&boxdR;"],
                    [0, "&boxDr;"],
                    [0, "&boxDR;"],
                    [0, "&boxdL;"],
                    [0, "&boxDl;"],
                    [0, "&boxDL;"],
                    [0, "&boxuR;"],
                    [0, "&boxUr;"],
                    [0, "&boxUR;"],
                    [0, "&boxuL;"],
                    [0, "&boxUl;"],
                    [0, "&boxUL;"],
                    [0, "&boxvR;"],
                    [0, "&boxVr;"],
                    [0, "&boxVR;"],
                    [0, "&boxvL;"],
                    [0, "&boxVl;"],
                    [0, "&boxVL;"],
                    [0, "&boxHd;"],
                    [0, "&boxhD;"],
                    [0, "&boxHD;"],
                    [0, "&boxHu;"],
                    [0, "&boxhU;"],
                    [0, "&boxHU;"],
                    [0, "&boxvH;"],
                    [0, "&boxVh;"],
                    [0, "&boxVH;"],
                    [19, "&uhblk;"],
                    [3, "&lhblk;"],
                    [3, "&block;"],
                    [8, "&blk14;"],
                    [0, "&blk12;"],
                    [0, "&blk34;"],
                    [13, "&square;"],
                    [8, "&blacksquare;"],
                    [0, "&EmptyVerySmallSquare;"],
                    [1, "&rect;"],
                    [0, "&marker;"],
                    [2, "&fltns;"],
                    [1, "&bigtriangleup;"],
                    [0, "&blacktriangle;"],
                    [0, "&triangle;"],
                    [2, "&blacktriangleright;"],
                    [0, "&rtri;"],
                    [3, "&bigtriangledown;"],
                    [0, "&blacktriangledown;"],
                    [0, "&dtri;"],
                    [2, "&blacktriangleleft;"],
                    [0, "&ltri;"],
                    [6, "&loz;"],
                    [0, "&cir;"],
                    [32, "&tridot;"],
                    [2, "&bigcirc;"],
                    [8, "&ultri;"],
                    [0, "&urtri;"],
                    [0, "&lltri;"],
                    [0, "&EmptySmallSquare;"],
                    [0, "&FilledSmallSquare;"],
                    [8, "&bigstar;"],
                    [0, "&star;"],
                    [7, "&phone;"],
                    [49, "&female;"],
                    [1, "&male;"],
                    [29, "&spades;"],
                    [2, "&clubs;"],
                    [1, "&hearts;"],
                    [0, "&diamondsuit;"],
                    [3, "&sung;"],
                    [2, "&flat;"],
                    [0, "&natural;"],
                    [0, "&sharp;"],
                    [163, "&check;"],
                    [3, "&cross;"],
                    [8, "&malt;"],
                    [21, "&sext;"],
                    [33, "&VerticalSeparator;"],
                    [25, "&lbbrk;"],
                    [0, "&rbbrk;"],
                    [84, "&bsolhsub;"],
                    [0, "&suphsol;"],
                    [28, "&LeftDoubleBracket;"],
                    [0, "&RightDoubleBracket;"],
                    [0, "&lang;"],
                    [0, "&rang;"],
                    [0, "&Lang;"],
                    [0, "&Rang;"],
                    [0, "&loang;"],
                    [0, "&roang;"],
                    [7, "&longleftarrow;"],
                    [0, "&longrightarrow;"],
                    [0, "&longleftrightarrow;"],
                    [0, "&DoubleLongLeftArrow;"],
                    [0, "&DoubleLongRightArrow;"],
                    [0, "&DoubleLongLeftRightArrow;"],
                    [1, "&longmapsto;"],
                    [2, "&dzigrarr;"],
                    [258, "&nvlArr;"],
                    [0, "&nvrArr;"],
                    [0, "&nvHarr;"],
                    [0, "&Map;"],
                    [6, "&lbarr;"],
                    [0, "&bkarow;"],
                    [0, "&lBarr;"],
                    [0, "&dbkarow;"],
                    [0, "&drbkarow;"],
                    [0, "&DDotrahd;"],
                    [0, "&UpArrowBar;"],
                    [0, "&DownArrowBar;"],
                    [2, "&Rarrtl;"],
                    [2, "&latail;"],
                    [0, "&ratail;"],
                    [0, "&lAtail;"],
                    [0, "&rAtail;"],
                    [0, "&larrfs;"],
                    [0, "&rarrfs;"],
                    [0, "&larrbfs;"],
                    [0, "&rarrbfs;"],
                    [2, "&nwarhk;"],
                    [0, "&nearhk;"],
                    [0, "&hksearow;"],
                    [0, "&hkswarow;"],
                    [0, "&nwnear;"],
                    [0, "&nesear;"],
                    [0, "&seswar;"],
                    [0, "&swnwar;"],
                    [8, {
                        v: "&rarrc;",
                        n: 824,
                        o: "&nrarrc;"
                    }],
                    [1, "&cudarrr;"],
                    [0, "&ldca;"],
                    [0, "&rdca;"],
                    [0, "&cudarrl;"],
                    [0, "&larrpl;"],
                    [2, "&curarrm;"],
                    [0, "&cularrp;"],
                    [7, "&rarrpl;"],
                    [2, "&harrcir;"],
                    [0, "&Uarrocir;"],
                    [0, "&lurdshar;"],
                    [0, "&ldrushar;"],
                    [2, "&LeftRightVector;"],
                    [0, "&RightUpDownVector;"],
                    [0, "&DownLeftRightVector;"],
                    [0, "&LeftUpDownVector;"],
                    [0, "&LeftVectorBar;"],
                    [0, "&RightVectorBar;"],
                    [0, "&RightUpVectorBar;"],
                    [0, "&RightDownVectorBar;"],
                    [0, "&DownLeftVectorBar;"],
                    [0, "&DownRightVectorBar;"],
                    [0, "&LeftUpVectorBar;"],
                    [0, "&LeftDownVectorBar;"],
                    [0, "&LeftTeeVector;"],
                    [0, "&RightTeeVector;"],
                    [0, "&RightUpTeeVector;"],
                    [0, "&RightDownTeeVector;"],
                    [0, "&DownLeftTeeVector;"],
                    [0, "&DownRightTeeVector;"],
                    [0, "&LeftUpTeeVector;"],
                    [0, "&LeftDownTeeVector;"],
                    [0, "&lHar;"],
                    [0, "&uHar;"],
                    [0, "&rHar;"],
                    [0, "&dHar;"],
                    [0, "&luruhar;"],
                    [0, "&ldrdhar;"],
                    [0, "&ruluhar;"],
                    [0, "&rdldhar;"],
                    [0, "&lharul;"],
                    [0, "&llhard;"],
                    [0, "&rharul;"],
                    [0, "&lrhard;"],
                    [0, "&udhar;"],
                    [0, "&duhar;"],
                    [0, "&RoundImplies;"],
                    [0, "&erarr;"],
                    [0, "&simrarr;"],
                    [0, "&larrsim;"],
                    [0, "&rarrsim;"],
                    [0, "&rarrap;"],
                    [0, "&ltlarr;"],
                    [1, "&gtrarr;"],
                    [0, "&subrarr;"],
                    [1, "&suplarr;"],
                    [0, "&lfisht;"],
                    [0, "&rfisht;"],
                    [0, "&ufisht;"],
                    [0, "&dfisht;"],
                    [5, "&lopar;"],
                    [0, "&ropar;"],
                    [4, "&lbrke;"],
                    [0, "&rbrke;"],
                    [0, "&lbrkslu;"],
                    [0, "&rbrksld;"],
                    [0, "&lbrksld;"],
                    [0, "&rbrkslu;"],
                    [0, "&langd;"],
                    [0, "&rangd;"],
                    [0, "&lparlt;"],
                    [0, "&rpargt;"],
                    [0, "&gtlPar;"],
                    [0, "&ltrPar;"],
                    [3, "&vzigzag;"],
                    [1, "&vangrt;"],
                    [0, "&angrtvbd;"],
                    [6, "&ange;"],
                    [0, "&range;"],
                    [0, "&dwangle;"],
                    [0, "&uwangle;"],
                    [0, "&angmsdaa;"],
                    [0, "&angmsdab;"],
                    [0, "&angmsdac;"],
                    [0, "&angmsdad;"],
                    [0, "&angmsdae;"],
                    [0, "&angmsdaf;"],
                    [0, "&angmsdag;"],
                    [0, "&angmsdah;"],
                    [0, "&bemptyv;"],
                    [0, "&demptyv;"],
                    [0, "&cemptyv;"],
                    [0, "&raemptyv;"],
                    [0, "&laemptyv;"],
                    [0, "&ohbar;"],
                    [0, "&omid;"],
                    [0, "&opar;"],
                    [1, "&operp;"],
                    [1, "&olcross;"],
                    [0, "&odsold;"],
                    [1, "&olcir;"],
                    [0, "&ofcir;"],
                    [0, "&olt;"],
                    [0, "&ogt;"],
                    [0, "&cirscir;"],
                    [0, "&cirE;"],
                    [0, "&solb;"],
                    [0, "&bsolb;"],
                    [3, "&boxbox;"],
                    [3, "&trisb;"],
                    [0, "&rtriltri;"],
                    [0, {
                        v: "&LeftTriangleBar;",
                        n: 824,
                        o: "&NotLeftTriangleBar;"
                    }],
                    [0, {
                        v: "&RightTriangleBar;",
                        n: 824,
                        o: "&NotRightTriangleBar;"
                    }],
                    [11, "&iinfin;"],
                    [0, "&infintie;"],
                    [0, "&nvinfin;"],
                    [4, "&eparsl;"],
                    [0, "&smeparsl;"],
                    [0, "&eqvparsl;"],
                    [5, "&blacklozenge;"],
                    [8, "&RuleDelayed;"],
                    [1, "&dsol;"],
                    [9, "&bigodot;"],
                    [0, "&bigoplus;"],
                    [0, "&bigotimes;"],
                    [1, "&biguplus;"],
                    [1, "&bigsqcup;"],
                    [5, "&iiiint;"],
                    [0, "&fpartint;"],
                    [2, "&cirfnint;"],
                    [0, "&awint;"],
                    [0, "&rppolint;"],
                    [0, "&scpolint;"],
                    [0, "&npolint;"],
                    [0, "&pointint;"],
                    [0, "&quatint;"],
                    [0, "&intlarhk;"],
                    [10, "&pluscir;"],
                    [0, "&plusacir;"],
                    [0, "&simplus;"],
                    [0, "&plusdu;"],
                    [0, "&plussim;"],
                    [0, "&plustwo;"],
                    [1, "&mcomma;"],
                    [0, "&minusdu;"],
                    [2, "&loplus;"],
                    [0, "&roplus;"],
                    [0, "&Cross;"],
                    [0, "&timesd;"],
                    [0, "&timesbar;"],
                    [1, "&smashp;"],
                    [0, "&lotimes;"],
                    [0, "&rotimes;"],
                    [0, "&otimesas;"],
                    [0, "&Otimes;"],
                    [0, "&odiv;"],
                    [0, "&triplus;"],
                    [0, "&triminus;"],
                    [0, "&tritime;"],
                    [0, "&intprod;"],
                    [2, "&amalg;"],
                    [0, "&capdot;"],
                    [1, "&ncup;"],
                    [0, "&ncap;"],
                    [0, "&capand;"],
                    [0, "&cupor;"],
                    [0, "&cupcap;"],
                    [0, "&capcup;"],
                    [0, "&cupbrcap;"],
                    [0, "&capbrcup;"],
                    [0, "&cupcup;"],
                    [0, "&capcap;"],
                    [0, "&ccups;"],
                    [0, "&ccaps;"],
                    [2, "&ccupssm;"],
                    [2, "&And;"],
                    [0, "&Or;"],
                    [0, "&andand;"],
                    [0, "&oror;"],
                    [0, "&orslope;"],
                    [0, "&andslope;"],
                    [1, "&andv;"],
                    [0, "&orv;"],
                    [0, "&andd;"],
                    [0, "&ord;"],
                    [1, "&wedbar;"],
                    [6, "&sdote;"],
                    [3, "&simdot;"],
                    [2, {
                        v: "&congdot;",
                        n: 824,
                        o: "&ncongdot;"
                    }],
                    [0, "&easter;"],
                    [0, "&apacir;"],
                    [0, {
                        v: "&apE;",
                        n: 824,
                        o: "&napE;"
                    }],
                    [0, "&eplus;"],
                    [0, "&pluse;"],
                    [0, "&Esim;"],
                    [0, "&Colone;"],
                    [0, "&Equal;"],
                    [1, "&ddotseq;"],
                    [0, "&equivDD;"],
                    [0, "&ltcir;"],
                    [0, "&gtcir;"],
                    [0, "&ltquest;"],
                    [0, "&gtquest;"],
                    [0, {
                        v: "&leqslant;",
                        n: 824,
                        o: "&nleqslant;"
                    }],
                    [0, {
                        v: "&geqslant;",
                        n: 824,
                        o: "&ngeqslant;"
                    }],
                    [0, "&lesdot;"],
                    [0, "&gesdot;"],
                    [0, "&lesdoto;"],
                    [0, "&gesdoto;"],
                    [0, "&lesdotor;"],
                    [0, "&gesdotol;"],
                    [0, "&lap;"],
                    [0, "&gap;"],
                    [0, "&lne;"],
                    [0, "&gne;"],
                    [0, "&lnap;"],
                    [0, "&gnap;"],
                    [0, "&lEg;"],
                    [0, "&gEl;"],
                    [0, "&lsime;"],
                    [0, "&gsime;"],
                    [0, "&lsimg;"],
                    [0, "&gsiml;"],
                    [0, "&lgE;"],
                    [0, "&glE;"],
                    [0, "&lesges;"],
                    [0, "&gesles;"],
                    [0, "&els;"],
                    [0, "&egs;"],
                    [0, "&elsdot;"],
                    [0, "&egsdot;"],
                    [0, "&el;"],
                    [0, "&eg;"],
                    [2, "&siml;"],
                    [0, "&simg;"],
                    [0, "&simlE;"],
                    [0, "&simgE;"],
                    [0, {
                        v: "&LessLess;",
                        n: 824,
                        o: "&NotNestedLessLess;"
                    }],
                    [0, {
                        v: "&GreaterGreater;",
                        n: 824,
                        o: "&NotNestedGreaterGreater;"
                    }],
                    [1, "&glj;"],
                    [0, "&gla;"],
                    [0, "&ltcc;"],
                    [0, "&gtcc;"],
                    [0, "&lescc;"],
                    [0, "&gescc;"],
                    [0, "&smt;"],
                    [0, "&lat;"],
                    [0, {
                        v: "&smte;",
                        n: 65024,
                        o: "&smtes;"
                    }],
                    [0, {
                        v: "&late;",
                        n: 65024,
                        o: "&lates;"
                    }],
                    [0, "&bumpE;"],
                    [0, {
                        v: "&PrecedesEqual;",
                        n: 824,
                        o: "&NotPrecedesEqual;"
                    }],
                    [0, {
                        v: "&sce;",
                        n: 824,
                        o: "&NotSucceedsEqual;"
                    }],
                    [2, "&prE;"],
                    [0, "&scE;"],
                    [0, "&precneqq;"],
                    [0, "&scnE;"],
                    [0, "&prap;"],
                    [0, "&scap;"],
                    [0, "&precnapprox;"],
                    [0, "&scnap;"],
                    [0, "&Pr;"],
                    [0, "&Sc;"],
                    [0, "&subdot;"],
                    [0, "&supdot;"],
                    [0, "&subplus;"],
                    [0, "&supplus;"],
                    [0, "&submult;"],
                    [0, "&supmult;"],
                    [0, "&subedot;"],
                    [0, "&supedot;"],
                    [0, {
                        v: "&subE;",
                        n: 824,
                        o: "&nsubE;"
                    }],
                    [0, {
                        v: "&supE;",
                        n: 824,
                        o: "&nsupE;"
                    }],
                    [0, "&subsim;"],
                    [0, "&supsim;"],
                    [2, {
                        v: "&subnE;",
                        n: 65024,
                        o: "&varsubsetneqq;"
                    }],
                    [0, {
                        v: "&supnE;",
                        n: 65024,
                        o: "&varsupsetneqq;"
                    }],
                    [2, "&csub;"],
                    [0, "&csup;"],
                    [0, "&csube;"],
                    [0, "&csupe;"],
                    [0, "&subsup;"],
                    [0, "&supsub;"],
                    [0, "&subsub;"],
                    [0, "&supsup;"],
                    [0, "&suphsub;"],
                    [0, "&supdsub;"],
                    [0, "&forkv;"],
                    [0, "&topfork;"],
                    [0, "&mlcp;"],
                    [8, "&Dashv;"],
                    [1, "&Vdashl;"],
                    [0, "&Barv;"],
                    [0, "&vBar;"],
                    [0, "&vBarv;"],
                    [1, "&Vbar;"],
                    [0, "&Not;"],
                    [0, "&bNot;"],
                    [0, "&rnmid;"],
                    [0, "&cirmid;"],
                    [0, "&midcir;"],
                    [0, "&topcir;"],
                    [0, "&nhpar;"],
                    [0, "&parsim;"],
                    [9, {
                        v: "&parsl;",
                        n: 8421,
                        o: "&nparsl;"
                    }],
                    [44343, {
                        n: new Map( /* #__PURE__ */ restoreDiff([
                            [56476, "&Ascr;"],
                            [1, "&Cscr;"],
                            [0, "&Dscr;"],
                            [2, "&Gscr;"],
                            [2, "&Jscr;"],
                            [0, "&Kscr;"],
                            [2, "&Nscr;"],
                            [0, "&Oscr;"],
                            [0, "&Pscr;"],
                            [0, "&Qscr;"],
                            [1, "&Sscr;"],
                            [0, "&Tscr;"],
                            [0, "&Uscr;"],
                            [0, "&Vscr;"],
                            [0, "&Wscr;"],
                            [0, "&Xscr;"],
                            [0, "&Yscr;"],
                            [0, "&Zscr;"],
                            [0, "&ascr;"],
                            [0, "&bscr;"],
                            [0, "&cscr;"],
                            [0, "&dscr;"],
                            [1, "&fscr;"],
                            [1, "&hscr;"],
                            [0, "&iscr;"],
                            [0, "&jscr;"],
                            [0, "&kscr;"],
                            [0, "&lscr;"],
                            [0, "&mscr;"],
                            [0, "&nscr;"],
                            [1, "&pscr;"],
                            [0, "&qscr;"],
                            [0, "&rscr;"],
                            [0, "&sscr;"],
                            [0, "&tscr;"],
                            [0, "&uscr;"],
                            [0, "&vscr;"],
                            [0, "&wscr;"],
                            [0, "&xscr;"],
                            [0, "&yscr;"],
                            [0, "&zscr;"],
                            [52, "&Afr;"],
                            [0, "&Bfr;"],
                            [1, "&Dfr;"],
                            [0, "&Efr;"],
                            [0, "&Ffr;"],
                            [0, "&Gfr;"],
                            [2, "&Jfr;"],
                            [0, "&Kfr;"],
                            [0, "&Lfr;"],
                            [0, "&Mfr;"],
                            [0, "&Nfr;"],
                            [0, "&Ofr;"],
                            [0, "&Pfr;"],
                            [0, "&Qfr;"],
                            [1, "&Sfr;"],
                            [0, "&Tfr;"],
                            [0, "&Ufr;"],
                            [0, "&Vfr;"],
                            [0, "&Wfr;"],
                            [0, "&Xfr;"],
                            [0, "&Yfr;"],
                            [1, "&afr;"],
                            [0, "&bfr;"],
                            [0, "&cfr;"],
                            [0, "&dfr;"],
                            [0, "&efr;"],
                            [0, "&ffr;"],
                            [0, "&gfr;"],
                            [0, "&hfr;"],
                            [0, "&ifr;"],
                            [0, "&jfr;"],
                            [0, "&kfr;"],
                            [0, "&lfr;"],
                            [0, "&mfr;"],
                            [0, "&nfr;"],
                            [0, "&ofr;"],
                            [0, "&pfr;"],
                            [0, "&qfr;"],
                            [0, "&rfr;"],
                            [0, "&sfr;"],
                            [0, "&tfr;"],
                            [0, "&ufr;"],
                            [0, "&vfr;"],
                            [0, "&wfr;"],
                            [0, "&xfr;"],
                            [0, "&yfr;"],
                            [0, "&zfr;"],
                            [0, "&Aopf;"],
                            [0, "&Bopf;"],
                            [1, "&Dopf;"],
                            [0, "&Eopf;"],
                            [0, "&Fopf;"],
                            [0, "&Gopf;"],
                            [1, "&Iopf;"],
                            [0, "&Jopf;"],
                            [0, "&Kopf;"],
                            [0, "&Lopf;"],
                            [0, "&Mopf;"],
                            [1, "&Oopf;"],
                            [3, "&Sopf;"],
                            [0, "&Topf;"],
                            [0, "&Uopf;"],
                            [0, "&Vopf;"],
                            [0, "&Wopf;"],
                            [0, "&Xopf;"],
                            [0, "&Yopf;"],
                            [1, "&aopf;"],
                            [0, "&bopf;"],
                            [0, "&copf;"],
                            [0, "&dopf;"],
                            [0, "&eopf;"],
                            [0, "&fopf;"],
                            [0, "&gopf;"],
                            [0, "&hopf;"],
                            [0, "&iopf;"],
                            [0, "&jopf;"],
                            [0, "&kopf;"],
                            [0, "&lopf;"],
                            [0, "&mopf;"],
                            [0, "&nopf;"],
                            [0, "&oopf;"],
                            [0, "&popf;"],
                            [0, "&qopf;"],
                            [0, "&ropf;"],
                            [0, "&sopf;"],
                            [0, "&topf;"],
                            [0, "&uopf;"],
                            [0, "&vopf;"],
                            [0, "&wopf;"],
                            [0, "&xopf;"],
                            [0, "&yopf;"],
                            [0, "&zopf;"]
                        ]))
                    }],
                    [8906, "&fflig;"],
                    [0, "&filig;"],
                    [0, "&fllig;"],
                    [0, "&ffilig;"],
                    [0, "&ffllig;"]
                ]));

                /***/
            }),

        /***/
        "../../../node_modules/entities/lib/index.js":
            /*!***************************************************!*\
              !*** ../../../node_modules/entities/lib/index.js ***!
              \***************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0;
                var decode_js_1 = __webpack_require__( /*! ./decode.js */ "../../../node_modules/entities/lib/decode.js");
                var encode_js_1 = __webpack_require__( /*! ./encode.js */ "../../../node_modules/entities/lib/encode.js");
                var escape_js_1 = __webpack_require__( /*! ./escape.js */ "../../../node_modules/entities/lib/escape.js");
                /** The level of entities to support. */
                var EntityLevel;
                (function(EntityLevel) {
                    /** Support only XML entities. */
                    EntityLevel[EntityLevel["XML"] = 0] = "XML";
                    /** Support HTML entities, which are a superset of XML entities. */
                    EntityLevel[EntityLevel["HTML"] = 1] = "HTML";
                })(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {}));
                var EncodingMode;
                (function(EncodingMode) {
                    /**
                     * The output is UTF-8 encoded. Only characters that need escaping within
                     * XML will be escaped.
                     */
                    EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8";
                    /**
                     * The output consists only of ASCII characters. Characters that need
                     * escaping within HTML, and characters that aren't ASCII characters will
                     * be escaped.
                     */
                    EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII";
                    /**
                     * Encode all characters that have an equivalent entity, as well as all
                     * characters that are not ASCII characters.
                     */
                    EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive";
                    /**
                     * Encode all characters that have to be escaped in HTML attributes,
                     * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
                     */
                    EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute";
                    /**
                     * Encode all characters that have to be escaped in HTML text,
                     * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
                     */
                    EncodingMode[EncodingMode["Text"] = 4] = "Text";
                })(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {}));
                /**
                 * Decodes a string with entities.
                 *
                 * @param data String to decode.
                 * @param options Decoding options.
                 */
                function decode(data, options) {
                    if (options === void 0) {
                        options = EntityLevel.XML;
                    }
                    var level = typeof options === "number" ? options : options.level;
                    if (level === EntityLevel.HTML) {
                        var mode = typeof options === "object" ? options.mode : undefined;
                        return (0, decode_js_1.decodeHTML)(data, mode);
                    }
                    return (0, decode_js_1.decodeXML)(data);
                }
                exports.decode = decode;
                /**
                 * Decodes a string with entities. Does not allow missing trailing semicolons for entities.
                 *
                 * @param data String to decode.
                 * @param options Decoding options.
                 * @deprecated Use `decode` with the `mode` set to `Strict`.
                 */
                function decodeStrict(data, options) {
                    var _a;
                    if (options === void 0) {
                        options = EntityLevel.XML;
                    }
                    var opts = typeof options === "number" ? {
                        level: options
                    } : options;
                    (_a = opts.mode) !== null && _a !== void 0 ? _a : opts.mode = decode_js_1.DecodingMode.Strict;
                    return decode(data, opts);
                }
                exports.decodeStrict = decodeStrict;
                /**
                 * Encodes a string with entities.
                 *
                 * @param data String to encode.
                 * @param options Encoding options.
                 */
                function encode(data, options) {
                    if (options === void 0) {
                        options = EntityLevel.XML;
                    }
                    var opts = typeof options === "number" ? {
                        level: options
                    } : options;
                    // Mode `UTF8` just escapes XML entities
                    if (opts.mode === EncodingMode.UTF8) return (0, escape_js_1.escapeUTF8)(data);
                    if (opts.mode === EncodingMode.Attribute) return (0, escape_js_1.escapeAttribute)(data);
                    if (opts.mode === EncodingMode.Text) return (0, escape_js_1.escapeText)(data);
                    if (opts.level === EntityLevel.HTML) {
                        if (opts.mode === EncodingMode.ASCII) {
                            return (0, encode_js_1.encodeNonAsciiHTML)(data);
                        }
                        return (0, encode_js_1.encodeHTML)(data);
                    }
                    // ASCII and Extensive are equivalent
                    return (0, escape_js_1.encodeXML)(data);
                }
                exports.encode = encode;
                var escape_js_2 = __webpack_require__( /*! ./escape.js */ "../../../node_modules/entities/lib/escape.js");
                Object.defineProperty(exports, "encodeXML", ({
                    enumerable: true,
                    get: function() {
                        return escape_js_2.encodeXML;
                    }
                }));
                Object.defineProperty(exports, "escape", ({
                    enumerable: true,
                    get: function() {
                        return escape_js_2.escape;
                    }
                }));
                Object.defineProperty(exports, "escapeUTF8", ({
                    enumerable: true,
                    get: function() {
                        return escape_js_2.escapeUTF8;
                    }
                }));
                Object.defineProperty(exports, "escapeAttribute", ({
                    enumerable: true,
                    get: function() {
                        return escape_js_2.escapeAttribute;
                    }
                }));
                Object.defineProperty(exports, "escapeText", ({
                    enumerable: true,
                    get: function() {
                        return escape_js_2.escapeText;
                    }
                }));
                var encode_js_2 = __webpack_require__( /*! ./encode.js */ "../../../node_modules/entities/lib/encode.js");
                Object.defineProperty(exports, "encodeHTML", ({
                    enumerable: true,
                    get: function() {
                        return encode_js_2.encodeHTML;
                    }
                }));
                Object.defineProperty(exports, "encodeNonAsciiHTML", ({
                    enumerable: true,
                    get: function() {
                        return encode_js_2.encodeNonAsciiHTML;
                    }
                }));
                // Legacy aliases (deprecated)
                Object.defineProperty(exports, "encodeHTML4", ({
                    enumerable: true,
                    get: function() {
                        return encode_js_2.encodeHTML;
                    }
                }));
                Object.defineProperty(exports, "encodeHTML5", ({
                    enumerable: true,
                    get: function() {
                        return encode_js_2.encodeHTML;
                    }
                }));
                var decode_js_2 = __webpack_require__( /*! ./decode.js */ "../../../node_modules/entities/lib/decode.js");
                Object.defineProperty(exports, "EntityDecoder", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.EntityDecoder;
                    }
                }));
                Object.defineProperty(exports, "DecodingMode", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.DecodingMode;
                    }
                }));
                Object.defineProperty(exports, "decodeXML", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.decodeXML;
                    }
                }));
                Object.defineProperty(exports, "decodeHTML", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.decodeHTML;
                    }
                }));
                Object.defineProperty(exports, "decodeHTMLStrict", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.decodeHTMLStrict;
                    }
                }));
                Object.defineProperty(exports, "decodeHTMLAttribute", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.decodeHTMLAttribute;
                    }
                }));
                // Legacy aliases (deprecated)
                Object.defineProperty(exports, "decodeHTML4", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.decodeHTML;
                    }
                }));
                Object.defineProperty(exports, "decodeHTML5", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.decodeHTML;
                    }
                }));
                Object.defineProperty(exports, "decodeHTML4Strict", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.decodeHTMLStrict;
                    }
                }));
                Object.defineProperty(exports, "decodeHTML5Strict", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.decodeHTMLStrict;
                    }
                }));
                Object.defineProperty(exports, "decodeXMLStrict", ({
                    enumerable: true,
                    get: function() {
                        return decode_js_2.decodeXML;
                    }
                }));

                /***/
            }),

        /***/
        "../../../node_modules/framer-motion/dist/cjs/index.js":
            /*!*************************************************************!*\
              !*** ../../../node_modules/framer-motion/dist/cjs/index.js ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                var tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var React = __webpack_require__( /*! react */ "react");
                var heyListen = __webpack_require__( /*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js");
                var styleValueTypes = __webpack_require__( /*! style-value-types */ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js");
                var popmotion = __webpack_require__( /*! popmotion */ "../../../node_modules/popmotion/dist/popmotion.cjs.js");
                var sync = __webpack_require__( /*! framesync */ "../../../node_modules/framesync/dist/framesync.cjs.js");
                var dom = __webpack_require__( /*! @motionone/dom */ "../../../node_modules/@motionone/dom/dist/index.es.js");

                function _interopDefaultLegacy(e) {
                    return e && typeof e === 'object' && 'default' in e ? e : {
                        'default': e
                    };
                }

                function _interopNamespace(e) {
                    if (e && e.__esModule) return e;
                    var n = Object.create(null);
                    if (e) {
                        Object.keys(e).forEach(function(k) {
                            if (k !== 'default') {
                                var d = Object.getOwnPropertyDescriptor(e, k);
                                Object.defineProperty(n, k, d.get ? d : {
                                    enumerable: true,
                                    get: function() {
                                        return e[k];
                                    }
                                });
                            }
                        });
                    }
                    n["default"] = e;
                    return Object.freeze(n);
                }
                var React__namespace = /*#__PURE__*/ _interopNamespace(React);
                var React__default = /*#__PURE__*/ _interopDefaultLegacy(React);
                var sync__default = /*#__PURE__*/ _interopDefaultLegacy(sync);

                /**
                 * Browser-safe usage of process
                 */
                var defaultEnvironment = "production";
                var env = typeof process === "undefined" || process.env === undefined ? defaultEnvironment : "development" || 0;
                var createDefinition = function(propNames) {
                    return {
                        isEnabled: function(props) {
                            return propNames.some(function(name) {
                                return !!props[name];
                            });
                        }
                    };
                };
                var featureDefinitions = {
                    measureLayout: createDefinition(["layout", "layoutId", "drag"]),
                    animation: createDefinition(["animate", "exit", "variants", "whileHover", "whileTap", "whileFocus", "whileDrag", "whileInView"]),
                    exit: createDefinition(["exit"]),
                    drag: createDefinition(["drag", "dragControls"]),
                    focus: createDefinition(["whileFocus"]),
                    hover: createDefinition(["whileHover", "onHoverStart", "onHoverEnd"]),
                    tap: createDefinition(["whileTap", "onTap", "onTapStart", "onTapCancel"]),
                    pan: createDefinition(["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"]),
                    inView: createDefinition(["whileInView", "onViewportEnter", "onViewportLeave"])
                };

                function loadFeatures(features) {
                    for (var key in features) {
                        if (features[key] === null) continue;
                        if (key === "projectionNodeConstructor") {
                            featureDefinitions.projectionNodeConstructor = features[key];
                        } else {
                            featureDefinitions[key].Component = features[key];
                        }
                    }
                }
                var LazyContext = React.createContext({
                    strict: false
                });
                var featureNames = Object.keys(featureDefinitions);
                var numFeatures = featureNames.length;
                /**
                 * Load features via renderless components based on the provided MotionProps.
                 */
                function useFeatures(props, visualElement, preloadedFeatures) {
                    var features = [];
                    var lazyContext = React.useContext(LazyContext);
                    if (!visualElement) return null;
                    /**
                     * If we're in development mode, check to make sure we're not rendering a motion component
                     * as a child of LazyMotion, as this will break the file-size benefits of using it.
                     */
                    if (env !== "production" && preloadedFeatures && lazyContext.strict) {
                        heyListen.invariant(false, "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");
                    }
                    for (var i = 0; i < numFeatures; i++) {
                        var name_1 = featureNames[i];
                        var _a = featureDefinitions[name_1],
                            isEnabled = _a.isEnabled,
                            Component = _a.Component;
                        /**
                         * It might be possible in the future to use this moment to
                         * dynamically request functionality. In initial tests this
                         * was producing a lot of duplication amongst bundles.
                         */
                        if (isEnabled(props) && Component) {
                            features.push(React__namespace.createElement(Component, tslib.__assign({
                                key: name_1
                            }, props, {
                                visualElement: visualElement
                            })));
                        }
                    }
                    return features;
                }

                /**
                 * @public
                 */
                var MotionConfigContext = React.createContext({
                    transformPagePoint: function(p) {
                        return p;
                    },
                    isStatic: false,
                    reducedMotion: "never"
                });
                var MotionContext = React.createContext({});

                function useVisualElementContext() {
                    return React.useContext(MotionContext).visualElement;
                }

                /**
                 * @public
                 */
                var PresenceContext = React.createContext(null);
                var isBrowser = typeof document !== "undefined";
                var useIsomorphicLayoutEffect = isBrowser ? React.useLayoutEffect : React.useEffect;

                // Does this device prefer reduced motion? Returns `null` server-side.
                var prefersReducedMotion = {
                    current: null
                };
                var hasDetected = false;

                function initPrefersReducedMotion() {
                    hasDetected = true;
                    if (!isBrowser) return;
                    if (window.matchMedia) {
                        var motionMediaQuery_1 = window.matchMedia("(prefers-reduced-motion)");
                        var setReducedMotionPreferences = function() {
                            return prefersReducedMotion.current = motionMediaQuery_1.matches;
                        };
                        motionMediaQuery_1.addListener(setReducedMotionPreferences);
                        setReducedMotionPreferences();
                    } else {
                        prefersReducedMotion.current = false;
                    }
                }
                /**
                 * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.
                 *
                 * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing
                 * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.
                 *
                 * It will actively respond to changes and re-render your components with the latest setting.
                 *
                 * ```jsx
                 * export function Sidebar({ isOpen }) {
                 *   const shouldReduceMotion = useReducedMotion()
                 *   const closedX = shouldReduceMotion ? 0 : "-100%"
                 *
                 *   return (
                 *     <motion.div animate={{
                 *       opacity: isOpen ? 1 : 0,
                 *       x: isOpen ? 0 : closedX
                 *     }} />
                 *   )
                 * }
                 * ```
                 *
                 * @return boolean
                 *
                 * @public
                 */
                function useReducedMotion() {
                    /**
                     * Lazy initialisation of prefersReducedMotion
                     */
                    !hasDetected && initPrefersReducedMotion();
                    var _a = tslib.__read(React.useState(prefersReducedMotion.current), 1),
                        shouldReduceMotion = _a[0];
                    /**
                     * TODO See if people miss automatically updating shouldReduceMotion setting
                     */
                    return shouldReduceMotion;
                }

                function useReducedMotionConfig() {
                    var reducedMotionPreference = useReducedMotion();
                    var reducedMotion = React.useContext(MotionConfigContext).reducedMotion;
                    if (reducedMotion === "never") {
                        return false;
                    } else if (reducedMotion === "always") {
                        return true;
                    } else {
                        return reducedMotionPreference;
                    }
                }

                function useVisualElement(Component, visualState, props, createVisualElement) {
                    var lazyContext = React.useContext(LazyContext);
                    var parent = useVisualElementContext();
                    var presenceContext = React.useContext(PresenceContext);
                    var shouldReduceMotion = useReducedMotionConfig();
                    var visualElementRef = React.useRef(undefined);
                    /**
                     * If we haven't preloaded a renderer, check to see if we have one lazy-loaded
                     */
                    if (!createVisualElement) createVisualElement = lazyContext.renderer;
                    if (!visualElementRef.current && createVisualElement) {
                        visualElementRef.current = createVisualElement(Component, {
                            visualState: visualState,
                            parent: parent,
                            props: props,
                            presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,
                            blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false,
                            shouldReduceMotion: shouldReduceMotion
                        });
                    }
                    var visualElement = visualElementRef.current;
                    useIsomorphicLayoutEffect(function() {
                        visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();
                    });
                    React.useEffect(function() {
                        var _a;
                        (_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();
                    });
                    useIsomorphicLayoutEffect(function() {
                        return function() {
                            return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount();
                        };
                    }, []);
                    return visualElement;
                }

                function isRefObject(ref) {
                    return typeof ref === "object" && Object.prototype.hasOwnProperty.call(ref, "current");
                }

                /**
                 * Creates a ref function that, when called, hydrates the provided
                 * external ref and VisualElement.
                 */
                function useMotionRef(visualState, visualElement, externalRef) {
                    return React.useCallback(function(instance) {
                            var _a;
                            instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));
                            if (visualElement) {
                                instance ? visualElement.mount(instance) : visualElement.unmount();
                            }
                            if (externalRef) {
                                if (typeof externalRef === "function") {
                                    externalRef(instance);
                                } else if (isRefObject(externalRef)) {
                                    externalRef.current = instance;
                                }
                            }
                        },
                        /**
                         * Only pass a new ref callback to React if we've received a visual element
                         * factory. Otherwise we'll be mounting/remounting every time externalRef
                         * or other dependencies change.
                         */
                        [visualElement]);
                }

                /**
                 * Decides if the supplied variable is an array of variant labels
                 */
                function isVariantLabels(v) {
                    return Array.isArray(v);
                }
                /**
                 * Decides if the supplied variable is variant label
                 */
                function isVariantLabel(v) {
                    return typeof v === "string" || isVariantLabels(v);
                }
                /**
                 * Creates an object containing the latest state of every MotionValue on a VisualElement
                 */
                function getCurrent(visualElement) {
                    var current = {};
                    visualElement.forEachValue(function(value, key) {
                        return current[key] = value.get();
                    });
                    return current;
                }
                /**
                 * Creates an object containing the latest velocity of every MotionValue on a VisualElement
                 */
                function getVelocity$1(visualElement) {
                    var velocity = {};
                    visualElement.forEachValue(function(value, key) {
                        return velocity[key] = value.getVelocity();
                    });
                    return velocity;
                }

                function resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) {
                    var _a;
                    if (currentValues === void 0) {
                        currentValues = {};
                    }
                    if (currentVelocity === void 0) {
                        currentVelocity = {};
                    }
                    /**
                     * If the variant definition is a function, resolve.
                     */
                    if (typeof definition === "function") {
                        definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);
                    }
                    /**
                     * If the variant definition is a variant label, or
                     * the function returned a variant label, resolve.
                     */
                    if (typeof definition === "string") {
                        definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition];
                    }
                    /**
                     * At this point we've resolved both functions and variant labels,
                     * but the resolved variant label might itself have been a function.
                     * If so, resolve. This can only have returned a valid target object.
                     */
                    if (typeof definition === "function") {
                        definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);
                    }
                    return definition;
                }

                function resolveVariant(visualElement, definition, custom) {
                    var props = visualElement.getProps();
                    return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity$1(visualElement));
                }

                function checkIfControllingVariants(props) {
                    var _a;
                    return typeof((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === "function" || isVariantLabel(props.initial) || isVariantLabel(props.animate) || isVariantLabel(props.whileHover) || isVariantLabel(props.whileDrag) || isVariantLabel(props.whileTap) || isVariantLabel(props.whileFocus) || isVariantLabel(props.exit);
                }

                function checkIfVariantNode(props) {
                    return Boolean(checkIfControllingVariants(props) || props.variants);
                }

                function getCurrentTreeVariants(props, context) {
                    if (checkIfControllingVariants(props)) {
                        var initial = props.initial,
                            animate = props.animate;
                        return {
                            initial: initial === false || isVariantLabel(initial) ? initial : undefined,
                            animate: isVariantLabel(animate) ? animate : undefined
                        };
                    }
                    return props.inherit !== false ? context : {};
                }

                function useCreateMotionContext(props) {
                    var _a = getCurrentTreeVariants(props, React.useContext(MotionContext)),
                        initial = _a.initial,
                        animate = _a.animate;
                    return React.useMemo(function() {
                        return {
                            initial: initial,
                            animate: animate
                        };
                    }, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
                }

                function variantLabelsAsDependency(prop) {
                    return Array.isArray(prop) ? prop.join(" ") : prop;
                }

                /**
                 * Creates a constant value over the lifecycle of a component.
                 *
                 * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer
                 * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`
                 * you can ensure that initialisers don't execute twice or more.
                 */
                function useConstant(init) {
                    var ref = React.useRef(null);
                    if (ref.current === null) {
                        ref.current = init();
                    }
                    return ref.current;
                }

                /**
                 * This should only ever be modified on the client otherwise it'll
                 * persist through server requests. If we need instanced states we
                 * could lazy-init via root.
                 */
                var globalProjectionState = {
                    /**
                     * Global flag as to whether the tree has animated since the last time
                     * we resized the window
                     */
                    hasAnimatedSinceResize: true,
                    /**
                     * We set this to true once, on the first update. Any nodes added to the tree beyond that
                     * update will be given a `data-projection-id` attribute.
                     */
                    hasEverUpdated: false
                };
                var id$1 = 1;

                function useProjectionId() {
                    return useConstant(function() {
                        if (globalProjectionState.hasEverUpdated) {
                            return id$1++;
                        }
                    });
                }
                var LayoutGroupContext = React.createContext({});

                /**
                 * Internal, exported only for usage in Framer
                 */
                var SwitchLayoutGroupContext = React.createContext({});

                function useProjection(projectionId, _a, visualElement, ProjectionNodeConstructor) {
                    var _b;
                    var layoutId = _a.layoutId,
                        layout = _a.layout,
                        drag = _a.drag,
                        dragConstraints = _a.dragConstraints,
                        layoutScroll = _a.layoutScroll;
                    var initialPromotionConfig = React.useContext(SwitchLayoutGroupContext);
                    if (!ProjectionNodeConstructor || !visualElement || (visualElement === null || visualElement === void 0 ? void 0 : visualElement.projection)) {
                        return;
                    }
                    visualElement.projection = new ProjectionNodeConstructor(projectionId, visualElement.getLatestValues(), (_b = visualElement.parent) === null || _b === void 0 ? void 0 : _b.projection);
                    visualElement.projection.setOptions({
                        layoutId: layoutId,
                        layout: layout,
                        alwaysMeasureLayout: Boolean(drag) || dragConstraints && isRefObject(dragConstraints),
                        visualElement: visualElement,
                        scheduleRender: function() {
                            return visualElement.scheduleRender();
                        },
                        /**
                         * TODO: Update options in an effect. This could be tricky as it'll be too late
                         * to update by the time layout animations run.
                         * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
                         * ensuring it gets called if there's no potential layout animations.
                         *
                         */
                        animationType: typeof layout === "string" ? layout : "both",
                        initialPromotionConfig: initialPromotionConfig,
                        layoutScroll: layoutScroll
                    });
                }
                var VisualElementHandler = /** @class */ function(_super) {
                    tslib.__extends(VisualElementHandler, _super);

                    function VisualElementHandler() {
                        return _super !== null && _super.apply(this, arguments) || this;
                    }
                    /**
                     * Update visual element props as soon as we know this update is going to be commited.
                     */
                    VisualElementHandler.prototype.getSnapshotBeforeUpdate = function() {
                        this.updateProps();
                        return null;
                    };
                    VisualElementHandler.prototype.componentDidUpdate = function() {};
                    VisualElementHandler.prototype.updateProps = function() {
                        var _a = this.props,
                            visualElement = _a.visualElement,
                            props = _a.props;
                        if (visualElement) visualElement.setProps(props);
                    };
                    VisualElementHandler.prototype.render = function() {
                        return this.props.children;
                    };
                    return VisualElementHandler;
                }(React__default["default"].Component);

                /**
                 * Create a `motion` component.
                 *
                 * This function accepts a Component argument, which can be either a string (ie "div"
                 * for `motion.div`), or an actual React component.
                 *
                 * Alongside this is a config option which provides a way of rendering the provided
                 * component "offline", or outside the React render cycle.
                 */
                function createMotionComponent(_a) {
                    var preloadedFeatures = _a.preloadedFeatures,
                        createVisualElement = _a.createVisualElement,
                        projectionNodeConstructor = _a.projectionNodeConstructor,
                        useRender = _a.useRender,
                        useVisualState = _a.useVisualState,
                        Component = _a.Component;
                    preloadedFeatures && loadFeatures(preloadedFeatures);

                    function MotionComponent(props, externalRef) {
                        var layoutId = useLayoutId(props);
                        props = tslib.__assign(tslib.__assign({}, props), {
                            layoutId: layoutId
                        });
                        /**
                         * If we're rendering in a static environment, we only visually update the component
                         * as a result of a React-rerender rather than interactions or animations. This
                         * means we don't need to load additional memory structures like VisualElement,
                         * or any gesture/animation features.
                         */
                        var config = React.useContext(MotionConfigContext);
                        var features = null;
                        var context = useCreateMotionContext(props);
                        /**
                         * Create a unique projection ID for this component. If a new component is added
                         * during a layout animation we'll use this to query the DOM and hydrate its ref early, allowing
                         * us to measure it as soon as any layout effect flushes pending layout animations.
                         *
                         * Performance note: It'd be better not to have to search the DOM for these elements.
                         * For newly-entering components it could be enough to only correct treeScale, in which
                         * case we could mount in a scale-correction mode. This wouldn't be enough for
                         * shared element transitions however. Perhaps for those we could revert to a root node
                         * that gets forceRendered and layout animations are triggered on its layout effect.
                         */
                        var projectionId = config.isStatic ? undefined : useProjectionId();
                        /**
                         *
                         */
                        var visualState = useVisualState(props, config.isStatic);
                        if (!config.isStatic && isBrowser) {
                            /**
                             * Create a VisualElement for this component. A VisualElement provides a common
                             * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as
                             * providing a way of rendering to these APIs outside of the React render loop
                             * for more performant animations and interactions
                             */
                            context.visualElement = useVisualElement(Component, visualState, tslib.__assign(tslib.__assign({}, config), props), createVisualElement);
                            useProjection(projectionId, props, context.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor);
                            /**
                             * Load Motion gesture and animation features. These are rendered as renderless
                             * components so each feature can optionally make use of React lifecycle methods.
                             */
                            features = useFeatures(props, context.visualElement, preloadedFeatures);
                        }
                        /**
                         * The mount order and hierarchy is specific to ensure our element ref
                         * is hydrated by the time features fire their effects.
                         */
                        return React__namespace.createElement(VisualElementHandler, {
                            visualElement: context.visualElement,
                            props: tslib.__assign(tslib.__assign({}, config), props)
                        }, features, React__namespace.createElement(MotionContext.Provider, {
                            value: context
                        }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement)));
                    }
                    return React.forwardRef(MotionComponent);
                }

                function useLayoutId(_a) {
                    var _b;
                    var layoutId = _a.layoutId;
                    var layoutGroupId = (_b = React.useContext(LayoutGroupContext)) === null || _b === void 0 ? void 0 : _b.id;
                    return layoutGroupId && layoutId !== undefined ? layoutGroupId + "-" + layoutId : layoutId;
                }

                /**
                 * Convert any React component into a `motion` component. The provided component
                 * **must** use `React.forwardRef` to the underlying DOM component you want to animate.
                 *
                 * ```jsx
                 * const Component = React.forwardRef((props, ref) => {
                 *   return <div ref={ref} />
                 * })
                 *
                 * const MotionComponent = motion(Component)
                 * ```
                 *
                 * @public
                 */
                function createMotionProxy(createConfig) {
                    function custom(Component, customMotionComponentConfig) {
                        if (customMotionComponentConfig === void 0) {
                            customMotionComponentConfig = {};
                        }
                        return createMotionComponent(createConfig(Component, customMotionComponentConfig));
                    }
                    if (typeof Proxy === "undefined") {
                        return custom;
                    }
                    /**
                     * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.
                     * Rather than generating them anew every render.
                     */
                    var componentCache = new Map();
                    return new Proxy(custom, {
                        /**
                         * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
                         * The prop name is passed through as `key` and we can use that to generate a `motion`
                         * DOM component with that name.
                         */
                        get: function(_target, key) {
                            /**
                             * If this element doesn't exist in the component cache, create it and cache.
                             */
                            if (!componentCache.has(key)) {
                                componentCache.set(key, custom(key));
                            }
                            return componentCache.get(key);
                        }
                    });
                }

                /**
                 * We keep these listed seperately as we use the lowercase tag names as part
                 * of the runtime bundle to detect SVG components
                 */
                var lowercaseSVGElements = ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view"];

                function isSVGComponent(Component) {
                    if (
                        /**
                         * If it's not a string, it's a custom React component. Currently we only support
                         * HTML custom React components.
                         */
                        typeof Component !== "string" ||
                        /**
                         * If it contains a dash, the element is a custom HTML webcomponent.
                         */
                        Component.includes("-")) {
                        return false;
                    } else if (
                        /**
                         * If it's in our list of lowercase SVG tags, it's an SVG component
                         */
                        lowercaseSVGElements.indexOf(Component) > -1 ||
                        /**
                         * If it contains a capital letter, it's an SVG component
                         */
                        /[A-Z]/.test(Component)) {
                        return true;
                    }
                    return false;
                }
                var scaleCorrectors = {};

                function addScaleCorrector(correctors) {
                    Object.assign(scaleCorrectors, correctors);
                }

                /**
                 * A list of all transformable axes. We'll use this list to generated a version
                 * of each axes for each transform.
                 */
                var transformAxes = ["", "X", "Y", "Z"];
                /**
                 * An ordered array of each transformable value. By default, transform values
                 * will be sorted to this order.
                 */
                var order = ["translate", "scale", "rotate", "skew"];
                /**
                 * Generate a list of every possible transform key.
                 */
                var transformProps = ["transformPerspective", "x", "y", "z"];
                order.forEach(function(operationKey) {
                    return transformAxes.forEach(function(axesKey) {
                        return transformProps.push(operationKey + axesKey);
                    });
                });
                /**
                 * A function to use with Array.sort to sort transform keys by their default order.
                 */
                function sortTransformProps(a, b) {
                    return transformProps.indexOf(a) - transformProps.indexOf(b);
                }
                /**
                 * A quick lookup for transform props.
                 */
                var transformPropSet = new Set(transformProps);

                function isTransformProp(key) {
                    return transformPropSet.has(key);
                }
                /**
                 * A quick lookup for transform origin props
                 */
                var transformOriginProps = new Set(["originX", "originY", "originZ"]);

                function isTransformOriginProp(key) {
                    return transformOriginProps.has(key);
                }

                function isForcedMotionValue(key, _a) {
                    var layout = _a.layout,
                        layoutId = _a.layoutId;
                    return isTransformProp(key) || isTransformOriginProp(key) || (layout || layoutId !== undefined) && (!!scaleCorrectors[key] || key === "opacity");
                }
                var isMotionValue = function(value) {
                    return Boolean(value !== null && typeof value === "object" && value.getVelocity);
                };
                var translateAlias = {
                    x: "translateX",
                    y: "translateY",
                    z: "translateZ",
                    transformPerspective: "perspective"
                };
                /**
                 * Build a CSS transform style from individual x/y/scale etc properties.
                 *
                 * This outputs with a default order of transforms/scales/rotations, this can be customised by
                 * providing a transformTemplate function.
                 */
                function buildTransform(_a, _b, transformIsDefault, transformTemplate) {
                    var transform = _a.transform,
                        transformKeys = _a.transformKeys;
                    var _c = _b.enableHardwareAcceleration,
                        enableHardwareAcceleration = _c === void 0 ? true : _c,
                        _d = _b.allowTransformNone,
                        allowTransformNone = _d === void 0 ? true : _d;
                    // The transform string we're going to build into.
                    var transformString = "";
                    // Transform keys into their default order - this will determine the output order.
                    transformKeys.sort(sortTransformProps);
                    // Track whether the defined transform has a defined z so we don't add a
                    // second to enable hardware acceleration
                    var transformHasZ = false;
                    // Loop over each transform and build them into transformString
                    var numTransformKeys = transformKeys.length;
                    for (var i = 0; i < numTransformKeys; i++) {
                        var key = transformKeys[i];
                        transformString += "".concat(translateAlias[key] || key, "(").concat(transform[key], ") ");
                        if (key === "z") transformHasZ = true;
                    }
                    if (!transformHasZ && enableHardwareAcceleration) {
                        transformString += "translateZ(0)";
                    } else {
                        transformString = transformString.trim();
                    }
                    // If we have a custom `transform` template, pass our transform values and
                    // generated transformString to that before returning
                    if (transformTemplate) {
                        transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
                    } else if (allowTransformNone && transformIsDefault) {
                        transformString = "none";
                    }
                    return transformString;
                }
                /**
                 * Build a transformOrigin style. Uses the same defaults as the browser for
                 * undefined origins.
                 */
                function buildTransformOrigin(_a) {
                    var _b = _a.originX,
                        originX = _b === void 0 ? "50%" : _b,
                        _c = _a.originY,
                        originY = _c === void 0 ? "50%" : _c,
                        _d = _a.originZ,
                        originZ = _d === void 0 ? 0 : _d;
                    return "".concat(originX, " ").concat(originY, " ").concat(originZ);
                }

                /**
                 * Returns true if the provided key is a CSS variable
                 */
                function isCSSVariable$1(key) {
                    return key.startsWith("--");
                }

                /**
                 * Provided a value and a ValueType, returns the value as that value type.
                 */
                var getValueAsType = function(value, type) {
                    return type && typeof value === "number" ? type.transform(value) : value;
                };
                var int = tslib.__assign(tslib.__assign({}, styleValueTypes.number), {
                    transform: Math.round
                });
                var numberValueTypes = {
                    // Border props
                    borderWidth: styleValueTypes.px,
                    borderTopWidth: styleValueTypes.px,
                    borderRightWidth: styleValueTypes.px,
                    borderBottomWidth: styleValueTypes.px,
                    borderLeftWidth: styleValueTypes.px,
                    borderRadius: styleValueTypes.px,
                    radius: styleValueTypes.px,
                    borderTopLeftRadius: styleValueTypes.px,
                    borderTopRightRadius: styleValueTypes.px,
                    borderBottomRightRadius: styleValueTypes.px,
                    borderBottomLeftRadius: styleValueTypes.px,
                    // Positioning props
                    width: styleValueTypes.px,
                    maxWidth: styleValueTypes.px,
                    height: styleValueTypes.px,
                    maxHeight: styleValueTypes.px,
                    size: styleValueTypes.px,
                    top: styleValueTypes.px,
                    right: styleValueTypes.px,
                    bottom: styleValueTypes.px,
                    left: styleValueTypes.px,
                    // Spacing props
                    padding: styleValueTypes.px,
                    paddingTop: styleValueTypes.px,
                    paddingRight: styleValueTypes.px,
                    paddingBottom: styleValueTypes.px,
                    paddingLeft: styleValueTypes.px,
                    margin: styleValueTypes.px,
                    marginTop: styleValueTypes.px,
                    marginRight: styleValueTypes.px,
                    marginBottom: styleValueTypes.px,
                    marginLeft: styleValueTypes.px,
                    // Transform props
                    rotate: styleValueTypes.degrees,
                    rotateX: styleValueTypes.degrees,
                    rotateY: styleValueTypes.degrees,
                    rotateZ: styleValueTypes.degrees,
                    scale: styleValueTypes.scale,
                    scaleX: styleValueTypes.scale,
                    scaleY: styleValueTypes.scale,
                    scaleZ: styleValueTypes.scale,
                    skew: styleValueTypes.degrees,
                    skewX: styleValueTypes.degrees,
                    skewY: styleValueTypes.degrees,
                    distance: styleValueTypes.px,
                    translateX: styleValueTypes.px,
                    translateY: styleValueTypes.px,
                    translateZ: styleValueTypes.px,
                    x: styleValueTypes.px,
                    y: styleValueTypes.px,
                    z: styleValueTypes.px,
                    perspective: styleValueTypes.px,
                    transformPerspective: styleValueTypes.px,
                    opacity: styleValueTypes.alpha,
                    originX: styleValueTypes.progressPercentage,
                    originY: styleValueTypes.progressPercentage,
                    originZ: styleValueTypes.px,
                    // Misc
                    zIndex: int,
                    // SVG
                    fillOpacity: styleValueTypes.alpha,
                    strokeOpacity: styleValueTypes.alpha,
                    numOctaves: int
                };

                function buildHTMLStyles(state, latestValues, options, transformTemplate) {
                    var _a;
                    var style = state.style,
                        vars = state.vars,
                        transform = state.transform,
                        transformKeys = state.transformKeys,
                        transformOrigin = state.transformOrigin;
                    // Empty the transformKeys array. As we're throwing out refs to its items
                    // this might not be as cheap as suspected. Maybe using the array as a buffer
                    // with a manual incrementation would be better.
                    transformKeys.length = 0;
                    // Track whether we encounter any transform or transformOrigin values.
                    var hasTransform = false;
                    var hasTransformOrigin = false;
                    // Does the calculated transform essentially equal "none"?
                    var transformIsNone = true;
                    /**
                     * Loop over all our latest animated values and decide whether to handle them
                     * as a style or CSS variable.
                     *
                     * Transforms and transform origins are kept seperately for further processing.
                     */
                    for (var key in latestValues) {
                        var value = latestValues[key];
                        /**
                         * If this is a CSS variable we don't do any further processing.
                         */
                        if (isCSSVariable$1(key)) {
                            vars[key] = value;
                            continue;
                        }
                        // Convert the value to its default value type, ie 0 -> "0px"
                        var valueType = numberValueTypes[key];
                        var valueAsType = getValueAsType(value, valueType);
                        if (isTransformProp(key)) {
                            // If this is a transform, flag to enable further transform processing
                            hasTransform = true;
                            transform[key] = valueAsType;
                            transformKeys.push(key);
                            // If we already know we have a non-default transform, early return
                            if (!transformIsNone) continue;
                            // Otherwise check to see if this is a default transform
                            if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0)) transformIsNone = false;
                        } else if (isTransformOriginProp(key)) {
                            transformOrigin[key] = valueAsType;
                            // If this is a transform origin, flag and enable further transform-origin processing
                            hasTransformOrigin = true;
                        } else {
                            style[key] = valueAsType;
                        }
                    }
                    if (hasTransform) {
                        style.transform = buildTransform(state, options, transformIsNone, transformTemplate);
                    } else if (transformTemplate) {
                        style.transform = transformTemplate({}, "");
                    } else if (!latestValues.transform && style.transform) {
                        style.transform = "none";
                    }
                    if (hasTransformOrigin) {
                        style.transformOrigin = buildTransformOrigin(transformOrigin);
                    }
                }
                var createHtmlRenderState = function() {
                    return {
                        style: {},
                        transform: {},
                        transformKeys: [],
                        transformOrigin: {},
                        vars: {}
                    };
                };

                function copyRawValuesOnly(target, source, props) {
                    for (var key in source) {
                        if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {
                            target[key] = source[key];
                        }
                    }
                }

                function useInitialMotionValues(_a, visualState, isStatic) {
                    var transformTemplate = _a.transformTemplate;
                    return React.useMemo(function() {
                        var state = createHtmlRenderState();
                        buildHTMLStyles(state, visualState, {
                            enableHardwareAcceleration: !isStatic
                        }, transformTemplate);
                        var vars = state.vars,
                            style = state.style;
                        return tslib.__assign(tslib.__assign({}, vars), style);
                    }, [visualState]);
                }

                function useStyle(props, visualState, isStatic) {
                    var styleProp = props.style || {};
                    var style = {};
                    /**
                     * Copy non-Motion Values straight into style
                     */
                    copyRawValuesOnly(style, styleProp, props);
                    Object.assign(style, useInitialMotionValues(props, visualState, isStatic));
                    if (props.transformValues) {
                        style = props.transformValues(style);
                    }
                    return style;
                }

                function useHTMLProps(props, visualState, isStatic) {
                    // The `any` isn't ideal but it is the type of createElement props argument
                    var htmlProps = {};
                    var style = useStyle(props, visualState, isStatic);
                    if (Boolean(props.drag) && props.dragListener !== false) {
                        // Disable the ghost element when a user drags
                        htmlProps.draggable = false;
                        // Disable text selection
                        style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout = "none";
                        // Disable scrolling on the draggable direction
                        style.touchAction = props.drag === true ? "none" : "pan-".concat(props.drag === "x" ? "y" : "x");
                    }
                    htmlProps.style = style;
                    return htmlProps;
                }

                /**
                 * A list of all valid MotionProps.
                 *
                 * @privateRemarks
                 * This doesn't throw if a `MotionProp` name is missing - it should.
                 */
                var validMotionProps = new Set(["initial", "animate", "exit", "style", "variants", "transition", "transformTemplate", "transformValues", "custom", "inherit", "layout", "layoutId", "layoutDependency", "onLayoutAnimationStart", "onLayoutAnimationComplete", "onLayoutMeasure", "onBeforeLayoutMeasure", "onAnimationStart", "onAnimationComplete", "onUpdate", "onDragStart", "onDrag", "onDragEnd", "onMeasureDragConstraints", "onDirectionLock", "onDragTransitionEnd", "drag", "dragControls", "dragListener", "dragConstraints", "dragDirectionLock", "dragSnapToOrigin", "_dragX", "_dragY", "dragElastic", "dragMomentum", "dragPropagation", "dragTransition", "whileDrag", "onPan", "onPanStart", "onPanEnd", "onPanSessionStart", "onTap", "onTapStart", "onTapCancel", "onHoverStart", "onHoverEnd", "whileFocus", "whileTap", "whileHover", "whileInView", "onViewportEnter", "onViewportLeave", "viewport", "layoutScroll"]);
                /**
                 * Check whether a prop name is a valid `MotionProp` key.
                 *
                 * @param key - Name of the property to check
                 * @returns `true` is key is a valid `MotionProp`.
                 *
                 * @public
                 */
                function isValidMotionProp(key) {
                    return validMotionProps.has(key);
                }
                var shouldForward = function(key) {
                    return !isValidMotionProp(key);
                };

                function loadExternalIsValidProp(isValidProp) {
                    if (!isValidProp) return;
                    // Explicitly filter our events
                    shouldForward = function(key) {
                        return key.startsWith("on") ? !isValidMotionProp(key) : isValidProp(key);
                    };
                }
                /**
                 * Emotion and Styled Components both allow users to pass through arbitrary props to their components
                 * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which
                 * of these should be passed to the underlying DOM node.
                 *
                 * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props
                 * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props
                 * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of
                 * `@emotion/is-prop-valid`, however to fix this problem we need to use it.
                 *
                 * By making it an optionalDependency we can offer this functionality only in the situations where it's
                 * actually required.
                 */
                try {
                    /**
                     * We attempt to import this package but require won't be defined in esm environments, in that case
                     * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed
                     * in favour of explicit injection.
                     */
                    loadExternalIsValidProp((__webpack_require__( /*! @emotion/is-prop-valid */ "../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js")["default"]));
                } catch (_a) {
                    // We don't need to actually do anything here - the fallback is the existing `isPropValid`.
                }

                function filterProps(props, isDom, forwardMotionProps) {
                    var filteredProps = {};
                    for (var key in props) {
                        if (shouldForward(key) || forwardMotionProps === true && isValidMotionProp(key) || !isDom && !isValidMotionProp(key) ||
                            // If trying to use native HTML drag events, forward drag listeners
                            props["draggable"] && key.startsWith("onDrag")) {
                            filteredProps[key] = props[key];
                        }
                    }
                    return filteredProps;
                }

                function calcOrigin$1(origin, offset, size) {
                    return typeof origin === "string" ? origin : styleValueTypes.px.transform(offset + size * origin);
                }
                /**
                 * The SVG transform origin defaults are different to CSS and is less intuitive,
                 * so we use the measured dimensions of the SVG to reconcile these.
                 */
                function calcSVGTransformOrigin(dimensions, originX, originY) {
                    var pxOriginX = calcOrigin$1(originX, dimensions.x, dimensions.width);
                    var pxOriginY = calcOrigin$1(originY, dimensions.y, dimensions.height);
                    return "".concat(pxOriginX, " ").concat(pxOriginY);
                }
                var dashKeys = {
                    offset: "stroke-dashoffset",
                    array: "stroke-dasharray"
                };
                var camelKeys = {
                    offset: "strokeDashoffset",
                    array: "strokeDasharray"
                };
                /**
                 * Build SVG path properties. Uses the path's measured length to convert
                 * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset
                 * and stroke-dasharray attributes.
                 *
                 * This function is mutative to reduce per-frame GC.
                 */
                function buildSVGPath(attrs, length, spacing, offset, useDashCase) {
                    if (spacing === void 0) {
                        spacing = 1;
                    }
                    if (offset === void 0) {
                        offset = 0;
                    }
                    if (useDashCase === void 0) {
                        useDashCase = true;
                    }
                    // Normalise path length by setting SVG attribute pathLength to 1
                    attrs.pathLength = 1;
                    // We use dash case when setting attributes directly to the DOM node and camel case
                    // when defining props on a React component.
                    var keys = useDashCase ? dashKeys : camelKeys;
                    // Build the dash offset
                    attrs[keys.offset] = styleValueTypes.px.transform(-offset);
                    // Build the dash array
                    var pathLength = styleValueTypes.px.transform(length);
                    var pathSpacing = styleValueTypes.px.transform(spacing);
                    attrs[keys.array] = "".concat(pathLength, " ").concat(pathSpacing);
                }

                /**
                 * Build SVG visual attrbutes, like cx and style.transform
                 */
                function buildSVGAttrs(state, _a, options, transformTemplate) {
                    var attrX = _a.attrX,
                        attrY = _a.attrY,
                        originX = _a.originX,
                        originY = _a.originY,
                        pathLength = _a.pathLength,
                        _b = _a.pathSpacing,
                        pathSpacing = _b === void 0 ? 1 : _b,
                        _c = _a.pathOffset,
                        pathOffset = _c === void 0 ? 0 : _c,
                        // This is object creation, which we try to avoid per-frame.
                        latest = tslib.__rest(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
                    buildHTMLStyles(state, latest, options, transformTemplate);
                    state.attrs = state.style;
                    state.style = {};
                    var attrs = state.attrs,
                        style = state.style,
                        dimensions = state.dimensions;
                    /**
                     * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs
                     * and copy it into style.
                     */
                    if (attrs.transform) {
                        if (dimensions) style.transform = attrs.transform;
                        delete attrs.transform;
                    }
                    // Parse transformOrigin
                    if (dimensions && (originX !== undefined || originY !== undefined || style.transform)) {
                        style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);
                    }
                    // Treat x/y not as shortcuts but as actual attributes
                    if (attrX !== undefined) attrs.x = attrX;
                    if (attrY !== undefined) attrs.y = attrY;
                    // Build SVG path if one has been defined
                    if (pathLength !== undefined) {
                        buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);
                    }
                }
                var createSvgRenderState = function() {
                    return tslib.__assign(tslib.__assign({}, createHtmlRenderState()), {
                        attrs: {}
                    });
                };

                function useSVGProps(props, visualState) {
                    var visualProps = React.useMemo(function() {
                        var state = createSvgRenderState();
                        buildSVGAttrs(state, visualState, {
                            enableHardwareAcceleration: false
                        }, props.transformTemplate);
                        return tslib.__assign(tslib.__assign({}, state.attrs), {
                            style: tslib.__assign({}, state.style)
                        });
                    }, [visualState]);
                    if (props.style) {
                        var rawStyles = {};
                        copyRawValuesOnly(rawStyles, props.style, props);
                        visualProps.style = tslib.__assign(tslib.__assign({}, rawStyles), visualProps.style);
                    }
                    return visualProps;
                }

                function createUseRender(forwardMotionProps) {
                    if (forwardMotionProps === void 0) {
                        forwardMotionProps = false;
                    }
                    var useRender = function(Component, props, projectionId, ref, _a, isStatic) {
                        var latestValues = _a.latestValues;
                        var useVisualProps = isSVGComponent(Component) ? useSVGProps : useHTMLProps;
                        var visualProps = useVisualProps(props, latestValues, isStatic);
                        var filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps);
                        var elementProps = tslib.__assign(tslib.__assign(tslib.__assign({}, filteredProps), visualProps), {
                            ref: ref
                        });
                        if (projectionId) {
                            elementProps["data-projection-id"] = projectionId;
                        }
                        return React.createElement(Component, elementProps);
                    };
                    return useRender;
                }
                var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g;
                var REPLACE_TEMPLATE = "$1-$2";
                /**
                 * Convert camelCase to dash-case properties.
                 */
                var camelToDash = function(str) {
                    return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase();
                };

                function renderHTML(element, _a, styleProp, projection) {
                    var style = _a.style,
                        vars = _a.vars;
                    Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));
                    // Loop over any CSS variables and assign those.
                    for (var key in vars) {
                        element.style.setProperty(key, vars[key]);
                    }
                }

                /**
                 * A set of attribute names that are always read/written as camel case.
                 */
                var camelCaseAttributes = new Set(["baseFrequency", "diffuseConstant", "kernelMatrix", "kernelUnitLength", "keySplines", "keyTimes", "limitingConeAngle", "markerHeight", "markerWidth", "numOctaves", "targetX", "targetY", "surfaceScale", "specularConstant", "specularExponent", "stdDeviation", "tableValues", "viewBox", "gradientTransform", "pathLength"]);

                function renderSVG(element, renderState, _styleProp, projection) {
                    renderHTML(element, renderState, undefined, projection);
                    for (var key in renderState.attrs) {
                        element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
                    }
                }

                function scrapeMotionValuesFromProps$1(props) {
                    var style = props.style;
                    var newValues = {};
                    for (var key in style) {
                        if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) {
                            newValues[key] = style[key];
                        }
                    }
                    return newValues;
                }

                function scrapeMotionValuesFromProps(props) {
                    var newValues = scrapeMotionValuesFromProps$1(props);
                    for (var key in props) {
                        if (isMotionValue(props[key])) {
                            var targetKey = key === "x" || key === "y" ? "attr" + key.toUpperCase() : key;
                            newValues[targetKey] = props[key];
                        }
                    }
                    return newValues;
                }

                function isAnimationControls(v) {
                    return typeof v === "object" && typeof v.start === "function";
                }
                var isKeyframesTarget = function(v) {
                    return Array.isArray(v);
                };
                var isCustomValue = function(v) {
                    return Boolean(v && typeof v === "object" && v.mix && v.toValue);
                };
                var resolveFinalValueInKeyframes = function(v) {
                    // TODO maybe throw if v.length - 1 is placeholder token?
                    return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
                };

                /**
                 * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself
                 *
                 * TODO: Remove and move to library
                 */
                function resolveMotionValue(value) {
                    var unwrappedValue = isMotionValue(value) ? value.get() : value;
                    return isCustomValue(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue;
                }

                function makeState(_a, props, context, presenceContext) {
                    var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps,
                        createRenderState = _a.createRenderState,
                        onMount = _a.onMount;
                    var state = {
                        latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),
                        renderState: createRenderState()
                    };
                    if (onMount) {
                        state.mount = function(instance) {
                            return onMount(props, instance, state);
                        };
                    }
                    return state;
                }
                var makeUseVisualState = function(config) {
                    return function(props, isStatic) {
                        var context = React.useContext(MotionContext);
                        var presenceContext = React.useContext(PresenceContext);
                        return isStatic ? makeState(config, props, context, presenceContext) : useConstant(function() {
                            return makeState(config, props, context, presenceContext);
                        });
                    };
                };

                function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
                    var values = {};
                    var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;
                    var motionValues = scrapeMotionValues(props);
                    for (var key in motionValues) {
                        values[key] = resolveMotionValue(motionValues[key]);
                    }
                    var initial = props.initial,
                        animate = props.animate;
                    var isControllingVariants = checkIfControllingVariants(props);
                    var isVariantNode = checkIfVariantNode(props);
                    if (context && isVariantNode && !isControllingVariants && props.inherit !== false) {
                        initial !== null && initial !== void 0 ? initial : initial = context.initial;
                        animate !== null && animate !== void 0 ? animate : animate = context.animate;
                    }
                    var initialAnimationIsBlocked = blockInitialAnimation || initial === false;
                    var variantToSet = initialAnimationIsBlocked ? animate : initial;
                    if (variantToSet && typeof variantToSet !== "boolean" && !isAnimationControls(variantToSet)) {
                        var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
                        list.forEach(function(definition) {
                            var resolved = resolveVariantFromProps(props, definition);
                            if (!resolved) return;
                            var transitionEnd = resolved.transitionEnd;
                            resolved.transition;
                            var target = tslib.__rest(resolved, ["transitionEnd", "transition"]);
                            for (var key in target) {
                                var valueTarget = target[key];
                                if (Array.isArray(valueTarget)) {
                                    /**
                                     * Take final keyframe if the initial animation is blocked because
                                     * we want to initialise at the end of that blocked animation.
                                     */
                                    var index = initialAnimationIsBlocked ? valueTarget.length - 1 : 0;
                                    valueTarget = valueTarget[index];
                                }
                                if (valueTarget !== null) {
                                    values[key] = valueTarget;
                                }
                            }
                            for (var key in transitionEnd) values[key] = transitionEnd[key];
                        });
                    }
                    return values;
                }
                var svgMotionConfig = {
                    useVisualState: makeUseVisualState({
                        scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,
                        createRenderState: createSvgRenderState,
                        onMount: function(props, instance, _a) {
                            var renderState = _a.renderState,
                                latestValues = _a.latestValues;
                            try {
                                renderState.dimensions = typeof instance.getBBox === "function" ? instance.getBBox() : instance.getBoundingClientRect();
                            } catch (e) {
                                // Most likely trying to measure an unrendered element under Firefox
                                renderState.dimensions = {
                                    x: 0,
                                    y: 0,
                                    width: 0,
                                    height: 0
                                };
                            }
                            buildSVGAttrs(renderState, latestValues, {
                                enableHardwareAcceleration: false
                            }, props.transformTemplate);
                            renderSVG(instance, renderState);
                        }
                    })
                };
                var htmlMotionConfig = {
                    useVisualState: makeUseVisualState({
                        scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
                        createRenderState: createHtmlRenderState
                    })
                };

                function createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement, projectionNodeConstructor) {
                    var _b = _a.forwardMotionProps,
                        forwardMotionProps = _b === void 0 ? false : _b;
                    var baseConfig = isSVGComponent(Component) ? svgMotionConfig : htmlMotionConfig;
                    return tslib.__assign(tslib.__assign({}, baseConfig), {
                        preloadedFeatures: preloadedFeatures,
                        useRender: createUseRender(forwardMotionProps),
                        createVisualElement: createVisualElement,
                        projectionNodeConstructor: projectionNodeConstructor,
                        Component: Component
                    });
                }
                exports.AnimationType = void 0;
                (function(AnimationType) {
                    AnimationType["Animate"] = "animate";
                    AnimationType["Hover"] = "whileHover";
                    AnimationType["Tap"] = "whileTap";
                    AnimationType["Drag"] = "whileDrag";
                    AnimationType["Focus"] = "whileFocus";
                    AnimationType["InView"] = "whileInView";
                    AnimationType["Exit"] = "exit";
                })(exports.AnimationType || (exports.AnimationType = {}));

                function addDomEvent(target, eventName, handler, options) {
                    if (options === void 0) {
                        options = {
                            passive: true
                        };
                    }
                    target.addEventListener(eventName, handler, options);
                    return function() {
                        return target.removeEventListener(eventName, handler);
                    };
                }
                /**
                 * Attaches an event listener directly to the provided DOM element.
                 *
                 * Bypassing React's event system can be desirable, for instance when attaching non-passive
                 * event handlers.
                 *
                 * ```jsx
                 * const ref = useRef(null)
                 *
                 * useDomEvent(ref, 'wheel', onWheel, { passive: false })
                 *
                 * return <div ref={ref} />
                 * ```
                 *
                 * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.
                 * @param eventName - Name of the event you want listen for.
                 * @param handler - Function to fire when receiving the event.
                 * @param options - Options to pass to `Event.addEventListener`.
                 *
                 * @public
                 */
                function useDomEvent(ref, eventName, handler, options) {
                    React.useEffect(function() {
                        var element = ref.current;
                        if (handler && element) {
                            return addDomEvent(element, eventName, handler, options);
                        }
                    }, [ref, eventName, handler, options]);
                }

                /**
                 *
                 * @param props
                 * @param ref
                 * @internal
                 */
                function useFocusGesture(_a) {
                    var whileFocus = _a.whileFocus,
                        visualElement = _a.visualElement;
                    var onFocus = function() {
                        var _a;
                        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Focus, true);
                    };
                    var onBlur = function() {
                        var _a;
                        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Focus, false);
                    };
                    useDomEvent(visualElement, "focus", whileFocus ? onFocus : undefined);
                    useDomEvent(visualElement, "blur", whileFocus ? onBlur : undefined);
                }

                function isMouseEvent(event) {
                    // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.
                    if (typeof PointerEvent !== "undefined" && event instanceof PointerEvent) {
                        return !!(event.pointerType === "mouse");
                    }
                    return event instanceof MouseEvent;
                }

                function isTouchEvent(event) {
                    var hasTouches = !!event.touches;
                    return hasTouches;
                }

                /**
                 * Filters out events not attached to the primary pointer (currently left mouse button)
                 * @param eventHandler
                 */
                function filterPrimaryPointer(eventHandler) {
                    return function(event) {
                        var isMouseEvent = event instanceof MouseEvent;
                        var isPrimaryPointer = !isMouseEvent || isMouseEvent && event.button === 0;
                        if (isPrimaryPointer) {
                            eventHandler(event);
                        }
                    };
                }
                var defaultPagePoint = {
                    pageX: 0,
                    pageY: 0
                };

                function pointFromTouch(e, pointType) {
                    if (pointType === void 0) {
                        pointType = "page";
                    }
                    var primaryTouch = e.touches[0] || e.changedTouches[0];
                    var point = primaryTouch || defaultPagePoint;
                    return {
                        x: point[pointType + "X"],
                        y: point[pointType + "Y"]
                    };
                }

                function pointFromMouse(point, pointType) {
                    if (pointType === void 0) {
                        pointType = "page";
                    }
                    return {
                        x: point[pointType + "X"],
                        y: point[pointType + "Y"]
                    };
                }

                function extractEventInfo(event, pointType) {
                    if (pointType === void 0) {
                        pointType = "page";
                    }
                    return {
                        point: isTouchEvent(event) ? pointFromTouch(event, pointType) : pointFromMouse(event, pointType)
                    };
                }
                var wrapHandler = function(handler, shouldFilterPrimaryPointer) {
                    if (shouldFilterPrimaryPointer === void 0) {
                        shouldFilterPrimaryPointer = false;
                    }
                    var listener = function(event) {
                        return handler(event, extractEventInfo(event));
                    };
                    return shouldFilterPrimaryPointer ? filterPrimaryPointer(listener) : listener;
                };

                // We check for event support via functions in case they've been mocked by a testing suite.
                var supportsPointerEvents = function() {
                    return isBrowser && window.onpointerdown === null;
                };
                var supportsTouchEvents = function() {
                    return isBrowser && window.ontouchstart === null;
                };
                var supportsMouseEvents = function() {
                    return isBrowser && window.onmousedown === null;
                };
                var mouseEventNames = {
                    pointerdown: "mousedown",
                    pointermove: "mousemove",
                    pointerup: "mouseup",
                    pointercancel: "mousecancel",
                    pointerover: "mouseover",
                    pointerout: "mouseout",
                    pointerenter: "mouseenter",
                    pointerleave: "mouseleave"
                };
                var touchEventNames = {
                    pointerdown: "touchstart",
                    pointermove: "touchmove",
                    pointerup: "touchend",
                    pointercancel: "touchcancel"
                };

                function getPointerEventName(name) {
                    if (supportsPointerEvents()) {
                        return name;
                    } else if (supportsTouchEvents()) {
                        return touchEventNames[name];
                    } else if (supportsMouseEvents()) {
                        return mouseEventNames[name];
                    }
                    return name;
                }

                function addPointerEvent(target, eventName, handler, options) {
                    return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === "pointerdown"), options);
                }

                function usePointerEvent(ref, eventName, handler, options) {
                    return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === "pointerdown"), options);
                }

                function createLock(name) {
                    var lock = null;
                    return function() {
                        var openLock = function() {
                            lock = null;
                        };
                        if (lock === null) {
                            lock = name;
                            return openLock;
                        }
                        return false;
                    };
                }
                var globalHorizontalLock = createLock("dragHorizontal");
                var globalVerticalLock = createLock("dragVertical");

                function getGlobalLock(drag) {
                    var lock = false;
                    if (drag === "y") {
                        lock = globalVerticalLock();
                    } else if (drag === "x") {
                        lock = globalHorizontalLock();
                    } else {
                        var openHorizontal_1 = globalHorizontalLock();
                        var openVertical_1 = globalVerticalLock();
                        if (openHorizontal_1 && openVertical_1) {
                            lock = function() {
                                openHorizontal_1();
                                openVertical_1();
                            };
                        } else {
                            // Release the locks because we don't use them
                            if (openHorizontal_1) openHorizontal_1();
                            if (openVertical_1) openVertical_1();
                        }
                    }
                    return lock;
                }

                function isDragActive() {
                    // Check the gesture lock - if we get it, it means no drag gesture is active
                    // and we can safely fire the tap gesture.
                    var openGestureLock = getGlobalLock(true);
                    if (!openGestureLock) return true;
                    openGestureLock();
                    return false;
                }

                function createHoverEvent(visualElement, isActive, callback) {
                    return function(event, info) {
                        var _a;
                        if (!isMouseEvent(event) || isDragActive()) return;
                        /**
                         * Ensure we trigger animations before firing event callback
                         */
                        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Hover, isActive);
                        callback === null || callback === void 0 ? void 0 : callback(event, info);
                    };
                }

                function useHoverGesture(_a) {
                    var onHoverStart = _a.onHoverStart,
                        onHoverEnd = _a.onHoverEnd,
                        whileHover = _a.whileHover,
                        visualElement = _a.visualElement;
                    usePointerEvent(visualElement, "pointerenter", onHoverStart || whileHover ? createHoverEvent(visualElement, true, onHoverStart) : undefined, {
                        passive: !onHoverStart
                    });
                    usePointerEvent(visualElement, "pointerleave", onHoverEnd || whileHover ? createHoverEvent(visualElement, false, onHoverEnd) : undefined, {
                        passive: !onHoverEnd
                    });
                }

                /**
                 * Recursively traverse up the tree to check whether the provided child node
                 * is the parent or a descendant of it.
                 *
                 * @param parent - Element to find
                 * @param child - Element to test against parent
                 */
                var isNodeOrChild = function(parent, child) {
                    if (!child) {
                        return false;
                    } else if (parent === child) {
                        return true;
                    } else {
                        return isNodeOrChild(parent, child.parentElement);
                    }
                };

                function useUnmountEffect(callback) {
                    return React.useEffect(function() {
                        return function() {
                            return callback();
                        };
                    }, []);
                }

                /**
                 * @param handlers -
                 * @internal
                 */
                function useTapGesture(_a) {
                    var onTap = _a.onTap,
                        onTapStart = _a.onTapStart,
                        onTapCancel = _a.onTapCancel,
                        whileTap = _a.whileTap,
                        visualElement = _a.visualElement;
                    var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap;
                    var isPressing = React.useRef(false);
                    var cancelPointerEndListeners = React.useRef(null);
                    /**
                     * Only set listener to passive if there are no external listeners.
                     */
                    var eventOptions = {
                        passive: !(onTapStart || onTap || onTapCancel || onPointerDown)
                    };

                    function removePointerEndListener() {
                        var _a;
                        (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners);
                        cancelPointerEndListeners.current = null;
                    }

                    function checkPointerEnd() {
                        var _a;
                        removePointerEndListener();
                        isPressing.current = false;
                        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Tap, false);
                        return !isDragActive();
                    }

                    function onPointerUp(event, info) {
                        if (!checkPointerEnd()) return;
                        /**
                         * We only count this as a tap gesture if the event.target is the same
                         * as, or a child of, this component's element
                         */
                        !isNodeOrChild(visualElement.getInstance(), event.target) ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info) : onTap === null || onTap === void 0 ? void 0 : onTap(event, info);
                    }

                    function onPointerCancel(event, info) {
                        if (!checkPointerEnd()) return;
                        onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info);
                    }

                    function onPointerDown(event, info) {
                        var _a;
                        removePointerEndListener();
                        if (isPressing.current) return;
                        isPressing.current = true;
                        cancelPointerEndListeners.current = popmotion.pipe(addPointerEvent(window, "pointerup", onPointerUp, eventOptions), addPointerEvent(window, "pointercancel", onPointerCancel, eventOptions));
                        /**
                         * Ensure we trigger animations before firing event callback
                         */
                        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Tap, true);
                        onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info);
                    }
                    usePointerEvent(visualElement, "pointerdown", hasPressListeners ? onPointerDown : undefined, eventOptions);
                    useUnmountEffect(removePointerEndListener);
                }
                var warned = new Set();

                function warnOnce(condition, message, element) {
                    if (condition || warned.has(message)) return;
                    console.warn(message);
                    if (element) console.warn(element);
                    warned.add(message);
                }

                /**
                 * Map an IntersectionHandler callback to an element. We only ever make one handler for one
                 * element, so even though these handlers might all be triggered by different
                 * observers, we can keep them in the same map.
                 */
                var observerCallbacks = new WeakMap();
                /**
                 * Multiple observers can be created for multiple element/document roots. Each with
                 * different settings. So here we store dictionaries of observers to each root,
                 * using serialised settings (threshold/margin) as lookup keys.
                 */
                var observers = new WeakMap();
                var fireObserverCallback = function(entry) {
                    var _a;
                    (_a = observerCallbacks.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);
                };
                var fireAllObserverCallbacks = function(entries) {
                    entries.forEach(fireObserverCallback);
                };

                function initIntersectionObserver(_a) {
                    var root = _a.root,
                        options = tslib.__rest(_a, ["root"]);
                    var lookupRoot = root || document;
                    /**
                     * If we don't have an observer lookup map for this root, create one.
                     */
                    if (!observers.has(lookupRoot)) {
                        observers.set(lookupRoot, {});
                    }
                    var rootObservers = observers.get(lookupRoot);
                    var key = JSON.stringify(options);
                    /**
                     * If we don't have an observer for this combination of root and settings,
                     * create one.
                     */
                    if (!rootObservers[key]) {
                        rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, tslib.__assign({
                            root: root
                        }, options));
                    }
                    return rootObservers[key];
                }

                function observeIntersection(element, options, callback) {
                    var rootInteresectionObserver = initIntersectionObserver(options);
                    observerCallbacks.set(element, callback);
                    rootInteresectionObserver.observe(element);
                    return function() {
                        observerCallbacks.delete(element);
                        rootInteresectionObserver.unobserve(element);
                    };
                }

                function useViewport(_a) {
                    var visualElement = _a.visualElement,
                        whileInView = _a.whileInView,
                        onViewportEnter = _a.onViewportEnter,
                        onViewportLeave = _a.onViewportLeave,
                        _b = _a.viewport,
                        viewport = _b === void 0 ? {} : _b;
                    var state = React.useRef({
                        hasEnteredView: false,
                        isInView: false
                    });
                    var shouldObserve = Boolean(whileInView || onViewportEnter || onViewportLeave);
                    if (viewport.once && state.current.hasEnteredView) shouldObserve = false;
                    var useObserver = typeof IntersectionObserver === "undefined" ? useMissingIntersectionObserver : useIntersectionObserver;
                    useObserver(shouldObserve, state.current, visualElement, viewport);
                }
                var thresholdNames = {
                    some: 0,
                    all: 1
                };

                function useIntersectionObserver(shouldObserve, state, visualElement, _a) {
                    var root = _a.root,
                        rootMargin = _a.margin,
                        _b = _a.amount,
                        amount = _b === void 0 ? "some" : _b,
                        once = _a.once;
                    React.useEffect(function() {
                        if (!shouldObserve) return;
                        var options = {
                            root: root === null || root === void 0 ? void 0 : root.current,
                            rootMargin: rootMargin,
                            threshold: typeof amount === "number" ? amount : thresholdNames[amount]
                        };
                        var intersectionCallback = function(entry) {
                            var _a;
                            var isIntersecting = entry.isIntersecting;
                            /**
                             * If there's been no change in the viewport state, early return.
                             */
                            if (state.isInView === isIntersecting) return;
                            state.isInView = isIntersecting;
                            /**
                             * Handle hasEnteredView. If this is only meant to run once, and
                             * element isn't visible, early return. Otherwise set hasEnteredView to true.
                             */
                            if (once && !isIntersecting && state.hasEnteredView) {
                                return;
                            } else if (isIntersecting) {
                                state.hasEnteredView = true;
                            }
                            (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.InView, isIntersecting);
                            /**
                             * Use the latest committed props rather than the ones in scope
                             * when this observer is created
                             */
                            var props = visualElement.getProps();
                            var callback = isIntersecting ? props.onViewportEnter : props.onViewportLeave;
                            callback === null || callback === void 0 ? void 0 : callback(entry);
                        };
                        return observeIntersection(visualElement.getInstance(), options, intersectionCallback);
                    }, [shouldObserve, root, rootMargin, amount]);
                }
                /**
                 * If IntersectionObserver is missing, we activate inView and fire onViewportEnter
                 * on mount. This way, the page will be in the state the author expects users
                 * to see it in for everyone.
                 */
                function useMissingIntersectionObserver(shouldObserve, state, visualElement, _a) {
                    var _b = _a.fallback,
                        fallback = _b === void 0 ? true : _b;
                    React.useEffect(function() {
                        if (!shouldObserve || !fallback) return;
                        if (env !== "production") {
                            warnOnce(false, "IntersectionObserver not available on this device. whileInView animations will trigger on mount.");
                        }
                        /**
                         * Fire this in an rAF because, at this point, the animation state
                         * won't have flushed for the first time and there's certain logic in
                         * there that behaves differently on the initial animation.
                         *
                         * This hook should be quite rarely called so setting this in an rAF
                         * is preferred to changing the behaviour of the animation state.
                         */
                        requestAnimationFrame(function() {
                            var _a;
                            state.hasEnteredView = true;
                            var onViewportEnter = visualElement.getProps().onViewportEnter;
                            onViewportEnter === null || onViewportEnter === void 0 ? void 0 : onViewportEnter(null);
                            (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.InView, true);
                        });
                    }, [shouldObserve]);
                }
                var makeRenderlessComponent = function(hook) {
                    return function(props) {
                        hook(props);
                        return null;
                    };
                };
                var gestureAnimations = {
                    inView: makeRenderlessComponent(useViewport),
                    tap: makeRenderlessComponent(useTapGesture),
                    focus: makeRenderlessComponent(useFocusGesture),
                    hover: makeRenderlessComponent(useHoverGesture)
                };
                var counter = 0;
                var incrementId = function() {
                    return counter++;
                };
                var useId = function() {
                    return useConstant(incrementId);
                };
                /**
                 * Ideally we'd use the following code to support React 18 optionally.
                 * But this fairly fails in Webpack (otherwise treeshaking wouldn't work at all).
                 * Need to come up with a different way of figuring this out.
                 */
                // export const useId = (React as any).useId
                //     ? (React as any).useId
                //     : () => useConstant(incrementId)

                /**
                 * When a component is the child of `AnimatePresence`, it can use `usePresence`
                 * to access information about whether it's still present in the React tree.
                 *
                 * ```jsx
                 * import { usePresence } from "framer-motion"
                 *
                 * export const Component = () => {
                 *   const [isPresent, safeToRemove] = usePresence()
                 *
                 *   useEffect(() => {
                 *     !isPresent && setTimeout(safeToRemove, 1000)
                 *   }, [isPresent])
                 *
                 *   return <div />
                 * }
                 * ```
                 *
                 * If `isPresent` is `false`, it means that a component has been removed the tree, but
                 * `AnimatePresence` won't really remove it until `safeToRemove` has been called.
                 *
                 * @public
                 */
                function usePresence() {
                    var context = React.useContext(PresenceContext);
                    if (context === null) return [true, null];
                    var isPresent = context.isPresent,
                        onExitComplete = context.onExitComplete,
                        register = context.register;
                    // It's safe to call the following hooks conditionally (after an early return) because the context will always
                    // either be null or non-null for the lifespan of the component.
                    // Replace with useId when released in React
                    var id = useId();
                    React.useEffect(function() {
                        return register(id);
                    }, []);
                    var safeToRemove = function() {
                        return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id);
                    };
                    return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
                }
                /**
                 * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.
                 * There is no `safeToRemove` function.
                 *
                 * ```jsx
                 * import { useIsPresent } from "framer-motion"
                 *
                 * export const Component = () => {
                 *   const isPresent = useIsPresent()
                 *
                 *   useEffect(() => {
                 *     !isPresent && console.log("I've been removed!")
                 *   }, [isPresent])
                 *
                 *   return <div />
                 * }
                 * ```
                 *
                 * @public
                 */
                function useIsPresent() {
                    return isPresent(React.useContext(PresenceContext));
                }

                function isPresent(context) {
                    return context === null ? true : context.isPresent;
                }

                function shallowCompare(next, prev) {
                    if (!Array.isArray(prev)) return false;
                    var prevLength = prev.length;
                    if (prevLength !== next.length) return false;
                    for (var i = 0; i < prevLength; i++) {
                        if (prev[i] !== next[i]) return false;
                    }
                    return true;
                }

                /**
                 * Converts seconds to milliseconds
                 *
                 * @param seconds - Time in seconds.
                 * @return milliseconds - Converted time in milliseconds.
                 */
                var secondsToMilliseconds = function(seconds) {
                    return seconds * 1000;
                };
                var easingLookup = {
                    linear: popmotion.linear,
                    easeIn: popmotion.easeIn,
                    easeInOut: popmotion.easeInOut,
                    easeOut: popmotion.easeOut,
                    circIn: popmotion.circIn,
                    circInOut: popmotion.circInOut,
                    circOut: popmotion.circOut,
                    backIn: popmotion.backIn,
                    backInOut: popmotion.backInOut,
                    backOut: popmotion.backOut,
                    anticipate: popmotion.anticipate,
                    bounceIn: popmotion.bounceIn,
                    bounceInOut: popmotion.bounceInOut,
                    bounceOut: popmotion.bounceOut
                };
                var easingDefinitionToFunction = function(definition) {
                    if (Array.isArray(definition)) {
                        // If cubic bezier definition, create bezier curve
                        heyListen.invariant(definition.length === 4, "Cubic bezier arrays must contain four numerical values.");
                        var _a = tslib.__read(definition, 4),
                            x1 = _a[0],
                            y1 = _a[1],
                            x2 = _a[2],
                            y2 = _a[3];
                        return popmotion.cubicBezier(x1, y1, x2, y2);
                    } else if (typeof definition === "string") {
                        // Else lookup from table
                        heyListen.invariant(easingLookup[definition] !== undefined, "Invalid easing type '".concat(definition, "'"));
                        return easingLookup[definition];
                    }
                    return definition;
                };
                var isEasingArray = function(ease) {
                    return Array.isArray(ease) && typeof ease[0] !== "number";
                };

                /**
                 * Check if a value is animatable. Examples:
                 *
                 * ✅: 100, "100px", "#fff"
                 * ❌: "block", "url(2.jpg)"
                 * @param value
                 *
                 * @internal
                 */
                var isAnimatable = function(key, value) {
                    // If the list of keys tat might be non-animatable grows, replace with Set
                    if (key === "zIndex") return false;
                    // If it's a number or a keyframes array, we can animate it. We might at some point
                    // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,
                    // but for now lets leave it like this for performance reasons
                    if (typeof value === "number" || Array.isArray(value)) return true;
                    if (typeof value === "string" &&
                        // It's animatable if we have a string
                        styleValueTypes.complex.test(value) &&
                        // And it contains numbers and/or colors
                        !value.startsWith("url(") // Unless it starts with "url("
                    ) {
                        return true;
                    }
                    return false;
                };
                var underDampedSpring = function() {
                    return {
                        type: "spring",
                        stiffness: 500,
                        damping: 25,
                        restSpeed: 10
                    };
                };
                var criticallyDampedSpring = function(to) {
                    return {
                        type: "spring",
                        stiffness: 550,
                        damping: to === 0 ? 2 * Math.sqrt(550) : 30,
                        restSpeed: 10
                    };
                };
                var linearTween = function() {
                    return {
                        type: "keyframes",
                        ease: "linear",
                        duration: 0.3
                    };
                };
                var keyframes = function(values) {
                    return {
                        type: "keyframes",
                        duration: 0.8,
                        values: values
                    };
                };
                var defaultTransitions = {
                    x: underDampedSpring,
                    y: underDampedSpring,
                    z: underDampedSpring,
                    rotate: underDampedSpring,
                    rotateX: underDampedSpring,
                    rotateY: underDampedSpring,
                    rotateZ: underDampedSpring,
                    scaleX: criticallyDampedSpring,
                    scaleY: criticallyDampedSpring,
                    scale: criticallyDampedSpring,
                    opacity: linearTween,
                    backgroundColor: linearTween,
                    color: linearTween,
                    default: criticallyDampedSpring
                };
                var getDefaultTransition = function(valueKey, to) {
                    var transitionFactory;
                    if (isKeyframesTarget(to)) {
                        transitionFactory = keyframes;
                    } else {
                        transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default;
                    }
                    return tslib.__assign({
                        to: to
                    }, transitionFactory(to));
                };

                /**
                 * A map of default value types for common values
                 */
                var defaultValueTypes = tslib.__assign(tslib.__assign({}, numberValueTypes), {
                    // Color props
                    color: styleValueTypes.color,
                    backgroundColor: styleValueTypes.color,
                    outlineColor: styleValueTypes.color,
                    fill: styleValueTypes.color,
                    stroke: styleValueTypes.color,
                    // Border props
                    borderColor: styleValueTypes.color,
                    borderTopColor: styleValueTypes.color,
                    borderRightColor: styleValueTypes.color,
                    borderBottomColor: styleValueTypes.color,
                    borderLeftColor: styleValueTypes.color,
                    filter: styleValueTypes.filter,
                    WebkitFilter: styleValueTypes.filter
                });
                /**
                 * Gets the default ValueType for the provided value key
                 */
                var getDefaultValueType = function(key) {
                    return defaultValueTypes[key];
                };

                function getAnimatableNone(key, value) {
                    var _a;
                    var defaultValueType = getDefaultValueType(key);
                    if (defaultValueType !== styleValueTypes.filter) defaultValueType = styleValueTypes.complex;
                    // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target
                    return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value);
                }
                var instantAnimationState = {
                    current: false
                };

                /**
                 * Decide whether a transition is defined on a given Transition.
                 * This filters out orchestration options and returns true
                 * if any options are left.
                 */
                function isTransitionDefined(_a) {
                    _a.when;
                    _a.delay;
                    _a.delayChildren;
                    _a.staggerChildren;
                    _a.staggerDirection;
                    _a.repeat;
                    _a.repeatType;
                    _a.repeatDelay;
                    _a.from;
                    var transition = tslib.__rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from"]);
                    return !!Object.keys(transition).length;
                }
                var legacyRepeatWarning = false;
                /**
                 * Convert Framer Motion's Transition type into Popmotion-compatible options.
                 */
                function convertTransitionToAnimationOptions(_a) {
                    var ease = _a.ease,
                        times = _a.times,
                        yoyo = _a.yoyo,
                        flip = _a.flip,
                        loop = _a.loop,
                        transition = tslib.__rest(_a, ["ease", "times", "yoyo", "flip", "loop"]);
                    var options = tslib.__assign({}, transition);
                    if (times) options["offset"] = times;
                    /**
                     * Convert any existing durations from seconds to milliseconds
                     */
                    if (transition.duration) options["duration"] = secondsToMilliseconds(transition.duration);
                    if (transition.repeatDelay) options.repeatDelay = secondsToMilliseconds(transition.repeatDelay);
                    /**
                     * Map easing names to Popmotion's easing functions
                     */
                    if (ease) {
                        options["ease"] = isEasingArray(ease) ? ease.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease);
                    }
                    /**
                     * Support legacy transition API
                     */
                    if (transition.type === "tween") options.type = "keyframes";
                    /**
                     * TODO: These options are officially removed from the API.
                     */
                    if (yoyo || loop || flip) {
                        heyListen.warning(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.");
                        legacyRepeatWarning = true;
                        if (yoyo) {
                            options.repeatType = "reverse";
                        } else if (loop) {
                            options.repeatType = "loop";
                        } else if (flip) {
                            options.repeatType = "mirror";
                        }
                        options.repeat = loop || yoyo || flip || transition.repeat;
                    }
                    /**
                     * TODO: Popmotion 9 has the ability to automatically detect whether to use
                     * a keyframes or spring animation, but does so by detecting velocity and other spring options.
                     * It'd be good to introduce a similar thing here.
                     */
                    if (transition.type !== "spring") options.type = "keyframes";
                    return options;
                }
                /**
                 * Get the delay for a value by checking Transition with decreasing specificity.
                 */
                function getDelayFromTransition(transition, key) {
                    var _a, _b;
                    var valueTransition = getValueTransition(transition, key) || {};
                    return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0;
                }

                function hydrateKeyframes(options) {
                    if (Array.isArray(options.to) && options.to[0] === null) {
                        options.to = tslib.__spreadArray([], tslib.__read(options.to), false);
                        options.to[0] = options.from;
                    }
                    return options;
                }

                function getPopmotionAnimationOptions(transition, options, key) {
                    var _a;
                    if (Array.isArray(options.to)) {
                        (_a = transition.duration) !== null && _a !== void 0 ? _a : transition.duration = 0.8;
                    }
                    hydrateKeyframes(options);
                    /**
                     * Get a default transition if none is determined to be defined.
                     */
                    if (!isTransitionDefined(transition)) {
                        transition = tslib.__assign(tslib.__assign({}, transition), getDefaultTransition(key, options.to));
                    }
                    return tslib.__assign(tslib.__assign({}, options), convertTransitionToAnimationOptions(transition));
                }
                /**
                 *
                 */
                function getAnimation(key, value, target, transition, onComplete) {
                    var _a;
                    var valueTransition = getValueTransition(transition, key);
                    var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get();
                    var isTargetAnimatable = isAnimatable(key, target);
                    if (origin === "none" && isTargetAnimatable && typeof target === "string") {
                        /**
                         * If we're trying to animate from "none", try and get an animatable version
                         * of the target. This could be improved to work both ways.
                         */
                        origin = getAnimatableNone(key, target);
                    } else if (isZero(origin) && typeof target === "string") {
                        origin = getZeroUnit(target);
                    } else if (!Array.isArray(target) && isZero(target) && typeof origin === "string") {
                        target = getZeroUnit(origin);
                    }
                    var isOriginAnimatable = isAnimatable(key, origin);
                    heyListen.warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate ".concat(key, " from \"").concat(origin, "\" to \"").concat(target, "\". ").concat(origin, " is not an animatable value - to enable this animation set ").concat(origin, " to a value animatable to ").concat(target, " via the `style` property."));

                    function start() {
                        var options = {
                            from: origin,
                            to: target,
                            velocity: value.getVelocity(),
                            onComplete: onComplete,
                            onUpdate: function(v) {
                                return value.set(v);
                            }
                        };
                        return valueTransition.type === "inertia" || valueTransition.type === "decay" ? popmotion.inertia(tslib.__assign(tslib.__assign({}, options), valueTransition)) : popmotion.animate(tslib.__assign(tslib.__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), {
                            onUpdate: function(v) {
                                var _a;
                                options.onUpdate(v);
                                (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v);
                            },
                            onComplete: function() {
                                var _a;
                                options.onComplete();
                                (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);
                            }
                        }));
                    }

                    function set() {
                        var _a, _b;
                        var finalTarget = resolveFinalValueInKeyframes(target);
                        value.set(finalTarget);
                        onComplete();
                        (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, finalTarget);
                        (_b = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _b === void 0 ? void 0 : _b.call(valueTransition);
                        return {
                            stop: function() {}
                        };
                    }
                    return !isOriginAnimatable || !isTargetAnimatable || valueTransition.type === false ? set : start;
                }

                function isZero(value) {
                    return value === 0 || typeof value === "string" && parseFloat(value) === 0 && value.indexOf(" ") === -1;
                }

                function getZeroUnit(potentialUnitType) {
                    return typeof potentialUnitType === "number" ? 0 : getAnimatableNone("", potentialUnitType);
                }

                function getValueTransition(transition, key) {
                    return transition[key] || transition["default"] || transition;
                }
                /**
                 * Start animation on a MotionValue. This function is an interface between
                 * Framer Motion and Popmotion
                 */
                function startAnimation(key, value, target, transition) {
                    if (transition === void 0) {
                        transition = {};
                    }
                    if (instantAnimationState.current) {
                        transition = {
                            type: false
                        };
                    }
                    return value.start(function(onComplete) {
                        var delayTimer;
                        var controls;
                        var animation = getAnimation(key, value, target, transition, onComplete);
                        var delay = getDelayFromTransition(transition, key);
                        var start = function() {
                            return controls = animation();
                        };
                        if (delay) {
                            delayTimer = window.setTimeout(start, secondsToMilliseconds(delay));
                        } else {
                            start();
                        }
                        return function() {
                            clearTimeout(delayTimer);
                            controls === null || controls === void 0 ? void 0 : controls.stop();
                        };
                    });
                }

                /**
                 * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1"
                 */
                var isNumericalString = function(v) {
                    return /^\-?\d*\.?\d+$/.test(v);
                };

                /**
                 * Check if the value is a zero value string like "0px" or "0%"
                 */
                var isZeroValueString = function(v) {
                    return /^0[^.\s]+$/.test(v);
                };

                function addUniqueItem(arr, item) {
                    arr.indexOf(item) === -1 && arr.push(item);
                }

                function removeItem(arr, item) {
                    var index = arr.indexOf(item);
                    index > -1 && arr.splice(index, 1);
                }
                // Adapted from array-move
                function moveItem(_a, fromIndex, toIndex) {
                    var _b = tslib.__read(_a),
                        arr = _b.slice(0);
                    var startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;
                    if (startIndex >= 0 && startIndex < arr.length) {
                        var endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;
                        var _c = tslib.__read(arr.splice(fromIndex, 1), 1),
                            item = _c[0];
                        arr.splice(endIndex, 0, item);
                    }
                    return arr;
                }
                var SubscriptionManager = /** @class */ function() {
                    function SubscriptionManager() {
                        this.subscriptions = [];
                    }
                    SubscriptionManager.prototype.add = function(handler) {
                        var _this = this;
                        addUniqueItem(this.subscriptions, handler);
                        return function() {
                            return removeItem(_this.subscriptions, handler);
                        };
                    };
                    SubscriptionManager.prototype.notify = function(a, b, c) {
                        var numSubscriptions = this.subscriptions.length;
                        if (!numSubscriptions) return;
                        if (numSubscriptions === 1) {
                            /**
                             * If there's only a single handler we can just call it without invoking a loop.
                             */
                            this.subscriptions[0](a, b, c);
                        } else {
                            for (var i = 0; i < numSubscriptions; i++) {
                                /**
                                 * Check whether the handler exists before firing as it's possible
                                 * the subscriptions were modified during this loop running.
                                 */
                                var handler = this.subscriptions[i];
                                handler && handler(a, b, c);
                            }
                        }
                    };
                    SubscriptionManager.prototype.getSize = function() {
                        return this.subscriptions.length;
                    };
                    SubscriptionManager.prototype.clear = function() {
                        this.subscriptions.length = 0;
                    };
                    return SubscriptionManager;
                }();
                var isFloat = function(value) {
                    return !isNaN(parseFloat(value));
                };
                /**
                 * `MotionValue` is used to track the state and velocity of motion values.
                 *
                 * @public
                 */
                var MotionValue = /** @class */ function() {
                    /**
                     * @param init - The initiating value
                     * @param config - Optional configuration options
                     *
                     * -  `transformer`: A function to transform incoming values with.
                     *
                     * @internal
                     */
                    function MotionValue(init) {
                        var _this = this;
                        /**
                         * This will be replaced by the build step with the latest version number.
                         * When MotionValues are provided to motion components, warn if versions are mixed.
                         */
                        this.version = "6.5.1";
                        /**
                         * Duration, in milliseconds, since last updating frame.
                         *
                         * @internal
                         */
                        this.timeDelta = 0;
                        /**
                         * Timestamp of the last time this `MotionValue` was updated.
                         *
                         * @internal
                         */
                        this.lastUpdated = 0;
                        /**
                         * Functions to notify when the `MotionValue` updates.
                         *
                         * @internal
                         */
                        this.updateSubscribers = new SubscriptionManager();
                        /**
                         * Functions to notify when the velocity updates.
                         *
                         * @internal
                         */
                        this.velocityUpdateSubscribers = new SubscriptionManager();
                        /**
                         * Functions to notify when the `MotionValue` updates and `render` is set to `true`.
                         *
                         * @internal
                         */
                        this.renderSubscribers = new SubscriptionManager();
                        /**
                         * Tracks whether this value can output a velocity. Currently this is only true
                         * if the value is numerical, but we might be able to widen the scope here and support
                         * other value types.
                         *
                         * @internal
                         */
                        this.canTrackVelocity = false;
                        this.updateAndNotify = function(v, render) {
                            if (render === void 0) {
                                render = true;
                            }
                            _this.prev = _this.current;
                            _this.current = v;
                            // Update timestamp
                            var _a = sync.getFrameData(),
                                delta = _a.delta,
                                timestamp = _a.timestamp;
                            if (_this.lastUpdated !== timestamp) {
                                _this.timeDelta = delta;
                                _this.lastUpdated = timestamp;
                                sync__default["default"].postRender(_this.scheduleVelocityCheck);
                            }
                            // Update update subscribers
                            if (_this.prev !== _this.current) {
                                _this.updateSubscribers.notify(_this.current);
                            }
                            // Update velocity subscribers
                            if (_this.velocityUpdateSubscribers.getSize()) {
                                _this.velocityUpdateSubscribers.notify(_this.getVelocity());
                            }
                            // Update render subscribers
                            if (render) {
                                _this.renderSubscribers.notify(_this.current);
                            }
                        };
                        /**
                         * Schedule a velocity check for the next frame.
                         *
                         * This is an instanced and bound function to prevent generating a new
                         * function once per frame.
                         *
                         * @internal
                         */
                        this.scheduleVelocityCheck = function() {
                            return sync__default["default"].postRender(_this.velocityCheck);
                        };
                        /**
                         * Updates `prev` with `current` if the value hasn't been updated this frame.
                         * This ensures velocity calculations return `0`.
                         *
                         * This is an instanced and bound function to prevent generating a new
                         * function once per frame.
                         *
                         * @internal
                         */
                        this.velocityCheck = function(_a) {
                            var timestamp = _a.timestamp;
                            if (timestamp !== _this.lastUpdated) {
                                _this.prev = _this.current;
                                _this.velocityUpdateSubscribers.notify(_this.getVelocity());
                            }
                        };
                        this.hasAnimated = false;
                        this.prev = this.current = init;
                        this.canTrackVelocity = isFloat(this.current);
                    }
                    /**
                     * Adds a function that will be notified when the `MotionValue` is updated.
                     *
                     * It returns a function that, when called, will cancel the subscription.
                     *
                     * When calling `onChange` inside a React component, it should be wrapped with the
                     * `useEffect` hook. As it returns an unsubscribe function, this should be returned
                     * from the `useEffect` function to ensure you don't add duplicate subscribers..
                     *
                     * ```jsx
                     * export const MyComponent = () => {
                     *   const x = useMotionValue(0)
                     *   const y = useMotionValue(0)
                     *   const opacity = useMotionValue(1)
                     *
                     *   useEffect(() => {
                     *     function updateOpacity() {
                     *       const maxXY = Math.max(x.get(), y.get())
                     *       const newOpacity = transform(maxXY, [0, 100], [1, 0])
                     *       opacity.set(newOpacity)
                     *     }
                     *
                     *     const unsubscribeX = x.onChange(updateOpacity)
                     *     const unsubscribeY = y.onChange(updateOpacity)
                     *
                     *     return () => {
                     *       unsubscribeX()
                     *       unsubscribeY()
                     *     }
                     *   }, [])
                     *
                     *   return <motion.div style={{ x }} />
                     * }
                     * ```
                     *
                     * @privateRemarks
                     *
                     * We could look into a `useOnChange` hook if the above lifecycle management proves confusing.
                     *
                     * ```jsx
                     * useOnChange(x, () => {})
                     * ```
                     *
                     * @param subscriber - A function that receives the latest value.
                     * @returns A function that, when called, will cancel this subscription.
                     *
                     * @public
                     */
                    MotionValue.prototype.onChange = function(subscription) {
                        return this.updateSubscribers.add(subscription);
                    };
                    MotionValue.prototype.clearListeners = function() {
                        this.updateSubscribers.clear();
                    };
                    /**
                     * Adds a function that will be notified when the `MotionValue` requests a render.
                     *
                     * @param subscriber - A function that's provided the latest value.
                     * @returns A function that, when called, will cancel this subscription.
                     *
                     * @internal
                     */
                    MotionValue.prototype.onRenderRequest = function(subscription) {
                        // Render immediately
                        subscription(this.get());
                        return this.renderSubscribers.add(subscription);
                    };
                    /**
                     * Attaches a passive effect to the `MotionValue`.
                     *
                     * @internal
                     */
                    MotionValue.prototype.attach = function(passiveEffect) {
                        this.passiveEffect = passiveEffect;
                    };
                    /**
                     * Sets the state of the `MotionValue`.
                     *
                     * @remarks
                     *
                     * ```jsx
                     * const x = useMotionValue(0)
                     * x.set(10)
                     * ```
                     *
                     * @param latest - Latest value to set.
                     * @param render - Whether to notify render subscribers. Defaults to `true`
                     *
                     * @public
                     */
                    MotionValue.prototype.set = function(v, render) {
                        if (render === void 0) {
                            render = true;
                        }
                        if (!render || !this.passiveEffect) {
                            this.updateAndNotify(v, render);
                        } else {
                            this.passiveEffect(v, this.updateAndNotify);
                        }
                    };
                    /**
                     * Returns the latest state of `MotionValue`
                     *
                     * @returns - The latest state of `MotionValue`
                     *
                     * @public
                     */
                    MotionValue.prototype.get = function() {
                        return this.current;
                    };
                    /**
                     * @public
                     */
                    MotionValue.prototype.getPrevious = function() {
                        return this.prev;
                    };
                    /**
                     * Returns the latest velocity of `MotionValue`
                     *
                     * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
                     *
                     * @public
                     */
                    MotionValue.prototype.getVelocity = function() {
                        // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful
                        return this.canTrackVelocity ?
                            // These casts could be avoided if parseFloat would be typed better
                            popmotion.velocityPerSecond(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta) : 0;
                    };
                    /**
                     * Registers a new animation to control this `MotionValue`. Only one
                     * animation can drive a `MotionValue` at one time.
                     *
                     * ```jsx
                     * value.start()
                     * ```
                     *
                     * @param animation - A function that starts the provided animation
                     *
                     * @internal
                     */
                    MotionValue.prototype.start = function(animation) {
                        var _this = this;
                        this.stop();
                        return new Promise(function(resolve) {
                            _this.hasAnimated = true;
                            _this.stopAnimation = animation(resolve);
                        }).then(function() {
                            return _this.clearAnimation();
                        });
                    };
                    /**
                     * Stop the currently active animation.
                     *
                     * @public
                     */
                    MotionValue.prototype.stop = function() {
                        if (this.stopAnimation) this.stopAnimation();
                        this.clearAnimation();
                    };
                    /**
                     * Returns `true` if this value is currently animating.
                     *
                     * @public
                     */
                    MotionValue.prototype.isAnimating = function() {
                        return !!this.stopAnimation;
                    };
                    MotionValue.prototype.clearAnimation = function() {
                        this.stopAnimation = null;
                    };
                    /**
                     * Destroy and clean up subscribers to this `MotionValue`.
                     *
                     * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
                     * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
                     * created a `MotionValue` via the `motionValue` function.
                     *
                     * @public
                     */
                    MotionValue.prototype.destroy = function() {
                        this.updateSubscribers.clear();
                        this.renderSubscribers.clear();
                        this.stop();
                    };
                    return MotionValue;
                }();

                function motionValue(init) {
                    return new MotionValue(init);
                }

                /**
                 * Tests a provided value against a ValueType
                 */
                var testValueType = function(v) {
                    return function(type) {
                        return type.test(v);
                    };
                };

                /**
                 * ValueType for "auto"
                 */
                var auto = {
                    test: function(v) {
                        return v === "auto";
                    },
                    parse: function(v) {
                        return v;
                    }
                };

                /**
                 * A list of value types commonly used for dimensions
                 */
                var dimensionValueTypes = [styleValueTypes.number, styleValueTypes.px, styleValueTypes.percent, styleValueTypes.degrees, styleValueTypes.vw, styleValueTypes.vh, auto];
                /**
                 * Tests a dimensional value against the list of dimension ValueTypes
                 */
                var findDimensionValueType = function(v) {
                    return dimensionValueTypes.find(testValueType(v));
                };

                /**
                 * A list of all ValueTypes
                 */
                var valueTypes = tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(dimensionValueTypes), false), [styleValueTypes.color, styleValueTypes.complex], false);
                /**
                 * Tests a value against the list of ValueTypes
                 */
                var findValueType = function(v) {
                    return valueTypes.find(testValueType(v));
                };

                /**
                 * Set VisualElement's MotionValue, creating a new MotionValue for it if
                 * it doesn't exist.
                 */
                function setMotionValue(visualElement, key, value) {
                    if (visualElement.hasValue(key)) {
                        visualElement.getValue(key).set(value);
                    } else {
                        visualElement.addValue(key, motionValue(value));
                    }
                }

                function setTarget(visualElement, definition) {
                    var resolved = resolveVariant(visualElement, definition);
                    var _a = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {},
                        _b = _a.transitionEnd,
                        transitionEnd = _b === void 0 ? {} : _b;
                    _a.transition;
                    var target = tslib.__rest(_a, ["transitionEnd", "transition"]);
                    target = tslib.__assign(tslib.__assign({}, target), transitionEnd);
                    for (var key in target) {
                        var value = resolveFinalValueInKeyframes(target[key]);
                        setMotionValue(visualElement, key, value);
                    }
                }

                function setVariants(visualElement, variantLabels) {
                    var reversedLabels = tslib.__spreadArray([], tslib.__read(variantLabels), false).reverse();
                    reversedLabels.forEach(function(key) {
                        var _a;
                        var variant = visualElement.getVariant(key);
                        variant && setTarget(visualElement, variant);
                        (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function(child) {
                            setVariants(child, variantLabels);
                        });
                    });
                }

                function setValues(visualElement, definition) {
                    if (Array.isArray(definition)) {
                        return setVariants(visualElement, definition);
                    } else if (typeof definition === "string") {
                        return setVariants(visualElement, [definition]);
                    } else {
                        setTarget(visualElement, definition);
                    }
                }

                function checkTargetForNewValues(visualElement, target, origin) {
                    var _a, _b, _c;
                    var _d;
                    var newValueKeys = Object.keys(target).filter(function(key) {
                        return !visualElement.hasValue(key);
                    });
                    var numNewValues = newValueKeys.length;
                    if (!numNewValues) return;
                    for (var i = 0; i < numNewValues; i++) {
                        var key = newValueKeys[i];
                        var targetValue = target[key];
                        var value = null;
                        /**
                         * If the target is a series of keyframes, we can use the first value
                         * in the array. If this first value is null, we'll still need to read from the DOM.
                         */
                        if (Array.isArray(targetValue)) {
                            value = targetValue[0];
                        }
                        /**
                         * If the target isn't keyframes, or the first keyframe was null, we need to
                         * first check if an origin value was explicitly defined in the transition as "from",
                         * if not read the value from the DOM. As an absolute fallback, take the defined target value.
                         */
                        if (value === null) {
                            value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];
                        }
                        /**
                         * If value is still undefined or null, ignore it. Preferably this would throw,
                         * but this was causing issues in Framer.
                         */
                        if (value === undefined || value === null) continue;
                        if (typeof value === "string" && (isNumericalString(value) || isZeroValueString(value))) {
                            // If this is a number read as a string, ie "0" or "200", convert it to a number
                            value = parseFloat(value);
                        } else if (!findValueType(value) && styleValueTypes.complex.test(targetValue)) {
                            value = getAnimatableNone(key, targetValue);
                        }
                        visualElement.addValue(key, motionValue(value));
                        (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : _d[key] = value;
                        visualElement.setBaseTarget(key, value);
                    }
                }

                function getOriginFromTransition(key, transition) {
                    if (!transition) return;
                    var valueTransition = transition[key] || transition["default"] || transition;
                    return valueTransition.from;
                }

                function getOrigin(target, transition, visualElement) {
                    var _a, _b;
                    var origin = {};
                    for (var key in target) {
                        origin[key] = (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get();
                    }
                    return origin;
                }

                function animateVisualElement(visualElement, definition, options) {
                    if (options === void 0) {
                        options = {};
                    }
                    visualElement.notifyAnimationStart(definition);
                    var animation;
                    if (Array.isArray(definition)) {
                        var animations = definition.map(function(variant) {
                            return animateVariant(visualElement, variant, options);
                        });
                        animation = Promise.all(animations);
                    } else if (typeof definition === "string") {
                        animation = animateVariant(visualElement, definition, options);
                    } else {
                        var resolvedDefinition = typeof definition === "function" ? resolveVariant(visualElement, definition, options.custom) : definition;
                        animation = animateTarget(visualElement, resolvedDefinition, options);
                    }
                    return animation.then(function() {
                        return visualElement.notifyAnimationComplete(definition);
                    });
                }

                function animateVariant(visualElement, variant, options) {
                    var _a;
                    if (options === void 0) {
                        options = {};
                    }
                    var resolved = resolveVariant(visualElement, variant, options.custom);
                    var _b = (resolved || {}).transition,
                        transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b;
                    if (options.transitionOverride) {
                        transition = options.transitionOverride;
                    }
                    /**
                     * If we have a variant, create a callback that runs it as an animation.
                     * Otherwise, we resolve a Promise immediately for a composable no-op.
                     */
                    var getAnimation = resolved ? function() {
                        return animateTarget(visualElement, resolved, options);
                    } : function() {
                        return Promise.resolve();
                    };
                    /**
                     * If we have children, create a callback that runs all their animations.
                     * Otherwise, we resolve a Promise immediately for a composable no-op.
                     */
                    var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size) ? function(forwardDelay) {
                        if (forwardDelay === void 0) {
                            forwardDelay = 0;
                        }
                        var _a = transition.delayChildren,
                            delayChildren = _a === void 0 ? 0 : _a,
                            staggerChildren = transition.staggerChildren,
                            staggerDirection = transition.staggerDirection;
                        return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);
                    } : function() {
                        return Promise.resolve();
                    };
                    /**
                     * If the transition explicitly defines a "when" option, we need to resolve either
                     * this animation or all children animations before playing the other.
                     */
                    var when = transition.when;
                    if (when) {
                        var _c = tslib.__read(when === "beforeChildren" ? [getAnimation, getChildAnimations] : [getChildAnimations, getAnimation], 2),
                            first = _c[0],
                            last = _c[1];
                        return first().then(last);
                    } else {
                        return Promise.all([getAnimation(), getChildAnimations(options.delay)]);
                    }
                }
                /**
                 * @internal
                 */
                function animateTarget(visualElement, definition, _a) {
                    var _b;
                    var _c = _a === void 0 ? {} : _a,
                        _d = _c.delay,
                        delay = _d === void 0 ? 0 : _d,
                        transitionOverride = _c.transitionOverride,
                        type = _c.type;
                    var _e = visualElement.makeTargetAnimatable(definition),
                        _f = _e.transition,
                        transition = _f === void 0 ? visualElement.getDefaultTransition() : _f,
                        transitionEnd = _e.transitionEnd,
                        target = tslib.__rest(_e, ["transition", "transitionEnd"]);
                    if (transitionOverride) transition = transitionOverride;
                    var animations = [];
                    var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]);
                    for (var key in target) {
                        var value = visualElement.getValue(key);
                        var valueTarget = target[key];
                        if (!value || valueTarget === undefined || animationTypeState && shouldBlockAnimation(animationTypeState, key)) {
                            continue;
                        }
                        var valueTransition = tslib.__assign({
                            delay: delay
                        }, transition);
                        /**
                         * Make animation instant if this is a transform prop and we should reduce motion.
                         */
                        if (visualElement.shouldReduceMotion && isTransformProp(key)) {
                            valueTransition = tslib.__assign(tslib.__assign({}, valueTransition), {
                                type: false,
                                delay: 0
                            });
                        }
                        var animation = startAnimation(key, value, valueTarget, valueTransition);
                        animations.push(animation);
                    }
                    return Promise.all(animations).then(function() {
                        transitionEnd && setTarget(visualElement, transitionEnd);
                    });
                }

                function animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) {
                    if (delayChildren === void 0) {
                        delayChildren = 0;
                    }
                    if (staggerChildren === void 0) {
                        staggerChildren = 0;
                    }
                    if (staggerDirection === void 0) {
                        staggerDirection = 1;
                    }
                    var animations = [];
                    var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;
                    var generateStaggerDuration = staggerDirection === 1 ? function(i) {
                        if (i === void 0) {
                            i = 0;
                        }
                        return i * staggerChildren;
                    } : function(i) {
                        if (i === void 0) {
                            i = 0;
                        }
                        return maxStaggerDuration - i * staggerChildren;
                    };
                    Array.from(visualElement.variantChildren).sort(sortByTreeOrder).forEach(function(child, i) {
                        animations.push(animateVariant(child, variant, tslib.__assign(tslib.__assign({}, options), {
                            delay: delayChildren + generateStaggerDuration(i)
                        })).then(function() {
                            return child.notifyAnimationComplete(variant);
                        }));
                    });
                    return Promise.all(animations);
                }

                function stopAnimation(visualElement) {
                    visualElement.forEachValue(function(value) {
                        return value.stop();
                    });
                }

                function sortByTreeOrder(a, b) {
                    return a.sortNodePosition(b);
                }
                /**
                 * Decide whether we should block this animation. Previously, we achieved this
                 * just by checking whether the key was listed in protectedKeys, but this
                 * posed problems if an animation was triggered by afterChildren and protectedKeys
                 * had been set to true in the meantime.
                 */
                function shouldBlockAnimation(_a, key) {
                    var protectedKeys = _a.protectedKeys,
                        needsAnimating = _a.needsAnimating;
                    var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
                    needsAnimating[key] = false;
                    return shouldBlock;
                }
                var variantPriorityOrder = [exports.AnimationType.Animate, exports.AnimationType.InView, exports.AnimationType.Focus, exports.AnimationType.Hover, exports.AnimationType.Tap, exports.AnimationType.Drag, exports.AnimationType.Exit];
                var reversePriorityOrder = tslib.__spreadArray([], tslib.__read(variantPriorityOrder), false).reverse();
                var numAnimationTypes = variantPriorityOrder.length;

                function animateList(visualElement) {
                    return function(animations) {
                        return Promise.all(animations.map(function(_a) {
                            var animation = _a.animation,
                                options = _a.options;
                            return animateVisualElement(visualElement, animation, options);
                        }));
                    };
                }

                function createAnimationState(visualElement) {
                    var animate = animateList(visualElement);
                    var state = createState();
                    var allAnimatedKeys = {};
                    var isInitialRender = true;
                    /**
                     * This function will be used to reduce the animation definitions for
                     * each active animation type into an object of resolved values for it.
                     */
                    var buildResolvedTypeValues = function(acc, definition) {
                        var resolved = resolveVariant(visualElement, definition);
                        if (resolved) {
                            resolved.transition;
                            var transitionEnd = resolved.transitionEnd,
                                target = tslib.__rest(resolved, ["transition", "transitionEnd"]);
                            acc = tslib.__assign(tslib.__assign(tslib.__assign({}, acc), target), transitionEnd);
                        }
                        return acc;
                    };

                    function isAnimated(key) {
                        return allAnimatedKeys[key] !== undefined;
                    }
                    /**
                     * This just allows us to inject mocked animation functions
                     * @internal
                     */
                    function setAnimateFunction(makeAnimator) {
                        animate = makeAnimator(visualElement);
                    }
                    /**
                     * When we receive new props, we need to:
                     * 1. Create a list of protected keys for each type. This is a directory of
                     *    value keys that are currently being "handled" by types of a higher priority
                     *    so that whenever an animation is played of a given type, these values are
                     *    protected from being animated.
                     * 2. Determine if an animation type needs animating.
                     * 3. Determine if any values have been removed from a type and figure out
                     *    what to animate those to.
                     */
                    function animateChanges(options, changedActiveType) {
                        var _a;
                        var props = visualElement.getProps();
                        var context = visualElement.getVariantContext(true) || {};
                        /**
                         * A list of animations that we'll build into as we iterate through the animation
                         * types. This will get executed at the end of the function.
                         */
                        var animations = [];
                        /**
                         * Keep track of which values have been removed. Then, as we hit lower priority
                         * animation types, we can check if they contain removed values and animate to that.
                         */
                        var removedKeys = new Set();
                        /**
                         * A dictionary of all encountered keys. This is an object to let us build into and
                         * copy it without iteration. Each time we hit an animation type we set its protected
                         * keys - the keys its not allowed to animate - to the latest version of this object.
                         */
                        var encounteredKeys = {};
                        /**
                         * If a variant has been removed at a given index, and this component is controlling
                         * variant animations, we want to ensure lower-priority variants are forced to animate.
                         */
                        var removedVariantIndex = Infinity;
                        var _loop_1 = function(i) {
                            var type = reversePriorityOrder[i];
                            var typeState = state[type];
                            var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];
                            var propIsVariant = isVariantLabel(prop);
                            /**
                             * If this type has *just* changed isActive status, set activeDelta
                             * to that status. Otherwise set to null.
                             */
                            var activeDelta = type === changedActiveType ? typeState.isActive : null;
                            if (activeDelta === false) removedVariantIndex = i;
                            /**
                             * If this prop is an inherited variant, rather than been set directly on the
                             * component itself, we want to make sure we allow the parent to trigger animations.
                             *
                             * TODO: Can probably change this to a !isControllingVariants check
                             */
                            var isInherited = prop === context[type] && prop !== props[type] && propIsVariant;
                            /**
                             *
                             */
                            if (isInherited && isInitialRender && visualElement.manuallyAnimateOnMount) {
                                isInherited = false;
                            }
                            /**
                             * Set all encountered keys so far as the protected keys for this type. This will
                             * be any key that has been animated or otherwise handled by active, higher-priortiy types.
                             */
                            typeState.protectedKeys = tslib.__assign({}, encounteredKeys);
                            // Check if we can skip analysing this prop early
                            if (
                                // If it isn't active and hasn't *just* been set as inactive
                                !typeState.isActive && activeDelta === null ||
                                // If we didn't and don't have any defined prop for this animation type
                                !prop && !typeState.prevProp ||
                                // Or if the prop doesn't define an animation
                                isAnimationControls(prop) || typeof prop === "boolean") {
                                return "continue";
                            }
                            /**
                             * As we go look through the values defined on this type, if we detect
                             * a changed value or a value that was removed in a higher priority, we set
                             * this to true and add this prop to the animation list.
                             */
                            var variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);
                            var shouldAnimateType = variantDidChange ||
                                // If we're making this variant active, we want to always make it active
                                type === changedActiveType && typeState.isActive && !isInherited && propIsVariant ||
                                // If we removed a higher-priority variant (i is in reverse order)
                                i > removedVariantIndex && propIsVariant;
                            /**
                             * As animations can be set as variant lists, variants or target objects, we
                             * coerce everything to an array if it isn't one already
                             */
                            var definitionList = Array.isArray(prop) ? prop : [prop];
                            /**
                             * Build an object of all the resolved values. We'll use this in the subsequent
                             * animateChanges calls to determine whether a value has changed.
                             */
                            var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});
                            if (activeDelta === false) resolvedValues = {};
                            /**
                             * Now we need to loop through all the keys in the prev prop and this prop,
                             * and decide:
                             * 1. If the value has changed, and needs animating
                             * 2. If it has been removed, and needs adding to the removedKeys set
                             * 3. If it has been removed in a higher priority type and needs animating
                             * 4. If it hasn't been removed in a higher priority but hasn't changed, and
                             *    needs adding to the type's protectedKeys list.
                             */
                            var _b = typeState.prevResolvedValues,
                                prevResolvedValues = _b === void 0 ? {} : _b;
                            var allKeys = tslib.__assign(tslib.__assign({}, prevResolvedValues), resolvedValues);
                            var markToAnimate = function(key) {
                                shouldAnimateType = true;
                                removedKeys.delete(key);
                                typeState.needsAnimating[key] = true;
                            };
                            for (var key in allKeys) {
                                var next = resolvedValues[key];
                                var prev = prevResolvedValues[key];
                                // If we've already handled this we can just skip ahead
                                if (encounteredKeys.hasOwnProperty(key)) continue;
                                /**
                                 * If the value has changed, we probably want to animate it.
                                 */
                                if (next !== prev) {
                                    /**
                                     * If both values are keyframes, we need to shallow compare them to
                                     * detect whether any value has changed. If it has, we animate it.
                                     */
                                    if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {
                                        if (!shallowCompare(next, prev) || variantDidChange) {
                                            markToAnimate(key);
                                        } else {
                                            /**
                                             * If it hasn't changed, we want to ensure it doesn't animate by
                                             * adding it to the list of protected keys.
                                             */
                                            typeState.protectedKeys[key] = true;
                                        }
                                    } else if (next !== undefined) {
                                        // If next is defined and doesn't equal prev, it needs animating
                                        markToAnimate(key);
                                    } else {
                                        // If it's undefined, it's been removed.
                                        removedKeys.add(key);
                                    }
                                } else if (next !== undefined && removedKeys.has(key)) {
                                    /**
                                     * If next hasn't changed and it isn't undefined, we want to check if it's
                                     * been removed by a higher priority
                                     */
                                    markToAnimate(key);
                                } else {
                                    /**
                                     * If it hasn't changed, we add it to the list of protected values
                                     * to ensure it doesn't get animated.
                                     */
                                    typeState.protectedKeys[key] = true;
                                }
                            }
                            /**
                             * Update the typeState so next time animateChanges is called we can compare the
                             * latest prop and resolvedValues to these.
                             */
                            typeState.prevProp = prop;
                            typeState.prevResolvedValues = resolvedValues;
                            /**
                             *
                             */
                            if (typeState.isActive) {
                                encounteredKeys = tslib.__assign(tslib.__assign({}, encounteredKeys), resolvedValues);
                            }
                            if (isInitialRender && visualElement.blockInitialAnimation) {
                                shouldAnimateType = false;
                            }
                            /**
                             * If this is an inherited prop we want to hard-block animations
                             * TODO: Test as this should probably still handle animations triggered
                             * by removed values?
                             */
                            if (shouldAnimateType && !isInherited) {
                                animations.push.apply(animations, tslib.__spreadArray([], tslib.__read(definitionList.map(function(animation) {
                                    return {
                                        animation: animation,
                                        options: tslib.__assign({
                                            type: type
                                        }, options)
                                    };
                                })), false));
                            }
                        };
                        /**
                         * Iterate through all animation types in reverse priority order. For each, we want to
                         * detect which values it's handling and whether or not they've changed (and therefore
                         * need to be animated). If any values have been removed, we want to detect those in
                         * lower priority props and flag for animation.
                         */
                        for (var i = 0; i < numAnimationTypes; i++) {
                            _loop_1(i);
                        }
                        allAnimatedKeys = tslib.__assign({}, encounteredKeys);
                        /**
                         * If there are some removed value that haven't been dealt with,
                         * we need to create a new animation that falls back either to the value
                         * defined in the style prop, or the last read value.
                         */
                        if (removedKeys.size) {
                            var fallbackAnimation_1 = {};
                            removedKeys.forEach(function(key) {
                                var fallbackTarget = visualElement.getBaseTarget(key);
                                if (fallbackTarget !== undefined) {
                                    fallbackAnimation_1[key] = fallbackTarget;
                                }
                            });
                            animations.push({
                                animation: fallbackAnimation_1
                            });
                        }
                        var shouldAnimate = Boolean(animations.length);
                        if (isInitialRender && props.initial === false && !visualElement.manuallyAnimateOnMount) {
                            shouldAnimate = false;
                        }
                        isInitialRender = false;
                        return shouldAnimate ? animate(animations) : Promise.resolve();
                    }
                    /**
                     * Change whether a certain animation type is active.
                     */
                    function setActive(type, isActive, options) {
                        var _a;
                        // If the active state hasn't changed, we can safely do nothing here
                        if (state[type].isActive === isActive) return Promise.resolve();
                        // Propagate active change to children
                        (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function(child) {
                            var _a;
                            return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive);
                        });
                        state[type].isActive = isActive;
                        var animations = animateChanges(options, type);
                        for (var key in state) {
                            state[key].protectedKeys = {};
                        }
                        return animations;
                    }
                    return {
                        isAnimated: isAnimated,
                        animateChanges: animateChanges,
                        setActive: setActive,
                        setAnimateFunction: setAnimateFunction,
                        getState: function() {
                            return state;
                        }
                    };
                }

                function checkVariantsDidChange(prev, next) {
                    if (typeof next === "string") {
                        return next !== prev;
                    } else if (isVariantLabels(next)) {
                        return !shallowCompare(next, prev);
                    }
                    return false;
                }

                function createTypeState(isActive) {
                    if (isActive === void 0) {
                        isActive = false;
                    }
                    return {
                        isActive: isActive,
                        protectedKeys: {},
                        needsAnimating: {},
                        prevResolvedValues: {}
                    };
                }

                function createState() {
                    var _a;
                    return _a = {}, _a[exports.AnimationType.Animate] = createTypeState(true), _a[exports.AnimationType.InView] = createTypeState(), _a[exports.AnimationType.Hover] = createTypeState(), _a[exports.AnimationType.Tap] = createTypeState(), _a[exports.AnimationType.Drag] = createTypeState(), _a[exports.AnimationType.Focus] = createTypeState(), _a[exports.AnimationType.Exit] = createTypeState(), _a;
                }
                var animations = {
                    animation: makeRenderlessComponent(function(_a) {
                        var visualElement = _a.visualElement,
                            animate = _a.animate;
                        /**
                         * We dynamically generate the AnimationState manager as it contains a reference
                         * to the underlying animation library. We only want to load that if we load this,
                         * so people can optionally code split it out using the `m` component.
                         */
                        visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement));
                        /**
                         * Subscribe any provided AnimationControls to the component's VisualElement
                         */
                        if (isAnimationControls(animate)) {
                            React.useEffect(function() {
                                return animate.subscribe(visualElement);
                            }, [animate]);
                        }
                    }),
                    exit: makeRenderlessComponent(function(props) {
                        var custom = props.custom,
                            visualElement = props.visualElement;
                        var _a = tslib.__read(usePresence(), 2),
                            isPresent = _a[0],
                            safeToRemove = _a[1];
                        var presenceContext = React.useContext(PresenceContext);
                        React.useEffect(function() {
                            var _a, _b;
                            visualElement.isPresent = isPresent;
                            var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Exit, !isPresent, {
                                custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom
                            });
                            !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(safeToRemove));
                        }, [isPresent]);
                    })
                };

                /**
                 * @internal
                 */
                var PanSession = /** @class */ function() {
                    function PanSession(event, handlers, _a) {
                        var _this = this;
                        var _b = _a === void 0 ? {} : _a,
                            transformPagePoint = _b.transformPagePoint;
                        /**
                         * @internal
                         */
                        this.startEvent = null;
                        /**
                         * @internal
                         */
                        this.lastMoveEvent = null;
                        /**
                         * @internal
                         */
                        this.lastMoveEventInfo = null;
                        /**
                         * @internal
                         */
                        this.handlers = {};
                        this.updatePoint = function() {
                            if (!(_this.lastMoveEvent && _this.lastMoveEventInfo)) return;
                            var info = getPanInfo(_this.lastMoveEventInfo, _this.history);
                            var isPanStarted = _this.startEvent !== null;
                            // Only start panning if the offset is larger than 3 pixels. If we make it
                            // any larger than this we'll want to reset the pointer history
                            // on the first update to avoid visual snapping to the cursoe.
                            var isDistancePastThreshold = popmotion.distance(info.offset, {
                                x: 0,
                                y: 0
                            }) >= 3;
                            if (!isPanStarted && !isDistancePastThreshold) return;
                            var point = info.point;
                            var timestamp = sync.getFrameData().timestamp;
                            _this.history.push(tslib.__assign(tslib.__assign({}, point), {
                                timestamp: timestamp
                            }));
                            var _a = _this.handlers,
                                onStart = _a.onStart,
                                onMove = _a.onMove;
                            if (!isPanStarted) {
                                onStart && onStart(_this.lastMoveEvent, info);
                                _this.startEvent = _this.lastMoveEvent;
                            }
                            onMove && onMove(_this.lastMoveEvent, info);
                        };
                        this.handlePointerMove = function(event, info) {
                            _this.lastMoveEvent = event;
                            _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint);
                            // Because Safari doesn't trigger mouseup events when it's above a `<select>`
                            if (isMouseEvent(event) && event.buttons === 0) {
                                _this.handlePointerUp(event, info);
                                return;
                            }
                            // Throttle mouse move event to once per frame
                            sync__default["default"].update(_this.updatePoint, true);
                        };
                        this.handlePointerUp = function(event, info) {
                            _this.end();
                            var _a = _this.handlers,
                                onEnd = _a.onEnd,
                                onSessionEnd = _a.onSessionEnd;
                            var panInfo = getPanInfo(transformPoint(info, _this.transformPagePoint), _this.history);
                            if (_this.startEvent && onEnd) {
                                onEnd(event, panInfo);
                            }
                            onSessionEnd && onSessionEnd(event, panInfo);
                        };
                        // If we have more than one touch, don't start detecting this gesture
                        if (isTouchEvent(event) && event.touches.length > 1) return;
                        this.handlers = handlers;
                        this.transformPagePoint = transformPagePoint;
                        var info = extractEventInfo(event);
                        var initialInfo = transformPoint(info, this.transformPagePoint);
                        var point = initialInfo.point;
                        var timestamp = sync.getFrameData().timestamp;
                        this.history = [tslib.__assign(tslib.__assign({}, point), {
                            timestamp: timestamp
                        })];
                        var onSessionStart = handlers.onSessionStart;
                        onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
                        this.removeListeners = popmotion.pipe(addPointerEvent(window, "pointermove", this.handlePointerMove), addPointerEvent(window, "pointerup", this.handlePointerUp), addPointerEvent(window, "pointercancel", this.handlePointerUp));
                    }
                    PanSession.prototype.updateHandlers = function(handlers) {
                        this.handlers = handlers;
                    };
                    PanSession.prototype.end = function() {
                        this.removeListeners && this.removeListeners();
                        sync.cancelSync.update(this.updatePoint);
                    };
                    return PanSession;
                }();

                function transformPoint(info, transformPagePoint) {
                    return transformPagePoint ? {
                        point: transformPagePoint(info.point)
                    } : info;
                }

                function subtractPoint(a, b) {
                    return {
                        x: a.x - b.x,
                        y: a.y - b.y
                    };
                }

                function getPanInfo(_a, history) {
                    var point = _a.point;
                    return {
                        point: point,
                        delta: subtractPoint(point, lastDevicePoint(history)),
                        offset: subtractPoint(point, startDevicePoint(history)),
                        velocity: getVelocity(history, 0.1)
                    };
                }

                function startDevicePoint(history) {
                    return history[0];
                }

                function lastDevicePoint(history) {
                    return history[history.length - 1];
                }

                function getVelocity(history, timeDelta) {
                    if (history.length < 2) {
                        return {
                            x: 0,
                            y: 0
                        };
                    }
                    var i = history.length - 1;
                    var timestampedPoint = null;
                    var lastPoint = lastDevicePoint(history);
                    while (i >= 0) {
                        timestampedPoint = history[i];
                        if (lastPoint.timestamp - timestampedPoint.timestamp > secondsToMilliseconds(timeDelta)) {
                            break;
                        }
                        i--;
                    }
                    if (!timestampedPoint) {
                        return {
                            x: 0,
                            y: 0
                        };
                    }
                    var time = (lastPoint.timestamp - timestampedPoint.timestamp) / 1000;
                    if (time === 0) {
                        return {
                            x: 0,
                            y: 0
                        };
                    }
                    var currentVelocity = {
                        x: (lastPoint.x - timestampedPoint.x) / time,
                        y: (lastPoint.y - timestampedPoint.y) / time
                    };
                    if (currentVelocity.x === Infinity) {
                        currentVelocity.x = 0;
                    }
                    if (currentVelocity.y === Infinity) {
                        currentVelocity.y = 0;
                    }
                    return currentVelocity;
                }

                function calcLength(axis) {
                    return axis.max - axis.min;
                }

                function isNear(value, target, maxDistance) {
                    if (target === void 0) {
                        target = 0;
                    }
                    if (maxDistance === void 0) {
                        maxDistance = 0.01;
                    }
                    return popmotion.distance(value, target) < maxDistance;
                }

                function calcAxisDelta(delta, source, target, origin) {
                    if (origin === void 0) {
                        origin = 0.5;
                    }
                    delta.origin = origin;
                    delta.originPoint = popmotion.mix(source.min, source.max, delta.origin);
                    delta.scale = calcLength(target) / calcLength(source);
                    if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale)) delta.scale = 1;
                    delta.translate = popmotion.mix(target.min, target.max, delta.origin) - delta.originPoint;
                    if (isNear(delta.translate) || isNaN(delta.translate)) delta.translate = 0;
                }

                function calcBoxDelta(delta, source, target, origin) {
                    calcAxisDelta(delta.x, source.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX);
                    calcAxisDelta(delta.y, source.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY);
                }

                function calcRelativeAxis(target, relative, parent) {
                    target.min = parent.min + relative.min;
                    target.max = target.min + calcLength(relative);
                }

                function calcRelativeBox(target, relative, parent) {
                    calcRelativeAxis(target.x, relative.x, parent.x);
                    calcRelativeAxis(target.y, relative.y, parent.y);
                }

                function calcRelativeAxisPosition(target, layout, parent) {
                    target.min = layout.min - parent.min;
                    target.max = target.min + calcLength(layout);
                }

                function calcRelativePosition(target, layout, parent) {
                    calcRelativeAxisPosition(target.x, layout.x, parent.x);
                    calcRelativeAxisPosition(target.y, layout.y, parent.y);
                }

                /**
                 * Apply constraints to a point. These constraints are both physical along an
                 * axis, and an elastic factor that determines how much to constrain the point
                 * by if it does lie outside the defined parameters.
                 */
                function applyConstraints(point, _a, elastic) {
                    var min = _a.min,
                        max = _a.max;
                    if (min !== undefined && point < min) {
                        // If we have a min point defined, and this is outside of that, constrain
                        point = elastic ? popmotion.mix(min, point, elastic.min) : Math.max(point, min);
                    } else if (max !== undefined && point > max) {
                        // If we have a max point defined, and this is outside of that, constrain
                        point = elastic ? popmotion.mix(max, point, elastic.max) : Math.min(point, max);
                    }
                    return point;
                }
                /**
                 * Calculate constraints in terms of the viewport when defined relatively to the
                 * measured axis. This is measured from the nearest edge, so a max constraint of 200
                 * on an axis with a max value of 300 would return a constraint of 500 - axis length
                 */
                function calcRelativeAxisConstraints(axis, min, max) {
                    return {
                        min: min !== undefined ? axis.min + min : undefined,
                        max: max !== undefined ? axis.max + max - (axis.max - axis.min) : undefined
                    };
                }
                /**
                 * Calculate constraints in terms of the viewport when
                 * defined relatively to the measured bounding box.
                 */
                function calcRelativeConstraints(layoutBox, _a) {
                    var top = _a.top,
                        left = _a.left,
                        bottom = _a.bottom,
                        right = _a.right;
                    return {
                        x: calcRelativeAxisConstraints(layoutBox.x, left, right),
                        y: calcRelativeAxisConstraints(layoutBox.y, top, bottom)
                    };
                }
                /**
                 * Calculate viewport constraints when defined as another viewport-relative axis
                 */
                function calcViewportAxisConstraints(layoutAxis, constraintsAxis) {
                    var _a;
                    var min = constraintsAxis.min - layoutAxis.min;
                    var max = constraintsAxis.max - layoutAxis.max;
                    // If the constraints axis is actually smaller than the layout axis then we can
                    // flip the constraints
                    if (constraintsAxis.max - constraintsAxis.min < layoutAxis.max - layoutAxis.min) {
                        _a = tslib.__read([max, min], 2), min = _a[0], max = _a[1];
                    }
                    return {
                        min: min,
                        max: max
                    };
                }
                /**
                 * Calculate viewport constraints when defined as another viewport-relative box
                 */
                function calcViewportConstraints(layoutBox, constraintsBox) {
                    return {
                        x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),
                        y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y)
                    };
                }
                /**
                 * Calculate a transform origin relative to the source axis, between 0-1, that results
                 * in an asthetically pleasing scale/transform needed to project from source to target.
                 */
                function calcOrigin(source, target) {
                    var origin = 0.5;
                    var sourceLength = calcLength(source);
                    var targetLength = calcLength(target);
                    if (targetLength > sourceLength) {
                        origin = popmotion.progress(target.min, target.max - sourceLength, source.min);
                    } else if (sourceLength > targetLength) {
                        origin = popmotion.progress(source.min, source.max - targetLength, target.min);
                    }
                    return popmotion.clamp(0, 1, origin);
                }
                /**
                 * Rebase the calculated viewport constraints relative to the layout.min point.
                 */
                function rebaseAxisConstraints(layout, constraints) {
                    var relativeConstraints = {};
                    if (constraints.min !== undefined) {
                        relativeConstraints.min = constraints.min - layout.min;
                    }
                    if (constraints.max !== undefined) {
                        relativeConstraints.max = constraints.max - layout.min;
                    }
                    return relativeConstraints;
                }
                var defaultElastic = 0.35;
                /**
                 * Accepts a dragElastic prop and returns resolved elastic values for each axis.
                 */
                function resolveDragElastic(dragElastic) {
                    if (dragElastic === void 0) {
                        dragElastic = defaultElastic;
                    }
                    if (dragElastic === false) {
                        dragElastic = 0;
                    } else if (dragElastic === true) {
                        dragElastic = defaultElastic;
                    }
                    return {
                        x: resolveAxisElastic(dragElastic, "left", "right"),
                        y: resolveAxisElastic(dragElastic, "top", "bottom")
                    };
                }

                function resolveAxisElastic(dragElastic, minLabel, maxLabel) {
                    return {
                        min: resolvePointElastic(dragElastic, minLabel),
                        max: resolvePointElastic(dragElastic, maxLabel)
                    };
                }

                function resolvePointElastic(dragElastic, label) {
                    var _a;
                    return typeof dragElastic === "number" ? dragElastic : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;
                }
                var createAxisDelta = function() {
                    return {
                        translate: 0,
                        scale: 1,
                        origin: 0,
                        originPoint: 0
                    };
                };
                var createDelta = function() {
                    return {
                        x: createAxisDelta(),
                        y: createAxisDelta()
                    };
                };
                var createAxis = function() {
                    return {
                        min: 0,
                        max: 0
                    };
                };
                var createBox = function() {
                    return {
                        x: createAxis(),
                        y: createAxis()
                    };
                };

                function eachAxis(callback) {
                    return [callback("x"), callback("y")];
                }

                /**
                 * Bounding boxes tend to be defined as top, left, right, bottom. For various operations
                 * it's easier to consider each axis individually. This function returns a bounding box
                 * as a map of single-axis min/max values.
                 */
                function convertBoundingBoxToBox(_a) {
                    var top = _a.top,
                        left = _a.left,
                        right = _a.right,
                        bottom = _a.bottom;
                    return {
                        x: {
                            min: left,
                            max: right
                        },
                        y: {
                            min: top,
                            max: bottom
                        }
                    };
                }

                function convertBoxToBoundingBox(_a) {
                    var x = _a.x,
                        y = _a.y;
                    return {
                        top: y.min,
                        right: x.max,
                        bottom: y.max,
                        left: x.min
                    };
                }
                /**
                 * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function
                 * provided by Framer to allow measured points to be corrected for device scaling. This is used
                 * when measuring DOM elements and DOM event points.
                 */
                function transformBoxPoints(point, transformPoint) {
                    if (!transformPoint) return point;
                    var topLeft = transformPoint({
                        x: point.left,
                        y: point.top
                    });
                    var bottomRight = transformPoint({
                        x: point.right,
                        y: point.bottom
                    });
                    return {
                        top: topLeft.y,
                        left: topLeft.x,
                        bottom: bottomRight.y,
                        right: bottomRight.x
                    };
                }

                function isIdentityScale(scale) {
                    return scale === undefined || scale === 1;
                }

                function hasScale(_a) {
                    var scale = _a.scale,
                        scaleX = _a.scaleX,
                        scaleY = _a.scaleY;
                    return !isIdentityScale(scale) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY);
                }

                function hasTransform(values) {
                    return hasScale(values) || hasTranslate(values.x) || hasTranslate(values.y) || values.z || values.rotate || values.rotateX || values.rotateY;
                }

                function hasTranslate(value) {
                    return value && value !== "0%";
                }

                /**
                 * Scales a point based on a factor and an originPoint
                 */
                function scalePoint(point, scale, originPoint) {
                    var distanceFromOrigin = point - originPoint;
                    var scaled = scale * distanceFromOrigin;
                    return originPoint + scaled;
                }
                /**
                 * Applies a translate/scale delta to a point
                 */
                function applyPointDelta(point, translate, scale, originPoint, boxScale) {
                    if (boxScale !== undefined) {
                        point = scalePoint(point, boxScale, originPoint);
                    }
                    return scalePoint(point, scale, originPoint) + translate;
                }
                /**
                 * Applies a translate/scale delta to an axis
                 */
                function applyAxisDelta(axis, translate, scale, originPoint, boxScale) {
                    if (translate === void 0) {
                        translate = 0;
                    }
                    if (scale === void 0) {
                        scale = 1;
                    }
                    axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
                    axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
                }
                /**
                 * Applies a translate/scale delta to a box
                 */
                function applyBoxDelta(box, _a) {
                    var x = _a.x,
                        y = _a.y;
                    applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
                    applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
                }
                /**
                 * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms
                 * in a tree upon our box before then calculating how to project it into our desired viewport-relative box
                 *
                 * This is the final nested loop within updateLayoutDelta for future refactoring
                 */
                function applyTreeDeltas(box, treeScale, treePath, isSharedTransition) {
                    var _a, _b;
                    if (isSharedTransition === void 0) {
                        isSharedTransition = false;
                    }
                    var treeLength = treePath.length;
                    if (!treeLength) return;
                    // Reset the treeScale
                    treeScale.x = treeScale.y = 1;
                    var node;
                    var delta;
                    for (var i = 0; i < treeLength; i++) {
                        node = treePath[i];
                        delta = node.projectionDelta;
                        if (((_b = (_a = node.instance) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === "contents") continue;
                        if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) {
                            transformBox(box, {
                                x: -node.scroll.x,
                                y: -node.scroll.y
                            });
                        }
                        if (delta) {
                            // Incoporate each ancestor's scale into a culmulative treeScale for this component
                            treeScale.x *= delta.x.scale;
                            treeScale.y *= delta.y.scale;
                            // Apply each ancestor's calculated delta into this component's recorded layout box
                            applyBoxDelta(box, delta);
                        }
                        if (isSharedTransition && hasTransform(node.latestValues)) {
                            transformBox(box, node.latestValues);
                        }
                    }
                }

                function translateAxis(axis, distance) {
                    axis.min = axis.min + distance;
                    axis.max = axis.max + distance;
                }
                /**
                 * Apply a transform to an axis from the latest resolved motion values.
                 * This function basically acts as a bridge between a flat motion value map
                 * and applyAxisDelta
                 */
                function transformAxis(axis, transforms, _a) {
                    var _b = tslib.__read(_a, 3),
                        key = _b[0],
                        scaleKey = _b[1],
                        originKey = _b[2];
                    var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;
                    var originPoint = popmotion.mix(axis.min, axis.max, axisOrigin);
                    // Apply the axis delta to the final axis
                    applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);
                }
                /**
                 * The names of the motion values we want to apply as translation, scale and origin.
                 */
                var xKeys$1 = ["x", "scaleX", "originX"];
                var yKeys$1 = ["y", "scaleY", "originY"];
                /**
                 * Apply a transform to a box from the latest resolved motion values.
                 */
                function transformBox(box, transform) {
                    transformAxis(box.x, transform, xKeys$1);
                    transformAxis(box.y, transform, yKeys$1);
                }

                function measureViewportBox(instance, transformPoint) {
                    return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
                }

                function measurePageBox(element, rootProjectionNode, transformPagePoint) {
                    var viewportBox = measureViewportBox(element, transformPagePoint);
                    var scroll = rootProjectionNode.scroll;
                    if (scroll) {
                        translateAxis(viewportBox.x, scroll.x);
                        translateAxis(viewportBox.y, scroll.y);
                    }
                    return viewportBox;
                }
                var elementDragControls = new WeakMap();
                /**
                 *
                 */
                // let latestPointerEvent: AnyPointerEvent
                var VisualElementDragControls = /** @class */ function() {
                    function VisualElementDragControls(visualElement) {
                        // This is a reference to the global drag gesture lock, ensuring only one component
                        // can "capture" the drag of one or both axes.
                        // TODO: Look into moving this into pansession?
                        this.openGlobalLock = null;
                        this.isDragging = false;
                        this.currentDirection = null;
                        this.originPoint = {
                            x: 0,
                            y: 0
                        };
                        /**
                         * The permitted boundaries of travel, in pixels.
                         */
                        this.constraints = false;
                        this.hasMutatedConstraints = false;
                        /**
                         * The per-axis resolved elastic values.
                         */
                        this.elastic = createBox();
                        this.visualElement = visualElement;
                    }
                    VisualElementDragControls.prototype.start = function(originEvent, _a) {
                        var _this = this;
                        var _b = _a === void 0 ? {} : _a,
                            _c = _b.snapToCursor,
                            snapToCursor = _c === void 0 ? false : _c;
                        /**
                         * Don't start dragging if this component is exiting
                         */
                        if (this.visualElement.isPresent === false) return;
                        var onSessionStart = function(event) {
                            // Stop any animations on both axis values immediately. This allows the user to throw and catch
                            // the component.
                            _this.stopAnimation();
                            if (snapToCursor) {
                                _this.snapToCursor(extractEventInfo(event, "page").point);
                            }
                        };
                        var onStart = function(event, info) {
                            var _a;
                            // Attempt to grab the global drag gesture lock - maybe make this part of PanSession
                            var _b = _this.getProps(),
                                drag = _b.drag,
                                dragPropagation = _b.dragPropagation,
                                onDragStart = _b.onDragStart;
                            if (drag && !dragPropagation) {
                                if (_this.openGlobalLock) _this.openGlobalLock();
                                _this.openGlobalLock = getGlobalLock(drag);
                                // If we don 't have the lock, don't start dragging
                                if (!_this.openGlobalLock) return;
                            }
                            _this.isDragging = true;
                            _this.currentDirection = null;
                            _this.resolveConstraints();
                            if (_this.visualElement.projection) {
                                _this.visualElement.projection.isAnimationBlocked = true;
                                _this.visualElement.projection.target = undefined;
                            }
                            /**
                             * Record gesture origin
                             */
                            eachAxis(function(axis) {
                                var _a, _b;
                                var current = _this.getAxisMotionValue(axis).get() || 0;
                                /**
                                 * If the MotionValue is a percentage value convert to px
                                 */
                                if (styleValueTypes.percent.test(current)) {
                                    var measuredAxis = (_b = (_a = _this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.actual[axis];
                                    if (measuredAxis) {
                                        var length_1 = calcLength(measuredAxis);
                                        current = length_1 * (parseFloat(current) / 100);
                                    }
                                }
                                _this.originPoint[axis] = current;
                            });
                            // Fire onDragStart event
                            onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(event, info);
                            (_a = _this.visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Drag, true);
                        };
                        var onMove = function(event, info) {
                            // latestPointerEvent = event
                            var _a = _this.getProps(),
                                dragPropagation = _a.dragPropagation,
                                dragDirectionLock = _a.dragDirectionLock,
                                onDirectionLock = _a.onDirectionLock,
                                onDrag = _a.onDrag;
                            // If we didn't successfully receive the gesture lock, early return.
                            if (!dragPropagation && !_this.openGlobalLock) return;
                            var offset = info.offset;
                            // Attempt to detect drag direction if directionLock is true
                            if (dragDirectionLock && _this.currentDirection === null) {
                                _this.currentDirection = getCurrentDirection(offset);
                                // If we've successfully set a direction, notify listener
                                if (_this.currentDirection !== null) {
                                    onDirectionLock === null || onDirectionLock === void 0 ? void 0 : onDirectionLock(_this.currentDirection);
                                }
                                return;
                            }
                            // Update each point with the latest position
                            _this.updateAxis("x", info.point, offset);
                            _this.updateAxis("y", info.point, offset);
                            /**
                             * Ideally we would leave the renderer to fire naturally at the end of
                             * this frame but if the element is about to change layout as the result
                             * of a re-render we want to ensure the browser can read the latest
                             * bounding box to ensure the pointer and element don't fall out of sync.
                             */
                            _this.visualElement.syncRender();
                            /**
                             * This must fire after the syncRender call as it might trigger a state
                             * change which itself might trigger a layout update.
                             */
                            onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, info);
                        };
                        var onSessionEnd = function(event, info) {
                            return _this.stop(event, info);
                        };
                        this.panSession = new PanSession(originEvent, {
                            onSessionStart: onSessionStart,
                            onStart: onStart,
                            onMove: onMove,
                            onSessionEnd: onSessionEnd
                        }, {
                            transformPagePoint: this.visualElement.getTransformPagePoint()
                        });
                    };
                    VisualElementDragControls.prototype.stop = function(event, info) {
                        var isDragging = this.isDragging;
                        this.cancel();
                        if (!isDragging) return;
                        var velocity = info.velocity;
                        this.startAnimation(velocity);
                        var onDragEnd = this.getProps().onDragEnd;
                        onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, info);
                    };
                    VisualElementDragControls.prototype.cancel = function() {
                        var _a, _b;
                        this.isDragging = false;
                        if (this.visualElement.projection) {
                            this.visualElement.projection.isAnimationBlocked = false;
                        }
                        (_a = this.panSession) === null || _a === void 0 ? void 0 : _a.end();
                        this.panSession = undefined;
                        var dragPropagation = this.getProps().dragPropagation;
                        if (!dragPropagation && this.openGlobalLock) {
                            this.openGlobalLock();
                            this.openGlobalLock = null;
                        }
                        (_b = this.visualElement.animationState) === null || _b === void 0 ? void 0 : _b.setActive(exports.AnimationType.Drag, false);
                    };
                    VisualElementDragControls.prototype.updateAxis = function(axis, _point, offset) {
                        var drag = this.getProps().drag;
                        // If we're not dragging this axis, do an early return.
                        if (!offset || !shouldDrag(axis, drag, this.currentDirection)) return;
                        var axisValue = this.getAxisMotionValue(axis);
                        var next = this.originPoint[axis] + offset[axis];
                        // Apply constraints
                        if (this.constraints && this.constraints[axis]) {
                            next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);
                        }
                        axisValue.set(next);
                    };
                    VisualElementDragControls.prototype.resolveConstraints = function() {
                        var _this = this;
                        var _a = this.getProps(),
                            dragConstraints = _a.dragConstraints,
                            dragElastic = _a.dragElastic;
                        var layout = (this.visualElement.projection || {}).layout;
                        var prevConstraints = this.constraints;
                        if (dragConstraints && isRefObject(dragConstraints)) {
                            if (!this.constraints) {
                                this.constraints = this.resolveRefConstraints();
                            }
                        } else {
                            if (dragConstraints && layout) {
                                this.constraints = calcRelativeConstraints(layout.actual, dragConstraints);
                            } else {
                                this.constraints = false;
                            }
                        }
                        this.elastic = resolveDragElastic(dragElastic);
                        /**
                         * If we're outputting to external MotionValues, we want to rebase the measured constraints
                         * from viewport-relative to component-relative.
                         */
                        if (prevConstraints !== this.constraints && layout && this.constraints && !this.hasMutatedConstraints) {
                            eachAxis(function(axis) {
                                if (_this.getAxisMotionValue(axis)) {
                                    _this.constraints[axis] = rebaseAxisConstraints(layout.actual[axis], _this.constraints[axis]);
                                }
                            });
                        }
                    };
                    VisualElementDragControls.prototype.resolveRefConstraints = function() {
                        var _a = this.getProps(),
                            constraints = _a.dragConstraints,
                            onMeasureDragConstraints = _a.onMeasureDragConstraints;
                        if (!constraints || !isRefObject(constraints)) return false;
                        var constraintsElement = constraints.current;
                        heyListen.invariant(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
                        var projection = this.visualElement.projection;
                        // TODO
                        if (!projection || !projection.layout) return false;
                        var constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
                        var measuredConstraints = calcViewportConstraints(projection.layout.actual, constraintsBox);
                        /**
                         * If there's an onMeasureDragConstraints listener we call it and
                         * if different constraints are returned, set constraints to that
                         */
                        if (onMeasureDragConstraints) {
                            var userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));
                            this.hasMutatedConstraints = !!userConstraints;
                            if (userConstraints) {
                                measuredConstraints = convertBoundingBoxToBox(userConstraints);
                            }
                        }
                        return measuredConstraints;
                    };
                    VisualElementDragControls.prototype.startAnimation = function(velocity) {
                        var _this = this;
                        var _a = this.getProps(),
                            drag = _a.drag,
                            dragMomentum = _a.dragMomentum,
                            dragElastic = _a.dragElastic,
                            dragTransition = _a.dragTransition,
                            dragSnapToOrigin = _a.dragSnapToOrigin,
                            onDragTransitionEnd = _a.onDragTransitionEnd;
                        var constraints = this.constraints || {};
                        var momentumAnimations = eachAxis(function(axis) {
                            var _a;
                            if (!shouldDrag(axis, drag, _this.currentDirection)) {
                                return;
                            }
                            var transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};
                            if (dragSnapToOrigin) transition = {
                                min: 0,
                                max: 0
                            };
                            /**
                             * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame
                             * of spring animations so we should look into adding a disable spring option to `inertia`.
                             * We could do something here where we affect the `bounceStiffness` and `bounceDamping`
                             * using the value of `dragElastic`.
                             */
                            var bounceStiffness = dragElastic ? 200 : 1000000;
                            var bounceDamping = dragElastic ? 40 : 10000000;
                            var inertia = tslib.__assign(tslib.__assign({
                                type: "inertia",
                                velocity: dragMomentum ? velocity[axis] : 0,
                                bounceStiffness: bounceStiffness,
                                bounceDamping: bounceDamping,
                                timeConstant: 750,
                                restDelta: 1,
                                restSpeed: 10
                            }, dragTransition), transition);
                            // If we're not animating on an externally-provided `MotionValue` we can use the
                            // component's animation controls which will handle interactions with whileHover (etc),
                            // otherwise we just have to animate the `MotionValue` itself.
                            return _this.startAxisValueAnimation(axis, inertia);
                        });
                        // Run all animations and then resolve the new drag constraints.
                        return Promise.all(momentumAnimations).then(onDragTransitionEnd);
                    };
                    VisualElementDragControls.prototype.startAxisValueAnimation = function(axis, transition) {
                        var axisValue = this.getAxisMotionValue(axis);
                        return startAnimation(axis, axisValue, 0, transition);
                    };
                    VisualElementDragControls.prototype.stopAnimation = function() {
                        var _this = this;
                        eachAxis(function(axis) {
                            return _this.getAxisMotionValue(axis).stop();
                        });
                    };
                    /**
                     * Drag works differently depending on which props are provided.
                     *
                     * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
                     * - Otherwise, we apply the delta to the x/y motion values.
                     */
                    VisualElementDragControls.prototype.getAxisMotionValue = function(axis) {
                        var _a, _b;
                        var dragKey = "_drag" + axis.toUpperCase();
                        var externalMotionValue = this.visualElement.getProps()[dragKey];
                        return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0);
                    };
                    VisualElementDragControls.prototype.snapToCursor = function(point) {
                        var _this = this;
                        eachAxis(function(axis) {
                            var drag = _this.getProps().drag;
                            // If we're not dragging this axis, do an early return.
                            if (!shouldDrag(axis, drag, _this.currentDirection)) return;
                            var projection = _this.visualElement.projection;
                            var axisValue = _this.getAxisMotionValue(axis);
                            if (projection && projection.layout) {
                                var _a = projection.layout.actual[axis],
                                    min = _a.min,
                                    max = _a.max;
                                axisValue.set(point[axis] - popmotion.mix(min, max, 0.5));
                            }
                        });
                    };
                    /**
                     * When the viewport resizes we want to check if the measured constraints
                     * have changed and, if so, reposition the element within those new constraints
                     * relative to where it was before the resize.
                     */
                    VisualElementDragControls.prototype.scalePositionWithinConstraints = function() {
                        var _this = this;
                        var _a;
                        var _b = this.getProps(),
                            drag = _b.drag,
                            dragConstraints = _b.dragConstraints;
                        var projection = this.visualElement.projection;
                        if (!isRefObject(dragConstraints) || !projection || !this.constraints) return;
                        /**
                         * Stop current animations as there can be visual glitching if we try to do
                         * this mid-animation
                         */
                        this.stopAnimation();
                        /**
                         * Record the relative position of the dragged element relative to the
                         * constraints box and save as a progress value.
                         */
                        var boxProgress = {
                            x: 0,
                            y: 0
                        };
                        eachAxis(function(axis) {
                            var axisValue = _this.getAxisMotionValue(axis);
                            if (axisValue) {
                                var latest = axisValue.get();
                                boxProgress[axis] = calcOrigin({
                                    min: latest,
                                    max: latest
                                }, _this.constraints[axis]);
                            }
                        });
                        /**
                         * Update the layout of this element and resolve the latest drag constraints
                         */
                        var transformTemplate = this.visualElement.getProps().transformTemplate;
                        this.visualElement.getInstance().style.transform = transformTemplate ? transformTemplate({}, "") : "none";
                        (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();
                        projection.updateLayout();
                        this.resolveConstraints();
                        /**
                         * For each axis, calculate the current progress of the layout axis
                         * within the new constraints.
                         */
                        eachAxis(function(axis) {
                            if (!shouldDrag(axis, drag, null)) return;
                            /**
                             * Calculate a new transform based on the previous box progress
                             */
                            var axisValue = _this.getAxisMotionValue(axis);
                            var _a = _this.constraints[axis],
                                min = _a.min,
                                max = _a.max;
                            axisValue.set(popmotion.mix(min, max, boxProgress[axis]));
                        });
                    };
                    VisualElementDragControls.prototype.addListeners = function() {
                        var _this = this;
                        var _a;
                        elementDragControls.set(this.visualElement, this);
                        var element = this.visualElement.getInstance();
                        /**
                         * Attach a pointerdown event listener on this DOM element to initiate drag tracking.
                         */
                        var stopPointerListener = addPointerEvent(element, "pointerdown", function(event) {
                            var _a = _this.getProps(),
                                drag = _a.drag,
                                _b = _a.dragListener,
                                dragListener = _b === void 0 ? true : _b;
                            drag && dragListener && _this.start(event);
                        });
                        var measureDragConstraints = function() {
                            var dragConstraints = _this.getProps().dragConstraints;
                            if (isRefObject(dragConstraints)) {
                                _this.constraints = _this.resolveRefConstraints();
                            }
                        };
                        var projection = this.visualElement.projection;
                        var stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints);
                        if (projection && !projection.layout) {
                            (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();
                            projection.updateLayout();
                        }
                        measureDragConstraints();
                        /**
                         * Attach a window resize listener to scale the draggable target within its defined
                         * constraints as the window resizes.
                         */
                        var stopResizeListener = addDomEvent(window, "resize", function() {
                            return _this.scalePositionWithinConstraints();
                        });
                        /**
                         * If the element's layout changes, calculate the delta and apply that to
                         * the drag gesture's origin point.
                         */
                        projection.addEventListener("didUpdate", function(_a) {
                            var delta = _a.delta,
                                hasLayoutChanged = _a.hasLayoutChanged;
                            if (_this.isDragging && hasLayoutChanged) {
                                eachAxis(function(axis) {
                                    var motionValue = _this.getAxisMotionValue(axis);
                                    if (!motionValue) return;
                                    _this.originPoint[axis] += delta[axis].translate;
                                    motionValue.set(motionValue.get() + delta[axis].translate);
                                });
                                _this.visualElement.syncRender();
                            }
                        });
                        return function() {
                            stopResizeListener();
                            stopPointerListener();
                            stopMeasureLayoutListener();
                        };
                    };
                    VisualElementDragControls.prototype.getProps = function() {
                        var props = this.visualElement.getProps();
                        var _a = props.drag,
                            drag = _a === void 0 ? false : _a,
                            _b = props.dragDirectionLock,
                            dragDirectionLock = _b === void 0 ? false : _b,
                            _c = props.dragPropagation,
                            dragPropagation = _c === void 0 ? false : _c,
                            _d = props.dragConstraints,
                            dragConstraints = _d === void 0 ? false : _d,
                            _e = props.dragElastic,
                            dragElastic = _e === void 0 ? defaultElastic : _e,
                            _f = props.dragMomentum,
                            dragMomentum = _f === void 0 ? true : _f;
                        return tslib.__assign(tslib.__assign({}, props), {
                            drag: drag,
                            dragDirectionLock: dragDirectionLock,
                            dragPropagation: dragPropagation,
                            dragConstraints: dragConstraints,
                            dragElastic: dragElastic,
                            dragMomentum: dragMomentum
                        });
                    };
                    return VisualElementDragControls;
                }();

                function shouldDrag(direction, drag, currentDirection) {
                    return (drag === true || drag === direction) && (currentDirection === null || currentDirection === direction);
                }
                /**
                 * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower
                 * than the provided threshold, return `null`.
                 *
                 * @param offset - The x/y offset from origin.
                 * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.
                 */
                function getCurrentDirection(offset, lockThreshold) {
                    if (lockThreshold === void 0) {
                        lockThreshold = 10;
                    }
                    var direction = null;
                    if (Math.abs(offset.y) > lockThreshold) {
                        direction = "y";
                    } else if (Math.abs(offset.x) > lockThreshold) {
                        direction = "x";
                    }
                    return direction;
                }

                /**
                 * A hook that allows an element to be dragged.
                 *
                 * @internal
                 */
                function useDrag(props) {
                    var groupDragControls = props.dragControls,
                        visualElement = props.visualElement;
                    var dragControls = useConstant(function() {
                        return new VisualElementDragControls(visualElement);
                    });
                    // If we've been provided a DragControls for manual control over the drag gesture,
                    // subscribe this component to it on mount.
                    React.useEffect(function() {
                        return groupDragControls && groupDragControls.subscribe(dragControls);
                    }, [dragControls, groupDragControls]);
                    // Apply the event listeners to the element
                    React.useEffect(function() {
                        return dragControls.addListeners();
                    }, [dragControls]);
                }

                /**
                 *
                 * @param handlers -
                 * @param ref -
                 *
                 * @privateRemarks
                 * Currently this sets new pan gesture functions every render. The memo route has been explored
                 * in the past but ultimately we're still creating new functions every render. An optimisation
                 * to explore is creating the pan gestures and loading them into a `ref`.
                 *
                 * @internal
                 */
                function usePanGesture(_a) {
                    var onPan = _a.onPan,
                        onPanStart = _a.onPanStart,
                        onPanEnd = _a.onPanEnd,
                        onPanSessionStart = _a.onPanSessionStart,
                        visualElement = _a.visualElement;
                    var hasPanEvents = onPan || onPanStart || onPanEnd || onPanSessionStart;
                    var panSession = React.useRef(null);
                    var transformPagePoint = React.useContext(MotionConfigContext).transformPagePoint;
                    var handlers = {
                        onSessionStart: onPanSessionStart,
                        onStart: onPanStart,
                        onMove: onPan,
                        onEnd: function(event, info) {
                            panSession.current = null;
                            onPanEnd && onPanEnd(event, info);
                        }
                    };
                    React.useEffect(function() {
                        if (panSession.current !== null) {
                            panSession.current.updateHandlers(handlers);
                        }
                    });

                    function onPointerDown(event) {
                        panSession.current = new PanSession(event, handlers, {
                            transformPagePoint: transformPagePoint
                        });
                    }
                    usePointerEvent(visualElement, "pointerdown", hasPanEvents && onPointerDown);
                    useUnmountEffect(function() {
                        return panSession.current && panSession.current.end();
                    });
                }
                var drag = {
                    pan: makeRenderlessComponent(usePanGesture),
                    drag: makeRenderlessComponent(useDrag)
                };
                var names = ["LayoutMeasure", "BeforeLayoutMeasure", "LayoutUpdate", "ViewportBoxUpdate", "Update", "Render", "AnimationComplete", "LayoutAnimationComplete", "AnimationStart", "LayoutAnimationStart", "SetAxisTarget", "Unmount"];

                function createLifecycles() {
                    var managers = names.map(function() {
                        return new SubscriptionManager();
                    });
                    var propSubscriptions = {};
                    var lifecycles = {
                        clearAllListeners: function() {
                            return managers.forEach(function(manager) {
                                return manager.clear();
                            });
                        },
                        updatePropListeners: function(props) {
                            names.forEach(function(name) {
                                var _a;
                                var on = "on" + name;
                                var propListener = props[on];
                                // Unsubscribe existing subscription
                                (_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions);
                                // Add new subscription
                                if (propListener) {
                                    propSubscriptions[name] = lifecycles[on](propListener);
                                }
                            });
                        }
                    };
                    managers.forEach(function(manager, i) {
                        lifecycles["on" + names[i]] = function(handler) {
                            return manager.add(handler);
                        };
                        lifecycles["notify" + names[i]] = function() {
                            var args = [];
                            for (var _i = 0; _i < arguments.length; _i++) {
                                args[_i] = arguments[_i];
                            }
                            return manager.notify.apply(manager, tslib.__spreadArray([], tslib.__read(args), false));
                        };
                    });
                    return lifecycles;
                }

                function updateMotionValuesFromProps(element, next, prev) {
                    var _a;
                    for (var key in next) {
                        var nextValue = next[key];
                        var prevValue = prev[key];
                        if (isMotionValue(nextValue)) {
                            /**
                             * If this is a motion value found in props or style, we want to add it
                             * to our visual element's motion value map.
                             */
                            element.addValue(key, nextValue);
                            /**
                             * Check the version of the incoming motion value with this version
                             * and warn against mismatches.
                             */
                            if (true) {
                                warnOnce(nextValue.version === "6.5.1", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.5.1 may not work as expected."));
                            }
                        } else if (isMotionValue(prevValue)) {
                            /**
                             * If we're swapping to a new motion value, create a new motion value
                             * from that
                             */
                            element.addValue(key, motionValue(nextValue));
                        } else if (prevValue !== nextValue) {
                            /**
                             * If this is a flat value that has changed, update the motion value
                             * or create one if it doesn't exist. We only want to do this if we're
                             * not handling the value with our animation state.
                             */
                            if (element.hasValue(key)) {
                                var existingValue = element.getValue(key);
                                // TODO: Only update values that aren't being animated or even looked at
                                !existingValue.hasAnimated && existingValue.set(nextValue);
                            } else {
                                element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));
                            }
                        }
                    }
                    // Handle removed values
                    for (var key in prev) {
                        if (next[key] === undefined) element.removeValue(key);
                    }
                    return next;
                }
                var visualElement = function(_a) {
                    var _b = _a.treeType,
                        treeType = _b === void 0 ? "" : _b,
                        build = _a.build,
                        getBaseTarget = _a.getBaseTarget,
                        makeTargetAnimatable = _a.makeTargetAnimatable,
                        measureViewportBox = _a.measureViewportBox,
                        renderInstance = _a.render,
                        readValueFromInstance = _a.readValueFromInstance,
                        removeValueFromRenderState = _a.removeValueFromRenderState,
                        sortNodePosition = _a.sortNodePosition,
                        scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps;
                    return function(_a, options) {
                        var parent = _a.parent,
                            props = _a.props,
                            presenceId = _a.presenceId,
                            blockInitialAnimation = _a.blockInitialAnimation,
                            visualState = _a.visualState,
                            shouldReduceMotion = _a.shouldReduceMotion;
                        if (options === void 0) {
                            options = {};
                        }
                        var isMounted = false;
                        var latestValues = visualState.latestValues,
                            renderState = visualState.renderState;
                        /**
                         * The instance of the render-specific node that will be hydrated by the
                         * exposed React ref. So for example, this visual element can host a
                         * HTMLElement, plain object, or Three.js object. The functions provided
                         * in VisualElementConfig allow us to interface with this instance.
                         */
                        var instance;
                        /**
                         * Manages the subscriptions for a visual element's lifecycle, for instance
                         * onRender
                         */
                        var lifecycles = createLifecycles();
                        /**
                         * A map of all motion values attached to this visual element. Motion
                         * values are source of truth for any given animated value. A motion
                         * value might be provided externally by the component via props.
                         */
                        var values = new Map();
                        /**
                         * A map of every subscription that binds the provided or generated
                         * motion values onChange listeners to this visual element.
                         */
                        var valueSubscriptions = new Map();
                        /**
                         * A reference to the previously-provided motion values as returned
                         * from scrapeMotionValuesFromProps. We use the keys in here to determine
                         * if any motion values need to be removed after props are updated.
                         */
                        var prevMotionValues = {};
                        /**
                         * When values are removed from all animation props we need to search
                         * for a fallback value to animate to. These values are tracked in baseTarget.
                         */
                        var baseTarget = tslib.__assign({}, latestValues);
                        // Internal methods ========================
                        /**
                         * On mount, this will be hydrated with a callback to disconnect
                         * this visual element from its parent on unmount.
                         */
                        var removeFromVariantTree;
                        /**
                         * Render the element with the latest styles outside of the React
                         * render lifecycle
                         */
                        function render() {
                            if (!instance || !isMounted) return;
                            triggerBuild();
                            renderInstance(instance, renderState, props.style, element.projection);
                        }

                        function triggerBuild() {
                            build(element, renderState, latestValues, options, props);
                        }

                        function update() {
                            lifecycles.notifyUpdate(latestValues);
                        }
                        /**
                         *
                         */
                        function bindToMotionValue(key, value) {
                            var removeOnChange = value.onChange(function(latestValue) {
                                latestValues[key] = latestValue;
                                props.onUpdate && sync__default["default"].update(update, false, true);
                            });
                            var removeOnRenderRequest = value.onRenderRequest(element.scheduleRender);
                            valueSubscriptions.set(key, function() {
                                removeOnChange();
                                removeOnRenderRequest();
                            });
                        }
                        /**
                         * Any motion values that are provided to the element when created
                         * aren't yet bound to the element, as this would technically be impure.
                         * However, we iterate through the motion values and set them to the
                         * initial values for this component.
                         *
                         * TODO: This is impure and we should look at changing this to run on mount.
                         * Doing so will break some tests but this isn't neccessarily a breaking change,
                         * more a reflection of the test.
                         */
                        var initialMotionValues = scrapeMotionValuesFromProps(props);
                        for (var key in initialMotionValues) {
                            var value = initialMotionValues[key];
                            if (latestValues[key] !== undefined && isMotionValue(value)) {
                                value.set(latestValues[key], false);
                            }
                        }
                        /**
                         * Determine what role this visual element should take in the variant tree.
                         */
                        var isControllingVariants = checkIfControllingVariants(props);
                        var isVariantNode = checkIfVariantNode(props);
                        var element = tslib.__assign(tslib.__assign({
                            treeType: treeType,
                            /**
                             * This is a mirror of the internal instance prop, which keeps
                             * VisualElement type-compatible with React's RefObject.
                             */
                            current: null,
                            /**
                             * The depth of this visual element within the visual element tree.
                             */
                            depth: parent ? parent.depth + 1 : 0,
                            parent: parent,
                            children: new Set(),
                            /**
                             *
                             */
                            presenceId: presenceId,
                            shouldReduceMotion: shouldReduceMotion,
                            /**
                             * If this component is part of the variant tree, it should track
                             * any children that are also part of the tree. This is essentially
                             * a shadow tree to simplify logic around how to stagger over children.
                             */
                            variantChildren: isVariantNode ? new Set() : undefined,
                            /**
                             * Whether this instance is visible. This can be changed imperatively
                             * by the projection tree, is analogous to CSS's visibility in that
                             * hidden elements should take up layout, and needs enacting by the configured
                             * render function.
                             */
                            isVisible: undefined,
                            /**
                             * Normally, if a component is controlled by a parent's variants, it can
                             * rely on that ancestor to trigger animations further down the tree.
                             * However, if a component is created after its parent is mounted, the parent
                             * won't trigger that mount animation so the child needs to.
                             *
                             * TODO: This might be better replaced with a method isParentMounted
                             */
                            manuallyAnimateOnMount: Boolean(parent === null || parent === void 0 ? void 0 : parent.isMounted()),
                            /**
                             * This can be set by AnimatePresence to force components that mount
                             * at the same time as it to mount as if they have initial={false} set.
                             */
                            blockInitialAnimation: blockInitialAnimation,
                            /**
                             * Determine whether this component has mounted yet. This is mostly used
                             * by variant children to determine whether they need to trigger their
                             * own animations on mount.
                             */
                            isMounted: function() {
                                return Boolean(instance);
                            },
                            mount: function(newInstance) {
                                isMounted = true;
                                instance = element.current = newInstance;
                                if (element.projection) {
                                    element.projection.mount(newInstance);
                                }
                                if (isVariantNode && parent && !isControllingVariants) {
                                    removeFromVariantTree = parent === null || parent === void 0 ? void 0 : parent.addVariantChild(element);
                                }
                                values.forEach(function(value, key) {
                                    return bindToMotionValue(key, value);
                                });
                                parent === null || parent === void 0 ? void 0 : parent.children.add(element);
                                element.setProps(props);
                            },
                            /**
                             *
                             */
                            unmount: function() {
                                var _a;
                                (_a = element.projection) === null || _a === void 0 ? void 0 : _a.unmount();
                                sync.cancelSync.update(update);
                                sync.cancelSync.render(render);
                                valueSubscriptions.forEach(function(remove) {
                                    return remove();
                                });
                                removeFromVariantTree === null || removeFromVariantTree === void 0 ? void 0 : removeFromVariantTree();
                                parent === null || parent === void 0 ? void 0 : parent.children.delete(element);
                                lifecycles.clearAllListeners();
                                instance = undefined;
                                isMounted = false;
                            },
                            /**
                             * Add a child visual element to our set of children.
                             */
                            addVariantChild: function(child) {
                                var _a;
                                var closestVariantNode = element.getClosestVariantNode();
                                if (closestVariantNode) {
                                    (_a = closestVariantNode.variantChildren) === null || _a === void 0 ? void 0 : _a.add(child);
                                    return function() {
                                        return closestVariantNode.variantChildren.delete(child);
                                    };
                                }
                            },
                            sortNodePosition: function(other) {
                                /**
                                 * If these nodes aren't even of the same type we can't compare their depth.
                                 */
                                if (!sortNodePosition || treeType !== other.treeType) return 0;
                                return sortNodePosition(element.getInstance(), other.getInstance());
                            },
                            /**
                             * Returns the closest variant node in the tree starting from
                             * this visual element.
                             */
                            getClosestVariantNode: function() {
                                return isVariantNode ? element : parent === null || parent === void 0 ? void 0 : parent.getClosestVariantNode();
                            },
                            /**
                             * Expose the latest layoutId prop.
                             */
                            getLayoutId: function() {
                                return props.layoutId;
                            },
                            /**
                             * Returns the current instance.
                             */
                            getInstance: function() {
                                return instance;
                            },
                            /**
                             * Get/set the latest static values.
                             */
                            getStaticValue: function(key) {
                                return latestValues[key];
                            },
                            setStaticValue: function(key, value) {
                                return latestValues[key] = value;
                            },
                            /**
                             * Returns the latest motion value state. Currently only used to take
                             * a snapshot of the visual element - perhaps this can return the whole
                             * visual state
                             */
                            getLatestValues: function() {
                                return latestValues;
                            },
                            /**
                             * Set the visiblity of the visual element. If it's changed, schedule
                             * a render to reflect these changes.
                             */
                            setVisibility: function(visibility) {
                                if (element.isVisible === visibility) return;
                                element.isVisible = visibility;
                                element.scheduleRender();
                            },
                            /**
                             * Make a target animatable by Popmotion. For instance, if we're
                             * trying to animate width from 100px to 100vw we need to measure 100vw
                             * in pixels to determine what we really need to animate to. This is also
                             * pluggable to support Framer's custom value types like Color,
                             * and CSS variables.
                             */
                            makeTargetAnimatable: function(target, canMutate) {
                                if (canMutate === void 0) {
                                    canMutate = true;
                                }
                                return makeTargetAnimatable(element, target, props, canMutate);
                            },
                            /**
                             * Measure the current viewport box with or without transforms.
                             * Only measures axis-aligned boxes, rotate and skew must be manually
                             * removed with a re-render to work.
                             */
                            measureViewportBox: function() {
                                return measureViewportBox(instance, props);
                            },
                            // Motion values ========================
                            /**
                             * Add a motion value and bind it to this visual element.
                             */
                            addValue: function(key, value) {
                                // Remove existing value if it exists
                                if (element.hasValue(key)) element.removeValue(key);
                                values.set(key, value);
                                latestValues[key] = value.get();
                                bindToMotionValue(key, value);
                            },
                            /**
                             * Remove a motion value and unbind any active subscriptions.
                             */
                            removeValue: function(key) {
                                var _a;
                                values.delete(key);
                                (_a = valueSubscriptions.get(key)) === null || _a === void 0 ? void 0 : _a();
                                valueSubscriptions.delete(key);
                                delete latestValues[key];
                                removeValueFromRenderState(key, renderState);
                            },
                            /**
                             * Check whether we have a motion value for this key
                             */
                            hasValue: function(key) {
                                return values.has(key);
                            },
                            /**
                             * Get a motion value for this key. If called with a default
                             * value, we'll create one if none exists.
                             */
                            getValue: function(key, defaultValue) {
                                var value = values.get(key);
                                if (value === undefined && defaultValue !== undefined) {
                                    value = motionValue(defaultValue);
                                    element.addValue(key, value);
                                }
                                return value;
                            },
                            /**
                             * Iterate over our motion values.
                             */
                            forEachValue: function(callback) {
                                return values.forEach(callback);
                            },
                            /**
                             * If we're trying to animate to a previously unencountered value,
                             * we need to check for it in our state and as a last resort read it
                             * directly from the instance (which might have performance implications).
                             */
                            readValue: function(key) {
                                var _a;
                                return (_a = latestValues[key]) !== null && _a !== void 0 ? _a : readValueFromInstance(instance, key, options);
                            },
                            /**
                             * Set the base target to later animate back to. This is currently
                             * only hydrated on creation and when we first read a value.
                             */
                            setBaseTarget: function(key, value) {
                                baseTarget[key] = value;
                            },
                            /**
                             * Find the base target for a value thats been removed from all animation
                             * props.
                             */
                            getBaseTarget: function(key) {
                                if (getBaseTarget) {
                                    var target = getBaseTarget(props, key);
                                    if (target !== undefined && !isMotionValue(target)) return target;
                                }
                                return baseTarget[key];
                            }
                        }, lifecycles), {
                            /**
                             * Build the renderer state based on the latest visual state.
                             */
                            build: function() {
                                triggerBuild();
                                return renderState;
                            },
                            /**
                             * Schedule a render on the next animation frame.
                             */
                            scheduleRender: function() {
                                sync__default["default"].render(render, false, true);
                            },
                            /**
                             * Synchronously fire render. It's prefered that we batch renders but
                             * in many circumstances, like layout measurement, we need to run this
                             * synchronously. However in those instances other measures should be taken
                             * to batch reads/writes.
                             */
                            syncRender: render,
                            /**
                             * Update the provided props. Ensure any newly-added motion values are
                             * added to our map, old ones removed, and listeners updated.
                             */
                            setProps: function(newProps) {
                                if (newProps.transformTemplate || props.transformTemplate) {
                                    element.scheduleRender();
                                }
                                props = newProps;
                                lifecycles.updatePropListeners(newProps);
                                prevMotionValues = updateMotionValuesFromProps(element, scrapeMotionValuesFromProps(props), prevMotionValues);
                            },
                            getProps: function() {
                                return props;
                            },
                            // Variants ==============================
                            /**
                             * Returns the variant definition with a given name.
                             */
                            getVariant: function(name) {
                                var _a;
                                return (_a = props.variants) === null || _a === void 0 ? void 0 : _a[name];
                            },
                            /**
                             * Returns the defined default transition on this component.
                             */
                            getDefaultTransition: function() {
                                return props.transition;
                            },
                            getTransformPagePoint: function() {
                                return props.transformPagePoint;
                            },
                            /**
                             * Used by child variant nodes to get the closest ancestor variant props.
                             */
                            getVariantContext: function(startAtParent) {
                                if (startAtParent === void 0) {
                                    startAtParent = false;
                                }
                                if (startAtParent) return parent === null || parent === void 0 ? void 0 : parent.getVariantContext();
                                if (!isControllingVariants) {
                                    var context_1 = (parent === null || parent === void 0 ? void 0 : parent.getVariantContext()) || {};
                                    if (props.initial !== undefined) {
                                        context_1.initial = props.initial;
                                    }
                                    return context_1;
                                }
                                var context = {};
                                for (var i = 0; i < numVariantProps; i++) {
                                    var name_1 = variantProps[i];
                                    var prop = props[name_1];
                                    if (isVariantLabel(prop) || prop === false) {
                                        context[name_1] = prop;
                                    }
                                }
                                return context;
                            }
                        });
                        return element;
                    };
                };
                var variantProps = tslib.__spreadArray(["initial"], tslib.__read(variantPriorityOrder), false);
                var numVariantProps = variantProps.length;

                function isCSSVariable(value) {
                    return typeof value === "string" && value.startsWith("var(--");
                }
                /**
                 * Parse Framer's special CSS variable format into a CSS token and a fallback.
                 *
                 * ```
                 * `var(--foo, #fff)` => [`--foo`, '#fff']
                 * ```
                 *
                 * @param current
                 */
                var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;

                function parseCSSVariable(current) {
                    var match = cssVariableRegex.exec(current);
                    if (!match) return [, ];
                    var _a = tslib.__read(match, 3),
                        token = _a[1],
                        fallback = _a[2];
                    return [token, fallback];
                }
                var maxDepth = 4;

                function getVariableValue(current, element, depth) {
                    if (depth === void 0) {
                        depth = 1;
                    }
                    heyListen.invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"".concat(current, "\". This may indicate a circular fallback dependency."));
                    var _a = tslib.__read(parseCSSVariable(current), 2),
                        token = _a[0],
                        fallback = _a[1];
                    // No CSS variable detected
                    if (!token) return;
                    // Attempt to read this CSS variable off the element
                    var resolved = window.getComputedStyle(element).getPropertyValue(token);
                    if (resolved) {
                        return resolved.trim();
                    } else if (isCSSVariable(fallback)) {
                        // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.
                        return getVariableValue(fallback, element, depth + 1);
                    } else {
                        return fallback;
                    }
                }
                /**
                 * Resolve CSS variables from
                 *
                 * @internal
                 */
                function resolveCSSVariables(visualElement, _a, transitionEnd) {
                    var _b;
                    var target = tslib.__rest(_a, []);
                    var element = visualElement.getInstance();
                    if (!(element instanceof Element)) return {
                        target: target,
                        transitionEnd: transitionEnd
                    };
                    // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
                    // only if they change but I think this reads clearer and this isn't a performance-critical path.
                    if (transitionEnd) {
                        transitionEnd = tslib.__assign({}, transitionEnd);
                    }
                    // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
                    visualElement.forEachValue(function(value) {
                        var current = value.get();
                        if (!isCSSVariable(current)) return;
                        var resolved = getVariableValue(current, element);
                        if (resolved) value.set(resolved);
                    });
                    // Cycle through every target property and resolve CSS variables. Currently
                    // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`
                    for (var key in target) {
                        var current = target[key];
                        if (!isCSSVariable(current)) continue;
                        var resolved = getVariableValue(current, element);
                        if (!resolved) continue;
                        // Clone target if it hasn't already been
                        target[key] = resolved;
                        // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved
                        // CSS variable. This will ensure that after the animation the component will reflect
                        // changes in the value of the CSS variable.
                        if (transitionEnd)(_b = transitionEnd[key]) !== null && _b !== void 0 ? _b : transitionEnd[key] = current;
                    }
                    return {
                        target: target,
                        transitionEnd: transitionEnd
                    };
                }
                var positionalKeys = new Set(["width", "height", "top", "left", "right", "bottom", "x", "y"]);
                var isPositionalKey = function(key) {
                    return positionalKeys.has(key);
                };
                var hasPositionalKey = function(target) {
                    return Object.keys(target).some(isPositionalKey);
                };
                var setAndResetVelocity = function(value, to) {
                    // Looks odd but setting it twice doesn't render, it'll just
                    // set both prev and current to the latest value
                    value.set(to, false);
                    value.set(to);
                };
                var isNumOrPxType = function(v) {
                    return v === styleValueTypes.number || v === styleValueTypes.px;
                };
                var BoundingBoxDimension;
                (function(BoundingBoxDimension) {
                    BoundingBoxDimension["width"] = "width";
                    BoundingBoxDimension["height"] = "height";
                    BoundingBoxDimension["left"] = "left";
                    BoundingBoxDimension["right"] = "right";
                    BoundingBoxDimension["top"] = "top";
                    BoundingBoxDimension["bottom"] = "bottom";
                })(BoundingBoxDimension || (BoundingBoxDimension = {}));
                var getPosFromMatrix = function(matrix, pos) {
                    return parseFloat(matrix.split(", ")[pos]);
                };
                var getTranslateFromMatrix = function(pos2, pos3) {
                    return function(_bbox, _a) {
                        var transform = _a.transform;
                        if (transform === "none" || !transform) return 0;
                        var matrix3d = transform.match(/^matrix3d\((.+)\)$/);
                        if (matrix3d) {
                            return getPosFromMatrix(matrix3d[1], pos3);
                        } else {
                            var matrix = transform.match(/^matrix\((.+)\)$/);
                            if (matrix) {
                                return getPosFromMatrix(matrix[1], pos2);
                            } else {
                                return 0;
                            }
                        }
                    };
                };
                var transformKeys = new Set(["x", "y", "z"]);
                var nonTranslationalTransformKeys = transformProps.filter(function(key) {
                    return !transformKeys.has(key);
                });

                function removeNonTranslationalTransform(visualElement) {
                    var removedTransforms = [];
                    nonTranslationalTransformKeys.forEach(function(key) {
                        var value = visualElement.getValue(key);
                        if (value !== undefined) {
                            removedTransforms.push([key, value.get()]);
                            value.set(key.startsWith("scale") ? 1 : 0);
                        }
                    });
                    // Apply changes to element before measurement
                    if (removedTransforms.length) visualElement.syncRender();
                    return removedTransforms;
                }
                var positionalValues = {
                    // Dimensions
                    width: function(_a, _b) {
                        var x = _a.x;
                        var _c = _b.paddingLeft,
                            paddingLeft = _c === void 0 ? "0" : _c,
                            _d = _b.paddingRight,
                            paddingRight = _d === void 0 ? "0" : _d;
                        return x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight);
                    },
                    height: function(_a, _b) {
                        var y = _a.y;
                        var _c = _b.paddingTop,
                            paddingTop = _c === void 0 ? "0" : _c,
                            _d = _b.paddingBottom,
                            paddingBottom = _d === void 0 ? "0" : _d;
                        return y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom);
                    },
                    top: function(_bbox, _a) {
                        var top = _a.top;
                        return parseFloat(top);
                    },
                    left: function(_bbox, _a) {
                        var left = _a.left;
                        return parseFloat(left);
                    },
                    bottom: function(_a, _b) {
                        var y = _a.y;
                        var top = _b.top;
                        return parseFloat(top) + (y.max - y.min);
                    },
                    right: function(_a, _b) {
                        var x = _a.x;
                        var left = _b.left;
                        return parseFloat(left) + (x.max - x.min);
                    },
                    // Transform
                    x: getTranslateFromMatrix(4, 13),
                    y: getTranslateFromMatrix(5, 14)
                };
                var convertChangedValueTypes = function(target, visualElement, changedKeys) {
                    var originBbox = visualElement.measureViewportBox();
                    var element = visualElement.getInstance();
                    var elementComputedStyle = getComputedStyle(element);
                    var display = elementComputedStyle.display;
                    var origin = {};
                    // If the element is currently set to display: "none", make it visible before
                    // measuring the target bounding box
                    if (display === "none") {
                        visualElement.setStaticValue("display", target.display || "block");
                    }
                    /**
                     * Record origins before we render and update styles
                     */
                    changedKeys.forEach(function(key) {
                        origin[key] = positionalValues[key](originBbox, elementComputedStyle);
                    });
                    // Apply the latest values (as set in checkAndConvertChangedValueTypes)
                    visualElement.syncRender();
                    var targetBbox = visualElement.measureViewportBox();
                    changedKeys.forEach(function(key) {
                        // Restore styles to their **calculated computed style**, not their actual
                        // originally set style. This allows us to animate between equivalent pixel units.
                        var value = visualElement.getValue(key);
                        setAndResetVelocity(value, origin[key]);
                        target[key] = positionalValues[key](targetBbox, elementComputedStyle);
                    });
                    return target;
                };
                var checkAndConvertChangedValueTypes = function(visualElement, target, origin, transitionEnd) {
                    if (origin === void 0) {
                        origin = {};
                    }
                    if (transitionEnd === void 0) {
                        transitionEnd = {};
                    }
                    target = tslib.__assign({}, target);
                    transitionEnd = tslib.__assign({}, transitionEnd);
                    var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);
                    // We want to remove any transform values that could affect the element's bounding box before
                    // it's measured. We'll reapply these later.
                    var removedTransformValues = [];
                    var hasAttemptedToRemoveTransformValues = false;
                    var changedValueTypeKeys = [];
                    targetPositionalKeys.forEach(function(key) {
                        var value = visualElement.getValue(key);
                        if (!visualElement.hasValue(key)) return;
                        var from = origin[key];
                        var fromType = findDimensionValueType(from);
                        var to = target[key];
                        var toType;
                        // TODO: The current implementation of this basically throws an error
                        // if you try and do value conversion via keyframes. There's probably
                        // a way of doing this but the performance implications would need greater scrutiny,
                        // as it'd be doing multiple resize-remeasure operations.
                        if (isKeyframesTarget(to)) {
                            var numKeyframes = to.length;
                            var fromIndex = to[0] === null ? 1 : 0;
                            from = to[fromIndex];
                            fromType = findDimensionValueType(from);
                            for (var i = fromIndex; i < numKeyframes; i++) {
                                if (!toType) {
                                    toType = findDimensionValueType(to[i]);
                                    heyListen.invariant(toType === fromType || isNumOrPxType(fromType) && isNumOrPxType(toType), "Keyframes must be of the same dimension as the current value");
                                } else {
                                    heyListen.invariant(findDimensionValueType(to[i]) === toType, "All keyframes must be of the same type");
                                }
                            }
                        } else {
                            toType = findDimensionValueType(to);
                        }
                        if (fromType !== toType) {
                            // If they're both just number or px, convert them both to numbers rather than
                            // relying on resize/remeasure to convert (which is wasteful in this situation)
                            if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {
                                var current = value.get();
                                if (typeof current === "string") {
                                    value.set(parseFloat(current));
                                }
                                if (typeof to === "string") {
                                    target[key] = parseFloat(to);
                                } else if (Array.isArray(to) && toType === styleValueTypes.px) {
                                    target[key] = to.map(parseFloat);
                                }
                            } else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) && (toType === null || toType === void 0 ? void 0 : toType.transform) && (from === 0 || to === 0)) {
                                // If one or the other value is 0, it's safe to coerce it to the
                                // type of the other without measurement
                                if (from === 0) {
                                    value.set(toType.transform(from));
                                } else {
                                    target[key] = fromType.transform(to);
                                }
                            } else {
                                // If we're going to do value conversion via DOM measurements, we first
                                // need to remove non-positional transform values that could affect the bbox measurements.
                                if (!hasAttemptedToRemoveTransformValues) {
                                    removedTransformValues = removeNonTranslationalTransform(visualElement);
                                    hasAttemptedToRemoveTransformValues = true;
                                }
                                changedValueTypeKeys.push(key);
                                transitionEnd[key] = transitionEnd[key] !== undefined ? transitionEnd[key] : target[key];
                                setAndResetVelocity(value, to);
                            }
                        }
                    });
                    if (changedValueTypeKeys.length) {
                        var scrollY_1 = changedValueTypeKeys.indexOf("height") >= 0 ? window.pageYOffset : null;
                        var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);
                        // If we removed transform values, reapply them before the next render
                        if (removedTransformValues.length) {
                            removedTransformValues.forEach(function(_a) {
                                var _b = tslib.__read(_a, 2),
                                    key = _b[0],
                                    value = _b[1];
                                visualElement.getValue(key).set(value);
                            });
                        }
                        // Reapply original values
                        visualElement.syncRender();
                        // Restore scroll position
                        if (scrollY_1 !== null) window.scrollTo({
                            top: scrollY_1
                        });
                        return {
                            target: convertedTarget,
                            transitionEnd: transitionEnd
                        };
                    } else {
                        return {
                            target: target,
                            transitionEnd: transitionEnd
                        };
                    }
                };
                /**
                 * Convert value types for x/y/width/height/top/left/bottom/right
                 *
                 * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`
                 *
                 * @internal
                 */
                function unitConversion(visualElement, target, origin, transitionEnd) {
                    return hasPositionalKey(target) ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd) : {
                        target: target,
                        transitionEnd: transitionEnd
                    };
                }

                /**
                 * Parse a DOM variant to make it animatable. This involves resolving CSS variables
                 * and ensuring animations like "20%" => "calc(50vw)" are performed in pixels.
                 */
                var parseDomVariant = function(visualElement, target, origin, transitionEnd) {
                    var resolved = resolveCSSVariables(visualElement, target, transitionEnd);
                    target = resolved.target;
                    transitionEnd = resolved.transitionEnd;
                    return unitConversion(visualElement, target, origin, transitionEnd);
                };

                function getComputedStyle$1(element) {
                    return window.getComputedStyle(element);
                }
                var htmlConfig = {
                    treeType: "dom",
                    readValueFromInstance: function(domElement, key) {
                        if (isTransformProp(key)) {
                            var defaultType = getDefaultValueType(key);
                            return defaultType ? defaultType.default || 0 : 0;
                        } else {
                            var computedStyle = getComputedStyle$1(domElement);
                            return (isCSSVariable$1(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;
                        }
                    },
                    sortNodePosition: function(a, b) {
                        /**
                         * compareDocumentPosition returns a bitmask, by using the bitwise &
                         * we're returning true if 2 in that bitmask is set to true. 2 is set
                         * to true if b preceeds a.
                         */
                        return a.compareDocumentPosition(b) & 2 ? 1 : -1;
                    },
                    getBaseTarget: function(props, key) {
                        var _a;
                        return (_a = props.style) === null || _a === void 0 ? void 0 : _a[key];
                    },
                    measureViewportBox: function(element, _a) {
                        var transformPagePoint = _a.transformPagePoint;
                        return measureViewportBox(element, transformPagePoint);
                    },
                    /**
                     * Reset the transform on the current Element. This is called as part
                     * of a batched process across the entire layout tree. To remove this write
                     * cycle it'd be interesting to see if it's possible to "undo" all the current
                     * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms
                     * works
                     */
                    resetTransform: function(element, domElement, props) {
                        var transformTemplate = props.transformTemplate;
                        domElement.style.transform = transformTemplate ? transformTemplate({}, "") : "none";
                        // Ensure that whatever happens next, we restore our transform on the next frame
                        element.scheduleRender();
                    },
                    restoreTransform: function(instance, mutableState) {
                        instance.style.transform = mutableState.style.transform;
                    },
                    removeValueFromRenderState: function(key, _a) {
                        var vars = _a.vars,
                            style = _a.style;
                        delete vars[key];
                        delete style[key];
                    },
                    /**
                     * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`
                     * can be animated by Motion.
                     */
                    makeTargetAnimatable: function(element, _a, _b, isMounted) {
                        var transformValues = _b.transformValues;
                        if (isMounted === void 0) {
                            isMounted = true;
                        }
                        var transition = _a.transition,
                            transitionEnd = _a.transitionEnd,
                            target = tslib.__rest(_a, ["transition", "transitionEnd"]);
                        var origin = getOrigin(target, transition || {}, element);
                        /**
                         * If Framer has provided a function to convert `Color` etc value types, convert them
                         */
                        if (transformValues) {
                            if (transitionEnd) transitionEnd = transformValues(transitionEnd);
                            if (target) target = transformValues(target);
                            if (origin) origin = transformValues(origin);
                        }
                        if (isMounted) {
                            checkTargetForNewValues(element, target, origin);
                            var parsed = parseDomVariant(element, target, origin, transitionEnd);
                            transitionEnd = parsed.transitionEnd;
                            target = parsed.target;
                        }
                        return tslib.__assign({
                            transition: transition,
                            transitionEnd: transitionEnd
                        }, target);
                    },
                    scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
                    build: function(element, renderState, latestValues, options, props) {
                        if (element.isVisible !== undefined) {
                            renderState.style.visibility = element.isVisible ? "visible" : "hidden";
                        }
                        buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);
                    },
                    render: renderHTML
                };
                var htmlVisualElement = visualElement(htmlConfig);
                var svgVisualElement = visualElement(tslib.__assign(tslib.__assign({}, htmlConfig), {
                    getBaseTarget: function(props, key) {
                        return props[key];
                    },
                    readValueFromInstance: function(domElement, key) {
                        var _a;
                        if (isTransformProp(key)) {
                            return ((_a = getDefaultValueType(key)) === null || _a === void 0 ? void 0 : _a.default) || 0;
                        }
                        key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;
                        return domElement.getAttribute(key);
                    },
                    scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,
                    build: function(_element, renderState, latestValues, options, props) {
                        buildSVGAttrs(renderState, latestValues, options, props.transformTemplate);
                    },
                    render: renderSVG
                }));
                var createDomVisualElement = function(Component, options) {
                    return isSVGComponent(Component) ? svgVisualElement(options, {
                        enableHardwareAcceleration: false
                    }) : htmlVisualElement(options, {
                        enableHardwareAcceleration: true
                    });
                };

                function pixelsToPercent(pixels, axis) {
                    if (axis.max === axis.min) return 0;
                    return pixels / (axis.max - axis.min) * 100;
                }
                /**
                 * We always correct borderRadius as a percentage rather than pixels to reduce paints.
                 * For example, if you are projecting a box that is 100px wide with a 10px borderRadius
                 * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%
                 * borderRadius in both states. If we animate between the two in pixels that will trigger
                 * a paint each time. If we animate between the two in percentage we'll avoid a paint.
                 */
                var correctBorderRadius = {
                    correct: function(latest, node) {
                        if (!node.target) return latest;
                        /**
                         * If latest is a string, if it's a percentage we can return immediately as it's
                         * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.
                         */
                        if (typeof latest === "string") {
                            if (styleValueTypes.px.test(latest)) {
                                latest = parseFloat(latest);
                            } else {
                                return latest;
                            }
                        }
                        /**
                         * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that
                         * pixel value as a percentage of each axis
                         */
                        var x = pixelsToPercent(latest, node.target.x);
                        var y = pixelsToPercent(latest, node.target.y);
                        return "".concat(x, "% ").concat(y, "%");
                    }
                };
                var varToken = "_$css";
                var correctBoxShadow = {
                    correct: function(latest, _a) {
                        var treeScale = _a.treeScale,
                            projectionDelta = _a.projectionDelta;
                        var original = latest;
                        /**
                         * We need to first strip and store CSS variables from the string.
                         */
                        var containsCSSVariables = latest.includes("var(");
                        var cssVariables = [];
                        if (containsCSSVariables) {
                            latest = latest.replace(cssVariableRegex, function(match) {
                                cssVariables.push(match);
                                return varToken;
                            });
                        }
                        var shadow = styleValueTypes.complex.parse(latest);
                        // TODO: Doesn't support multiple shadows
                        if (shadow.length > 5) return original;
                        var template = styleValueTypes.complex.createTransformer(latest);
                        var offset = typeof shadow[0] !== "number" ? 1 : 0;
                        // Calculate the overall context scale
                        var xScale = projectionDelta.x.scale * treeScale.x;
                        var yScale = projectionDelta.y.scale * treeScale.y;
                        shadow[0 + offset] /= xScale;
                        shadow[1 + offset] /= yScale;
                        /**
                         * Ideally we'd correct x and y scales individually, but because blur and
                         * spread apply to both we have to take a scale average and apply that instead.
                         * We could potentially improve the outcome of this by incorporating the ratio between
                         * the two scales.
                         */
                        var averageScale = popmotion.mix(xScale, yScale, 0.5);
                        // Blur
                        if (typeof shadow[2 + offset] === "number") shadow[2 + offset] /= averageScale;
                        // Spread
                        if (typeof shadow[3 + offset] === "number") shadow[3 + offset] /= averageScale;
                        var output = template(shadow);
                        if (containsCSSVariables) {
                            var i_1 = 0;
                            output = output.replace(varToken, function() {
                                var cssVariable = cssVariables[i_1];
                                i_1++;
                                return cssVariable;
                            });
                        }
                        return output;
                    }
                };
                var MeasureLayoutWithContext = /** @class */ function(_super) {
                    tslib.__extends(MeasureLayoutWithContext, _super);

                    function MeasureLayoutWithContext() {
                        return _super !== null && _super.apply(this, arguments) || this;
                    }
                    /**
                     * This only mounts projection nodes for components that
                     * need measuring, we might want to do it for all components
                     * in order to incorporate transforms
                     */
                    MeasureLayoutWithContext.prototype.componentDidMount = function() {
                        var _this = this;
                        var _a = this.props,
                            visualElement = _a.visualElement,
                            layoutGroup = _a.layoutGroup,
                            switchLayoutGroup = _a.switchLayoutGroup,
                            layoutId = _a.layoutId;
                        var projection = visualElement.projection;
                        addScaleCorrector(defaultScaleCorrectors);
                        if (projection) {
                            if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group) layoutGroup.group.add(projection);
                            if ((switchLayoutGroup === null || switchLayoutGroup === void 0 ? void 0 : switchLayoutGroup.register) && layoutId) {
                                switchLayoutGroup.register(projection);
                            }
                            projection.root.didUpdate();
                            projection.addEventListener("animationComplete", function() {
                                _this.safeToRemove();
                            });
                            projection.setOptions(tslib.__assign(tslib.__assign({}, projection.options), {
                                onExitComplete: function() {
                                    return _this.safeToRemove();
                                }
                            }));
                        }
                        globalProjectionState.hasEverUpdated = true;
                    };
                    MeasureLayoutWithContext.prototype.getSnapshotBeforeUpdate = function(prevProps) {
                        var _this = this;
                        var _a = this.props,
                            layoutDependency = _a.layoutDependency,
                            visualElement = _a.visualElement,
                            drag = _a.drag,
                            isPresent = _a.isPresent;
                        var projection = visualElement.projection;
                        if (!projection) return null;
                        /**
                         * TODO: We use this data in relegate to determine whether to
                         * promote a previous element. There's no guarantee its presence data
                         * will have updated by this point - if a bug like this arises it will
                         * have to be that we markForRelegation and then find a new lead some other way,
                         * perhaps in didUpdate
                         */
                        projection.isPresent = isPresent;
                        if (drag || prevProps.layoutDependency !== layoutDependency || layoutDependency === undefined) {
                            projection.willUpdate();
                        } else {
                            this.safeToRemove();
                        }
                        if (prevProps.isPresent !== isPresent) {
                            if (isPresent) {
                                projection.promote();
                            } else if (!projection.relegate()) {
                                /**
                                 * If there's another stack member taking over from this one,
                                 * it's in charge of the exit animation and therefore should
                                 * be in charge of the safe to remove. Otherwise we call it here.
                                 */
                                sync__default["default"].postRender(function() {
                                    var _a;
                                    if (!((_a = projection.getStack()) === null || _a === void 0 ? void 0 : _a.members.length)) {
                                        _this.safeToRemove();
                                    }
                                });
                            }
                        }
                        return null;
                    };
                    MeasureLayoutWithContext.prototype.componentDidUpdate = function() {
                        var projection = this.props.visualElement.projection;
                        if (projection) {
                            projection.root.didUpdate();
                            if (!projection.currentAnimation && projection.isLead()) {
                                this.safeToRemove();
                            }
                        }
                    };
                    MeasureLayoutWithContext.prototype.componentWillUnmount = function() {
                        var _a = this.props,
                            visualElement = _a.visualElement,
                            layoutGroup = _a.layoutGroup,
                            promoteContext = _a.switchLayoutGroup;
                        var projection = visualElement.projection;
                        if (projection) {
                            projection.scheduleCheckAfterUnmount();
                            if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group) layoutGroup.group.remove(projection);
                            if (promoteContext === null || promoteContext === void 0 ? void 0 : promoteContext.deregister) promoteContext.deregister(projection);
                        }
                    };
                    MeasureLayoutWithContext.prototype.safeToRemove = function() {
                        var safeToRemove = this.props.safeToRemove;
                        safeToRemove === null || safeToRemove === void 0 ? void 0 : safeToRemove();
                    };
                    MeasureLayoutWithContext.prototype.render = function() {
                        return null;
                    };
                    return MeasureLayoutWithContext;
                }(React__default["default"].Component);

                function MeasureLayout(props) {
                    var _a = tslib.__read(usePresence(), 2),
                        isPresent = _a[0],
                        safeToRemove = _a[1];
                    var layoutGroup = React.useContext(LayoutGroupContext);
                    return React__default["default"].createElement(MeasureLayoutWithContext, tslib.__assign({}, props, {
                        layoutGroup: layoutGroup,
                        switchLayoutGroup: React.useContext(SwitchLayoutGroupContext),
                        isPresent: isPresent,
                        safeToRemove: safeToRemove
                    }));
                }
                var defaultScaleCorrectors = {
                    borderRadius: tslib.__assign(tslib.__assign({}, correctBorderRadius), {
                        applyTo: ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius"]
                    }),
                    borderTopLeftRadius: correctBorderRadius,
                    borderTopRightRadius: correctBorderRadius,
                    borderBottomLeftRadius: correctBorderRadius,
                    borderBottomRightRadius: correctBorderRadius,
                    boxShadow: correctBoxShadow
                };
                var layoutFeatures = {
                    measureLayout: MeasureLayout
                };

                /**
                 * Animate a single value or a `MotionValue`.
                 *
                 * The first argument is either a `MotionValue` to animate, or an initial animation value.
                 *
                 * The second is either a value to animate to, or an array of keyframes to animate through.
                 *
                 * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.
                 *
                 * Returns `AnimationPlaybackControls`, currently just a `stop` method.
                 *
                 * ```javascript
                 * const x = useMotionValue(0)
                 *
                 * useEffect(() => {
                 *   const controls = animate(x, 100, {
                 *     type: "spring",
                 *     stiffness: 2000,
                 *     onComplete: v => {}
                 *   })
                 *
                 *   return controls.stop
                 * })
                 * ```
                 *
                 * @public
                 */
                function animate(from, to, transition) {
                    if (transition === void 0) {
                        transition = {};
                    }
                    var value = isMotionValue(from) ? from : motionValue(from);
                    startAnimation("", value, to, transition);
                    return {
                        stop: function() {
                            return value.stop();
                        },
                        isAnimating: function() {
                            return value.isAnimating();
                        }
                    };
                }
                var borders = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"];
                var numBorders = borders.length;
                var asNumber = function(value) {
                    return typeof value === "string" ? parseFloat(value) : value;
                };
                var isPx = function(value) {
                    return typeof value === "number" || styleValueTypes.px.test(value);
                };

                function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
                    var _a, _b, _c, _d;
                    if (shouldCrossfadeOpacity) {
                        target.opacity = popmotion.mix(0,
                            // (follow?.opacity as number) ?? 0,
                            // TODO Reinstate this if only child
                            (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress));
                        target.opacityExit = popmotion.mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress));
                    } else if (isOnlyMember) {
                        target.opacity = popmotion.mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress);
                    }
                    /**
                     * Mix border radius
                     */
                    for (var i = 0; i < numBorders; i++) {
                        var borderLabel = "border".concat(borders[i], "Radius");
                        var followRadius = getRadius(follow, borderLabel);
                        var leadRadius = getRadius(lead, borderLabel);
                        if (followRadius === undefined && leadRadius === undefined) continue;
                        followRadius || (followRadius = 0);
                        leadRadius || (leadRadius = 0);
                        var canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius);
                        if (canMix) {
                            target[borderLabel] = Math.max(popmotion.mix(asNumber(followRadius), asNumber(leadRadius), progress), 0);
                            if (styleValueTypes.percent.test(leadRadius) || styleValueTypes.percent.test(followRadius)) {
                                target[borderLabel] += "%";
                            }
                        } else {
                            target[borderLabel] = leadRadius;
                        }
                    }
                    /**
                     * Mix rotation
                     */
                    if (follow.rotate || lead.rotate) {
                        target.rotate = popmotion.mix(follow.rotate || 0, lead.rotate || 0, progress);
                    }
                }

                function getRadius(values, radiusName) {
                    var _a;
                    return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;
                }
                // /**
                //  * We only want to mix the background color if there's a follow element
                //  * that we're not crossfading opacity between. For instance with switch
                //  * AnimateSharedLayout animations, this helps the illusion of a continuous
                //  * element being animated but also cuts down on the number of paints triggered
                //  * for elements where opacity is doing that work for us.
                //  */
                // if (
                //     !hasFollowElement &&
                //     latestLeadValues.backgroundColor &&
                //     latestFollowValues.backgroundColor
                // ) {
                //     /**
                //      * This isn't ideal performance-wise as mixColor is creating a new function every frame.
                //      * We could probably create a mixer that runs at the start of the animation but
                //      * the idea behind the crossfader is that it runs dynamically between two potentially
                //      * changing targets (ie opacity or borderRadius may be animating independently via variants)
                //      */
                //     leadState.backgroundColor = followState.backgroundColor = mixColor(
                //         latestFollowValues.backgroundColor as string,
                //         latestLeadValues.backgroundColor as string
                //     )(p)
                // }
                var easeCrossfadeIn = compress(0, 0.5, popmotion.circOut);
                var easeCrossfadeOut = compress(0.5, 0.95, popmotion.linear);

                function compress(min, max, easing) {
                    return function(p) {
                        // Could replace ifs with clamp
                        if (p < min) return 0;
                        if (p > max) return 1;
                        return easing(popmotion.progress(min, max, p));
                    };
                }

                /**
                 * Reset an axis to the provided origin box.
                 *
                 * This is a mutative operation.
                 */
                function copyAxisInto(axis, originAxis) {
                    axis.min = originAxis.min;
                    axis.max = originAxis.max;
                }
                /**
                 * Reset a box to the provided origin box.
                 *
                 * This is a mutative operation.
                 */
                function copyBoxInto(box, originBox) {
                    copyAxisInto(box.x, originBox.x);
                    copyAxisInto(box.y, originBox.y);
                }

                /**
                 * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse
                 */
                function removePointDelta(point, translate, scale, originPoint, boxScale) {
                    point -= translate;
                    point = scalePoint(point, 1 / scale, originPoint);
                    if (boxScale !== undefined) {
                        point = scalePoint(point, 1 / boxScale, originPoint);
                    }
                    return point;
                }
                /**
                 * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse
                 */
                function removeAxisDelta(axis, translate, scale, origin, boxScale, originAxis, sourceAxis) {
                    if (translate === void 0) {
                        translate = 0;
                    }
                    if (scale === void 0) {
                        scale = 1;
                    }
                    if (origin === void 0) {
                        origin = 0.5;
                    }
                    if (originAxis === void 0) {
                        originAxis = axis;
                    }
                    if (sourceAxis === void 0) {
                        sourceAxis = axis;
                    }
                    if (styleValueTypes.percent.test(translate)) {
                        translate = parseFloat(translate);
                        var relativeProgress = popmotion.mix(sourceAxis.min, sourceAxis.max, translate / 100);
                        translate = relativeProgress - sourceAxis.min;
                    }
                    if (typeof translate !== "number") return;
                    var originPoint = popmotion.mix(originAxis.min, originAxis.max, origin);
                    if (axis === originAxis) originPoint -= translate;
                    axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);
                    axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);
                }
                /**
                 * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse
                 * and acts as a bridge between motion values and removeAxisDelta
                 */
                function removeAxisTransforms(axis, transforms, _a, origin, sourceAxis) {
                    var _b = tslib.__read(_a, 3),
                        key = _b[0],
                        scaleKey = _b[1],
                        originKey = _b[2];
                    removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);
                }
                /**
                 * The names of the motion values we want to apply as translation, scale and origin.
                 */
                var xKeys = ["x", "scaleX", "originX"];
                var yKeys = ["y", "scaleY", "originY"];
                /**
                 * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse
                 * and acts as a bridge between motion values and removeAxisDelta
                 */
                function removeBoxTransforms(box, transforms, originBox, sourceBox) {
                    removeAxisTransforms(box.x, transforms, xKeys, originBox === null || originBox === void 0 ? void 0 : originBox.x, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.x);
                    removeAxisTransforms(box.y, transforms, yKeys, originBox === null || originBox === void 0 ? void 0 : originBox.y, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.y);
                }

                function isAxisDeltaZero(delta) {
                    return delta.translate === 0 && delta.scale === 1;
                }

                function isDeltaZero(delta) {
                    return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);
                }

                function boxEquals(a, b) {
                    return a.x.min === b.x.min && a.x.max === b.x.max && a.y.min === b.y.min && a.y.max === b.y.max;
                }
                var NodeStack = /** @class */ function() {
                    function NodeStack() {
                        this.members = [];
                    }
                    NodeStack.prototype.add = function(node) {
                        addUniqueItem(this.members, node);
                        node.scheduleRender();
                    };
                    NodeStack.prototype.remove = function(node) {
                        removeItem(this.members, node);
                        if (node === this.prevLead) {
                            this.prevLead = undefined;
                        }
                        if (node === this.lead) {
                            var prevLead = this.members[this.members.length - 1];
                            if (prevLead) {
                                this.promote(prevLead);
                            }
                        }
                    };
                    NodeStack.prototype.relegate = function(node) {
                        var indexOfNode = this.members.findIndex(function(member) {
                            return node === member;
                        });
                        if (indexOfNode === 0) return false;
                        /**
                         * Find the next projection node that is present
                         */
                        var prevLead;
                        for (var i = indexOfNode; i >= 0; i--) {
                            var member = this.members[i];
                            if (member.isPresent !== false) {
                                prevLead = member;
                                break;
                            }
                        }
                        if (prevLead) {
                            this.promote(prevLead);
                            return true;
                        } else {
                            return false;
                        }
                    };
                    NodeStack.prototype.promote = function(node, preserveFollowOpacity) {
                        var _a;
                        var prevLead = this.lead;
                        if (node === prevLead) return;
                        this.prevLead = prevLead;
                        this.lead = node;
                        node.show();
                        if (prevLead) {
                            prevLead.instance && prevLead.scheduleRender();
                            node.scheduleRender();
                            node.resumeFrom = prevLead;
                            if (preserveFollowOpacity) {
                                node.resumeFrom.preserveOpacity = true;
                            }
                            if (prevLead.snapshot) {
                                node.snapshot = prevLead.snapshot;
                                node.snapshot.latestValues = prevLead.animationValues || prevLead.latestValues;
                                node.snapshot.isShared = true;
                            }
                            if ((_a = node.root) === null || _a === void 0 ? void 0 : _a.isUpdating) {
                                node.isLayoutDirty = true;
                            }
                            var crossfade = node.options.crossfade;
                            if (crossfade === false) {
                                prevLead.hide();
                            }
                            /**
                             * TODO:
                             *   - Test border radius when previous node was deleted
                             *   - boxShadow mixing
                             *   - Shared between element A in scrolled container and element B (scroll stays the same or changes)
                             *   - Shared between element A in transformed container and element B (transform stays the same or changes)
                             *   - Shared between element A in scrolled page and element B (scroll stays the same or changes)
                             * ---
                             *   - Crossfade opacity of root nodes
                             *   - layoutId changes after animation
                             *   - layoutId changes mid animation
                             */
                        }
                    };
                    NodeStack.prototype.exitAnimationComplete = function() {
                        this.members.forEach(function(node) {
                            var _a, _b, _c, _d, _e;
                            (_b = (_a = node.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);
                            (_e = (_c = node.resumingFrom) === null || _c === void 0 ? void 0 : (_d = _c.options).onExitComplete) === null || _e === void 0 ? void 0 : _e.call(_d);
                        });
                    };
                    NodeStack.prototype.scheduleRender = function() {
                        this.members.forEach(function(node) {
                            node.instance && node.scheduleRender(false);
                        });
                    };
                    /**
                     * Clear any leads that have been removed this render to prevent them from being
                     * used in future animations and to prevent memory leaks
                     */
                    NodeStack.prototype.removeLeadSnapshot = function() {
                        if (this.lead && this.lead.snapshot) {
                            this.lead.snapshot = undefined;
                        }
                    };
                    return NodeStack;
                }();
                var identityProjection = "translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";

                function buildProjectionTransform(delta, treeScale, latestTransform) {
                    /**
                     * The translations we use to calculate are always relative to the viewport coordinate space.
                     * But when we apply scales, we also scale the coordinate space of an element and its children.
                     * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need
                     * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.
                     */
                    var xTranslate = delta.x.translate / treeScale.x;
                    var yTranslate = delta.y.translate / treeScale.y;
                    var transform = "translate3d(".concat(xTranslate, "px, ").concat(yTranslate, "px, 0) ");
                    /**
                     * Apply scale correction for the tree transform.
                     * This will apply scale to the screen-orientated axes.
                     */
                    transform += "scale(".concat(1 / treeScale.x, ", ").concat(1 / treeScale.y, ") ");
                    if (latestTransform) {
                        var rotate = latestTransform.rotate,
                            rotateX = latestTransform.rotateX,
                            rotateY = latestTransform.rotateY;
                        if (rotate) transform += "rotate(".concat(rotate, "deg) ");
                        if (rotateX) transform += "rotateX(".concat(rotateX, "deg) ");
                        if (rotateY) transform += "rotateY(".concat(rotateY, "deg) ");
                    }
                    /**
                     * Apply scale to match the size of the element to the size we want it.
                     * This will apply scale to the element-orientated axes.
                     */
                    var elementScaleX = delta.x.scale * treeScale.x;
                    var elementScaleY = delta.y.scale * treeScale.y;
                    transform += "scale(".concat(elementScaleX, ", ").concat(elementScaleY, ")");
                    return transform === identityProjection ? "none" : transform;
                }
                var compareByDepth = function(a, b) {
                    return a.depth - b.depth;
                };
                var FlatTree = /** @class */ function() {
                    function FlatTree() {
                        this.children = [];
                        this.isDirty = false;
                    }
                    FlatTree.prototype.add = function(child) {
                        addUniqueItem(this.children, child);
                        this.isDirty = true;
                    };
                    FlatTree.prototype.remove = function(child) {
                        removeItem(this.children, child);
                        this.isDirty = true;
                    };
                    FlatTree.prototype.forEach = function(callback) {
                        this.isDirty && this.children.sort(compareByDepth);
                        this.isDirty = false;
                        this.children.forEach(callback);
                    };
                    return FlatTree;
                }();

                /**
                 * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1
                 * which has a noticeable difference in spring animations
                 */
                var animationTarget = 1000;

                function createProjectionNode(_a) {
                    var attachResizeListener = _a.attachResizeListener,
                        defaultParent = _a.defaultParent,
                        measureScroll = _a.measureScroll,
                        checkIsScrollRoot = _a.checkIsScrollRoot,
                        resetTransform = _a.resetTransform;
                    return /** @class */ function() {
                        function ProjectionNode(id, latestValues, parent) {
                            var _this = this;
                            if (latestValues === void 0) {
                                latestValues = {};
                            }
                            if (parent === void 0) {
                                parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent();
                            }
                            /**
                             * A Set containing all this component's children. This is used to iterate
                             * through the children.
                             *
                             * TODO: This could be faster to iterate as a flat array stored on the root node.
                             */
                            this.children = new Set();
                            /**
                             * Options for the node. We use this to configure what kind of layout animations
                             * we should perform (if any).
                             */
                            this.options = {};
                            /**
                             * We use this to detect when its safe to shut down part of a projection tree.
                             * We have to keep projecting children for scale correction and relative projection
                             * until all their parents stop performing layout animations.
                             */
                            this.isTreeAnimating = false;
                            this.isAnimationBlocked = false;
                            /**
                             * Flag to true if we think this layout has been changed. We can't always know this,
                             * currently we set it to true every time a component renders, or if it has a layoutDependency
                             * if that has changed between renders. Additionally, components can be grouped by LayoutGroup
                             * and if one node is dirtied, they all are.
                             */
                            this.isLayoutDirty = false;
                            /**
                             * Block layout updates for instant layout transitions throughout the tree.
                             */
                            this.updateManuallyBlocked = false;
                            this.updateBlockedByResize = false;
                            /**
                             * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`
                             * call.
                             */
                            this.isUpdating = false;
                            /**
                             * If this is an SVG element we currently disable projection transforms
                             */
                            this.isSVG = false;
                            /**
                             * Flag to true (during promotion) if a node doing an instant layout transition needs to reset
                             * its projection styles.
                             */
                            this.needsReset = false;
                            /**
                             * Flags whether this node should have its transform reset prior to measuring.
                             */
                            this.shouldResetTransform = false;
                            /**
                             * An object representing the calculated contextual/accumulated/tree scale.
                             * This will be used to scale calculcated projection transforms, as these are
                             * calculated in screen-space but need to be scaled for elements to actually
                             * make it to their calculated destinations.
                             *
                             * TODO: Lazy-init
                             */
                            this.treeScale = {
                                x: 1,
                                y: 1
                            };
                            /**
                             *
                             */
                            this.eventHandlers = new Map();
                            // Note: Currently only running on root node
                            this.potentialNodes = new Map();
                            this.checkUpdateFailed = function() {
                                if (_this.isUpdating) {
                                    _this.isUpdating = false;
                                    _this.clearAllSnapshots();
                                }
                            };
                            this.updateProjection = function() {
                                _this.nodes.forEach(resolveTargetDelta);
                                _this.nodes.forEach(calcProjection);
                            };
                            this.hasProjected = false;
                            this.isVisible = true;
                            this.animationProgress = 0;
                            /**
                             * Shared layout
                             */
                            // TODO Only running on root node
                            this.sharedNodes = new Map();
                            this.id = id;
                            this.latestValues = latestValues;
                            this.root = parent ? parent.root || parent : this;
                            this.path = parent ? tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(parent.path), false), [parent], false) : [];
                            this.parent = parent;
                            this.depth = parent ? parent.depth + 1 : 0;
                            id && this.root.registerPotentialNode(id, this);
                            for (var i = 0; i < this.path.length; i++) {
                                this.path[i].shouldResetTransform = true;
                            }
                            if (this.root === this) this.nodes = new FlatTree();
                        }
                        ProjectionNode.prototype.addEventListener = function(name, handler) {
                            if (!this.eventHandlers.has(name)) {
                                this.eventHandlers.set(name, new SubscriptionManager());
                            }
                            return this.eventHandlers.get(name).add(handler);
                        };
                        ProjectionNode.prototype.notifyListeners = function(name) {
                            var args = [];
                            for (var _i = 1; _i < arguments.length; _i++) {
                                args[_i - 1] = arguments[_i];
                            }
                            var subscriptionManager = this.eventHandlers.get(name);
                            subscriptionManager === null || subscriptionManager === void 0 ? void 0 : subscriptionManager.notify.apply(subscriptionManager, tslib.__spreadArray([], tslib.__read(args), false));
                        };
                        ProjectionNode.prototype.hasListeners = function(name) {
                            return this.eventHandlers.has(name);
                        };
                        ProjectionNode.prototype.registerPotentialNode = function(id, node) {
                            this.potentialNodes.set(id, node);
                        };
                        /**
                         * Lifecycles
                         */
                        ProjectionNode.prototype.mount = function(instance, isLayoutDirty) {
                            var _this = this;
                            var _a;
                            if (isLayoutDirty === void 0) {
                                isLayoutDirty = false;
                            }
                            if (this.instance) return;
                            this.isSVG = instance instanceof SVGElement && instance.tagName !== "svg";
                            this.instance = instance;
                            var _b = this.options,
                                layoutId = _b.layoutId,
                                layout = _b.layout,
                                visualElement = _b.visualElement;
                            if (visualElement && !visualElement.getInstance()) {
                                visualElement.mount(instance);
                            }
                            this.root.nodes.add(this);
                            (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children.add(this);
                            this.id && this.root.potentialNodes.delete(this.id);
                            if (isLayoutDirty && (layout || layoutId)) {
                                this.isLayoutDirty = true;
                            }
                            if (attachResizeListener) {
                                var unblockTimeout_1;
                                var resizeUnblockUpdate_1 = function() {
                                    return _this.root.updateBlockedByResize = false;
                                };
                                attachResizeListener(instance, function() {
                                    _this.root.updateBlockedByResize = true;
                                    clearTimeout(unblockTimeout_1);
                                    unblockTimeout_1 = window.setTimeout(resizeUnblockUpdate_1, 250);
                                    if (globalProjectionState.hasAnimatedSinceResize) {
                                        globalProjectionState.hasAnimatedSinceResize = false;
                                        _this.nodes.forEach(finishAnimation);
                                    }
                                });
                            }
                            if (layoutId) {
                                this.root.registerSharedNode(layoutId, this);
                            }
                            // Only register the handler if it requires layout animation
                            if (this.options.animate !== false && visualElement && (layoutId || layout)) {
                                this.addEventListener("didUpdate", function(_a) {
                                    var _b, _c, _d, _e, _f;
                                    var delta = _a.delta,
                                        hasLayoutChanged = _a.hasLayoutChanged,
                                        hasRelativeTargetChanged = _a.hasRelativeTargetChanged,
                                        newLayout = _a.layout;
                                    if (_this.isTreeAnimationBlocked()) {
                                        _this.target = undefined;
                                        _this.relativeTarget = undefined;
                                        return;
                                    }
                                    // TODO: Check here if an animation exists
                                    var layoutTransition = (_c = (_b = _this.options.transition) !== null && _b !== void 0 ? _b : visualElement.getDefaultTransition()) !== null && _c !== void 0 ? _c : defaultLayoutTransition;
                                    var _g = visualElement.getProps(),
                                        onLayoutAnimationStart = _g.onLayoutAnimationStart,
                                        onLayoutAnimationComplete = _g.onLayoutAnimationComplete;
                                    /**
                                     * The target layout of the element might stay the same,
                                     * but its position relative to its parent has changed.
                                     */
                                    var targetChanged = !_this.targetLayout || !boxEquals(_this.targetLayout, newLayout) || hasRelativeTargetChanged;
                                    /**
                                     * If the layout hasn't seemed to have changed, it might be that the
                                     * element is visually in the same place in the document but its position
                                     * relative to its parent has indeed changed. So here we check for that.
                                     */
                                    var hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;
                                    if (((_d = _this.resumeFrom) === null || _d === void 0 ? void 0 : _d.instance) || hasOnlyRelativeTargetChanged || hasLayoutChanged && (targetChanged || !_this.currentAnimation)) {
                                        if (_this.resumeFrom) {
                                            _this.resumingFrom = _this.resumeFrom;
                                            _this.resumingFrom.resumingFrom = undefined;
                                        }
                                        _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
                                        var animationOptions = tslib.__assign(tslib.__assign({}, getValueTransition(layoutTransition, "layout")), {
                                            onPlay: onLayoutAnimationStart,
                                            onComplete: onLayoutAnimationComplete
                                        });
                                        if (visualElement.shouldReduceMotion) {
                                            animationOptions.delay = 0;
                                            animationOptions.type = false;
                                        }
                                        _this.startAnimation(animationOptions);
                                    } else {
                                        /**
                                         * If the layout hasn't changed and we have an animation that hasn't started yet,
                                         * finish it immediately. Otherwise it will be animating from a location
                                         * that was probably never commited to screen and look like a jumpy box.
                                         */
                                        if (!hasLayoutChanged && _this.animationProgress === 0) {
                                            _this.finishAnimation();
                                        }
                                        _this.isLead() && ((_f = (_e = _this.options).onExitComplete) === null || _f === void 0 ? void 0 : _f.call(_e));
                                    }
                                    _this.targetLayout = newLayout;
                                });
                            }
                        };
                        ProjectionNode.prototype.unmount = function() {
                            var _a, _b;
                            this.options.layoutId && this.willUpdate();
                            this.root.nodes.remove(this);
                            (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.remove(this);
                            (_b = this.parent) === null || _b === void 0 ? void 0 : _b.children.delete(this);
                            this.instance = undefined;
                            sync.cancelSync.preRender(this.updateProjection);
                        };
                        // only on the root
                        ProjectionNode.prototype.blockUpdate = function() {
                            this.updateManuallyBlocked = true;
                        };
                        ProjectionNode.prototype.unblockUpdate = function() {
                            this.updateManuallyBlocked = false;
                        };
                        ProjectionNode.prototype.isUpdateBlocked = function() {
                            return this.updateManuallyBlocked || this.updateBlockedByResize;
                        };
                        ProjectionNode.prototype.isTreeAnimationBlocked = function() {
                            var _a;
                            return this.isAnimationBlocked || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimationBlocked()) || false;
                        };
                        // Note: currently only running on root node
                        ProjectionNode.prototype.startUpdate = function() {
                            var _a;
                            if (this.isUpdateBlocked()) return;
                            this.isUpdating = true;
                            (_a = this.nodes) === null || _a === void 0 ? void 0 : _a.forEach(resetRotation);
                        };
                        ProjectionNode.prototype.willUpdate = function(shouldNotifyListeners) {
                            var _a, _b, _c;
                            if (shouldNotifyListeners === void 0) {
                                shouldNotifyListeners = true;
                            }
                            if (this.root.isUpdateBlocked()) {
                                (_b = (_a = this.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);
                                return;
                            }!this.root.isUpdating && this.root.startUpdate();
                            if (this.isLayoutDirty) return;
                            this.isLayoutDirty = true;
                            for (var i = 0; i < this.path.length; i++) {
                                var node = this.path[i];
                                node.shouldResetTransform = true;
                                /**
                                 * TODO: Check we haven't updated the scroll
                                 * since the last didUpdate
                                 */
                                node.updateScroll();
                            }
                            var _d = this.options,
                                layoutId = _d.layoutId,
                                layout = _d.layout;
                            if (layoutId === undefined && !layout) return;
                            var transformTemplate = (_c = this.options.visualElement) === null || _c === void 0 ? void 0 : _c.getProps().transformTemplate;
                            this.prevTransformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, "");
                            this.updateSnapshot();
                            shouldNotifyListeners && this.notifyListeners("willUpdate");
                        };
                        // Note: Currently only running on root node
                        ProjectionNode.prototype.didUpdate = function() {
                            var updateWasBlocked = this.isUpdateBlocked();
                            // When doing an instant transition, we skip the layout update,
                            // but should still clean up the measurements so that the next
                            // snapshot could be taken correctly.
                            if (updateWasBlocked) {
                                this.unblockUpdate();
                                this.clearAllSnapshots();
                                this.nodes.forEach(clearMeasurements);
                                return;
                            }
                            if (!this.isUpdating) return;
                            this.isUpdating = false;
                            /**
                             * Search for and mount newly-added projection elements.
                             *
                             * TODO: Every time a new component is rendered we could search up the tree for
                             * the closest mounted node and query from there rather than document.
                             */
                            if (this.potentialNodes.size) {
                                this.potentialNodes.forEach(mountNodeEarly);
                                this.potentialNodes.clear();
                            }
                            /**
                             * Write
                             */
                            this.nodes.forEach(resetTransformStyle);
                            /**
                             * Read ==================
                             */
                            // Update layout measurements of updated children
                            this.nodes.forEach(updateLayout);
                            /**
                             * Write
                             */
                            // Notify listeners that the layout is updated
                            this.nodes.forEach(notifyLayoutUpdate);
                            this.clearAllSnapshots();
                            // Flush any scheduled updates
                            sync.flushSync.update();
                            sync.flushSync.preRender();
                            sync.flushSync.render();
                        };
                        ProjectionNode.prototype.clearAllSnapshots = function() {
                            this.nodes.forEach(clearSnapshot);
                            this.sharedNodes.forEach(removeLeadSnapshots);
                        };
                        ProjectionNode.prototype.scheduleUpdateProjection = function() {
                            sync__default["default"].preRender(this.updateProjection, false, true);
                        };
                        ProjectionNode.prototype.scheduleCheckAfterUnmount = function() {
                            var _this = this;
                            /**
                             * If the unmounting node is in a layoutGroup and did trigger a willUpdate,
                             * we manually call didUpdate to give a chance to the siblings to animate.
                             * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.
                             */
                            sync__default["default"].postRender(function() {
                                if (_this.isLayoutDirty) {
                                    _this.root.didUpdate();
                                } else {
                                    _this.root.checkUpdateFailed();
                                }
                            });
                        };
                        /**
                         * Update measurements
                         */
                        ProjectionNode.prototype.updateSnapshot = function() {
                            if (this.snapshot || !this.instance) return;
                            var measured = this.measure();
                            var layout = this.removeTransform(this.removeElementScroll(measured));
                            roundBox(layout);
                            this.snapshot = {
                                measured: measured,
                                layout: layout,
                                latestValues: {}
                            };
                        };
                        ProjectionNode.prototype.updateLayout = function() {
                            var _a;
                            if (!this.instance) return;
                            // TODO: Incorporate into a forwarded scroll offset
                            this.updateScroll();
                            if (!(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty) {
                                return;
                            }
                            /**
                             * When a node is mounted, it simply resumes from the prevLead's
                             * snapshot instead of taking a new one, but the ancestors scroll
                             * might have updated while the prevLead is unmounted. We need to
                             * update the scroll again to make sure the layout we measure is
                             * up to date.
                             */
                            if (this.resumeFrom && !this.resumeFrom.instance) {
                                for (var i = 0; i < this.path.length; i++) {
                                    var node = this.path[i];
                                    node.updateScroll();
                                }
                            }
                            var measured = this.measure();
                            roundBox(measured);
                            var prevLayout = this.layout;
                            this.layout = {
                                measured: measured,
                                actual: this.removeElementScroll(measured)
                            };
                            this.layoutCorrected = createBox();
                            this.isLayoutDirty = false;
                            this.projectionDelta = undefined;
                            this.notifyListeners("measure", this.layout.actual);
                            (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.notifyLayoutMeasure(this.layout.actual, prevLayout === null || prevLayout === void 0 ? void 0 : prevLayout.actual);
                        };
                        ProjectionNode.prototype.updateScroll = function() {
                            if (this.options.layoutScroll && this.instance) {
                                this.isScrollRoot = checkIsScrollRoot(this.instance);
                                this.scroll = measureScroll(this.instance);
                            }
                        };
                        ProjectionNode.prototype.resetTransform = function() {
                            var _a;
                            if (!resetTransform) return;
                            var isResetRequested = this.isLayoutDirty || this.shouldResetTransform;
                            var hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);
                            var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;
                            var transformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, "");
                            var transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;
                            if (isResetRequested && (hasProjection || hasTransform(this.latestValues) || transformTemplateHasChanged)) {
                                resetTransform(this.instance, transformTemplateValue);
                                this.shouldResetTransform = false;
                                this.scheduleRender();
                            }
                        };
                        ProjectionNode.prototype.measure = function() {
                            var visualElement = this.options.visualElement;
                            if (!visualElement) return createBox();
                            var box = visualElement.measureViewportBox();
                            // Remove viewport scroll to give page-relative coordinates
                            var scroll = this.root.scroll;
                            if (scroll) {
                                translateAxis(box.x, scroll.x);
                                translateAxis(box.y, scroll.y);
                            }
                            return box;
                        };
                        ProjectionNode.prototype.removeElementScroll = function(box) {
                            var boxWithoutScroll = createBox();
                            copyBoxInto(boxWithoutScroll, box);
                            /**
                             * Performance TODO: Keep a cumulative scroll offset down the tree
                             * rather than loop back up the path.
                             */
                            for (var i = 0; i < this.path.length; i++) {
                                var node = this.path[i];
                                var scroll_1 = node.scroll,
                                    options = node.options,
                                    isScrollRoot = node.isScrollRoot;
                                if (node !== this.root && scroll_1 && options.layoutScroll) {
                                    /**
                                     * If this is a new scroll root, we want to remove all previous scrolls
                                     * from the viewport box.
                                     */
                                    if (isScrollRoot) {
                                        copyBoxInto(boxWithoutScroll, box);
                                        var rootScroll = this.root.scroll;
                                        /**
                                         * Undo the application of page scroll that was originally added
                                         * to the measured bounding box.
                                         */
                                        if (rootScroll) {
                                            translateAxis(boxWithoutScroll.x, -rootScroll.x);
                                            translateAxis(boxWithoutScroll.y, -rootScroll.y);
                                        }
                                    }
                                    translateAxis(boxWithoutScroll.x, scroll_1.x);
                                    translateAxis(boxWithoutScroll.y, scroll_1.y);
                                }
                            }
                            return boxWithoutScroll;
                        };
                        ProjectionNode.prototype.applyTransform = function(box, transformOnly) {
                            if (transformOnly === void 0) {
                                transformOnly = false;
                            }
                            var withTransforms = createBox();
                            copyBoxInto(withTransforms, box);
                            for (var i = 0; i < this.path.length; i++) {
                                var node = this.path[i];
                                if (!transformOnly && node.options.layoutScroll && node.scroll && node !== node.root) {
                                    transformBox(withTransforms, {
                                        x: -node.scroll.x,
                                        y: -node.scroll.y
                                    });
                                }
                                if (!hasTransform(node.latestValues)) continue;
                                transformBox(withTransforms, node.latestValues);
                            }
                            if (hasTransform(this.latestValues)) {
                                transformBox(withTransforms, this.latestValues);
                            }
                            return withTransforms;
                        };
                        ProjectionNode.prototype.removeTransform = function(box) {
                            var _a;
                            var boxWithoutTransform = createBox();
                            copyBoxInto(boxWithoutTransform, box);
                            for (var i = 0; i < this.path.length; i++) {
                                var node = this.path[i];
                                if (!node.instance) continue;
                                if (!hasTransform(node.latestValues)) continue;
                                hasScale(node.latestValues) && node.updateSnapshot();
                                var sourceBox = createBox();
                                var nodeBox = node.measure();
                                copyBoxInto(sourceBox, nodeBox);
                                removeBoxTransforms(boxWithoutTransform, node.latestValues, (_a = node.snapshot) === null || _a === void 0 ? void 0 : _a.layout, sourceBox);
                            }
                            if (hasTransform(this.latestValues)) {
                                removeBoxTransforms(boxWithoutTransform, this.latestValues);
                            }
                            return boxWithoutTransform;
                        };
                        /**
                         *
                         */
                        ProjectionNode.prototype.setTargetDelta = function(delta) {
                            this.targetDelta = delta;
                            this.root.scheduleUpdateProjection();
                        };
                        ProjectionNode.prototype.setOptions = function(options) {
                            var _a;
                            this.options = tslib.__assign(tslib.__assign(tslib.__assign({}, this.options), options), {
                                crossfade: (_a = options.crossfade) !== null && _a !== void 0 ? _a : true
                            });
                        };
                        ProjectionNode.prototype.clearMeasurements = function() {
                            this.scroll = undefined;
                            this.layout = undefined;
                            this.snapshot = undefined;
                            this.prevTransformTemplateValue = undefined;
                            this.targetDelta = undefined;
                            this.target = undefined;
                            this.isLayoutDirty = false;
                        };
                        /**
                         * Frame calculations
                         */
                        ProjectionNode.prototype.resolveTargetDelta = function() {
                            var _a;
                            var _b = this.options,
                                layout = _b.layout,
                                layoutId = _b.layoutId;
                            /**
                             * If we have no layout, we can't perform projection, so early return
                             */
                            if (!this.layout || !(layout || layoutId)) return;
                            /**
                             * If we don't have a targetDelta but do have a layout, we can attempt to resolve
                             * a relativeParent. This will allow a component to perform scale correction
                             * even if no animation has started.
                             */
                            // TODO If this is unsuccessful this currently happens every frame
                            if (!this.targetDelta && !this.relativeTarget) {
                                // TODO: This is a semi-repetition of further down this function, make DRY
                                this.relativeParent = this.getClosestProjectingParent();
                                if (this.relativeParent && this.relativeParent.layout) {
                                    this.relativeTarget = createBox();
                                    this.relativeTargetOrigin = createBox();
                                    calcRelativePosition(this.relativeTargetOrigin, this.layout.actual, this.relativeParent.layout.actual);
                                    copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
                                }
                            }
                            /**
                             * If we have no relative target or no target delta our target isn't valid
                             * for this frame.
                             */
                            if (!this.relativeTarget && !this.targetDelta) return;
                            /**
                             * Lazy-init target data structure
                             */
                            if (!this.target) {
                                this.target = createBox();
                                this.targetWithTransforms = createBox();
                            }
                            /**
                             * If we've got a relative box for this component, resolve it into a target relative to the parent.
                             */
                            if (this.relativeTarget && this.relativeTargetOrigin && ((_a = this.relativeParent) === null || _a === void 0 ? void 0 : _a.target)) {
                                calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);
                                /**
                                 * If we've only got a targetDelta, resolve it into a target
                                 */
                            } else if (this.targetDelta) {
                                if (Boolean(this.resumingFrom)) {
                                    // TODO: This is creating a new object every frame
                                    this.target = this.applyTransform(this.layout.actual);
                                } else {
                                    copyBoxInto(this.target, this.layout.actual);
                                }
                                applyBoxDelta(this.target, this.targetDelta);
                            } else {
                                /**
                                 * If no target, use own layout as target
                                 */
                                copyBoxInto(this.target, this.layout.actual);
                            }
                            /**
                             * If we've been told to attempt to resolve a relative target, do so.
                             */
                            if (this.attemptToResolveRelativeTarget) {
                                this.attemptToResolveRelativeTarget = false;
                                this.relativeParent = this.getClosestProjectingParent();
                                if (this.relativeParent && Boolean(this.relativeParent.resumingFrom) === Boolean(this.resumingFrom) && !this.relativeParent.options.layoutScroll && this.relativeParent.target) {
                                    this.relativeTarget = createBox();
                                    this.relativeTargetOrigin = createBox();
                                    calcRelativePosition(this.relativeTargetOrigin, this.target, this.relativeParent.target);
                                    copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
                                }
                            }
                        };
                        ProjectionNode.prototype.getClosestProjectingParent = function() {
                            if (!this.parent || hasTransform(this.parent.latestValues)) return undefined;
                            if ((this.parent.relativeTarget || this.parent.targetDelta) && this.parent.layout) {
                                return this.parent;
                            } else {
                                return this.parent.getClosestProjectingParent();
                            }
                        };
                        ProjectionNode.prototype.calcProjection = function() {
                            var _a;
                            var _b = this.options,
                                layout = _b.layout,
                                layoutId = _b.layoutId;
                            /**
                             * If this section of the tree isn't animating we can
                             * delete our target sources for the following frame.
                             */
                            this.isTreeAnimating = Boolean(((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimating) || this.currentAnimation || this.pendingAnimation);
                            if (!this.isTreeAnimating) {
                                this.targetDelta = this.relativeTarget = undefined;
                            }
                            if (!this.layout || !(layout || layoutId)) return;
                            var lead = this.getLead();
                            /**
                             * Reset the corrected box with the latest values from box, as we're then going
                             * to perform mutative operations on it.
                             */
                            copyBoxInto(this.layoutCorrected, this.layout.actual);
                            /**
                             * Apply all the parent deltas to this box to produce the corrected box. This
                             * is the layout box, as it will appear on screen as a result of the transforms of its parents.
                             */
                            applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, Boolean(this.resumingFrom) || this !== lead);
                            var target = lead.target;
                            if (!target) return;
                            if (!this.projectionDelta) {
                                this.projectionDelta = createDelta();
                                this.projectionDeltaWithTransform = createDelta();
                            }
                            var prevTreeScaleX = this.treeScale.x;
                            var prevTreeScaleY = this.treeScale.y;
                            var prevProjectionTransform = this.projectionTransform;
                            /**
                             * Update the delta between the corrected box and the target box before user-set transforms were applied.
                             * This will allow us to calculate the corrected borderRadius and boxShadow to compensate
                             * for our layout reprojection, but still allow them to be scaled correctly by the user.
                             * It might be that to simplify this we may want to accept that user-set scale is also corrected
                             * and we wouldn't have to keep and calc both deltas, OR we could support a user setting
                             * to allow people to choose whether these styles are corrected based on just the
                             * layout reprojection or the final bounding box.
                             */
                            calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);
                            this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale);
                            if (this.projectionTransform !== prevProjectionTransform || this.treeScale.x !== prevTreeScaleX || this.treeScale.y !== prevTreeScaleY) {
                                this.hasProjected = true;
                                this.scheduleRender();
                                this.notifyListeners("projectionUpdate", target);
                            }
                        };
                        ProjectionNode.prototype.hide = function() {
                            this.isVisible = false;
                            // TODO: Schedule render
                        };
                        ProjectionNode.prototype.show = function() {
                            this.isVisible = true;
                            // TODO: Schedule render
                        };
                        ProjectionNode.prototype.scheduleRender = function(notifyAll) {
                            var _a, _b, _c;
                            if (notifyAll === void 0) {
                                notifyAll = true;
                            }
                            (_b = (_a = this.options).scheduleRender) === null || _b === void 0 ? void 0 : _b.call(_a);
                            notifyAll && ((_c = this.getStack()) === null || _c === void 0 ? void 0 : _c.scheduleRender());
                            if (this.resumingFrom && !this.resumingFrom.instance) {
                                this.resumingFrom = undefined;
                            }
                        };
                        ProjectionNode.prototype.setAnimationOrigin = function(delta, hasOnlyRelativeTargetChanged) {
                            var _this = this;
                            var _a;
                            if (hasOnlyRelativeTargetChanged === void 0) {
                                hasOnlyRelativeTargetChanged = false;
                            }
                            var snapshot = this.snapshot;
                            var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};
                            var mixedValues = tslib.__assign({}, this.latestValues);
                            var targetDelta = createDelta();
                            this.relativeTarget = this.relativeTargetOrigin = undefined;
                            this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;
                            var relativeLayout = createBox();
                            var isSharedLayoutAnimation = snapshot === null || snapshot === void 0 ? void 0 : snapshot.isShared;
                            var isOnlyMember = (((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.members.length) || 0) <= 1;
                            var shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade));
                            this.animationProgress = 0;
                            this.mixTargetDelta = function(latest) {
                                var _a;
                                var progress = latest / 1000;
                                mixAxisDelta(targetDelta.x, delta.x, progress);
                                mixAxisDelta(targetDelta.y, delta.y, progress);
                                _this.setTargetDelta(targetDelta);
                                if (_this.relativeTarget && _this.relativeTargetOrigin && _this.layout && ((_a = _this.relativeParent) === null || _a === void 0 ? void 0 : _a.layout)) {
                                    calcRelativePosition(relativeLayout, _this.layout.actual, _this.relativeParent.layout.actual);
                                    mixBox(_this.relativeTarget, _this.relativeTargetOrigin, relativeLayout, progress);
                                }
                                if (isSharedLayoutAnimation) {
                                    _this.animationValues = mixedValues;
                                    mixValues(mixedValues, snapshotLatestValues, _this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);
                                }
                                _this.root.scheduleUpdateProjection();
                                _this.scheduleRender();
                                _this.animationProgress = progress;
                            };
                            this.mixTargetDelta(0);
                        };
                        ProjectionNode.prototype.startAnimation = function(options) {
                            var _this = this;
                            var _a, _b;
                            this.notifyListeners("animationStart");
                            (_a = this.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();
                            if (this.resumingFrom) {
                                (_b = this.resumingFrom.currentAnimation) === null || _b === void 0 ? void 0 : _b.stop();
                            }
                            if (this.pendingAnimation) {
                                sync.cancelSync.update(this.pendingAnimation);
                                this.pendingAnimation = undefined;
                            }
                            /**
                             * Start the animation in the next frame to have a frame with progress 0,
                             * where the target is the same as when the animation started, so we can
                             * calculate the relative positions correctly for instant transitions.
                             */
                            this.pendingAnimation = sync__default["default"].update(function() {
                                globalProjectionState.hasAnimatedSinceResize = true;
                                _this.currentAnimation = animate(0, animationTarget, tslib.__assign(tslib.__assign({}, options), {
                                    onUpdate: function(latest) {
                                        var _a;
                                        _this.mixTargetDelta(latest);
                                        (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, latest);
                                    },
                                    onComplete: function() {
                                        var _a;
                                        (_a = options.onComplete) === null || _a === void 0 ? void 0 : _a.call(options);
                                        _this.completeAnimation();
                                    }
                                }));
                                if (_this.resumingFrom) {
                                    _this.resumingFrom.currentAnimation = _this.currentAnimation;
                                }
                                _this.pendingAnimation = undefined;
                            });
                        };
                        ProjectionNode.prototype.completeAnimation = function() {
                            var _a;
                            if (this.resumingFrom) {
                                this.resumingFrom.currentAnimation = undefined;
                                this.resumingFrom.preserveOpacity = undefined;
                            }
                            (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.exitAnimationComplete();
                            this.resumingFrom = this.currentAnimation = this.animationValues = undefined;
                            this.notifyListeners("animationComplete");
                        };
                        ProjectionNode.prototype.finishAnimation = function() {
                            var _a;
                            if (this.currentAnimation) {
                                (_a = this.mixTargetDelta) === null || _a === void 0 ? void 0 : _a.call(this, animationTarget);
                                this.currentAnimation.stop();
                            }
                            this.completeAnimation();
                        };
                        ProjectionNode.prototype.applyTransformsToTarget = function() {
                            var _a = this.getLead(),
                                targetWithTransforms = _a.targetWithTransforms,
                                target = _a.target,
                                layout = _a.layout,
                                latestValues = _a.latestValues;
                            if (!targetWithTransforms || !target || !layout) return;
                            copyBoxInto(targetWithTransforms, target);
                            /**
                             * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.
                             * This is the final box that we will then project into by calculating a transform delta and
                             * applying it to the corrected box.
                             */
                            transformBox(targetWithTransforms, latestValues);
                            /**
                             * Update the delta between the corrected box and the final target box, after
                             * user-set transforms are applied to it. This will be used by the renderer to
                             * create a transform style that will reproject the element from its actual layout
                             * into the desired bounding box.
                             */
                            calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);
                        };
                        ProjectionNode.prototype.registerSharedNode = function(layoutId, node) {
                            var _a, _b, _c;
                            if (!this.sharedNodes.has(layoutId)) {
                                this.sharedNodes.set(layoutId, new NodeStack());
                            }
                            var stack = this.sharedNodes.get(layoutId);
                            stack.add(node);
                            node.promote({
                                transition: (_a = node.options.initialPromotionConfig) === null || _a === void 0 ? void 0 : _a.transition,
                                preserveFollowOpacity: (_c = (_b = node.options.initialPromotionConfig) === null || _b === void 0 ? void 0 : _b.shouldPreserveFollowOpacity) === null || _c === void 0 ? void 0 : _c.call(_b, node)
                            });
                        };
                        ProjectionNode.prototype.isLead = function() {
                            var stack = this.getStack();
                            return stack ? stack.lead === this : true;
                        };
                        ProjectionNode.prototype.getLead = function() {
                            var _a;
                            var layoutId = this.options.layoutId;
                            return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;
                        };
                        ProjectionNode.prototype.getPrevLead = function() {
                            var _a;
                            var layoutId = this.options.layoutId;
                            return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;
                        };
                        ProjectionNode.prototype.getStack = function() {
                            var layoutId = this.options.layoutId;
                            if (layoutId) return this.root.sharedNodes.get(layoutId);
                        };
                        ProjectionNode.prototype.promote = function(_a) {
                            var _b = _a === void 0 ? {} : _a,
                                needsReset = _b.needsReset,
                                transition = _b.transition,
                                preserveFollowOpacity = _b.preserveFollowOpacity;
                            var stack = this.getStack();
                            if (stack) stack.promote(this, preserveFollowOpacity);
                            if (needsReset) {
                                this.projectionDelta = undefined;
                                this.needsReset = true;
                            }
                            if (transition) this.setOptions({
                                transition: transition
                            });
                        };
                        ProjectionNode.prototype.relegate = function() {
                            var stack = this.getStack();
                            if (stack) {
                                return stack.relegate(this);
                            } else {
                                return false;
                            }
                        };
                        ProjectionNode.prototype.resetRotation = function() {
                            var visualElement = this.options.visualElement;
                            if (!visualElement) return;
                            // If there's no detected rotation values, we can early return without a forced render.
                            var hasRotate = false;
                            // Keep a record of all the values we've reset
                            var resetValues = {};
                            // Check the rotate value of all axes and reset to 0
                            for (var i = 0; i < transformAxes.length; i++) {
                                var axis = transformAxes[i];
                                var key = "rotate" + axis;
                                // If this rotation doesn't exist as a motion value, then we don't
                                // need to reset it
                                if (!visualElement.getStaticValue(key)) {
                                    continue;
                                }
                                hasRotate = true;
                                // Record the rotation and then temporarily set it to 0
                                resetValues[key] = visualElement.getStaticValue(key);
                                visualElement.setStaticValue(key, 0);
                            }
                            // If there's no rotation values, we don't need to do any more.
                            if (!hasRotate) return;
                            // Force a render of this element to apply the transform with all rotations
                            // set to 0.
                            visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();
                            // Put back all the values we reset
                            for (var key in resetValues) {
                                visualElement.setStaticValue(key, resetValues[key]);
                            }
                            // Schedule a render for the next frame. This ensures we won't visually
                            // see the element with the reset rotate value applied.
                            visualElement.scheduleRender();
                        };
                        ProjectionNode.prototype.getProjectionStyles = function(styleProp) {
                            var _a, _b, _c, _d, _e, _f;
                            if (styleProp === void 0) {
                                styleProp = {};
                            }
                            // TODO: Return lifecycle-persistent object
                            var styles = {};
                            if (!this.instance || this.isSVG) return styles;
                            if (!this.isVisible) {
                                return {
                                    visibility: "hidden"
                                };
                            } else {
                                styles.visibility = "";
                            }
                            var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;
                            if (this.needsReset) {
                                this.needsReset = false;
                                styles.opacity = "";
                                styles.pointerEvents = resolveMotionValue(styleProp.pointerEvents) || "";
                                styles.transform = transformTemplate ? transformTemplate(this.latestValues, "") : "none";
                                return styles;
                            }
                            var lead = this.getLead();
                            if (!this.projectionDelta || !this.layout || !lead.target) {
                                var emptyStyles = {};
                                if (this.options.layoutId) {
                                    emptyStyles.opacity = (_b = this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1;
                                    emptyStyles.pointerEvents = resolveMotionValue(styleProp.pointerEvents) || "";
                                }
                                if (this.hasProjected && !hasTransform(this.latestValues)) {
                                    emptyStyles.transform = transformTemplate ? transformTemplate({}, "") : "none";
                                    this.hasProjected = false;
                                }
                                return emptyStyles;
                            }
                            var valuesToRender = lead.animationValues || lead.latestValues;
                            this.applyTransformsToTarget();
                            styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);
                            if (transformTemplate) {
                                styles.transform = transformTemplate(valuesToRender, styles.transform);
                            }
                            var _g = this.projectionDelta,
                                x = _g.x,
                                y = _g.y;
                            styles.transformOrigin = "".concat(x.origin * 100, "% ").concat(y.origin * 100, "% 0");
                            if (lead.animationValues) {
                                /**
                                 * If the lead component is animating, assign this either the entering/leaving
                                 * opacity
                                 */
                                styles.opacity = lead === this ? (_d = (_c = valuesToRender.opacity) !== null && _c !== void 0 ? _c : this.latestValues.opacity) !== null && _d !== void 0 ? _d : 1 : this.preserveOpacity ? this.latestValues.opacity : valuesToRender.opacityExit;
                            } else {
                                /**
                                 * Or we're not animating at all, set the lead component to its actual
                                 * opacity and other components to hidden.
                                 */
                                styles.opacity = lead === this ? (_e = valuesToRender.opacity) !== null && _e !== void 0 ? _e : "" : (_f = valuesToRender.opacityExit) !== null && _f !== void 0 ? _f : 0;
                            }
                            /**
                             * Apply scale correction
                             */
                            for (var key in scaleCorrectors) {
                                if (valuesToRender[key] === undefined) continue;
                                var _h = scaleCorrectors[key],
                                    correct = _h.correct,
                                    applyTo = _h.applyTo;
                                var corrected = correct(valuesToRender[key], lead);
                                if (applyTo) {
                                    var num = applyTo.length;
                                    for (var i = 0; i < num; i++) {
                                        styles[applyTo[i]] = corrected;
                                    }
                                } else {
                                    styles[key] = corrected;
                                }
                            }
                            /**
                             * Disable pointer events on follow components. This is to ensure
                             * that if a follow component covers a lead component it doesn't block
                             * pointer events on the lead.
                             */
                            if (this.options.layoutId) {
                                styles.pointerEvents = lead === this ? resolveMotionValue(styleProp.pointerEvents) || "" : "none";
                            }
                            return styles;
                        };
                        ProjectionNode.prototype.clearSnapshot = function() {
                            this.resumeFrom = this.snapshot = undefined;
                        };
                        // Only run on root
                        ProjectionNode.prototype.resetTree = function() {
                            this.root.nodes.forEach(function(node) {
                                var _a;
                                return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();
                            });
                            this.root.nodes.forEach(clearMeasurements);
                            this.root.sharedNodes.clear();
                        };
                        return ProjectionNode;
                    }();
                }

                function updateLayout(node) {
                    node.updateLayout();
                }

                function notifyLayoutUpdate(node) {
                    var _a, _b, _c, _d;
                    var snapshot = (_b = (_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) !== null && _b !== void 0 ? _b : node.snapshot;
                    if (node.isLead() && node.layout && snapshot && node.hasListeners("didUpdate")) {
                        var _e = node.layout,
                            layout_1 = _e.actual,
                            measuredLayout = _e.measured;
                        // TODO Maybe we want to also resize the layout snapshot so we don't trigger
                        // animations for instance if layout="size" and an element has only changed position
                        if (node.options.animationType === "size") {
                            eachAxis(function(axis) {
                                var axisSnapshot = snapshot.isShared ? snapshot.measured[axis] : snapshot.layout[axis];
                                var length = calcLength(axisSnapshot);
                                axisSnapshot.min = layout_1[axis].min;
                                axisSnapshot.max = axisSnapshot.min + length;
                            });
                        } else if (node.options.animationType === "position") {
                            eachAxis(function(axis) {
                                var axisSnapshot = snapshot.isShared ? snapshot.measured[axis] : snapshot.layout[axis];
                                var length = calcLength(layout_1[axis]);
                                axisSnapshot.max = axisSnapshot.min + length;
                            });
                        }
                        var layoutDelta = createDelta();
                        calcBoxDelta(layoutDelta, layout_1, snapshot.layout);
                        var visualDelta = createDelta();
                        if (snapshot.isShared) {
                            calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measured);
                        } else {
                            calcBoxDelta(visualDelta, layout_1, snapshot.layout);
                        }
                        var hasLayoutChanged = !isDeltaZero(layoutDelta);
                        var hasRelativeTargetChanged = false;
                        if (!node.resumeFrom) {
                            node.relativeParent = node.getClosestProjectingParent();
                            /**
                             * If the relativeParent is itself resuming from a different element then
                             * the relative snapshot is not relavent
                             */
                            if (node.relativeParent && !node.relativeParent.resumeFrom) {
                                var _f = node.relativeParent,
                                    parentSnapshot = _f.snapshot,
                                    parentLayout = _f.layout;
                                if (parentSnapshot && parentLayout) {
                                    var relativeSnapshot = createBox();
                                    calcRelativePosition(relativeSnapshot, snapshot.layout, parentSnapshot.layout);
                                    var relativeLayout = createBox();
                                    calcRelativePosition(relativeLayout, layout_1, parentLayout.actual);
                                    if (!boxEquals(relativeSnapshot, relativeLayout)) {
                                        hasRelativeTargetChanged = true;
                                    }
                                }
                            }
                        }
                        node.notifyListeners("didUpdate", {
                            layout: layout_1,
                            snapshot: snapshot,
                            delta: visualDelta,
                            layoutDelta: layoutDelta,
                            hasLayoutChanged: hasLayoutChanged,
                            hasRelativeTargetChanged: hasRelativeTargetChanged
                        });
                    } else if (node.isLead()) {
                        (_d = (_c = node.options).onExitComplete) === null || _d === void 0 ? void 0 : _d.call(_c);
                    }
                    /**
                     * Clearing transition
                     * TODO: Investigate why this transition is being passed in as {type: false } from Framer
                     * and why we need it at all
                     */
                    node.options.transition = undefined;
                }

                function clearSnapshot(node) {
                    node.clearSnapshot();
                }

                function clearMeasurements(node) {
                    node.clearMeasurements();
                }

                function resetTransformStyle(node) {
                    var visualElement = node.options.visualElement;
                    if (visualElement === null || visualElement === void 0 ? void 0 : visualElement.getProps().onBeforeLayoutMeasure) {
                        visualElement.notifyBeforeLayoutMeasure();
                    }
                    node.resetTransform();
                }

                function finishAnimation(node) {
                    node.finishAnimation();
                    node.targetDelta = node.relativeTarget = node.target = undefined;
                }

                function resolveTargetDelta(node) {
                    node.resolveTargetDelta();
                }

                function calcProjection(node) {
                    node.calcProjection();
                }

                function resetRotation(node) {
                    node.resetRotation();
                }

                function removeLeadSnapshots(stack) {
                    stack.removeLeadSnapshot();
                }

                function mixAxisDelta(output, delta, p) {
                    output.translate = popmotion.mix(delta.translate, 0, p);
                    output.scale = popmotion.mix(delta.scale, 1, p);
                    output.origin = delta.origin;
                    output.originPoint = delta.originPoint;
                }

                function mixAxis(output, from, to, p) {
                    output.min = popmotion.mix(from.min, to.min, p);
                    output.max = popmotion.mix(from.max, to.max, p);
                }

                function mixBox(output, from, to, p) {
                    mixAxis(output.x, from.x, to.x, p);
                    mixAxis(output.y, from.y, to.y, p);
                }

                function hasOpacityCrossfade(node) {
                    return node.animationValues && node.animationValues.opacityExit !== undefined;
                }
                var defaultLayoutTransition = {
                    duration: 0.45,
                    ease: [0.4, 0, 0.1, 1]
                };

                function mountNodeEarly(node, id) {
                    /**
                     * Rather than searching the DOM from document we can search the
                     * path for the deepest mounted ancestor and search from there
                     */
                    var searchNode = node.root;
                    for (var i = node.path.length - 1; i >= 0; i--) {
                        if (Boolean(node.path[i].instance)) {
                            searchNode = node.path[i];
                            break;
                        }
                    }
                    var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;
                    var element = searchElement.querySelector("[data-projection-id=\"".concat(id, "\"]"));
                    if (element) node.mount(element, true);
                }

                function roundAxis(axis) {
                    axis.min = Math.round(axis.min);
                    axis.max = Math.round(axis.max);
                }

                function roundBox(box) {
                    roundAxis(box.x);
                    roundAxis(box.y);
                }
                var DocumentProjectionNode = createProjectionNode({
                    attachResizeListener: function(ref, notify) {
                        return addDomEvent(ref, "resize", notify);
                    },
                    measureScroll: function() {
                        return {
                            x: document.documentElement.scrollLeft || document.body.scrollLeft,
                            y: document.documentElement.scrollTop || document.body.scrollTop
                        };
                    },
                    checkIsScrollRoot: function() {
                        return true;
                    }
                });
                var rootProjectionNode = {
                    current: undefined
                };
                var HTMLProjectionNode = createProjectionNode({
                    measureScroll: function(instance) {
                        return {
                            x: instance.scrollLeft,
                            y: instance.scrollTop
                        };
                    },
                    defaultParent: function() {
                        if (!rootProjectionNode.current) {
                            var documentNode = new DocumentProjectionNode(0, {});
                            documentNode.mount(window);
                            documentNode.setOptions({
                                layoutScroll: true
                            });
                            rootProjectionNode.current = documentNode;
                        }
                        return rootProjectionNode.current;
                    },
                    resetTransform: function(instance, value) {
                        instance.style.transform = value !== null && value !== void 0 ? value : "none";
                    },
                    checkIsScrollRoot: function(instance) {
                        return Boolean(window.getComputedStyle(instance).position === "fixed");
                    }
                });
                var featureBundle = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, animations), gestureAnimations), drag), layoutFeatures);
                /**
                 * HTML & SVG components, optimised for use with gestures and animation. These can be used as
                 * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.
                 *
                 * @public
                 */
                var motion = /*@__PURE__*/ createMotionProxy(function(Component, config) {
                    return createDomMotionConfig(Component, config, featureBundle, createDomVisualElement, HTMLProjectionNode);
                });
                /**
                 * Create a DOM `motion` component with the provided string. This is primarily intended
                 * as a full alternative to `motion` for consumers who have to support environments that don't
                 * support `Proxy`.
                 *
                 * ```javascript
                 * import { createDomMotionComponent } from "framer-motion"
                 *
                 * const motion = {
                 *   div: createDomMotionComponent('div')
                 * }
                 * ```
                 *
                 * @public
                 */
                function createDomMotionComponent(key) {
                    return createMotionComponent(createDomMotionConfig(key, {
                        forwardMotionProps: false
                    }, featureBundle, createDomVisualElement, HTMLProjectionNode));
                }

                /**
                 * @public
                 */
                var m = createMotionProxy(createDomMotionConfig);

                function useIsMounted() {
                    var isMounted = React.useRef(false);
                    useIsomorphicLayoutEffect(function() {
                        isMounted.current = true;
                        return function() {
                            isMounted.current = false;
                        };
                    }, []);
                    return isMounted;
                }

                function useForceUpdate() {
                    var isMounted = useIsMounted();
                    var _a = tslib.__read(React.useState(0), 2),
                        forcedRenderCount = _a[0],
                        setForcedRenderCount = _a[1];
                    var forceRender = React.useCallback(function() {
                        isMounted.current && setForcedRenderCount(forcedRenderCount + 1);
                    }, [forcedRenderCount]);
                    /**
                     * Defer this to the end of the next animation frame in case there are multiple
                     * synchronous calls.
                     */
                    var deferredForceRender = React.useCallback(function() {
                        return sync__default["default"].postRender(forceRender);
                    }, [forceRender]);
                    return [deferredForceRender, forcedRenderCount];
                }
                var PresenceChild = function(_a) {
                    var children = _a.children,
                        initial = _a.initial,
                        isPresent = _a.isPresent,
                        onExitComplete = _a.onExitComplete,
                        custom = _a.custom,
                        presenceAffectsLayout = _a.presenceAffectsLayout;
                    var presenceChildren = useConstant(newChildrenMap);
                    var id = useId();
                    var context = React.useMemo(function() {
                            return {
                                id: id,
                                initial: initial,
                                isPresent: isPresent,
                                custom: custom,
                                onExitComplete: function(childId) {
                                    var e_1, _a;
                                    presenceChildren.set(childId, true);
                                    try {
                                        for (var _b = tslib.__values(presenceChildren.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
                                            var isComplete = _c.value;
                                            if (!isComplete) return; // can stop searching when any is incomplete
                                        }
                                    } catch (e_1_1) {
                                        e_1 = {
                                            error: e_1_1
                                        };
                                    } finally {
                                        try {
                                            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
                                        } finally {
                                            if (e_1) throw e_1.error;
                                        }
                                    }
                                    onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();
                                },
                                register: function(childId) {
                                    presenceChildren.set(childId, false);
                                    return function() {
                                        return presenceChildren.delete(childId);
                                    };
                                }
                            };
                        },
                        /**
                         * If the presence of a child affects the layout of the components around it,
                         * we want to make a new context value to ensure they get re-rendered
                         * so they can detect that layout change.
                         */
                        presenceAffectsLayout ? undefined : [isPresent]);
                    React.useMemo(function() {
                        presenceChildren.forEach(function(_, key) {
                            return presenceChildren.set(key, false);
                        });
                    }, [isPresent]);
                    /**
                     * If there's no `motion` components to fire exit animations, we want to remove this
                     * component immediately.
                     */
                    React__namespace.useEffect(function() {
                        !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());
                    }, [isPresent]);
                    return React__namespace.createElement(PresenceContext.Provider, {
                        value: context
                    }, children);
                };

                function newChildrenMap() {
                    return new Map();
                }
                var getChildKey = function(child) {
                    return child.key || "";
                };

                function updateChildLookup(children, allChildren) {
                    children.forEach(function(child) {
                        var key = getChildKey(child);
                        allChildren.set(key, child);
                    });
                }

                function onlyElements(children) {
                    var filtered = [];
                    // We use forEach here instead of map as map mutates the component key by preprending `.$`
                    React.Children.forEach(children, function(child) {
                        if (React.isValidElement(child)) filtered.push(child);
                    });
                    return filtered;
                }
                /**
                 * `AnimatePresence` enables the animation of components that have been removed from the tree.
                 *
                 * When adding/removing more than a single child, every child **must** be given a unique `key` prop.
                 *
                 * Any `motion` components that have an `exit` property defined will animate out when removed from
                 * the tree.
                 *
                 * ```jsx
                 * import { motion, AnimatePresence } from 'framer-motion'
                 *
                 * export const Items = ({ items }) => (
                 *   <AnimatePresence>
                 *     {items.map(item => (
                 *       <motion.div
                 *         key={item.id}
                 *         initial={{ opacity: 0 }}
                 *         animate={{ opacity: 1 }}
                 *         exit={{ opacity: 0 }}
                 *       />
                 *     ))}
                 *   </AnimatePresence>
                 * )
                 * ```
                 *
                 * You can sequence exit animations throughout a tree using variants.
                 *
                 * If a child contains multiple `motion` components with `exit` props, it will only unmount the child
                 * once all `motion` components have finished animating out. Likewise, any components using
                 * `usePresence` all need to call `safeToRemove`.
                 *
                 * @public
                 */
                var AnimatePresence = function(_a) {
                    var children = _a.children,
                        custom = _a.custom,
                        _b = _a.initial,
                        initial = _b === void 0 ? true : _b,
                        onExitComplete = _a.onExitComplete,
                        exitBeforeEnter = _a.exitBeforeEnter,
                        _c = _a.presenceAffectsLayout,
                        presenceAffectsLayout = _c === void 0 ? true : _c;
                    // We want to force a re-render once all exiting animations have finished. We
                    // either use a local forceRender function, or one from a parent context if it exists.
                    var _d = tslib.__read(useForceUpdate(), 1),
                        forceRender = _d[0];
                    var forceRenderLayoutGroup = React.useContext(LayoutGroupContext).forceRender;
                    if (forceRenderLayoutGroup) forceRender = forceRenderLayoutGroup;
                    var isMounted = useIsMounted();
                    // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key
                    var filteredChildren = onlyElements(children);
                    var childrenToRender = filteredChildren;
                    var exiting = new Set();
                    // Keep a living record of the children we're actually rendering so we
                    // can diff to figure out which are entering and exiting
                    var presentChildren = React.useRef(childrenToRender);
                    // A lookup table to quickly reference components by key
                    var allChildren = React.useRef(new Map()).current;
                    // If this is the initial component render, just deal with logic surrounding whether
                    // we play onMount animations or not.
                    var isInitialRender = React.useRef(true);
                    useIsomorphicLayoutEffect(function() {
                        isInitialRender.current = false;
                        updateChildLookup(filteredChildren, allChildren);
                        presentChildren.current = childrenToRender;
                    });
                    useUnmountEffect(function() {
                        isInitialRender.current = true;
                        allChildren.clear();
                        exiting.clear();
                    });
                    if (isInitialRender.current) {
                        return React__namespace.createElement(React__namespace.Fragment, null, childrenToRender.map(function(child) {
                            return React__namespace.createElement(PresenceChild, {
                                key: getChildKey(child),
                                isPresent: true,
                                initial: initial ? undefined : false,
                                presenceAffectsLayout: presenceAffectsLayout
                            }, child);
                        }));
                    }
                    // If this is a subsequent render, deal with entering and exiting children
                    childrenToRender = tslib.__spreadArray([], tslib.__read(childrenToRender), false);
                    // Diff the keys of the currently-present and target children to update our
                    // exiting list.
                    var presentKeys = presentChildren.current.map(getChildKey);
                    var targetKeys = filteredChildren.map(getChildKey);
                    // Diff the present children with our target children and mark those that are exiting
                    var numPresent = presentKeys.length;
                    for (var i = 0; i < numPresent; i++) {
                        var key = presentKeys[i];
                        if (targetKeys.indexOf(key) === -1) {
                            exiting.add(key);
                        }
                    }
                    // If we currently have exiting children, and we're deferring rendering incoming children
                    // until after all current children have exiting, empty the childrenToRender array
                    if (exitBeforeEnter && exiting.size) {
                        childrenToRender = [];
                    }
                    // Loop through all currently exiting components and clone them to overwrite `animate`
                    // with any `exit` prop they might have defined.
                    exiting.forEach(function(key) {
                        // If this component is actually entering again, early return
                        if (targetKeys.indexOf(key) !== -1) return;
                        var child = allChildren.get(key);
                        if (!child) return;
                        var insertionIndex = presentKeys.indexOf(key);
                        var onExit = function() {
                            allChildren.delete(key);
                            exiting.delete(key);
                            // Remove this child from the present children
                            var removeIndex = presentChildren.current.findIndex(function(presentChild) {
                                return presentChild.key === key;
                            });
                            presentChildren.current.splice(removeIndex, 1);
                            // Defer re-rendering until all exiting children have indeed left
                            if (!exiting.size) {
                                presentChildren.current = filteredChildren;
                                if (isMounted.current === false) return;
                                forceRender();
                                onExitComplete && onExitComplete();
                            }
                        };
                        childrenToRender.splice(insertionIndex, 0, React__namespace.createElement(PresenceChild, {
                            key: getChildKey(child),
                            isPresent: false,
                            onExitComplete: onExit,
                            custom: custom,
                            presenceAffectsLayout: presenceAffectsLayout
                        }, child));
                    });
                    // Add `MotionContext` even to children that don't need it to ensure we're rendering
                    // the same tree between renders
                    childrenToRender = childrenToRender.map(function(child) {
                        var key = child.key;
                        return exiting.has(key) ? child : React__namespace.createElement(PresenceChild, {
                            key: getChildKey(child),
                            isPresent: true,
                            presenceAffectsLayout: presenceAffectsLayout
                        }, child);
                    });
                    if (env !== "production" && exitBeforeEnter && childrenToRender.length > 1) {
                        console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour.");
                    }
                    return React__namespace.createElement(React__namespace.Fragment, null, exiting.size ? childrenToRender : childrenToRender.map(function(child) {
                        return React.cloneElement(child);
                    }));
                };

                /**
                 * @deprecated
                 */
                var DeprecatedLayoutGroupContext = React.createContext(null);
                var notify = function(node) {
                    return !node.isLayoutDirty && node.willUpdate(false);
                };

                function nodeGroup() {
                    var nodes = new Set();
                    var subscriptions = new WeakMap();
                    var dirtyAll = function() {
                        return nodes.forEach(notify);
                    };
                    return {
                        add: function(node) {
                            nodes.add(node);
                            subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll));
                        },
                        remove: function(node) {
                            var _a;
                            nodes.delete(node);
                            (_a = subscriptions.get(node)) === null || _a === void 0 ? void 0 : _a();
                            subscriptions.delete(node);
                            dirtyAll();
                        },
                        dirty: dirtyAll
                    };
                }
                var shouldInheritGroup = function(inherit) {
                    return inherit === true;
                };
                var shouldInheritId = function(inherit) {
                    return shouldInheritGroup(inherit === true) || inherit === "id";
                };
                var LayoutGroup = function(_a) {
                    var _b, _c;
                    var children = _a.children,
                        id = _a.id,
                        inheritId = _a.inheritId,
                        _d = _a.inherit,
                        inherit = _d === void 0 ? true : _d;
                    // Maintain backwards-compatibility with inheritId until 7.0
                    if (inheritId !== undefined) inherit = inheritId;
                    var layoutGroupContext = React.useContext(LayoutGroupContext);
                    var deprecatedLayoutGroupContext = React.useContext(DeprecatedLayoutGroupContext);
                    var _e = tslib.__read(useForceUpdate(), 2),
                        forceRender = _e[0],
                        key = _e[1];
                    var context = React.useRef(null);
                    var upstreamId = (_b = layoutGroupContext.id) !== null && _b !== void 0 ? _b : deprecatedLayoutGroupContext;
                    if (context.current === null) {
                        if (shouldInheritId(inherit) && upstreamId) {
                            id = id ? upstreamId + "-" + id : upstreamId;
                        }
                        context.current = {
                            id: id,
                            group: shouldInheritGroup(inherit) ? (_c = layoutGroupContext === null || layoutGroupContext === void 0 ? void 0 : layoutGroupContext.group) !== null && _c !== void 0 ? _c : nodeGroup() : nodeGroup()
                        };
                    }
                    var memoizedContext = React.useMemo(function() {
                        return tslib.__assign(tslib.__assign({}, context.current), {
                            forceRender: forceRender
                        });
                    }, [key]);
                    return React__namespace.createElement(LayoutGroupContext.Provider, {
                        value: memoizedContext
                    }, children);
                };
                var id = 0;
                var AnimateSharedLayout = function(_a) {
                    var children = _a.children;
                    React__namespace.useEffect(function() {
                        heyListen.warning(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations");
                    }, []);
                    return React__namespace.createElement(LayoutGroup, {
                        id: useConstant(function() {
                            return "asl-".concat(id++);
                        })
                    }, children);
                };

                /**
                 * `MotionConfig` is used to set configuration options for all children `motion` components.
                 *
                 * ```jsx
                 * import { motion, MotionConfig } from "framer-motion"
                 *
                 * export function App() {
                 *   return (
                 *     <MotionConfig transition={{ type: "spring" }}>
                 *       <motion.div animate={{ x: 100 }} />
                 *     </MotionConfig>
                 *   )
                 * }
                 * ```
                 *
                 * @public
                 */
                function MotionConfig(_a) {
                    var children = _a.children,
                        isValidProp = _a.isValidProp,
                        config = tslib.__rest(_a, ["children", "isValidProp"]);
                    isValidProp && loadExternalIsValidProp(isValidProp);
                    /**
                     * Inherit props from any parent MotionConfig components
                     */
                    config = tslib.__assign(tslib.__assign({}, React.useContext(MotionConfigContext)), config);
                    /**
                     * Don't allow isStatic to change between renders as it affects how many hooks
                     * motion components fire.
                     */
                    config.isStatic = useConstant(function() {
                        return config.isStatic;
                    });
                    /**
                     * Creating a new config context object will re-render every `motion` component
                     * every time it renders. So we only want to create a new one sparingly.
                     */
                    var context = React.useMemo(function() {
                        return config;
                    }, [JSON.stringify(config.transition), config.transformPagePoint, config.reducedMotion]);
                    return React__namespace.createElement(MotionConfigContext.Provider, {
                        value: context
                    }, children);
                }

                /**
                 * Used in conjunction with the `m` component to reduce bundle size.
                 *
                 * `m` is a version of the `motion` component that only loads functionality
                 * critical for the initial render.
                 *
                 * `LazyMotion` can then be used to either synchronously or asynchronously
                 * load animation and gesture support.
                 *
                 * ```jsx
                 * // Synchronous loading
                 * import { LazyMotion, m, domAnimations } from "framer-motion"
                 *
                 * function App() {
                 *   return (
                 *     <LazyMotion features={domAnimations}>
                 *       <m.div animate={{ scale: 2 }} />
                 *     </LazyMotion>
                 *   )
                 * }
                 *
                 * // Asynchronous loading
                 * import { LazyMotion, m } from "framer-motion"
                 *
                 * function App() {
                 *   return (
                 *     <LazyMotion features={() => import('./path/to/domAnimations')}>
                 *       <m.div animate={{ scale: 2 }} />
                 *     </LazyMotion>
                 *   )
                 * }
                 * ```
                 *
                 * @public
                 */
                function LazyMotion(_a) {
                    var children = _a.children,
                        features = _a.features,
                        _b = _a.strict,
                        strict = _b === void 0 ? false : _b;
                    var _c = tslib.__read(React.useState(!isLazyBundle(features)), 2),
                        setIsLoaded = _c[1];
                    var loadedRenderer = React.useRef(undefined);
                    /**
                     * If this is a synchronous load, load features immediately
                     */
                    if (!isLazyBundle(features)) {
                        var renderer = features.renderer,
                            loadedFeatures = tslib.__rest(features, ["renderer"]);
                        loadedRenderer.current = renderer;
                        loadFeatures(loadedFeatures);
                    }
                    React.useEffect(function() {
                        if (isLazyBundle(features)) {
                            features().then(function(_a) {
                                var renderer = _a.renderer,
                                    loadedFeatures = tslib.__rest(_a, ["renderer"]);
                                loadFeatures(loadedFeatures);
                                loadedRenderer.current = renderer;
                                setIsLoaded(true);
                            });
                        }
                    }, []);
                    return React__namespace.createElement(LazyContext.Provider, {
                        value: {
                            renderer: loadedRenderer.current,
                            strict: strict
                        }
                    }, children);
                }

                function isLazyBundle(features) {
                    return typeof features === "function";
                }
                var ReorderContext = React.createContext(null);

                function checkReorder(order, value, offset, velocity) {
                    if (!velocity) return order;
                    var index = order.findIndex(function(item) {
                        return item.value === value;
                    });
                    if (index === -1) return order;
                    var nextOffset = velocity > 0 ? 1 : -1;
                    var nextItem = order[index + nextOffset];
                    if (!nextItem) return order;
                    var item = order[index];
                    var nextLayout = nextItem.layout;
                    var nextItemCenter = popmotion.mix(nextLayout.min, nextLayout.max, 0.5);
                    if (nextOffset === 1 && item.layout.max + offset > nextItemCenter || nextOffset === -1 && item.layout.min + offset < nextItemCenter) {
                        return moveItem(order, index, index + nextOffset);
                    }
                    return order;
                }

                function ReorderGroup(_a, externalRef) {
                    var children = _a.children,
                        _b = _a.as,
                        as = _b === void 0 ? "ul" : _b,
                        _c = _a.axis,
                        axis = _c === void 0 ? "y" : _c,
                        onReorder = _a.onReorder,
                        values = _a.values,
                        props = tslib.__rest(_a, ["children", "as", "axis", "onReorder", "values"]);
                    var Component = useConstant(function() {
                        return motion(as);
                    });
                    var order = [];
                    var isReordering = React.useRef(false);
                    heyListen.invariant(Boolean(values), "Reorder.Group must be provided a values prop");
                    var context = {
                        axis: axis,
                        registerItem: function(value, layout) {
                            /**
                             * Ensure entries can't add themselves more than once
                             */
                            if (layout && order.findIndex(function(entry) {
                                    return value === entry.value;
                                }) === -1) {
                                order.push({
                                    value: value,
                                    layout: layout[axis]
                                });
                                order.sort(compareMin);
                            }
                        },
                        updateOrder: function(id, offset, velocity) {
                            if (isReordering.current) return;
                            var newOrder = checkReorder(order, id, offset, velocity);
                            if (order !== newOrder) {
                                isReordering.current = true;
                                onReorder(newOrder.map(getValue).filter(function(value) {
                                    return values.indexOf(value) !== -1;
                                }));
                            }
                        }
                    };
                    React.useEffect(function() {
                        isReordering.current = false;
                    });
                    return React__namespace.createElement(Component, tslib.__assign({}, props, {
                        ref: externalRef
                    }), React__namespace.createElement(ReorderContext.Provider, {
                        value: context
                    }, children));
                }
                var Group = React.forwardRef(ReorderGroup);

                function getValue(item) {
                    return item.value;
                }

                function compareMin(a, b) {
                    return a.layout.min - b.layout.min;
                }

                /**
                 * Creates a `MotionValue` to track the state and velocity of a value.
                 *
                 * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.
                 *
                 * ```jsx
                 * export const MyComponent = () => {
                 *   const scale = useMotionValue(1)
                 *
                 *   return <motion.div style={{ scale }} />
                 * }
                 * ```
                 *
                 * @param initial - The initial state.
                 *
                 * @public
                 */
                function useMotionValue(initial) {
                    var value = useConstant(function() {
                        return motionValue(initial);
                    });
                    /**
                     * If this motion value is being used in static mode, like on
                     * the Framer canvas, force components to rerender when the motion
                     * value is updated.
                     */
                    var isStatic = React.useContext(MotionConfigContext).isStatic;
                    if (isStatic) {
                        var _a = tslib.__read(React.useState(initial), 2),
                            setLatest_1 = _a[1];
                        React.useEffect(function() {
                            return value.onChange(setLatest_1);
                        }, []);
                    }
                    return value;
                }
                var isCustomValueType = function(v) {
                    return typeof v === "object" && v.mix;
                };
                var getMixer = function(v) {
                    return isCustomValueType(v) ? v.mix : undefined;
                };

                function transform() {
                    var args = [];
                    for (var _i = 0; _i < arguments.length; _i++) {
                        args[_i] = arguments[_i];
                    }
                    var useImmediate = !Array.isArray(args[0]);
                    var argOffset = useImmediate ? 0 : -1;
                    var inputValue = args[0 + argOffset];
                    var inputRange = args[1 + argOffset];
                    var outputRange = args[2 + argOffset];
                    var options = args[3 + argOffset];
                    var interpolator = popmotion.interpolate(inputRange, outputRange, tslib.__assign({
                        mixer: getMixer(outputRange[0])
                    }, options));
                    return useImmediate ? interpolator(inputValue) : interpolator;
                }

                function useOnChange(value, callback) {
                    useIsomorphicLayoutEffect(function() {
                        if (isMotionValue(value)) return value.onChange(callback);
                    }, [callback]);
                }

                function useMultiOnChange(values, handler) {
                    useIsomorphicLayoutEffect(function() {
                        var subscriptions = values.map(function(value) {
                            return value.onChange(handler);
                        });
                        return function() {
                            return subscriptions.forEach(function(unsubscribe) {
                                return unsubscribe();
                            });
                        };
                    });
                }

                function useCombineMotionValues(values, combineValues) {
                    /**
                     * Initialise the returned motion value. This remains the same between renders.
                     */
                    var value = useMotionValue(combineValues());
                    /**
                     * Create a function that will update the template motion value with the latest values.
                     * This is pre-bound so whenever a motion value updates it can schedule its
                     * execution in Framesync. If it's already been scheduled it won't be fired twice
                     * in a single frame.
                     */
                    var updateValue = function() {
                        return value.set(combineValues());
                    };
                    /**
                     * Synchronously update the motion value with the latest values during the render.
                     * This ensures that within a React render, the styles applied to the DOM are up-to-date.
                     */
                    updateValue();
                    /**
                     * Subscribe to all motion values found within the template. Whenever any of them change,
                     * schedule an update.
                     */
                    useMultiOnChange(values, function() {
                        return sync__default["default"].update(updateValue, false, true);
                    });
                    return value;
                }

                function useTransform(input, inputRangeOrTransformer, outputRange, options) {
                    var transformer = typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : transform(inputRangeOrTransformer, outputRange, options);
                    return Array.isArray(input) ? useListTransform(input, transformer) : useListTransform([input], function(_a) {
                        var _b = tslib.__read(_a, 1),
                            latest = _b[0];
                        return transformer(latest);
                    });
                }

                function useListTransform(values, transformer) {
                    var latest = useConstant(function() {
                        return [];
                    });
                    return useCombineMotionValues(values, function() {
                        latest.length = 0;
                        var numValues = values.length;
                        for (var i = 0; i < numValues; i++) {
                            latest[i] = values[i].get();
                        }
                        return transformer(latest);
                    });
                }

                function useDefaultMotionValue(value, defaultValue) {
                    if (defaultValue === void 0) {
                        defaultValue = 0;
                    }
                    return isMotionValue(value) ? value : useMotionValue(defaultValue);
                }

                function ReorderItem(_a, externalRef) {
                    var children = _a.children,
                        style = _a.style,
                        value = _a.value,
                        _b = _a.as,
                        as = _b === void 0 ? "li" : _b,
                        onDrag = _a.onDrag,
                        _c = _a.layout,
                        layout = _c === void 0 ? true : _c,
                        props = tslib.__rest(_a, ["children", "style", "value", "as", "onDrag", "layout"]);
                    var Component = useConstant(function() {
                        return motion(as);
                    });
                    var context = React.useContext(ReorderContext);
                    var point = {
                        x: useDefaultMotionValue(style === null || style === void 0 ? void 0 : style.x),
                        y: useDefaultMotionValue(style === null || style === void 0 ? void 0 : style.y)
                    };
                    var zIndex = useTransform([point.x, point.y], function(_a) {
                        var _b = tslib.__read(_a, 2),
                            latestX = _b[0],
                            latestY = _b[1];
                        return latestX || latestY ? 1 : "unset";
                    });
                    var measuredLayout = React.useRef(null);
                    heyListen.invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group");
                    var _d = context,
                        axis = _d.axis,
                        registerItem = _d.registerItem,
                        updateOrder = _d.updateOrder;
                    React.useEffect(function() {
                        registerItem(value, measuredLayout.current);
                    }, [context]);
                    return React__namespace.createElement(Component, tslib.__assign({
                        drag: axis
                    }, props, {
                        dragSnapToOrigin: true,
                        style: tslib.__assign(tslib.__assign({}, style), {
                            x: point.x,
                            y: point.y,
                            zIndex: zIndex
                        }),
                        layout: layout,
                        onDrag: function(event, gesturePoint) {
                            var velocity = gesturePoint.velocity;
                            velocity[axis] && updateOrder(value, point[axis].get(), velocity[axis]);
                            onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, gesturePoint);
                        },
                        onLayoutMeasure: function(measured) {
                            measuredLayout.current = measured;
                        },
                        ref: externalRef
                    }), children);
                }
                var Item = React.forwardRef(ReorderItem);
                var Reorder = {
                    Group: Group,
                    Item: Item
                };

                /**
                 * @public
                 */
                var domAnimation = tslib.__assign(tslib.__assign({
                    renderer: createDomVisualElement
                }, animations), gestureAnimations);

                /**
                 * @public
                 */
                var domMax = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, domAnimation), drag), layoutFeatures), {
                    projectionNodeConstructor: HTMLProjectionNode
                });

                /**
                 * Combine multiple motion values into a new one using a string template literal.
                 *
                 * ```jsx
                 * import {
                 *   motion,
                 *   useSpring,
                 *   useMotionValue,
                 *   useMotionTemplate
                 * } from "framer-motion"
                 *
                 * function Component() {
                 *   const shadowX = useSpring(0)
                 *   const shadowY = useMotionValue(0)
                 *   const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))`
                 *
                 *   return <motion.div style={{ filter: shadow }} />
                 * }
                 * ```
                 *
                 * @public
                 */
                function useMotionTemplate(fragments) {
                    var values = [];
                    for (var _i = 1; _i < arguments.length; _i++) {
                        values[_i - 1] = arguments[_i];
                    }
                    /**
                     * Create a function that will build a string from the latest motion values.
                     */
                    var numFragments = fragments.length;

                    function buildValue() {
                        var output = "";
                        for (var i = 0; i < numFragments; i++) {
                            output += fragments[i];
                            var value = values[i];
                            if (value) output += values[i].get();
                        }
                        return output;
                    }
                    return useCombineMotionValues(values, buildValue);
                }

                /**
                 * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.
                 *
                 * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber
                 * to another `MotionValue`.
                 *
                 * @remarks
                 *
                 * ```jsx
                 * const x = useSpring(0, { stiffness: 300 })
                 * const y = useSpring(x, { damping: 10 })
                 * ```
                 *
                 * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.
                 * @param springConfig - Configuration options for the spring.
                 * @returns `MotionValue`
                 *
                 * @public
                 */
                function useSpring(source, config) {
                    if (config === void 0) {
                        config = {};
                    }
                    var isStatic = React.useContext(MotionConfigContext).isStatic;
                    var activeSpringAnimation = React.useRef(null);
                    var value = useMotionValue(isMotionValue(source) ? source.get() : source);
                    React.useMemo(function() {
                        return value.attach(function(v, set) {
                            /**
                             * A more hollistic approach to this might be to use isStatic to fix VisualElement animations
                             * at that level, but this will work for now
                             */
                            if (isStatic) return set(v);
                            if (activeSpringAnimation.current) {
                                activeSpringAnimation.current.stop();
                            }
                            activeSpringAnimation.current = popmotion.animate(tslib.__assign(tslib.__assign({
                                from: value.get(),
                                to: v,
                                velocity: value.getVelocity()
                            }, config), {
                                onUpdate: set
                            }));
                            return value.get();
                        });
                    }, [JSON.stringify(config)]);
                    useOnChange(source, function(v) {
                        return value.set(parseFloat(v));
                    });
                    return value;
                }

                /**
                 * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
                 *
                 * ```javascript
                 * const x = useMotionValue(0)
                 * const xVelocity = useVelocity(x)
                 * const xAcceleration = useVelocity(xVelocity)
                 * ```
                 *
                 * @public
                 */
                function useVelocity(value) {
                    var velocity = useMotionValue(value.getVelocity());
                    React.useEffect(function() {
                        return value.velocityUpdateSubscribers.add(function(newVelocity) {
                            velocity.set(newVelocity);
                        });
                    }, [value]);
                    return velocity;
                }
                var createScrollMotionValues = function() {
                    return {
                        scrollX: motionValue(0),
                        scrollY: motionValue(0),
                        scrollXProgress: motionValue(0),
                        scrollYProgress: motionValue(0)
                    };
                };

                function useScroll(_a) {
                    if (_a === void 0) {
                        _a = {};
                    }
                    var container = _a.container,
                        target = _a.target,
                        options = tslib.__rest(_a, ["container", "target"]);
                    var values = useConstant(createScrollMotionValues);
                    useIsomorphicLayoutEffect(function() {
                        return dom.scroll(function(_a) {
                            var x = _a.x,
                                y = _a.y;
                            values.scrollX.set(x.current);
                            values.scrollXProgress.set(x.progress);
                            values.scrollY.set(y.current);
                            values.scrollYProgress.set(y.progress);
                        }, tslib.__assign(tslib.__assign({}, options), {
                            container: (container === null || container === void 0 ? void 0 : container.current) || undefined,
                            target: (target === null || target === void 0 ? void 0 : target.current) || undefined
                        }));
                    }, []);
                    return values;
                }

                function useElementScroll(ref) {
                    warnOnce(false, "useElementScroll is deprecated. Convert to useScroll({ container: ref }).");
                    return useScroll({
                        container: ref
                    });
                }

                function useViewportScroll() {
                    warnOnce(false, "useViewportScroll is deprecated. Convert to useScroll().");
                    return useScroll();
                }
                var getCurrentTime = typeof performance !== "undefined" ? function() {
                    return performance.now();
                } : function() {
                    return Date.now();
                };

                function useAnimationFrame(callback) {
                    var initialTimestamp = useConstant(getCurrentTime);
                    var isStatic = React.useContext(MotionConfigContext).isStatic;
                    React.useEffect(function() {
                        if (isStatic) return;
                        var provideTimeSinceStart = function(_a) {
                            var timestamp = _a.timestamp;
                            callback(timestamp - initialTimestamp);
                        };
                        sync__default["default"].update(provideTimeSinceStart, true);
                        return function() {
                            return sync.cancelSync.update(provideTimeSinceStart);
                        };
                    }, [callback]);
                }

                function useTime() {
                    var time = useMotionValue(0);
                    useAnimationFrame(function(t) {
                        return time.set(t);
                    });
                    return time;
                }

                /**
                 * @public
                 */
                function animationControls() {
                    /**
                     * Track whether the host component has mounted.
                     */
                    var hasMounted = false;
                    /**
                     * Pending animations that are started before a component is mounted.
                     * TODO: Remove this as animations should only run in effects
                     */
                    var pendingAnimations = [];
                    /**
                     * A collection of linked component animation controls.
                     */
                    var subscribers = new Set();
                    var controls = {
                        subscribe: function(visualElement) {
                            subscribers.add(visualElement);
                            return function() {
                                return void subscribers.delete(visualElement);
                            };
                        },
                        start: function(definition, transitionOverride) {
                            /**
                             * TODO: We only perform this hasMounted check because in Framer we used to
                             * encourage the ability to start an animation within the render phase. This
                             * isn't behaviour concurrent-safe so when we make Framer concurrent-safe
                             * we can ditch this.
                             */
                            if (hasMounted) {
                                var animations_1 = [];
                                subscribers.forEach(function(visualElement) {
                                    animations_1.push(animateVisualElement(visualElement, definition, {
                                        transitionOverride: transitionOverride
                                    }));
                                });
                                return Promise.all(animations_1);
                            } else {
                                return new Promise(function(resolve) {
                                    pendingAnimations.push({
                                        animation: [definition, transitionOverride],
                                        resolve: resolve
                                    });
                                });
                            }
                        },
                        set: function(definition) {
                            heyListen.invariant(hasMounted, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.");
                            return subscribers.forEach(function(visualElement) {
                                setValues(visualElement, definition);
                            });
                        },
                        stop: function() {
                            subscribers.forEach(function(visualElement) {
                                stopAnimation(visualElement);
                            });
                        },
                        mount: function() {
                            hasMounted = true;
                            pendingAnimations.forEach(function(_a) {
                                var animation = _a.animation,
                                    resolve = _a.resolve;
                                controls.start.apply(controls, tslib.__spreadArray([], tslib.__read(animation), false)).then(resolve);
                            });
                            return function() {
                                hasMounted = false;
                                controls.stop();
                            };
                        }
                    };
                    return controls;
                }

                /**
                 * Creates `AnimationControls`, which can be used to manually start, stop
                 * and sequence animations on one or more components.
                 *
                 * The returned `AnimationControls` should be passed to the `animate` property
                 * of the components you want to animate.
                 *
                 * These components can then be animated with the `start` method.
                 *
                 * ```jsx
                 * import * as React from 'react'
                 * import { motion, useAnimation } from 'framer-motion'
                 *
                 * export function MyComponent(props) {
                 *    const controls = useAnimation()
                 *
                 *    controls.start({
                 *        x: 100,
                 *        transition: { duration: 0.5 },
                 *    })
                 *
                 *    return <motion.div animate={controls} />
                 * }
                 * ```
                 *
                 * @returns Animation controller with `start` and `stop` methods
                 *
                 * @public
                 */
                function useAnimationControls() {
                    var controls = useConstant(animationControls);
                    React.useEffect(controls.mount, []);
                    return controls;
                }
                var useAnimation = useAnimationControls;

                /**
                 * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.
                 *
                 * An index value can be passed to the returned `cycle` function to cycle to a specific index.
                 *
                 * ```jsx
                 * import * as React from "react"
                 * import { motion, useCycle } from "framer-motion"
                 *
                 * export const MyComponent = () => {
                 *   const [x, cycleX] = useCycle(0, 50, 100)
                 *
                 *   return (
                 *     <motion.div
                 *       animate={{ x: x }}
                 *       onTap={() => cycleX()}
                 *      />
                 *    )
                 * }
                 * ```
                 *
                 * @param items - items to cycle through
                 * @returns [currentState, cycleState]
                 *
                 * @public
                 */
                function useCycle() {
                    var items = [];
                    for (var _i = 0; _i < arguments.length; _i++) {
                        items[_i] = arguments[_i];
                    }
                    var index = React.useRef(0);
                    var _a = tslib.__read(React.useState(items[index.current]), 2),
                        item = _a[0],
                        setItem = _a[1];
                    var runCycle = React.useCallback(function(next) {
                        index.current = typeof next !== "number" ? popmotion.wrap(0, items.length, index.current + 1) : next;
                        setItem(items[index.current]);
                    }, tslib.__spreadArray([items.length], tslib.__read(items), false));
                    return [item, runCycle];
                }

                function useInView(ref, _a) {
                    var _b = _a === void 0 ? {} : _a,
                        root = _b.root,
                        margin = _b.margin,
                        amount = _b.amount,
                        _c = _b.once,
                        once = _c === void 0 ? false : _c;
                    var _d = tslib.__read(React.useState(false), 2),
                        isInView = _d[0],
                        setInView = _d[1];
                    React.useEffect(function() {
                        var _a;
                        if (!ref.current || once && isInView) return;
                        var onEnter = function() {
                            setInView(true);
                            return once ? undefined : function() {
                                return setInView(false);
                            };
                        };
                        var options = {
                            root: (_a = root === null || root === void 0 ? void 0 : root.current) !== null && _a !== void 0 ? _a : undefined,
                            margin: margin,
                            amount: amount === "some" ? "any" : amount
                        };
                        return dom.inView(ref.current, onEnter, options);
                    }, [root, ref, margin, once]);
                    return isInView;
                }

                /**
                 * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.
                 *
                 * ```jsx
                 * const dragControls = useDragControls()
                 *
                 * function startDrag(event) {
                 *   dragControls.start(event, { snapToCursor: true })
                 * }
                 *
                 * return (
                 *   <>
                 *     <div onPointerDown={startDrag} />
                 *     <motion.div drag="x" dragControls={dragControls} />
                 *   </>
                 * )
                 * ```
                 *
                 * @public
                 */
                var DragControls = /** @class */ function() {
                    function DragControls() {
                        this.componentControls = new Set();
                    }
                    /**
                     * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.
                     *
                     * @internal
                     */
                    DragControls.prototype.subscribe = function(controls) {
                        var _this = this;
                        this.componentControls.add(controls);
                        return function() {
                            return _this.componentControls.delete(controls);
                        };
                    };
                    /**
                     * Start a drag gesture on every `motion` component that has this set of drag controls
                     * passed into it via the `dragControls` prop.
                     *
                     * ```jsx
                     * dragControls.start(e, {
                     *   snapToCursor: true
                     * })
                     * ```
                     *
                     * @param event - PointerEvent
                     * @param options - Options
                     *
                     * @public
                     */
                    DragControls.prototype.start = function(event, options) {
                        this.componentControls.forEach(function(controls) {
                            controls.start(event.nativeEvent || event, options);
                        });
                    };
                    return DragControls;
                }();
                var createDragControls = function() {
                    return new DragControls();
                };
                /**
                 * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop
                 * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we
                 * might want to initiate that dragging from a different component than the draggable one.
                 *
                 * By creating a `dragControls` using the `useDragControls` hook, we can pass this into
                 * the draggable component's `dragControls` prop. It exposes a `start` method
                 * that can start dragging from pointer events on other components.
                 *
                 * ```jsx
                 * const dragControls = useDragControls()
                 *
                 * function startDrag(event) {
                 *   dragControls.start(event, { snapToCursor: true })
                 * }
                 *
                 * return (
                 *   <>
                 *     <div onPointerDown={startDrag} />
                 *     <motion.div drag="x" dragControls={dragControls} />
                 *   </>
                 * )
                 * ```
                 *
                 * @public
                 */
                function useDragControls() {
                    return useConstant(createDragControls);
                }

                function useInstantLayoutTransition() {
                    return startTransition;
                }

                function startTransition(cb) {
                    if (!rootProjectionNode.current) return;
                    rootProjectionNode.current.isUpdating = false;
                    rootProjectionNode.current.blockUpdate();
                    cb === null || cb === void 0 ? void 0 : cb();
                }

                function useInstantTransition() {
                    var _a = tslib.__read(useForceUpdate(), 2),
                        forceUpdate = _a[0],
                        forcedRenderCount = _a[1];
                    var startInstantLayoutTransition = useInstantLayoutTransition();
                    React.useEffect(function() {
                        /**
                         * Unblock after two animation frames, otherwise this will unblock too soon.
                         */
                        sync__default["default"].postRender(function() {
                            return sync__default["default"].postRender(function() {
                                return instantAnimationState.current = false;
                            });
                        });
                    }, [forcedRenderCount]);
                    return function(callback) {
                        startInstantLayoutTransition(function() {
                            instantAnimationState.current = true;
                            forceUpdate();
                            callback();
                        });
                    };
                }

                function useResetProjection() {
                    var reset = React__namespace.useCallback(function() {
                        var root = rootProjectionNode.current;
                        if (!root) return;
                        root.resetTree();
                    }, []);
                    return reset;
                }
                var createObject = function() {
                    return {};
                };
                var stateVisualElement = visualElement({
                    build: function() {},
                    measureViewportBox: createBox,
                    resetTransform: function() {},
                    restoreTransform: function() {},
                    removeValueFromRenderState: function() {},
                    render: function() {},
                    scrapeMotionValuesFromProps: createObject,
                    readValueFromInstance: function(_state, key, options) {
                        return options.initialState[key] || 0;
                    },
                    makeTargetAnimatable: function(element, _a) {
                        var transition = _a.transition,
                            transitionEnd = _a.transitionEnd,
                            target = tslib.__rest(_a, ["transition", "transitionEnd"]);
                        var origin = getOrigin(target, transition || {}, element);
                        checkTargetForNewValues(element, target, origin);
                        return tslib.__assign({
                            transition: transition,
                            transitionEnd: transitionEnd
                        }, target);
                    }
                });
                var useVisualState = makeUseVisualState({
                    scrapeMotionValuesFromProps: createObject,
                    createRenderState: createObject
                });
                /**
                 * This is not an officially supported API and may be removed
                 * on any version.
                 */
                function useAnimatedState(initialState) {
                    var _a = tslib.__read(React.useState(initialState), 2),
                        animationState = _a[0],
                        setAnimationState = _a[1];
                    var visualState = useVisualState({}, false);
                    var element = useConstant(function() {
                        return stateVisualElement({
                            props: {},
                            visualState: visualState
                        }, {
                            initialState: initialState
                        });
                    });
                    React.useEffect(function() {
                        element.mount({});
                        return element.unmount;
                    }, [element]);
                    React.useEffect(function() {
                        element.setProps({
                            onUpdate: function(v) {
                                setAnimationState(tslib.__assign({}, v));
                            }
                        });
                    }, [setAnimationState, element]);
                    var startAnimation = useConstant(function() {
                        return function(animationDefinition) {
                            return animateVisualElement(element, animationDefinition);
                        };
                    });
                    return [animationState, startAnimation];
                }

                // Keep things reasonable and avoid scale: Infinity. In practise we might need
                // to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1]
                // to simply hide content at unreasonable scales.
                var maxScale = 100000;
                var invertScale = function(scale) {
                    return scale > 0.001 ? 1 / scale : maxScale;
                };
                var hasWarned = false;
                /**
                 * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse
                 * of their respective parent scales.
                 *
                 * This is useful for undoing the distortion of content when scaling a parent component.
                 *
                 * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent.
                 * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output
                 * of those instead.
                 *
                 * ```jsx
                 * const MyComponent = () => {
                 *   const { scaleX, scaleY } = useInvertedScale()
                 *   return <motion.div style={{ scaleX, scaleY }} />
                 * }
                 * ```
                 *
                 * @deprecated
                 */
                function useInvertedScale(scale) {
                    var parentScaleX = useMotionValue(1);
                    var parentScaleY = useMotionValue(1);
                    var visualElement = useVisualElementContext();
                    heyListen.invariant(!!(scale || visualElement), "If no scale values are provided, useInvertedScale must be used within a child of another motion component.");
                    heyListen.warning(hasWarned, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.");
                    hasWarned = true;
                    if (scale) {
                        parentScaleX = scale.scaleX || parentScaleX;
                        parentScaleY = scale.scaleY || parentScaleY;
                    } else if (visualElement) {
                        parentScaleX = visualElement.getValue("scaleX", 1);
                        parentScaleY = visualElement.getValue("scaleY", 1);
                    }
                    var scaleX = useTransform(parentScaleX, invertScale);
                    var scaleY = useTransform(parentScaleY, invertScale);
                    return {
                        scaleX: scaleX,
                        scaleY: scaleY
                    };
                }
                exports.AnimatePresence = AnimatePresence;
                exports.AnimateSharedLayout = AnimateSharedLayout;
                exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext;
                exports.DragControls = DragControls;
                exports.FlatTree = FlatTree;
                exports.LayoutGroup = LayoutGroup;
                exports.LayoutGroupContext = LayoutGroupContext;
                exports.LazyMotion = LazyMotion;
                exports.MotionConfig = MotionConfig;
                exports.MotionConfigContext = MotionConfigContext;
                exports.MotionContext = MotionContext;
                exports.MotionValue = MotionValue;
                exports.PresenceContext = PresenceContext;
                exports.Reorder = Reorder;
                exports.SwitchLayoutGroupContext = SwitchLayoutGroupContext;
                exports.addPointerEvent = addPointerEvent;
                exports.addScaleCorrector = addScaleCorrector;
                exports.animate = animate;
                exports.animateVisualElement = animateVisualElement;
                exports.animationControls = animationControls;
                exports.animations = animations;
                exports.calcLength = calcLength;
                exports.checkTargetForNewValues = checkTargetForNewValues;
                exports.createBox = createBox;
                exports.createDomMotionComponent = createDomMotionComponent;
                exports.createMotionComponent = createMotionComponent;
                exports.domAnimation = domAnimation;
                exports.domMax = domMax;
                exports.filterProps = filterProps;
                exports.isBrowser = isBrowser;
                exports.isDragActive = isDragActive;
                exports.isMotionValue = isMotionValue;
                exports.isValidMotionProp = isValidMotionProp;
                exports.m = m;
                exports.makeUseVisualState = makeUseVisualState;
                exports.motion = motion;
                exports.motionValue = motionValue;
                exports.resolveMotionValue = resolveMotionValue;
                exports.transform = transform;
                exports.useAnimation = useAnimation;
                exports.useAnimationControls = useAnimationControls;
                exports.useAnimationFrame = useAnimationFrame;
                exports.useCycle = useCycle;
                exports.useDeprecatedAnimatedState = useAnimatedState;
                exports.useDeprecatedInvertedScale = useInvertedScale;
                exports.useDomEvent = useDomEvent;
                exports.useDragControls = useDragControls;
                exports.useElementScroll = useElementScroll;
                exports.useForceUpdate = useForceUpdate;
                exports.useInView = useInView;
                exports.useInstantLayoutTransition = useInstantLayoutTransition;
                exports.useInstantTransition = useInstantTransition;
                exports.useIsPresent = useIsPresent;
                exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
                exports.useMotionTemplate = useMotionTemplate;
                exports.useMotionValue = useMotionValue;
                exports.usePresence = usePresence;
                exports.useReducedMotion = useReducedMotion;
                exports.useReducedMotionConfig = useReducedMotionConfig;
                exports.useResetProjection = useResetProjection;
                exports.useScroll = useScroll;
                exports.useSpring = useSpring;
                exports.useTime = useTime;
                exports.useTransform = useTransform;
                exports.useUnmountEffect = useUnmountEffect;
                exports.useVelocity = useVelocity;
                exports.useViewportScroll = useViewportScroll;
                exports.useVisualElementContext = useVisualElementContext;
                exports.visualElement = visualElement;
                exports.wrapHandler = wrapHandler;

                /***/
            }),

        /***/
        "../../../node_modules/framesync/dist/framesync.cjs.js":
            /*!*************************************************************!*\
              !*** ../../../node_modules/framesync/dist/framesync.cjs.js ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                const defaultTimestep = 1 / 60 * 1000;
                const getCurrentTime = typeof performance !== "undefined" ? () => performance.now() : () => Date.now();
                const onNextFrame = typeof window !== "undefined" ? callback => window.requestAnimationFrame(callback) : callback => setTimeout(() => callback(getCurrentTime()), defaultTimestep);

                function createRenderStep(runNextFrame) {
                    let toRun = [];
                    let toRunNextFrame = [];
                    let numToRun = 0;
                    let isProcessing = false;
                    let flushNextFrame = false;
                    const toKeepAlive = new WeakSet();
                    const step = {
                        schedule: (callback, keepAlive = false, immediate = false) => {
                            const addToCurrentFrame = immediate && isProcessing;
                            const buffer = addToCurrentFrame ? toRun : toRunNextFrame;
                            if (keepAlive) toKeepAlive.add(callback);
                            if (buffer.indexOf(callback) === -1) {
                                buffer.push(callback);
                                if (addToCurrentFrame && isProcessing) numToRun = toRun.length;
                            }
                            return callback;
                        },
                        cancel: callback => {
                            const index = toRunNextFrame.indexOf(callback);
                            if (index !== -1) toRunNextFrame.splice(index, 1);
                            toKeepAlive.delete(callback);
                        },
                        process: frameData => {
                            if (isProcessing) {
                                flushNextFrame = true;
                                return;
                            }
                            isProcessing = true;
                            [toRun, toRunNextFrame] = [toRunNextFrame, toRun];
                            toRunNextFrame.length = 0;
                            numToRun = toRun.length;
                            if (numToRun) {
                                for (let i = 0; i < numToRun; i++) {
                                    const callback = toRun[i];
                                    callback(frameData);
                                    if (toKeepAlive.has(callback)) {
                                        step.schedule(callback);
                                        runNextFrame();
                                    }
                                }
                            }
                            isProcessing = false;
                            if (flushNextFrame) {
                                flushNextFrame = false;
                                step.process(frameData);
                            }
                        }
                    };
                    return step;
                }
                const maxElapsed = 40;
                let useDefaultElapsed = true;
                let runNextFrame = false;
                let isProcessing = false;
                const frame = {
                    delta: 0,
                    timestamp: 0
                };
                const stepsOrder = ["read", "update", "preRender", "render", "postRender"];
                const steps = stepsOrder.reduce((acc, key) => {
                    acc[key] = createRenderStep(() => runNextFrame = true);
                    return acc;
                }, {});
                const sync = stepsOrder.reduce((acc, key) => {
                    const step = steps[key];
                    acc[key] = (process, keepAlive = false, immediate = false) => {
                        if (!runNextFrame) startLoop();
                        return step.schedule(process, keepAlive, immediate);
                    };
                    return acc;
                }, {});
                const cancelSync = stepsOrder.reduce((acc, key) => {
                    acc[key] = steps[key].cancel;
                    return acc;
                }, {});
                const flushSync = stepsOrder.reduce((acc, key) => {
                    acc[key] = () => steps[key].process(frame);
                    return acc;
                }, {});
                const processStep = stepId => steps[stepId].process(frame);
                const processFrame = timestamp => {
                    runNextFrame = false;
                    frame.delta = useDefaultElapsed ? defaultTimestep : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);
                    frame.timestamp = timestamp;
                    isProcessing = true;
                    stepsOrder.forEach(processStep);
                    isProcessing = false;
                    if (runNextFrame) {
                        useDefaultElapsed = false;
                        onNextFrame(processFrame);
                    }
                };
                const startLoop = () => {
                    runNextFrame = true;
                    useDefaultElapsed = true;
                    if (!isProcessing) onNextFrame(processFrame);
                };
                const getFrameData = () => frame;
                exports.cancelSync = cancelSync;
                exports["default"] = sync;
                exports.flushSync = flushSync;
                exports.getFrameData = getFrameData;

                /***/
            }),

        /***/
        "../../../node_modules/get-nonce/dist/es2015/index.js":
            /*!************************************************************!*\
              !*** ../../../node_modules/get-nonce/dist/es2015/index.js ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.setNonce = exports.getNonce = void 0;
                var currentNonce;
                var setNonce = function(nonce) {
                    currentNonce = nonce;
                };
                exports.setNonce = setNonce;
                var getNonce = function() {
                    if (currentNonce) {
                        return currentNonce;
                    }
                    if (true) {
                        return __webpack_require__.nc;
                    }
                    return undefined;
                };
                exports.getNonce = getNonce;

                /***/
            }),

        /***/
        "../../../node_modules/get-value/index.js":
            /*!************************************************!*\
              !*** ../../../node_modules/get-value/index.js ***!
              \************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                /*!
                 * get-value <https://github.com/jonschlinkert/get-value>
                 *
                 * Copyright (c) 2014-2018, Jon Schlinkert.
                 * Released under the MIT License.
                 */

                const isObject = __webpack_require__( /*! isobject */ "../../../node_modules/isobject/index.js");
                module.exports = function(target, path, options) {
                    if (!isObject(options)) {
                        options = {
                            default: options
                        };
                    }
                    if (!isValidObject(target)) {
                        return typeof options.default !== 'undefined' ? options.default : target;
                    }
                    if (typeof path === 'number') {
                        path = String(path);
                    }
                    const isArray = Array.isArray(path);
                    const isString = typeof path === 'string';
                    const splitChar = options.separator || '.';
                    const joinChar = options.joinChar || (typeof splitChar === 'string' ? splitChar : '.');
                    if (!isString && !isArray) {
                        return target;
                    }
                    if (isString && path in target) {
                        return isValid(path, target, options) ? target[path] : options.default;
                    }
                    let segs = isArray ? path : split(path, splitChar, options);
                    let len = segs.length;
                    let idx = 0;
                    do {
                        let prop = segs[idx];
                        if (typeof prop === 'number') {
                            prop = String(prop);
                        }
                        while (prop && prop.slice(-1) === '\\') {
                            prop = join([prop.slice(0, -1), segs[++idx] || ''], joinChar, options);
                        }
                        if (prop in target) {
                            if (!isValid(prop, target, options)) {
                                return options.default;
                            }
                            target = target[prop];
                        } else {
                            let hasProp = false;
                            let n = idx + 1;
                            while (n < len) {
                                prop = join([prop, segs[n++]], joinChar, options);
                                if (hasProp = prop in target) {
                                    if (!isValid(prop, target, options)) {
                                        return options.default;
                                    }
                                    target = target[prop];
                                    idx = n - 1;
                                    break;
                                }
                            }
                            if (!hasProp) {
                                return options.default;
                            }
                        }
                    } while (++idx < len && isValidObject(target));
                    if (idx === len) {
                        return target;
                    }
                    return options.default;
                };

                function join(segs, joinChar, options) {
                    if (typeof options.join === 'function') {
                        return options.join(segs);
                    }
                    return segs[0] + joinChar + segs[1];
                }

                function split(path, splitChar, options) {
                    if (typeof options.split === 'function') {
                        return options.split(path);
                    }
                    return path.split(splitChar);
                }

                function isValid(key, target, options) {
                    if (typeof options.isValid === 'function') {
                        return options.isValid(key, target);
                    }
                    return true;
                }

                function isValidObject(val) {
                    return isObject(val) || Array.isArray(val) || typeof val === 'function';
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql-ws/lib/client.mjs":
            /*!*******************************************************!*\
              !*** ../../../node_modules/graphql-ws/lib/client.mjs ***!
              \*******************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                var _exportNames = {
                    createClient: true
                };
                exports.createClient = createClient;
                var _common = __webpack_require__( /*! ./common.mjs */ "../../../node_modules/graphql-ws/lib/common.mjs");
                Object.keys(_common).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
                    if (key in exports && exports[key] === _common[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _common[key];
                        }
                    });
                });
                var _utils = __webpack_require__( /*! ./utils.mjs */ "../../../node_modules/graphql-ws/lib/utils.mjs");
                /**
                 *
                 * client
                 *
                 */
                var __await = void 0 && (void 0).__await || function(v) {
                    return this instanceof __await ? (this.v = v, this) : new __await(v);
                };
                var __asyncGenerator = void 0 && (void 0).__asyncGenerator || function(thisArg, _arguments, generator) {
                    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
                    var g = generator.apply(thisArg, _arguments || []),
                        i,
                        q = [];
                    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
                        return this;
                    }, i;

                    function verb(n) {
                        if (g[n]) i[n] = function(v) {
                            return new Promise(function(a, b) {
                                q.push([n, v, a, b]) > 1 || resume(n, v);
                            });
                        };
                    }

                    function resume(n, v) {
                        try {
                            step(g[n](v));
                        } catch (e) {
                            settle(q[0][3], e);
                        }
                    }

                    function step(r) {
                        r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
                    }

                    function fulfill(value) {
                        resume("next", value);
                    }

                    function reject(value) {
                        resume("throw", value);
                    }

                    function settle(f, v) {
                        if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
                    }
                };

                /** This file is the entry point for browsers, re-export common elements. */

                /**
                 * Creates a disposable GraphQL over WebSocket client.
                 *
                 * @category Client
                 */
                function createClient(options) {
                    const {
                        url,
                        connectionParams,
                        lazy = true,
                        onNonLazyError = console.error,
                        lazyCloseTimeout: lazyCloseTimeoutMs = 0,
                        keepAlive = 0,
                        disablePong,
                        connectionAckWaitTimeout = 0,
                        retryAttempts = 5,
                        retryWait = async function randomisedExponentialBackoff(retries) {
                            let retryDelay = 1000; // start with 1s delay
                            for (let i = 0; i < retries; i++) {
                                retryDelay *= 2;
                            }
                            await new Promise(resolve => setTimeout(resolve, retryDelay +
                                // add random timeout from 300ms to 3s
                                Math.floor(Math.random() * (3000 - 300) + 300)));
                        },
                        shouldRetry = isLikeCloseEvent,
                        isFatalConnectionProblem,
                        on,
                        webSocketImpl,
                        /**
                         * Generates a v4 UUID to be used as the ID using `Math`
                         * as the random number generator. Supply your own generator
                         * in case you need more uniqueness.
                         *
                         * Reference: https://gist.github.com/jed/982883
                         */
                        generateID = function generateUUID() {
                            return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
                                const r = Math.random() * 16 | 0,
                                    v = c == 'x' ? r : r & 0x3 | 0x8;
                                return v.toString(16);
                            });
                        },
                        jsonMessageReplacer: replacer,
                        jsonMessageReviver: reviver
                    } = options;
                    let ws;
                    if (webSocketImpl) {
                        if (!isWebSocket(webSocketImpl)) {
                            throw new Error('Invalid WebSocket implementation provided');
                        }
                        ws = webSocketImpl;
                    } else if (typeof WebSocket !== 'undefined') {
                        ws = WebSocket;
                    } else if (typeof __webpack_require__.g !== 'undefined') {
                        ws = __webpack_require__.g.WebSocket ||
                            // @ts-expect-error: Support more browsers
                            __webpack_require__.g.MozWebSocket;
                    } else if (typeof window !== 'undefined') {
                        ws = window.WebSocket ||
                            // @ts-expect-error: Support more browsers
                            window.MozWebSocket;
                    }
                    if (!ws) throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");
                    const WebSocketImpl = ws;
                    // websocket status emitter, subscriptions are handled differently
                    const emitter = (() => {
                        const message = (() => {
                            const listeners = {};
                            return {
                                on(id, listener) {
                                    listeners[id] = listener;
                                    return () => {
                                        delete listeners[id];
                                    };
                                },
                                emit(message) {
                                    var _a;
                                    if ('id' in message)(_a = listeners[message.id]) === null || _a === void 0 ? void 0 : _a.call(listeners, message);
                                }
                            };
                        })();
                        const listeners = {
                            connecting: (on === null || on === void 0 ? void 0 : on.connecting) ? [on.connecting] : [],
                            opened: (on === null || on === void 0 ? void 0 : on.opened) ? [on.opened] : [],
                            connected: (on === null || on === void 0 ? void 0 : on.connected) ? [on.connected] : [],
                            ping: (on === null || on === void 0 ? void 0 : on.ping) ? [on.ping] : [],
                            pong: (on === null || on === void 0 ? void 0 : on.pong) ? [on.pong] : [],
                            message: (on === null || on === void 0 ? void 0 : on.message) ? [message.emit, on.message] : [message.emit],
                            closed: (on === null || on === void 0 ? void 0 : on.closed) ? [on.closed] : [],
                            error: (on === null || on === void 0 ? void 0 : on.error) ? [on.error] : []
                        };
                        return {
                            onMessage: message.on,
                            on(event, listener) {
                                const l = listeners[event];
                                l.push(listener);
                                return () => {
                                    l.splice(l.indexOf(listener), 1);
                                };
                            },
                            emit(event, ...args) {
                                // we copy the listeners so that unlistens dont "pull the rug under our feet"
                                for (const listener of [...listeners[event]]) {
                                    // @ts-expect-error: The args should fit
                                    listener(...args);
                                }
                            }
                        };
                    })();
                    // invokes the callback either when an error or closed event is emitted,
                    // first one that gets called prevails, other emissions are ignored
                    function errorOrClosed(cb) {
                        const listening = [
                            // errors are fatal and more critical than close events, throw them first
                            emitter.on('error', err => {
                                listening.forEach(unlisten => unlisten());
                                cb(err);
                            }),
                            // closes can be graceful and not fatal, throw them second (if error didnt throw)
                            emitter.on('closed', event => {
                                listening.forEach(unlisten => unlisten());
                                cb(event);
                            })
                        ];
                    }
                    let connecting,
                        locks = 0,
                        lazyCloseTimeout,
                        retrying = false,
                        retries = 0,
                        disposed = false;
                    async function connect() {
                        // clear the lazy close timeout immediatelly so that close gets debounced
                        // see: https://github.com/enisdenjo/graphql-ws/issues/388
                        clearTimeout(lazyCloseTimeout);
                        const [socket, throwOnClose] = await (connecting !== null && connecting !== void 0 ? connecting : connecting = new Promise((connected, denied) => (async () => {
                            if (retrying) {
                                await retryWait(retries);
                                // subscriptions might complete while waiting for retry
                                if (!locks) {
                                    connecting = undefined;
                                    return denied({
                                        code: 1000,
                                        reason: 'All Subscriptions Gone'
                                    });
                                }
                                retries++;
                            }
                            emitter.emit('connecting');
                            const socket = new WebSocketImpl(typeof url === 'function' ? await url() : url, _common.GRAPHQL_TRANSPORT_WS_PROTOCOL);
                            let connectionAckTimeout, queuedPing;

                            function enqueuePing() {
                                if (isFinite(keepAlive) && keepAlive > 0) {
                                    clearTimeout(queuedPing); // in case where a pong was received before a ping (this is valid behaviour)
                                    queuedPing = setTimeout(() => {
                                        if (socket.readyState === WebSocketImpl.OPEN) {
                                            socket.send((0, _common.stringifyMessage)({
                                                type: _common.MessageType.Ping
                                            }));
                                            emitter.emit('ping', false, undefined);
                                        }
                                    }, keepAlive);
                                }
                            }
                            errorOrClosed(errOrEvent => {
                                connecting = undefined;
                                clearTimeout(connectionAckTimeout);
                                clearTimeout(queuedPing);
                                denied(errOrEvent);
                                if (isLikeCloseEvent(errOrEvent) && errOrEvent.code === 4499) {
                                    socket.close(4499, 'Terminated'); // close event is artificial and emitted manually, see `Client.terminate()` below
                                    socket.onerror = null;
                                    socket.onclose = null;
                                }
                            });
                            socket.onerror = err => emitter.emit('error', err);
                            socket.onclose = event => emitter.emit('closed', event);
                            socket.onopen = async () => {
                                try {
                                    emitter.emit('opened', socket);
                                    const payload = typeof connectionParams === 'function' ? await connectionParams() : connectionParams;
                                    // connectionParams might take too long causing the server to kick off the client
                                    // the necessary error/close event is already reported - simply stop execution
                                    if (socket.readyState !== WebSocketImpl.OPEN) return;
                                    socket.send((0, _common.stringifyMessage)(payload ? {
                                        type: _common.MessageType.ConnectionInit,
                                        payload
                                    } : {
                                        type: _common.MessageType.ConnectionInit
                                        // payload is completely absent if not provided
                                    }, replacer));
                                    if (isFinite(connectionAckWaitTimeout) && connectionAckWaitTimeout > 0) {
                                        connectionAckTimeout = setTimeout(() => {
                                            socket.close(_common.CloseCode.ConnectionAcknowledgementTimeout, 'Connection acknowledgement timeout');
                                        }, connectionAckWaitTimeout);
                                    }
                                    enqueuePing(); // enqueue ping (noop if disabled)
                                } catch (err) {
                                    emitter.emit('error', err);
                                    socket.close(_common.CloseCode.InternalClientError, (0, _utils.limitCloseReason)(err instanceof Error ? err.message : new Error(err).message, 'Internal client error'));
                                }
                            };
                            let acknowledged = false;
                            socket.onmessage = ({
                                data
                            }) => {
                                try {
                                    const message = (0, _common.parseMessage)(data, reviver);
                                    emitter.emit('message', message);
                                    if (message.type === 'ping' || message.type === 'pong') {
                                        emitter.emit(message.type, true, message.payload); // received
                                        if (message.type === 'pong') {
                                            enqueuePing(); // enqueue next ping (noop if disabled)
                                        } else if (!disablePong) {
                                            // respond with pong on ping
                                            socket.send((0, _common.stringifyMessage)(message.payload ? {
                                                type: _common.MessageType.Pong,
                                                payload: message.payload
                                            } : {
                                                type: _common.MessageType.Pong
                                                // payload is completely absent if not provided
                                            }));
                                            emitter.emit('pong', false, message.payload);
                                        }
                                        return; // ping and pongs can be received whenever
                                    }
                                    if (acknowledged) return; // already connected and acknowledged
                                    if (message.type !== _common.MessageType.ConnectionAck) throw new Error(`First message cannot be of type ${message.type}`);
                                    clearTimeout(connectionAckTimeout);
                                    acknowledged = true;
                                    emitter.emit('connected', socket, message.payload); // connected = socket opened + acknowledged
                                    retrying = false; // future lazy connects are not retries
                                    retries = 0; // reset the retries on connect
                                    connected([socket, new Promise((_, reject) => errorOrClosed(reject))]);
                                } catch (err) {
                                    socket.onmessage = null; // stop reading messages as soon as reading breaks once
                                    emitter.emit('error', err);
                                    socket.close(_common.CloseCode.BadResponse, (0, _utils.limitCloseReason)(err instanceof Error ? err.message : new Error(err).message, 'Bad response'));
                                }
                            };
                        })()));
                        // if the provided socket is in a closing state, wait for the throw on close
                        if (socket.readyState === WebSocketImpl.CLOSING) await throwOnClose;
                        let release = () => {
                            // releases this connection
                        };
                        const released = new Promise(resolve => release = resolve);
                        return [socket, release, Promise.race([
                            // wait for
                            released.then(() => {
                                if (!locks) {
                                    // and if no more locks are present, complete the connection
                                    const complete = () => socket.close(1000, 'Normal Closure');
                                    if (isFinite(lazyCloseTimeoutMs) && lazyCloseTimeoutMs > 0) {
                                        // if the keepalive is set, allow for the specified calmdown time and
                                        // then complete if the socket is still open.
                                        lazyCloseTimeout = setTimeout(() => {
                                            if (socket.readyState === WebSocketImpl.OPEN) complete();
                                        }, lazyCloseTimeoutMs);
                                    } else {
                                        // otherwise complete immediately
                                        complete();
                                    }
                                }
                            }),
                            // or
                            throwOnClose
                        ])];
                    }
                    /**
                     * Checks the `connect` problem and evaluates if the client should retry.
                     */
                    function shouldRetryConnectOrThrow(errOrCloseEvent) {
                        // some close codes are worth reporting immediately
                        if (isLikeCloseEvent(errOrCloseEvent) && (isFatalInternalCloseCode(errOrCloseEvent.code) || [_common.CloseCode.InternalServerError, _common.CloseCode.InternalClientError, _common.CloseCode.BadRequest, _common.CloseCode.BadResponse, _common.CloseCode.Unauthorized,
                                // CloseCode.Forbidden, might grant access out after retry
                                _common.CloseCode.SubprotocolNotAcceptable,
                                // CloseCode.ConnectionInitialisationTimeout, might not time out after retry
                                // CloseCode.ConnectionAcknowledgementTimeout, might not time out after retry
                                _common.CloseCode.SubscriberAlreadyExists, _common.CloseCode.TooManyInitialisationRequests
                                // 4499, // Terminated, probably because the socket froze, we want to retry
                            ].includes(errOrCloseEvent.code))) throw errOrCloseEvent;
                        // client was disposed, no retries should proceed regardless
                        if (disposed) return false;
                        // normal closure (possibly all subscriptions have completed)
                        // if no locks were acquired in the meantime, shouldnt try again
                        if (isLikeCloseEvent(errOrCloseEvent) && errOrCloseEvent.code === 1000) return locks > 0;
                        // retries are not allowed or we tried to many times, report error
                        if (!retryAttempts || retries >= retryAttempts) throw errOrCloseEvent;
                        // throw non-retryable connection problems
                        if (!shouldRetry(errOrCloseEvent)) throw errOrCloseEvent;
                        // @deprecated throw fatal connection problems immediately
                        if (isFatalConnectionProblem === null || isFatalConnectionProblem === void 0 ? void 0 : isFatalConnectionProblem(errOrCloseEvent)) throw errOrCloseEvent;
                        // looks good, start retrying
                        return retrying = true;
                    }
                    // in non-lazy (hot?) mode always hold one connection lock to persist the socket
                    if (!lazy) {
                        (async () => {
                            locks++;
                            for (;;) {
                                try {
                                    const [, , throwOnClose] = await connect();
                                    await throwOnClose; // will always throw because releaser is not used
                                } catch (errOrCloseEvent) {
                                    try {
                                        if (!shouldRetryConnectOrThrow(errOrCloseEvent)) return;
                                    } catch (errOrCloseEvent) {
                                        // report thrown error, no further retries
                                        return onNonLazyError === null || onNonLazyError === void 0 ? void 0 : onNonLazyError(errOrCloseEvent);
                                    }
                                }
                            }
                        })();
                    }
                    return {
                        on: emitter.on,
                        subscribe(payload, sink) {
                            const id = generateID(payload);
                            let done = false,
                                errored = false,
                                releaser = () => {
                                    // for handling completions before connect
                                    locks--;
                                    done = true;
                                };
                            (async () => {
                                locks++;
                                for (;;) {
                                    try {
                                        const [socket, release, waitForReleaseOrThrowOnClose] = await connect();
                                        // if done while waiting for connect, release the connection lock right away
                                        if (done) return release();
                                        const unlisten = emitter.onMessage(id, message => {
                                            switch (message.type) {
                                                case _common.MessageType.Next: {
                                                    // eslint-disable-next-line @typescript-eslint/no-explicit-any -- payload will fit type
                                                    sink.next(message.payload);
                                                    return;
                                                }
                                                case _common.MessageType.Error: {
                                                    errored = true, done = true;
                                                    sink.error(message.payload);
                                                    releaser();
                                                    return;
                                                }
                                                case _common.MessageType.Complete: {
                                                    done = true;
                                                    releaser(); // release completes the sink
                                                    return;
                                                }
                                            }
                                        });
                                        socket.send((0, _common.stringifyMessage)({
                                            id,
                                            type: _common.MessageType.Subscribe,
                                            payload
                                        }, replacer));
                                        releaser = () => {
                                            if (!done && socket.readyState === WebSocketImpl.OPEN)
                                                // if not completed already and socket is open, send complete message to server on release
                                                socket.send((0, _common.stringifyMessage)({
                                                    id,
                                                    type: _common.MessageType.Complete
                                                }, replacer));
                                            locks--;
                                            done = true;
                                            release();
                                        };
                                        // either the releaser will be called, connection completed and
                                        // the promise resolved or the socket closed and the promise rejected.
                                        // whatever happens though, we want to stop listening for messages
                                        await waitForReleaseOrThrowOnClose.finally(unlisten);
                                        return; // completed, shouldnt try again
                                    } catch (errOrCloseEvent) {
                                        if (!shouldRetryConnectOrThrow(errOrCloseEvent)) return;
                                    }
                                }
                            })().then(() => {
                                    // delivering either an error or a complete terminates the sequence
                                    if (!errored) sink.complete();
                                }) // resolves on release or normal closure
                                .catch(err => {
                                    sink.error(err);
                                }); // rejects on close events and errors
                            return () => {
                                // dispose only of active subscriptions
                                if (!done) releaser();
                            };
                        },
                        iterate(request) {
                            const pending = [];
                            const deferred = {
                                done: false,
                                error: null,
                                resolve: () => {
                                    // noop
                                }
                            };
                            const dispose = this.subscribe(request, {
                                next(val) {
                                    pending.push(val);
                                    deferred.resolve();
                                },
                                error(err) {
                                    deferred.done = true;
                                    deferred.error = err;
                                    deferred.resolve();
                                },
                                complete() {
                                    deferred.done = true;
                                    deferred.resolve();
                                }
                            });
                            const iterator = function iterator() {
                                return __asyncGenerator(this, arguments, function* iterator_1() {
                                    for (;;) {
                                        if (!pending.length) {
                                            // only wait if there are no pending messages available
                                            yield __await(new Promise(resolve => deferred.resolve = resolve));
                                        }
                                        // first flush
                                        while (pending.length) {
                                            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                                            yield yield __await(pending.shift());
                                        }
                                        // then error
                                        if (deferred.error) {
                                            throw deferred.error;
                                        }
                                        // or complete
                                        if (deferred.done) {
                                            return yield __await(void 0);
                                        }
                                    }
                                });
                            }();
                            iterator.throw = async err => {
                                if (!deferred.done) {
                                    deferred.done = true;
                                    deferred.error = err;
                                    deferred.resolve();
                                }
                                return {
                                    done: true,
                                    value: undefined
                                };
                            };
                            iterator.return = async () => {
                                dispose();
                                return {
                                    done: true,
                                    value: undefined
                                };
                            };
                            return iterator;
                        },
                        async dispose() {
                            disposed = true;
                            if (connecting) {
                                // if there is a connection, close it
                                const [socket] = await connecting;
                                socket.close(1000, 'Normal Closure');
                            }
                        },
                        terminate() {
                            if (connecting) {
                                // only if there is a connection
                                emitter.emit('closed', {
                                    code: 4499,
                                    reason: 'Terminated',
                                    wasClean: false
                                });
                            }
                        }
                    };
                }

                function isLikeCloseEvent(val) {
                    return (0, _utils.isObject)(val) && 'code' in val && 'reason' in val;
                }

                function isFatalInternalCloseCode(code) {
                    if ([1000, 1001, 1006, 1005, 1012, 1013, 1013 // Bad Gateway
                        ].includes(code)) return false;
                    // all other internal errors are fatal
                    return code >= 1000 && code <= 1999;
                }

                function isWebSocket(val) {
                    return typeof val === 'function' && 'constructor' in val && 'CLOSED' in val && 'CLOSING' in val && 'CONNECTING' in val && 'OPEN' in val;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql-ws/lib/common.mjs":
            /*!*******************************************************!*\
              !*** ../../../node_modules/graphql-ws/lib/common.mjs ***!
              \*******************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.MessageType = exports.GRAPHQL_TRANSPORT_WS_PROTOCOL = exports.DEPRECATED_GRAPHQL_WS_PROTOCOL = exports.CloseCode = void 0;
                exports.isMessage = isMessage;
                exports.parseMessage = parseMessage;
                exports.stringifyMessage = stringifyMessage;
                exports.validateMessage = validateMessage;
                var _utils = __webpack_require__( /*! ./utils.mjs */ "../../../node_modules/graphql-ws/lib/utils.mjs");
                /**
                 *
                 * common
                 *
                 */

                /**
                 * The WebSocket sub-protocol used for the [GraphQL over WebSocket Protocol](https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket.md).
                 *
                 * @category Common
                 */
                const GRAPHQL_TRANSPORT_WS_PROTOCOL = exports.GRAPHQL_TRANSPORT_WS_PROTOCOL = 'graphql-transport-ws';
                /**
                 * The deprecated subprotocol used by [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws).
                 *
                 * @private
                 */
                const DEPRECATED_GRAPHQL_WS_PROTOCOL = exports.DEPRECATED_GRAPHQL_WS_PROTOCOL = 'graphql-ws';
                /**
                 * `graphql-ws` expected and standard close codes of the [GraphQL over WebSocket Protocol](https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket.md).
                 *
                 * @category Common
                 */
                var CloseCode;
                (function(CloseCode) {
                    CloseCode[CloseCode["InternalServerError"] = 4500] = "InternalServerError";
                    CloseCode[CloseCode["InternalClientError"] = 4005] = "InternalClientError";
                    CloseCode[CloseCode["BadRequest"] = 4400] = "BadRequest";
                    CloseCode[CloseCode["BadResponse"] = 4004] = "BadResponse";
                    /** Tried subscribing before connect ack */
                    CloseCode[CloseCode["Unauthorized"] = 4401] = "Unauthorized";
                    CloseCode[CloseCode["Forbidden"] = 4403] = "Forbidden";
                    CloseCode[CloseCode["SubprotocolNotAcceptable"] = 4406] = "SubprotocolNotAcceptable";
                    CloseCode[CloseCode["ConnectionInitialisationTimeout"] = 4408] = "ConnectionInitialisationTimeout";
                    CloseCode[CloseCode["ConnectionAcknowledgementTimeout"] = 4504] = "ConnectionAcknowledgementTimeout";
                    /** Subscriber distinction is very important */
                    CloseCode[CloseCode["SubscriberAlreadyExists"] = 4409] = "SubscriberAlreadyExists";
                    CloseCode[CloseCode["TooManyInitialisationRequests"] = 4429] = "TooManyInitialisationRequests";
                })(CloseCode || (exports.CloseCode = CloseCode = {}));
                /**
                 * Types of messages allowed to be sent by the client/server over the WS protocol.
                 *
                 * @category Common
                 */
                var MessageType;
                (function(MessageType) {
                    MessageType["ConnectionInit"] = "connection_init";
                    MessageType["ConnectionAck"] = "connection_ack";
                    MessageType["Ping"] = "ping";
                    MessageType["Pong"] = "pong";
                    MessageType["Subscribe"] = "subscribe";
                    MessageType["Next"] = "next";
                    MessageType["Error"] = "error";
                    MessageType["Complete"] = "complete";
                })(MessageType || (exports.MessageType = MessageType = {}));
                /**
                 * Validates the message against the GraphQL over WebSocket Protocol.
                 *
                 * Invalid messages will throw descriptive errors.
                 *
                 * @category Common
                 */
                function validateMessage(val) {
                    if (!(0, _utils.isObject)(val)) {
                        throw new Error(`Message is expected to be an object, but got ${(0, _utils.extendedTypeof)(val)}`);
                    }
                    if (!val.type) {
                        throw new Error(`Message is missing the 'type' property`);
                    }
                    if (typeof val.type !== 'string') {
                        throw new Error(`Message is expects the 'type' property to be a string, but got ${(0, _utils.extendedTypeof)(val.type)}`);
                    }
                    switch (val.type) {
                        case MessageType.ConnectionInit:
                        case MessageType.ConnectionAck:
                        case MessageType.Ping:
                        case MessageType.Pong: {
                            if (val.payload != null && !(0, _utils.isObject)(val.payload)) {
                                throw new Error(`"${val.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${val.payload}"`);
                            }
                            break;
                        }
                        case MessageType.Subscribe: {
                            if (typeof val.id !== 'string') {
                                throw new Error(`"${val.type}" message expects the 'id' property to be a string, but got ${(0, _utils.extendedTypeof)(val.id)}`);
                            }
                            if (!val.id) {
                                throw new Error(`"${val.type}" message requires a non-empty 'id' property`);
                            }
                            if (!(0, _utils.isObject)(val.payload)) {
                                throw new Error(`"${val.type}" message expects the 'payload' property to be an object, but got ${(0, _utils.extendedTypeof)(val.payload)}`);
                            }
                            if (typeof val.payload.query !== 'string') {
                                throw new Error(`"${val.type}" message payload expects the 'query' property to be a string, but got ${(0, _utils.extendedTypeof)(val.payload.query)}`);
                            }
                            if (val.payload.variables != null && !(0, _utils.isObject)(val.payload.variables)) {
                                throw new Error(`"${val.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${(0, _utils.extendedTypeof)(val.payload.variables)}`);
                            }
                            if (val.payload.operationName != null && (0, _utils.extendedTypeof)(val.payload.operationName) !== 'string') {
                                throw new Error(`"${val.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${(0, _utils.extendedTypeof)(val.payload.operationName)}`);
                            }
                            if (val.payload.extensions != null && !(0, _utils.isObject)(val.payload.extensions)) {
                                throw new Error(`"${val.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${(0, _utils.extendedTypeof)(val.payload.extensions)}`);
                            }
                            break;
                        }
                        case MessageType.Next: {
                            if (typeof val.id !== 'string') {
                                throw new Error(`"${val.type}" message expects the 'id' property to be a string, but got ${(0, _utils.extendedTypeof)(val.id)}`);
                            }
                            if (!val.id) {
                                throw new Error(`"${val.type}" message requires a non-empty 'id' property`);
                            }
                            if (!(0, _utils.isObject)(val.payload)) {
                                throw new Error(`"${val.type}" message expects the 'payload' property to be an object, but got ${(0, _utils.extendedTypeof)(val.payload)}`);
                            }
                            break;
                        }
                        case MessageType.Error: {
                            if (typeof val.id !== 'string') {
                                throw new Error(`"${val.type}" message expects the 'id' property to be a string, but got ${(0, _utils.extendedTypeof)(val.id)}`);
                            }
                            if (!val.id) {
                                throw new Error(`"${val.type}" message requires a non-empty 'id' property`);
                            }
                            if (!(0, _utils.areGraphQLErrors)(val.payload)) {
                                throw new Error(`"${val.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(val.payload)}`);
                            }
                            break;
                        }
                        case MessageType.Complete: {
                            if (typeof val.id !== 'string') {
                                throw new Error(`"${val.type}" message expects the 'id' property to be a string, but got ${(0, _utils.extendedTypeof)(val.id)}`);
                            }
                            if (!val.id) {
                                throw new Error(`"${val.type}" message requires a non-empty 'id' property`);
                            }
                            break;
                        }
                        default:
                            throw new Error(`Invalid message 'type' property "${val.type}"`);
                    }
                    return val;
                }
                /**
                 * Checks if the provided value is a valid GraphQL over WebSocket message.
                 *
                 * @deprecated Use `validateMessage` instead.
                 *
                 * @category Common
                 */
                function isMessage(val) {
                    try {
                        validateMessage(val);
                        return true;
                    } catch (_a) {
                        return false;
                    }
                }
                /**
                 * Parses the raw websocket message data to a valid message.
                 *
                 * @category Common
                 */
                function parseMessage(data, reviver) {
                    return validateMessage(typeof data === 'string' ? JSON.parse(data, reviver) : data);
                }
                /**
                 * Stringifies a valid message ready to be sent through the socket.
                 *
                 * @category Common
                 */
                function stringifyMessage(msg, replacer) {
                    validateMessage(msg);
                    return JSON.stringify(msg, replacer);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql-ws/lib/index.js":
            /*!*****************************************************!*\
              !*** ../../../node_modules/graphql-ws/lib/index.js ***!
              \*****************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function(o, m, k, k2) {
                    if (k2 === undefined) k2 = k;
                    var desc = Object.getOwnPropertyDescriptor(m, k);
                    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                        desc = {
                            enumerable: true,
                            get: function() {
                                return m[k];
                            }
                        };
                    }
                    Object.defineProperty(o, k2, desc);
                } : function(o, m, k, k2) {
                    if (k2 === undefined) k2 = k;
                    o[k2] = m[k];
                });
                var __exportStar = void 0 && (void 0).__exportStar || function(m, exports) {
                    for (var p in m)
                        if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
                };
                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                __exportStar(__webpack_require__( /*! ./client */ "../../../node_modules/graphql-ws/lib/client.mjs"), exports);
                __exportStar(__webpack_require__( /*! ./server */ "../../../node_modules/graphql-ws/lib/server.mjs"), exports);
                __exportStar(__webpack_require__( /*! ./common */ "../../../node_modules/graphql-ws/lib/common.mjs"), exports);

                /***/
            }),

        /***/
        "../../../node_modules/graphql-ws/lib/server.mjs":
            /*!*******************************************************!*\
              !*** ../../../node_modules/graphql-ws/lib/server.mjs ***!
              \*******************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.handleProtocols = handleProtocols;
                exports.makeServer = makeServer;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _common = __webpack_require__( /*! ./common.mjs */ "../../../node_modules/graphql-ws/lib/common.mjs");
                var _utils = __webpack_require__( /*! ./utils.mjs */ "../../../node_modules/graphql-ws/lib/utils.mjs");
                /**
                 *
                 * server
                 *
                 */
                var __asyncValues = void 0 && (void 0).__asyncValues || function(o) {
                    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
                    var m = o[Symbol.asyncIterator],
                        i;
                    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
                        return this;
                    }, i);

                    function verb(n) {
                        i[n] = o[n] && function(v) {
                            return new Promise(function(resolve, reject) {
                                v = o[n](v), settle(resolve, reject, v.done, v.value);
                            });
                        };
                    }

                    function settle(resolve, reject, d, v) {
                        Promise.resolve(v).then(function(v) {
                            resolve({
                                value: v,
                                done: d
                            });
                        }, reject);
                    }
                };
                /**
                 * Makes a Protocol complient WebSocket GraphQL server. The server
                 * is actually an API which is to be used with your favourite WebSocket
                 * server library!
                 *
                 * Read more about the [GraphQL over WebSocket Protocol](https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket.md).
                 *
                 * @category Server
                 */
                function makeServer(options) {
                    const {
                        schema,
                        context,
                        roots,
                        validate,
                        execute,
                        subscribe,
                        connectionInitWaitTimeout = 3000,
                        // 3 seconds
                        onConnect,
                        onDisconnect,
                        onClose,
                        onSubscribe,
                        onOperation,
                        onNext,
                        onError,
                        onComplete,
                        jsonMessageReviver: reviver,
                        jsonMessageReplacer: replacer
                    } = options;
                    return {
                        opened(socket, extra) {
                            const ctx = {
                                connectionInitReceived: false,
                                acknowledged: false,
                                subscriptions: {},
                                extra
                            };
                            if (socket.protocol !== _common.GRAPHQL_TRANSPORT_WS_PROTOCOL) {
                                socket.close(_common.CloseCode.SubprotocolNotAcceptable, 'Subprotocol not acceptable');
                                return async (code, reason) => {
                                    /* nothing was set up, just notify the closure */
                                    await (onClose === null || onClose === void 0 ? void 0 : onClose(ctx, code, reason));
                                };
                            }
                            // kick the client off (close socket) if the connection has
                            // not been initialised after the specified wait timeout
                            const connectionInitWait = connectionInitWaitTimeout > 0 && isFinite(connectionInitWaitTimeout) ? setTimeout(() => {
                                if (!ctx.connectionInitReceived) socket.close(_common.CloseCode.ConnectionInitialisationTimeout, 'Connection initialisation timeout');
                            }, connectionInitWaitTimeout) : null;
                            socket.onMessage(async function onMessage(data) {
                                var _a, e_1, _b, _c;
                                var _d;
                                let message;
                                try {
                                    message = (0, _common.parseMessage)(data, reviver);
                                } catch (err) {
                                    return socket.close(_common.CloseCode.BadRequest, 'Invalid message received');
                                }
                                switch (message.type) {
                                    case _common.MessageType.ConnectionInit: {
                                        if (ctx.connectionInitReceived) return socket.close(_common.CloseCode.TooManyInitialisationRequests, 'Too many initialisation requests');
                                        // @ts-expect-error: I can write
                                        ctx.connectionInitReceived = true;
                                        if ((0, _utils.isObject)(message.payload))
                                            // @ts-expect-error: I can write
                                            ctx.connectionParams = message.payload;
                                        const permittedOrPayload = await (onConnect === null || onConnect === void 0 ? void 0 : onConnect(ctx));
                                        if (permittedOrPayload === false) return socket.close(_common.CloseCode.Forbidden, 'Forbidden');
                                        await socket.send((0, _common.stringifyMessage)((0, _utils.isObject)(permittedOrPayload) ? {
                                            type: _common.MessageType.ConnectionAck,
                                            payload: permittedOrPayload
                                        } : {
                                            type: _common.MessageType.ConnectionAck
                                            // payload is completely absent if not provided
                                        }, replacer));
                                        // @ts-expect-error: I can write
                                        ctx.acknowledged = true;
                                        return;
                                    }
                                    case _common.MessageType.Ping: {
                                        if (socket.onPing)
                                            // if the onPing listener is registered, automatic pong is disabled
                                            return await socket.onPing(message.payload);
                                        await socket.send((0, _common.stringifyMessage)(message.payload ? {
                                            type: _common.MessageType.Pong,
                                            payload: message.payload
                                        } : {
                                            type: _common.MessageType.Pong
                                            // payload is completely absent if not provided
                                        }));
                                        return;
                                    }
                                    case _common.MessageType.Pong:
                                        return await ((_d = socket.onPong) === null || _d === void 0 ? void 0 : _d.call(socket, message.payload));
                                    case _common.MessageType.Subscribe: {
                                        if (!ctx.acknowledged) return socket.close(_common.CloseCode.Unauthorized, 'Unauthorized');
                                        const {
                                            id,
                                            payload
                                        } = message;
                                        if (id in ctx.subscriptions) return socket.close(_common.CloseCode.SubscriberAlreadyExists, `Subscriber for ${id} already exists`);
                                        // if this turns out to be a streaming operation, the subscription value
                                        // will change to an `AsyncIterable`, otherwise it will stay as is
                                        ctx.subscriptions[id] = null;
                                        const emit = {
                                            next: async (result, args) => {
                                                let nextMessage = {
                                                    id,
                                                    type: _common.MessageType.Next,
                                                    payload: result
                                                };
                                                const maybeResult = await (onNext === null || onNext === void 0 ? void 0 : onNext(ctx, nextMessage, args, result));
                                                if (maybeResult) nextMessage = Object.assign(Object.assign({}, nextMessage), {
                                                    payload: maybeResult
                                                });
                                                await socket.send((0, _common.stringifyMessage)(nextMessage, replacer));
                                            },
                                            error: async errors => {
                                                let errorMessage = {
                                                    id,
                                                    type: _common.MessageType.Error,
                                                    payload: errors
                                                };
                                                const maybeErrors = await (onError === null || onError === void 0 ? void 0 : onError(ctx, errorMessage, errors));
                                                if (maybeErrors) errorMessage = Object.assign(Object.assign({}, errorMessage), {
                                                    payload: maybeErrors
                                                });
                                                await socket.send((0, _common.stringifyMessage)(errorMessage, replacer));
                                            },
                                            complete: async notifyClient => {
                                                const completeMessage = {
                                                    id,
                                                    type: _common.MessageType.Complete
                                                };
                                                await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(ctx, completeMessage));
                                                if (notifyClient) await socket.send((0, _common.stringifyMessage)(completeMessage, replacer));
                                            }
                                        };
                                        try {
                                            let execArgs;
                                            const maybeExecArgsOrErrors = await (onSubscribe === null || onSubscribe === void 0 ? void 0 : onSubscribe(ctx, message));
                                            if (maybeExecArgsOrErrors) {
                                                if ((0, _utils.areGraphQLErrors)(maybeExecArgsOrErrors)) return await emit.error(maybeExecArgsOrErrors);
                                                else if (Array.isArray(maybeExecArgsOrErrors)) throw new Error('Invalid return value from onSubscribe hook, expected an array of GraphQLError objects');
                                                // not errors, is exec args
                                                execArgs = maybeExecArgsOrErrors;
                                            } else {
                                                // you either provide a schema dynamically through
                                                // `onSubscribe` or you set one up during the server setup
                                                if (!schema) throw new Error('The GraphQL schema is not provided');
                                                const args = {
                                                    operationName: payload.operationName,
                                                    document: (0, _graphql.parse)(payload.query),
                                                    variableValues: payload.variables
                                                };
                                                execArgs = Object.assign(Object.assign({}, args), {
                                                    schema: typeof schema === 'function' ? await schema(ctx, message, args) : schema
                                                });
                                                const validationErrors = (validate !== null && validate !== void 0 ? validate : _graphql.validate)(execArgs.schema, execArgs.document);
                                                if (validationErrors.length > 0) return await emit.error(validationErrors);
                                            }
                                            const operationAST = (0, _graphql.getOperationAST)(execArgs.document, execArgs.operationName);
                                            if (!operationAST) return await emit.error([new _graphql.GraphQLError('Unable to identify operation')]);
                                            // if `onSubscribe` didnt specify a rootValue, inject one
                                            if (!('rootValue' in execArgs)) execArgs.rootValue = roots === null || roots === void 0 ? void 0 : roots[operationAST.operation];
                                            // if `onSubscribe` didn't specify a context, inject one
                                            if (!('contextValue' in execArgs)) execArgs.contextValue = typeof context === 'function' ? await context(ctx, message, execArgs) : context;
                                            // the execution arguments have been prepared
                                            // perform the operation and act accordingly
                                            let operationResult;
                                            if (operationAST.operation === 'subscription') operationResult = await (subscribe !== null && subscribe !== void 0 ? subscribe : _graphql.subscribe)(execArgs);
                                            // operation === 'query' || 'mutation'
                                            else operationResult = await (execute !== null && execute !== void 0 ? execute : _graphql.execute)(execArgs);
                                            const maybeResult = await (onOperation === null || onOperation === void 0 ? void 0 : onOperation(ctx, message, execArgs, operationResult));
                                            if (maybeResult) operationResult = maybeResult;
                                            if ((0, _utils.isAsyncIterable)(operationResult)) {
                                                /** multiple emitted results */
                                                if (!(id in ctx.subscriptions)) {
                                                    // subscription was completed/canceled before the operation settled
                                                    if ((0, _utils.isAsyncGenerator)(operationResult)) operationResult.return(undefined);
                                                } else {
                                                    ctx.subscriptions[id] = operationResult;
                                                    try {
                                                        for (var _e = true, operationResult_1 = __asyncValues(operationResult), operationResult_1_1; operationResult_1_1 = await operationResult_1.next(), _a = operationResult_1_1.done, !_a; _e = true) {
                                                            _c = operationResult_1_1.value;
                                                            _e = false;
                                                            const result = _c;
                                                            await emit.next(result, execArgs);
                                                        }
                                                    } catch (e_1_1) {
                                                        e_1 = {
                                                            error: e_1_1
                                                        };
                                                    } finally {
                                                        try {
                                                            if (!_e && !_a && (_b = operationResult_1.return)) await _b.call(operationResult_1);
                                                        } finally {
                                                            if (e_1) throw e_1.error;
                                                        }
                                                    }
                                                }
                                            } else {
                                                /** single emitted result */
                                                // if the client completed the subscription before the single result
                                                // became available, he effectively canceled it and no data should be sent
                                                if (id in ctx.subscriptions) await emit.next(operationResult, execArgs);
                                            }
                                            // lack of subscription at this point indicates that the client
                                            // completed the subscription, he doesnt need to be reminded
                                            await emit.complete(id in ctx.subscriptions);
                                        } finally {
                                            // whatever happens to the subscription, we finally want to get rid of the reservation
                                            delete ctx.subscriptions[id];
                                        }
                                        return;
                                    }
                                    case _common.MessageType.Complete: {
                                        const subscription = ctx.subscriptions[message.id];
                                        delete ctx.subscriptions[message.id]; // deleting the subscription means no further activity should take place
                                        if ((0, _utils.isAsyncGenerator)(subscription)) await subscription.return(undefined);
                                        return;
                                    }
                                    default:
                                        throw new Error(`Unexpected message of type ${message.type} received`);
                                }
                            });
                            // wait for close, cleanup and the disconnect callback
                            return async (code, reason) => {
                                if (connectionInitWait) clearTimeout(connectionInitWait);
                                for (const sub of Object.values(ctx.subscriptions)) {
                                    if ((0, _utils.isAsyncGenerator)(sub)) await sub.return(undefined);
                                }
                                if (ctx.acknowledged) await (onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect(ctx, code, reason));
                                await (onClose === null || onClose === void 0 ? void 0 : onClose(ctx, code, reason));
                            };
                        }
                    };
                }
                /**
                 * Helper utility for choosing the "graphql-transport-ws" subprotocol from
                 * a set of WebSocket subprotocols.
                 *
                 * Accepts a set of already extracted WebSocket subprotocols or the raw
                 * Sec-WebSocket-Protocol header value. In either case, if the right
                 * protocol appears, it will be returned.
                 *
                 * By specification, the server should not provide a value with Sec-WebSocket-Protocol
                 * if it does not agree with client's subprotocols. The client has a responsibility
                 * to handle the connection afterwards.
                 *
                 * @category Server
                 */
                function handleProtocols(protocols) {
                    switch (true) {
                        case protocols instanceof Set && protocols.has(_common.GRAPHQL_TRANSPORT_WS_PROTOCOL):
                        case Array.isArray(protocols) && protocols.includes(_common.GRAPHQL_TRANSPORT_WS_PROTOCOL):
                        case typeof protocols === 'string' && protocols.split(',').map(p => p.trim()).includes(_common.GRAPHQL_TRANSPORT_WS_PROTOCOL):
                            return _common.GRAPHQL_TRANSPORT_WS_PROTOCOL;
                        default:
                            return false;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql-ws/lib/utils.mjs":
            /*!******************************************************!*\
              !*** ../../../node_modules/graphql-ws/lib/utils.mjs ***!
              \******************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.areGraphQLErrors = areGraphQLErrors;
                exports.extendedTypeof = extendedTypeof;
                exports.isAsyncGenerator = isAsyncGenerator;
                exports.isAsyncIterable = isAsyncIterable;
                exports.isObject = isObject;
                exports.limitCloseReason = limitCloseReason;
                /** @private */
                function extendedTypeof(val) {
                    if (val === null) {
                        return 'null';
                    }
                    if (Array.isArray(val)) {
                        return 'array';
                    }
                    return typeof val;
                }
                /** @private */
                function isObject(val) {
                    return extendedTypeof(val) === 'object';
                }
                /** @private */
                function isAsyncIterable(val) {
                    return typeof Object(val)[Symbol.asyncIterator] === 'function';
                }
                /** @private */
                function isAsyncGenerator(val) {
                    return isObject(val) && typeof Object(val)[Symbol.asyncIterator] === 'function' && typeof val.return === 'function'
                    // for lazy ones, we only need the return anyway
                    // typeof val.throw === 'function' &&
                    // typeof val.next === 'function'
                    ;
                }
                /** @private */
                function areGraphQLErrors(obj) {
                    return Array.isArray(obj) &&
                        // must be at least one error
                        obj.length > 0 &&
                        // error has at least a message
                        obj.every(ob => 'message' in ob);
                }
                /**
                 * Limits the WebSocket close event reason to not exceed a length of one frame.
                 * Reference: https://datatracker.ietf.org/doc/html/rfc6455#section-5.2.
                 *
                 * @private
                 */
                function limitCloseReason(reason, whenTooLong) {
                    return reason.length < 124 ? reason : whenTooLong;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/error/GraphQLError.mjs":
            /*!************************************************************!*\
              !*** ../../../node_modules/graphql/error/GraphQLError.mjs ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.GraphQLError = void 0;
                exports.formatError = formatError;
                exports.printError = printError;
                var _isObjectLike = __webpack_require__( /*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
                var _location = __webpack_require__( /*! ../language/location.mjs */ "../../../node_modules/graphql/language/location.mjs");
                var _printLocation = __webpack_require__( /*! ../language/printLocation.mjs */ "../../../node_modules/graphql/language/printLocation.mjs");

                function toNormalizedOptions(args) {
                    const firstArg = args[0];
                    if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {
                        return {
                            nodes: firstArg,
                            source: args[1],
                            positions: args[2],
                            path: args[3],
                            originalError: args[4],
                            extensions: args[5]
                        };
                    }
                    return firstArg;
                }
                /**
                 * A GraphQLError describes an Error found during the parse, validate, or
                 * execute phases of performing a GraphQL operation. In addition to a message
                 * and stack trace, it also includes information about the locations in a
                 * GraphQL document and/or execution result that correspond to the Error.
                 */

                class GraphQLError extends Error {
                    /**
                     * An array of `{ line, column }` locations within the source GraphQL document
                     * which correspond to this error.
                     *
                     * Errors during validation often contain multiple locations, for example to
                     * point out two things with the same name. Errors during execution include a
                     * single location, the field which produced the error.
                     *
                     * Enumerable, and appears in the result of JSON.stringify().
                     */

                    /**
                     * An array describing the JSON-path into the execution response which
                     * corresponds to this error. Only included for errors during execution.
                     *
                     * Enumerable, and appears in the result of JSON.stringify().
                     */

                    /**
                     * An array of GraphQL AST Nodes corresponding to this error.
                     */

                    /**
                     * The source GraphQL document for the first location of this error.
                     *
                     * Note that if this Error represents more than one node, the source may not
                     * represent nodes after the first node.
                     */

                    /**
                     * An array of character offsets within the source GraphQL document
                     * which correspond to this error.
                     */

                    /**
                     * The original error thrown from a field resolver during execution.
                     */

                    /**
                     * Extension fields to add to the formatted error.
                     */

                    /**
                     * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
                     */
                    constructor(message, ...rawArgs) {
                        var _this$nodes, _nodeLocations$, _ref;
                        const {
                            nodes,
                            source,
                            positions,
                            path,
                            originalError,
                            extensions
                        } = toNormalizedOptions(rawArgs);
                        super(message);
                        this.name = 'GraphQLError';
                        this.path = path !== null && path !== void 0 ? path : undefined;
                        this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes.

                        this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined);
                        const nodeLocations = undefinedIfEmpty((_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map(node => node.loc).filter(loc => loc != null)); // Compute locations in the source for the given nodes/positions.

                        this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source;
                        this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map(loc => loc.start);
                        this.locations = positions && source ? positions.map(pos => (0, _location.getLocation)(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map(loc => (0, _location.getLocation)(loc.source, loc.start));
                        const originalExtensions = (0, _isObjectLike.isObjectLike)(originalError === null || originalError === void 0 ? void 0 : originalError.extensions) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : undefined;
                        this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : Object.create(null); // Only properties prescribed by the spec should be enumerable.
                        // Keep the rest as non-enumerable.

                        Object.defineProperties(this, {
                            message: {
                                writable: true,
                                enumerable: true
                            },
                            name: {
                                enumerable: false
                            },
                            nodes: {
                                enumerable: false
                            },
                            source: {
                                enumerable: false
                            },
                            positions: {
                                enumerable: false
                            },
                            originalError: {
                                enumerable: false
                            }
                        }); // Include (non-enumerable) stack trace.

                        /* c8 ignore start */
                        // FIXME: https://github.com/graphql/graphql-js/issues/2317

                        if (originalError !== null && originalError !== void 0 && originalError.stack) {
                            Object.defineProperty(this, 'stack', {
                                value: originalError.stack,
                                writable: true,
                                configurable: true
                            });
                        } else if (Error.captureStackTrace) {
                            Error.captureStackTrace(this, GraphQLError);
                        } else {
                            Object.defineProperty(this, 'stack', {
                                value: Error().stack,
                                writable: true,
                                configurable: true
                            });
                        }
                        /* c8 ignore stop */
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLError';
                    }
                    toString() {
                        let output = this.message;
                        if (this.nodes) {
                            for (const node of this.nodes) {
                                if (node.loc) {
                                    output += '\n\n' + (0, _printLocation.printLocation)(node.loc);
                                }
                            }
                        } else if (this.source && this.locations) {
                            for (const location of this.locations) {
                                output += '\n\n' + (0, _printLocation.printSourceLocation)(this.source, location);
                            }
                        }
                        return output;
                    }
                    toJSON() {
                        const formattedError = {
                            message: this.message
                        };
                        if (this.locations != null) {
                            formattedError.locations = this.locations;
                        }
                        if (this.path != null) {
                            formattedError.path = this.path;
                        }
                        if (this.extensions != null && Object.keys(this.extensions).length > 0) {
                            formattedError.extensions = this.extensions;
                        }
                        return formattedError;
                    }
                }
                exports.GraphQLError = GraphQLError;

                function undefinedIfEmpty(array) {
                    return array === undefined || array.length === 0 ? undefined : array;
                }
                /**
                 * See: https://spec.graphql.org/draft/#sec-Errors
                 */

                /**
                 * Prints a GraphQLError to a string, representing useful location information
                 * about the error's position in the source.
                 *
                 * @deprecated Please use `error.toString` instead. Will be removed in v17
                 */
                function printError(error) {
                    return error.toString();
                }
                /**
                 * Given a GraphQLError, format it according to the rules described by the
                 * Response Format, Errors section of the GraphQL Specification.
                 *
                 * @deprecated Please use `error.toJSON` instead. Will be removed in v17
                 */

                function formatError(error) {
                    return error.toJSON();
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/error/index.mjs":
            /*!*****************************************************!*\
              !*** ../../../node_modules/graphql/error/index.mjs ***!
              \*****************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "GraphQLError", ({
                    enumerable: true,
                    get: function() {
                        return _GraphQLError.GraphQLError;
                    }
                }));
                Object.defineProperty(exports, "formatError", ({
                    enumerable: true,
                    get: function() {
                        return _GraphQLError.formatError;
                    }
                }));
                Object.defineProperty(exports, "locatedError", ({
                    enumerable: true,
                    get: function() {
                        return _locatedError.locatedError;
                    }
                }));
                Object.defineProperty(exports, "printError", ({
                    enumerable: true,
                    get: function() {
                        return _GraphQLError.printError;
                    }
                }));
                Object.defineProperty(exports, "syntaxError", ({
                    enumerable: true,
                    get: function() {
                        return _syntaxError.syntaxError;
                    }
                }));
                var _GraphQLError = __webpack_require__( /*! ./GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _syntaxError = __webpack_require__( /*! ./syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs");
                var _locatedError = __webpack_require__( /*! ./locatedError.mjs */ "../../../node_modules/graphql/error/locatedError.mjs");

                /***/
            }),

        /***/
        "../../../node_modules/graphql/error/locatedError.mjs":
            /*!************************************************************!*\
              !*** ../../../node_modules/graphql/error/locatedError.mjs ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.locatedError = locatedError;
                var _toError = __webpack_require__( /*! ../jsutils/toError.mjs */ "../../../node_modules/graphql/jsutils/toError.mjs");
                var _GraphQLError = __webpack_require__( /*! ./GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Given an arbitrary value, presumably thrown while attempting to execute a
                 * GraphQL operation, produce a new GraphQLError aware of the location in the
                 * document responsible for the original Error.
                 */

                function locatedError(rawOriginalError, nodes, path) {
                    var _nodes;
                    const originalError = (0, _toError.toError)(rawOriginalError); // Note: this uses a brand-check to support GraphQL errors originating from other contexts.

                    if (isLocatedGraphQLError(originalError)) {
                        return originalError;
                    }
                    return new _GraphQLError.GraphQLError(originalError.message, {
                        nodes: (_nodes = originalError.nodes) !== null && _nodes !== void 0 ? _nodes : nodes,
                        source: originalError.source,
                        positions: originalError.positions,
                        path,
                        originalError
                    });
                }

                function isLocatedGraphQLError(error) {
                    return Array.isArray(error.path);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/error/syntaxError.mjs":
            /*!***********************************************************!*\
              !*** ../../../node_modules/graphql/error/syntaxError.mjs ***!
              \***********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.syntaxError = syntaxError;
                var _GraphQLError = __webpack_require__( /*! ./GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Produces a GraphQLError representing a syntax error, containing useful
                 * descriptive information about the syntax error's position in the source.
                 */

                function syntaxError(source, position, description) {
                    return new _GraphQLError.GraphQLError(`Syntax Error: ${description}`, {
                        source,
                        positions: [position]
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/execution/collectFields.mjs":
            /*!*****************************************************************!*\
              !*** ../../../node_modules/graphql/execution/collectFields.mjs ***!
              \*****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.collectFields = collectFields;
                exports.collectSubfields = collectSubfields;
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _directives = __webpack_require__( /*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                var _typeFromAST = __webpack_require__( /*! ../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
                var _values = __webpack_require__( /*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs");
                /**
                 * Given a selectionSet, collects all of the fields and returns them.
                 *
                 * CollectFields requires the "runtime type" of an object. For a field that
                 * returns an Interface or Union type, the "runtime type" will be the actual
                 * object type returned by that field.
                 *
                 * @internal
                 */

                function collectFields(schema, fragments, variableValues, runtimeType, selectionSet) {
                    const fields = new Map();
                    collectFieldsImpl(schema, fragments, variableValues, runtimeType, selectionSet, fields, new Set());
                    return fields;
                }
                /**
                 * Given an array of field nodes, collects all of the subfields of the passed
                 * in fields, and returns them at the end.
                 *
                 * CollectSubFields requires the "return type" of an object. For a field that
                 * returns an Interface or Union type, the "return type" will be the actual
                 * object type returned by that field.
                 *
                 * @internal
                 */

                function collectSubfields(schema, fragments, variableValues, returnType, fieldNodes) {
                    const subFieldNodes = new Map();
                    const visitedFragmentNames = new Set();
                    for (const node of fieldNodes) {
                        if (node.selectionSet) {
                            collectFieldsImpl(schema, fragments, variableValues, returnType, node.selectionSet, subFieldNodes, visitedFragmentNames);
                        }
                    }
                    return subFieldNodes;
                }

                function collectFieldsImpl(schema, fragments, variableValues, runtimeType, selectionSet, fields, visitedFragmentNames) {
                    for (const selection of selectionSet.selections) {
                        switch (selection.kind) {
                            case _kinds.Kind.FIELD: {
                                if (!shouldIncludeNode(variableValues, selection)) {
                                    continue;
                                }
                                const name = getFieldEntryKey(selection);
                                const fieldList = fields.get(name);
                                if (fieldList !== undefined) {
                                    fieldList.push(selection);
                                } else {
                                    fields.set(name, [selection]);
                                }
                                break;
                            }
                            case _kinds.Kind.INLINE_FRAGMENT: {
                                if (!shouldIncludeNode(variableValues, selection) || !doesFragmentConditionMatch(schema, selection, runtimeType)) {
                                    continue;
                                }
                                collectFieldsImpl(schema, fragments, variableValues, runtimeType, selection.selectionSet, fields, visitedFragmentNames);
                                break;
                            }
                            case _kinds.Kind.FRAGMENT_SPREAD: {
                                const fragName = selection.name.value;
                                if (visitedFragmentNames.has(fragName) || !shouldIncludeNode(variableValues, selection)) {
                                    continue;
                                }
                                visitedFragmentNames.add(fragName);
                                const fragment = fragments[fragName];
                                if (!fragment || !doesFragmentConditionMatch(schema, fragment, runtimeType)) {
                                    continue;
                                }
                                collectFieldsImpl(schema, fragments, variableValues, runtimeType, fragment.selectionSet, fields, visitedFragmentNames);
                                break;
                            }
                        }
                    }
                }
                /**
                 * Determines if a field should be included based on the `@include` and `@skip`
                 * directives, where `@skip` has higher precedence than `@include`.
                 */

                function shouldIncludeNode(variableValues, node) {
                    const skip = (0, _values.getDirectiveValues)(_directives.GraphQLSkipDirective, node, variableValues);
                    if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) {
                        return false;
                    }
                    const include = (0, _values.getDirectiveValues)(_directives.GraphQLIncludeDirective, node, variableValues);
                    if ((include === null || include === void 0 ? void 0 : include.if) === false) {
                        return false;
                    }
                    return true;
                }
                /**
                 * Determines if a fragment is applicable to the given type.
                 */

                function doesFragmentConditionMatch(schema, fragment, type) {
                    const typeConditionNode = fragment.typeCondition;
                    if (!typeConditionNode) {
                        return true;
                    }
                    const conditionalType = (0, _typeFromAST.typeFromAST)(schema, typeConditionNode);
                    if (conditionalType === type) {
                        return true;
                    }
                    if ((0, _definition.isAbstractType)(conditionalType)) {
                        return schema.isSubType(conditionalType, type);
                    }
                    return false;
                }
                /**
                 * Implements the logic to compute the key of a given field's entry
                 */

                function getFieldEntryKey(node) {
                    return node.alias ? node.alias.value : node.name.value;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/execution/execute.mjs":
            /*!***********************************************************!*\
              !*** ../../../node_modules/graphql/execution/execute.mjs ***!
              \***********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.assertValidExecutionArguments = assertValidExecutionArguments;
                exports.buildExecutionContext = buildExecutionContext;
                exports.buildResolveInfo = buildResolveInfo;
                exports.defaultTypeResolver = exports.defaultFieldResolver = void 0;
                exports.execute = execute;
                exports.executeSync = executeSync;
                exports.getFieldDef = getFieldDef;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _isIterableObject = __webpack_require__( /*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs");
                var _isObjectLike = __webpack_require__( /*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
                var _isPromise = __webpack_require__( /*! ../jsutils/isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs");
                var _memoize = __webpack_require__( /*! ../jsutils/memoize3.mjs */ "../../../node_modules/graphql/jsutils/memoize3.mjs");
                var _Path = __webpack_require__( /*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs");
                var _promiseForObject = __webpack_require__( /*! ../jsutils/promiseForObject.mjs */ "../../../node_modules/graphql/jsutils/promiseForObject.mjs");
                var _promiseReduce = __webpack_require__( /*! ../jsutils/promiseReduce.mjs */ "../../../node_modules/graphql/jsutils/promiseReduce.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _locatedError = __webpack_require__( /*! ../error/locatedError.mjs */ "../../../node_modules/graphql/error/locatedError.mjs");
                var _ast = __webpack_require__( /*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _introspection = __webpack_require__( /*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                var _validate = __webpack_require__( /*! ../type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs");
                var _collectFields = __webpack_require__( /*! ./collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs");
                var _values = __webpack_require__( /*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs");
                /**
                 * A memoized collection of relevant subfields with regard to the return
                 * type. Memoizing ensures the subfields are not repeatedly calculated, which
                 * saves overhead when resolving lists of values.
                 */

                const collectSubfields = (0, _memoize.memoize3)((exeContext, returnType, fieldNodes) => (0, _collectFields.collectSubfields)(exeContext.schema, exeContext.fragments, exeContext.variableValues, returnType, fieldNodes));
                /**
                 * Terminology
                 *
                 * "Definitions" are the generic name for top-level statements in the document.
                 * Examples of this include:
                 * 1) Operations (such as a query)
                 * 2) Fragments
                 *
                 * "Operations" are a generic name for requests in the document.
                 * Examples of this include:
                 * 1) query,
                 * 2) mutation
                 *
                 * "Selections" are the definitions that can appear legally and at
                 * single level of the query. These include:
                 * 1) field references e.g `a`
                 * 2) fragment "spreads" e.g. `...c`
                 * 3) inline fragment "spreads" e.g. `...on Type { a }`
                 */

                /**
                 * Data that must be available at all points during query execution.
                 *
                 * Namely, schema of the type system that is currently executing,
                 * and the fragments defined in the query document
                 */

                /**
                 * Implements the "Executing requests" section of the GraphQL specification.
                 *
                 * Returns either a synchronous ExecutionResult (if all encountered resolvers
                 * are synchronous), or a Promise of an ExecutionResult that will eventually be
                 * resolved and never rejected.
                 *
                 * If the arguments to this function do not result in a legal execution context,
                 * a GraphQLError will be thrown immediately explaining the invalid input.
                 */
                function execute(args) {
                    // Temporary for v15 to v16 migration. Remove in v17
                    arguments.length < 2 || (0, _devAssert.devAssert)(false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.');
                    const {
                        schema,
                        document,
                        variableValues,
                        rootValue
                    } = args; // If arguments are missing or incorrect, throw an error.

                    assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,
                    // a "Response" with only errors is returned.

                    const exeContext = buildExecutionContext(args); // Return early errors if execution context failed.

                    if (!('schema' in exeContext)) {
                        return {
                            errors: exeContext
                        };
                    } // Return a Promise that will eventually resolve to the data described by
                    // The "Response" section of the GraphQL specification.
                    //
                    // If errors are encountered while executing a GraphQL field, only that
                    // field and its descendants will be omitted, and sibling fields will still
                    // be executed. An execution which encounters errors will still result in a
                    // resolved Promise.
                    //
                    // Errors from sub-fields of a NonNull type may propagate to the top level,
                    // at which point we still log the error and null the parent field, which
                    // in this case is the entire response.

                    try {
                        const {
                            operation
                        } = exeContext;
                        const result = executeOperation(exeContext, operation, rootValue);
                        if ((0, _isPromise.isPromise)(result)) {
                            return result.then(data => buildResponse(data, exeContext.errors), error => {
                                exeContext.errors.push(error);
                                return buildResponse(null, exeContext.errors);
                            });
                        }
                        return buildResponse(result, exeContext.errors);
                    } catch (error) {
                        exeContext.errors.push(error);
                        return buildResponse(null, exeContext.errors);
                    }
                }
                /**
                 * Also implements the "Executing requests" section of the GraphQL specification.
                 * However, it guarantees to complete synchronously (or throw an error) assuming
                 * that all field resolvers are also synchronous.
                 */

                function executeSync(args) {
                    const result = execute(args); // Assert that the execution was synchronous.

                    if ((0, _isPromise.isPromise)(result)) {
                        throw new Error('GraphQL execution failed to complete synchronously.');
                    }
                    return result;
                }
                /**
                 * Given a completed execution context and data, build the `{ errors, data }`
                 * response defined by the "Response" section of the GraphQL specification.
                 */

                function buildResponse(data, errors) {
                    return errors.length === 0 ? {
                        data
                    } : {
                        errors,
                        data
                    };
                }
                /**
                 * Essential assertions before executing to provide developer feedback for
                 * improper use of the GraphQL library.
                 *
                 * @internal
                 */

                function assertValidExecutionArguments(schema, document, rawVariableValues) {
                    document || (0, _devAssert.devAssert)(false, 'Must provide document.'); // If the schema used for execution is invalid, throw an error.

                    (0, _validate.assertValidSchema)(schema); // Variables, if provided, must be an object.

                    rawVariableValues == null || (0, _isObjectLike.isObjectLike)(rawVariableValues) || (0, _devAssert.devAssert)(false, 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.');
                }
                /**
                 * Constructs a ExecutionContext object from the arguments passed to
                 * execute, which we will pass throughout the other execution methods.
                 *
                 * Throws a GraphQLError if a valid execution context cannot be created.
                 *
                 * @internal
                 */

                function buildExecutionContext(args) {
                    var _definition$name, _operation$variableDe;
                    const {
                        schema,
                        document,
                        rootValue,
                        contextValue,
                        variableValues: rawVariableValues,
                        operationName,
                        fieldResolver,
                        typeResolver,
                        subscribeFieldResolver
                    } = args;
                    let operation;
                    const fragments = Object.create(null);
                    for (const definition of document.definitions) {
                        switch (definition.kind) {
                            case _kinds.Kind.OPERATION_DEFINITION:
                                if (operationName == null) {
                                    if (operation !== undefined) {
                                        return [new _GraphQLError.GraphQLError('Must provide operation name if query contains multiple operations.')];
                                    }
                                    operation = definition;
                                } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {
                                    operation = definition;
                                }
                                break;
                            case _kinds.Kind.FRAGMENT_DEFINITION:
                                fragments[definition.name.value] = definition;
                                break;
                            default: // ignore non-executable definitions
                        }
                    }
                    if (!operation) {
                        if (operationName != null) {
                            return [new _GraphQLError.GraphQLError(`Unknown operation named "${operationName}".`)];
                        }
                        return [new _GraphQLError.GraphQLError('Must provide an operation.')];
                    } // FIXME: https://github.com/graphql/graphql-js/issues/2203

                    /* c8 ignore next */

                    const variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== void 0 ? _operation$variableDe : [];
                    const coercedVariableValues = (0, _values.getVariableValues)(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== void 0 ? rawVariableValues : {}, {
                        maxErrors: 50
                    });
                    if (coercedVariableValues.errors) {
                        return coercedVariableValues.errors;
                    }
                    return {
                        schema,
                        fragments,
                        rootValue,
                        contextValue,
                        operation,
                        variableValues: coercedVariableValues.coerced,
                        fieldResolver: fieldResolver !== null && fieldResolver !== void 0 ? fieldResolver : defaultFieldResolver,
                        typeResolver: typeResolver !== null && typeResolver !== void 0 ? typeResolver : defaultTypeResolver,
                        subscribeFieldResolver: subscribeFieldResolver !== null && subscribeFieldResolver !== void 0 ? subscribeFieldResolver : defaultFieldResolver,
                        errors: []
                    };
                }
                /**
                 * Implements the "Executing operations" section of the spec.
                 */

                function executeOperation(exeContext, operation, rootValue) {
                    const rootType = exeContext.schema.getRootType(operation.operation);
                    if (rootType == null) {
                        throw new _GraphQLError.GraphQLError(`Schema is not configured to execute ${operation.operation} operation.`, {
                            nodes: operation
                        });
                    }
                    const rootFields = (0, _collectFields.collectFields)(exeContext.schema, exeContext.fragments, exeContext.variableValues, rootType, operation.selectionSet);
                    const path = undefined;
                    switch (operation.operation) {
                        case _ast.OperationTypeNode.QUERY:
                            return executeFields(exeContext, rootType, rootValue, path, rootFields);
                        case _ast.OperationTypeNode.MUTATION:
                            return executeFieldsSerially(exeContext, rootType, rootValue, path, rootFields);
                        case _ast.OperationTypeNode.SUBSCRIPTION:
                            // TODO: deprecate `subscribe` and move all logic here
                            // Temporary solution until we finish merging execute and subscribe together
                            return executeFields(exeContext, rootType, rootValue, path, rootFields);
                    }
                }
                /**
                 * Implements the "Executing selection sets" section of the spec
                 * for fields that must be executed serially.
                 */

                function executeFieldsSerially(exeContext, parentType, sourceValue, path, fields) {
                    return (0, _promiseReduce.promiseReduce)(fields.entries(), (results, [responseName, fieldNodes]) => {
                        const fieldPath = (0, _Path.addPath)(path, responseName, parentType.name);
                        const result = executeField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);
                        if (result === undefined) {
                            return results;
                        }
                        if ((0, _isPromise.isPromise)(result)) {
                            return result.then(resolvedResult => {
                                results[responseName] = resolvedResult;
                                return results;
                            });
                        }
                        results[responseName] = result;
                        return results;
                    }, Object.create(null));
                }
                /**
                 * Implements the "Executing selection sets" section of the spec
                 * for fields that may be executed in parallel.
                 */

                function executeFields(exeContext, parentType, sourceValue, path, fields) {
                    const results = Object.create(null);
                    let containsPromise = false;
                    try {
                        for (const [responseName, fieldNodes] of fields.entries()) {
                            const fieldPath = (0, _Path.addPath)(path, responseName, parentType.name);
                            const result = executeField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);
                            if (result !== undefined) {
                                results[responseName] = result;
                                if ((0, _isPromise.isPromise)(result)) {
                                    containsPromise = true;
                                }
                            }
                        }
                    } catch (error) {
                        if (containsPromise) {
                            // Ensure that any promises returned by other fields are handled, as they may also reject.
                            return (0, _promiseForObject.promiseForObject)(results).finally(() => {
                                throw error;
                            });
                        }
                        throw error;
                    } // If there are no promises, we can just return the object

                    if (!containsPromise) {
                        return results;
                    } // Otherwise, results is a map from field name to the result of resolving that
                    // field, which is possibly a promise. Return a promise that will return this
                    // same map, but with any promises replaced with the values they resolved to.

                    return (0, _promiseForObject.promiseForObject)(results);
                }
                /**
                 * Implements the "Executing fields" section of the spec
                 * In particular, this function figures out the value that the field returns by
                 * calling its resolve function, then calls completeValue to complete promises,
                 * serialize scalars, or execute the sub-selection-set for objects.
                 */

                function executeField(exeContext, parentType, source, fieldNodes, path) {
                    var _fieldDef$resolve;
                    const fieldDef = getFieldDef(exeContext.schema, parentType, fieldNodes[0]);
                    if (!fieldDef) {
                        return;
                    }
                    const returnType = fieldDef.type;
                    const resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _fieldDef$resolve : exeContext.fieldResolver;
                    const info = buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path); // Get the resolve function, regardless of if its result is normal or abrupt (error).

                    try {
                        // Build a JS object of arguments from the field.arguments AST, using the
                        // variables scope to fulfill any variable references.
                        // TODO: find a way to memoize, in case this field is within a List type.
                        const args = (0, _values.getArgumentValues)(fieldDef, fieldNodes[0], exeContext.variableValues); // The resolve function's optional third argument is a context value that
                        // is provided to every resolve function within an execution. It is commonly
                        // used to represent an authenticated user, or request-specific caches.

                        const contextValue = exeContext.contextValue;
                        const result = resolveFn(source, args, contextValue, info);
                        let completed;
                        if ((0, _isPromise.isPromise)(result)) {
                            completed = result.then(resolved => completeValue(exeContext, returnType, fieldNodes, info, path, resolved));
                        } else {
                            completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);
                        }
                        if ((0, _isPromise.isPromise)(completed)) {
                            // Note: we don't rely on a `catch` method, but we do expect "thenable"
                            // to take a second callback for the error case.
                            return completed.then(undefined, rawError => {
                                const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path));
                                return handleFieldError(error, returnType, exeContext);
                            });
                        }
                        return completed;
                    } catch (rawError) {
                        const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path));
                        return handleFieldError(error, returnType, exeContext);
                    }
                }
                /**
                 * @internal
                 */

                function buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path) {
                    // The resolve function's optional fourth argument is a collection of
                    // information about the current execution state.
                    return {
                        fieldName: fieldDef.name,
                        fieldNodes,
                        returnType: fieldDef.type,
                        parentType,
                        path,
                        schema: exeContext.schema,
                        fragments: exeContext.fragments,
                        rootValue: exeContext.rootValue,
                        operation: exeContext.operation,
                        variableValues: exeContext.variableValues
                    };
                }

                function handleFieldError(error, returnType, exeContext) {
                    // If the field type is non-nullable, then it is resolved without any
                    // protection from errors, however it still properly locates the error.
                    if ((0, _definition.isNonNullType)(returnType)) {
                        throw error;
                    } // Otherwise, error protection is applied, logging the error and resolving
                    // a null value for this field if one is encountered.

                    exeContext.errors.push(error);
                    return null;
                }
                /**
                 * Implements the instructions for completeValue as defined in the
                 * "Value Completion" section of the spec.
                 *
                 * If the field type is Non-Null, then this recursively completes the value
                 * for the inner type. It throws a field error if that completion returns null,
                 * as per the "Nullability" section of the spec.
                 *
                 * If the field type is a List, then this recursively completes the value
                 * for the inner type on each item in the list.
                 *
                 * If the field type is a Scalar or Enum, ensures the completed value is a legal
                 * value of the type by calling the `serialize` method of GraphQL type
                 * definition.
                 *
                 * If the field is an abstract type, determine the runtime type of the value
                 * and then complete based on that type
                 *
                 * Otherwise, the field type expects a sub-selection set, and will complete the
                 * value by executing all sub-selections.
                 */

                function completeValue(exeContext, returnType, fieldNodes, info, path, result) {
                    // If result is an Error, throw a located error.
                    if (result instanceof Error) {
                        throw result;
                    } // If field type is NonNull, complete for inner type, and throw field error
                    // if result is null.

                    if ((0, _definition.isNonNullType)(returnType)) {
                        const completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);
                        if (completed === null) {
                            throw new Error(`Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`);
                        }
                        return completed;
                    } // If result value is null or undefined then return null.

                    if (result == null) {
                        return null;
                    } // If field type is List, complete each item in the list with the inner type

                    if ((0, _definition.isListType)(returnType)) {
                        return completeListValue(exeContext, returnType, fieldNodes, info, path, result);
                    } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,
                    // returning null if serialization is not possible.

                    if ((0, _definition.isLeafType)(returnType)) {
                        return completeLeafValue(returnType, result);
                    } // If field type is an abstract type, Interface or Union, determine the
                    // runtime Object type and complete for that type.

                    if ((0, _definition.isAbstractType)(returnType)) {
                        return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);
                    } // If field type is Object, execute and complete all sub-selections.

                    if ((0, _definition.isObjectType)(returnType)) {
                        return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);
                    }
                    /* c8 ignore next 6 */
                    // Not reachable, all possible output types have been considered.

                    false || (0, _invariant.invariant)(false, 'Cannot complete value of unexpected output type: ' + (0, _inspect.inspect)(returnType));
                }
                /**
                 * Complete a list value by completing each item in the list with the
                 * inner type
                 */

                function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {
                    if (!(0, _isIterableObject.isIterableObject)(result)) {
                        throw new _GraphQLError.GraphQLError(`Expected Iterable, but did not find one for field "${info.parentType.name}.${info.fieldName}".`);
                    } // This is specified as a simple map, however we're optimizing the path
                    // where the list contains no Promises by avoiding creating another Promise.

                    const itemType = returnType.ofType;
                    let containsPromise = false;
                    const completedResults = Array.from(result, (item, index) => {
                        // No need to modify the info object containing the path,
                        // since from here on it is not ever accessed by resolver functions.
                        const itemPath = (0, _Path.addPath)(path, index, undefined);
                        try {
                            let completedItem;
                            if ((0, _isPromise.isPromise)(item)) {
                                completedItem = item.then(resolved => completeValue(exeContext, itemType, fieldNodes, info, itemPath, resolved));
                            } else {
                                completedItem = completeValue(exeContext, itemType, fieldNodes, info, itemPath, item);
                            }
                            if ((0, _isPromise.isPromise)(completedItem)) {
                                containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect "thenable"
                                // to take a second callback for the error case.

                                return completedItem.then(undefined, rawError => {
                                    const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath));
                                    return handleFieldError(error, itemType, exeContext);
                                });
                            }
                            return completedItem;
                        } catch (rawError) {
                            const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath));
                            return handleFieldError(error, itemType, exeContext);
                        }
                    });
                    return containsPromise ? Promise.all(completedResults) : completedResults;
                }
                /**
                 * Complete a Scalar or Enum by serializing to a valid value, returning
                 * null if serialization is not possible.
                 */

                function completeLeafValue(returnType, result) {
                    const serializedResult = returnType.serialize(result);
                    if (serializedResult == null) {
                        throw new Error(`Expected \`${(0, _inspect.inspect)(returnType)}.serialize(${(0, _inspect.inspect)(result)})\` to ` + `return non-nullable value, returned: ${(0, _inspect.inspect)(serializedResult)}`);
                    }
                    return serializedResult;
                }
                /**
                 * Complete a value of an abstract type by determining the runtime object type
                 * of that value, then complete the value for that type.
                 */

                function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {
                    var _returnType$resolveTy;
                    const resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver;
                    const contextValue = exeContext.contextValue;
                    const runtimeType = resolveTypeFn(result, contextValue, info, returnType);
                    if ((0, _isPromise.isPromise)(runtimeType)) {
                        return runtimeType.then(resolvedRuntimeType => completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result));
                    }
                    return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);
                }

                function ensureValidRuntimeType(runtimeTypeName, exeContext, returnType, fieldNodes, info, result) {
                    if (runtimeTypeName == null) {
                        throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}". Either the "${returnType.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`, fieldNodes);
                    } // releases before 16.0.0 supported returning `GraphQLObjectType` from `resolveType`
                    // TODO: remove in 17.0.0 release

                    if ((0, _definition.isObjectType)(runtimeTypeName)) {
                        throw new _GraphQLError.GraphQLError('Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.');
                    }
                    if (typeof runtimeTypeName !== 'string') {
                        throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}" with ` + `value ${(0, _inspect.inspect)(result)}, received "${(0, _inspect.inspect)(runtimeTypeName)}".`);
                    }
                    const runtimeType = exeContext.schema.getType(runtimeTypeName);
                    if (runtimeType == null) {
                        throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" was resolved to a type "${runtimeTypeName}" that does not exist inside the schema.`, {
                            nodes: fieldNodes
                        });
                    }
                    if (!(0, _definition.isObjectType)(runtimeType)) {
                        throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" was resolved to a non-object type "${runtimeTypeName}".`, {
                            nodes: fieldNodes
                        });
                    }
                    if (!exeContext.schema.isSubType(returnType, runtimeType)) {
                        throw new _GraphQLError.GraphQLError(`Runtime Object type "${runtimeType.name}" is not a possible type for "${returnType.name}".`, {
                            nodes: fieldNodes
                        });
                    }
                    return runtimeType;
                }
                /**
                 * Complete an Object value by executing all sub-selections.
                 */

                function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {
                    // Collect sub-fields to execute to complete this value.
                    const subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes); // If there is an isTypeOf predicate function, call it with the
                    // current result. If isTypeOf returns false, then raise an error rather
                    // than continuing execution.

                    if (returnType.isTypeOf) {
                        const isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);
                        if ((0, _isPromise.isPromise)(isTypeOf)) {
                            return isTypeOf.then(resolvedIsTypeOf => {
                                if (!resolvedIsTypeOf) {
                                    throw invalidReturnTypeError(returnType, result, fieldNodes);
                                }
                                return executeFields(exeContext, returnType, result, path, subFieldNodes);
                            });
                        }
                        if (!isTypeOf) {
                            throw invalidReturnTypeError(returnType, result, fieldNodes);
                        }
                    }
                    return executeFields(exeContext, returnType, result, path, subFieldNodes);
                }

                function invalidReturnTypeError(returnType, result, fieldNodes) {
                    return new _GraphQLError.GraphQLError(`Expected value of type "${returnType.name}" but got: ${(0, _inspect.inspect)(result)}.`, {
                        nodes: fieldNodes
                    });
                }
                /**
                 * If a resolveType function is not given, then a default resolve behavior is
                 * used which attempts two strategies:
                 *
                 * First, See if the provided value has a `__typename` field defined, if so, use
                 * that value as name of the resolved type.
                 *
                 * Otherwise, test each possible type for the abstract type by calling
                 * isTypeOf for the object being coerced, returning the first type that matches.
                 */

                const defaultTypeResolver = function(value, contextValue, info, abstractType) {
                    // First, look for `__typename`.
                    if ((0, _isObjectLike.isObjectLike)(value) && typeof value.__typename === 'string') {
                        return value.__typename;
                    } // Otherwise, test each possible type.

                    const possibleTypes = info.schema.getPossibleTypes(abstractType);
                    const promisedIsTypeOfResults = [];
                    for (let i = 0; i < possibleTypes.length; i++) {
                        const type = possibleTypes[i];
                        if (type.isTypeOf) {
                            const isTypeOfResult = type.isTypeOf(value, contextValue, info);
                            if ((0, _isPromise.isPromise)(isTypeOfResult)) {
                                promisedIsTypeOfResults[i] = isTypeOfResult;
                            } else if (isTypeOfResult) {
                                return type.name;
                            }
                        }
                    }
                    if (promisedIsTypeOfResults.length) {
                        return Promise.all(promisedIsTypeOfResults).then(isTypeOfResults => {
                            for (let i = 0; i < isTypeOfResults.length; i++) {
                                if (isTypeOfResults[i]) {
                                    return possibleTypes[i].name;
                                }
                            }
                        });
                    }
                };
                /**
                 * If a resolve function is not given, then a default resolve behavior is used
                 * which takes the property of the source object of the same name as the field
                 * and returns it as the result, or if it's a function, returns the result
                 * of calling that function while passing along args and context value.
                 */
                exports.defaultTypeResolver = defaultTypeResolver;
                const defaultFieldResolver = function(source, args, contextValue, info) {
                    // ensure source is a value for which property access is acceptable.
                    if ((0, _isObjectLike.isObjectLike)(source) || typeof source === 'function') {
                        const property = source[info.fieldName];
                        if (typeof property === 'function') {
                            return source[info.fieldName](args, contextValue, info);
                        }
                        return property;
                    }
                };
                /**
                 * This method looks up the field on the given type definition.
                 * It has special casing for the three introspection fields,
                 * __schema, __type and __typename. __typename is special because
                 * it can always be queried as a field, even in situations where no
                 * other fields are allowed, like on a Union. __schema and __type
                 * could get automatically added to the query type, but that would
                 * require mutating type definitions, which would cause issues.
                 *
                 * @internal
                 */
                exports.defaultFieldResolver = defaultFieldResolver;

                function getFieldDef(schema, parentType, fieldNode) {
                    const fieldName = fieldNode.name.value;
                    if (fieldName === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) {
                        return _introspection.SchemaMetaFieldDef;
                    } else if (fieldName === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) {
                        return _introspection.TypeMetaFieldDef;
                    } else if (fieldName === _introspection.TypeNameMetaFieldDef.name) {
                        return _introspection.TypeNameMetaFieldDef;
                    }
                    return parentType.getFields()[fieldName];
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/execution/index.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/execution/index.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "createSourceEventStream", ({
                    enumerable: true,
                    get: function() {
                        return _subscribe.createSourceEventStream;
                    }
                }));
                Object.defineProperty(exports, "defaultFieldResolver", ({
                    enumerable: true,
                    get: function() {
                        return _execute.defaultFieldResolver;
                    }
                }));
                Object.defineProperty(exports, "defaultTypeResolver", ({
                    enumerable: true,
                    get: function() {
                        return _execute.defaultTypeResolver;
                    }
                }));
                Object.defineProperty(exports, "execute", ({
                    enumerable: true,
                    get: function() {
                        return _execute.execute;
                    }
                }));
                Object.defineProperty(exports, "executeSync", ({
                    enumerable: true,
                    get: function() {
                        return _execute.executeSync;
                    }
                }));
                Object.defineProperty(exports, "getArgumentValues", ({
                    enumerable: true,
                    get: function() {
                        return _values.getArgumentValues;
                    }
                }));
                Object.defineProperty(exports, "getDirectiveValues", ({
                    enumerable: true,
                    get: function() {
                        return _values.getDirectiveValues;
                    }
                }));
                Object.defineProperty(exports, "getVariableValues", ({
                    enumerable: true,
                    get: function() {
                        return _values.getVariableValues;
                    }
                }));
                Object.defineProperty(exports, "responsePathAsArray", ({
                    enumerable: true,
                    get: function() {
                        return _Path.pathToArray;
                    }
                }));
                Object.defineProperty(exports, "subscribe", ({
                    enumerable: true,
                    get: function() {
                        return _subscribe.subscribe;
                    }
                }));
                var _Path = __webpack_require__( /*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs");
                var _execute = __webpack_require__( /*! ./execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs");
                var _subscribe = __webpack_require__( /*! ./subscribe.mjs */ "../../../node_modules/graphql/execution/subscribe.mjs");
                var _values = __webpack_require__( /*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs");

                /***/
            }),

        /***/
        "../../../node_modules/graphql/execution/mapAsyncIterator.mjs":
            /*!********************************************************************!*\
              !*** ../../../node_modules/graphql/execution/mapAsyncIterator.mjs ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.mapAsyncIterator = mapAsyncIterator;
                /**
                 * Given an AsyncIterable and a callback function, return an AsyncIterator
                 * which produces values mapped via calling the callback function.
                 */
                function mapAsyncIterator(iterable, callback) {
                    const iterator = iterable[Symbol.asyncIterator]();
                    async function mapResult(result) {
                        if (result.done) {
                            return result;
                        }
                        try {
                            return {
                                value: await callback(result.value),
                                done: false
                            };
                        } catch (error) {
                            /* c8 ignore start */
                            // FIXME: add test case
                            if (typeof iterator.return === 'function') {
                                try {
                                    await iterator.return();
                                } catch (_e) {
                                    /* ignore error */
                                }
                            }
                            throw error;
                            /* c8 ignore stop */
                        }
                    }
                    return {
                        async next() {
                            return mapResult(await iterator.next());
                        },
                        async return () {
                            // If iterator.return() does not exist, then type R must be undefined.
                            return typeof iterator.return === 'function' ? mapResult(await iterator.return()) : {
                                value: undefined,
                                done: true
                            };
                        },
                        async throw (error) {
                            if (typeof iterator.throw === 'function') {
                                return mapResult(await iterator.throw(error));
                            }
                            throw error;
                        },
                        [Symbol.asyncIterator]() {
                            return this;
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/execution/subscribe.mjs":
            /*!*************************************************************!*\
              !*** ../../../node_modules/graphql/execution/subscribe.mjs ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createSourceEventStream = createSourceEventStream;
                exports.subscribe = subscribe;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _isAsyncIterable = __webpack_require__( /*! ../jsutils/isAsyncIterable.mjs */ "../../../node_modules/graphql/jsutils/isAsyncIterable.mjs");
                var _Path = __webpack_require__( /*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _locatedError = __webpack_require__( /*! ../error/locatedError.mjs */ "../../../node_modules/graphql/error/locatedError.mjs");
                var _collectFields = __webpack_require__( /*! ./collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs");
                var _execute = __webpack_require__( /*! ./execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs");
                var _mapAsyncIterator = __webpack_require__( /*! ./mapAsyncIterator.mjs */ "../../../node_modules/graphql/execution/mapAsyncIterator.mjs");
                var _values = __webpack_require__( /*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs");
                /**
                 * Implements the "Subscribe" algorithm described in the GraphQL specification.
                 *
                 * Returns a Promise which resolves to either an AsyncIterator (if successful)
                 * or an ExecutionResult (error). The promise will be rejected if the schema or
                 * other arguments to this function are invalid, or if the resolved event stream
                 * is not an async iterable.
                 *
                 * If the client-provided arguments to this function do not result in a
                 * compliant subscription, a GraphQL Response (ExecutionResult) with
                 * descriptive errors and no data will be returned.
                 *
                 * If the source stream could not be created due to faulty subscription
                 * resolver logic or underlying systems, the promise will resolve to a single
                 * ExecutionResult containing `errors` and no `data`.
                 *
                 * If the operation succeeded, the promise resolves to an AsyncIterator, which
                 * yields a stream of ExecutionResults representing the response stream.
                 *
                 * Accepts either an object with named arguments, or individual arguments.
                 */

                async function subscribe(args) {
                    // Temporary for v15 to v16 migration. Remove in v17
                    arguments.length < 2 || (0, _devAssert.devAssert)(false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.');
                    const resultOrStream = await createSourceEventStream(args);
                    if (!(0, _isAsyncIterable.isAsyncIterable)(resultOrStream)) {
                        return resultOrStream;
                    } // For each payload yielded from a subscription, map it over the normal
                    // GraphQL `execute` function, with `payload` as the rootValue.
                    // This implements the "MapSourceToResponseEvent" algorithm described in
                    // the GraphQL specification. The `execute` function provides the
                    // "ExecuteSubscriptionEvent" algorithm, as it is nearly identical to the
                    // "ExecuteQuery" algorithm, for which `execute` is also used.

                    const mapSourceToResponse = payload => (0, _execute.execute)({
                        ...args,
                        rootValue: payload
                    }); // Map every source value to a ExecutionResult value as described above.

                    return (0, _mapAsyncIterator.mapAsyncIterator)(resultOrStream, mapSourceToResponse);
                }

                function toNormalizedArgs(args) {
                    const firstArg = args[0];
                    if (firstArg && 'document' in firstArg) {
                        return firstArg;
                    }
                    return {
                        schema: firstArg,
                        // FIXME: when underlying TS bug fixed, see https://github.com/microsoft/TypeScript/issues/31613
                        document: args[1],
                        rootValue: args[2],
                        contextValue: args[3],
                        variableValues: args[4],
                        operationName: args[5],
                        subscribeFieldResolver: args[6]
                    };
                }
                /**
                 * Implements the "CreateSourceEventStream" algorithm described in the
                 * GraphQL specification, resolving the subscription source event stream.
                 *
                 * Returns a Promise which resolves to either an AsyncIterable (if successful)
                 * or an ExecutionResult (error). The promise will be rejected if the schema or
                 * other arguments to this function are invalid, or if the resolved event stream
                 * is not an async iterable.
                 *
                 * If the client-provided arguments to this function do not result in a
                 * compliant subscription, a GraphQL Response (ExecutionResult) with
                 * descriptive errors and no data will be returned.
                 *
                 * If the the source stream could not be created due to faulty subscription
                 * resolver logic or underlying systems, the promise will resolve to a single
                 * ExecutionResult containing `errors` and no `data`.
                 *
                 * If the operation succeeded, the promise resolves to the AsyncIterable for the
                 * event stream returned by the resolver.
                 *
                 * A Source Event Stream represents a sequence of events, each of which triggers
                 * a GraphQL execution for that event.
                 *
                 * This may be useful when hosting the stateful subscription service in a
                 * different process or machine than the stateless GraphQL execution engine,
                 * or otherwise separating these two steps. For more on this, see the
                 * "Supporting Subscriptions at Scale" information in the GraphQL specification.
                 */

                async function createSourceEventStream(...rawArgs) {
                    const args = toNormalizedArgs(rawArgs);
                    const {
                        schema,
                        document,
                        variableValues
                    } = args; // If arguments are missing or incorrectly typed, this is an internal
                    // developer mistake which should throw an early error.

                    (0, _execute.assertValidExecutionArguments)(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,
                    // a "Response" with only errors is returned.

                    const exeContext = (0, _execute.buildExecutionContext)(args); // Return early errors if execution context failed.

                    if (!('schema' in exeContext)) {
                        return {
                            errors: exeContext
                        };
                    }
                    try {
                        const eventStream = await executeSubscription(exeContext); // Assert field returned an event stream, otherwise yield an error.

                        if (!(0, _isAsyncIterable.isAsyncIterable)(eventStream)) {
                            throw new Error('Subscription field must return Async Iterable. ' + `Received: ${(0, _inspect.inspect)(eventStream)}.`);
                        }
                        return eventStream;
                    } catch (error) {
                        // If it GraphQLError, report it as an ExecutionResult, containing only errors and no data.
                        // Otherwise treat the error as a system-class error and re-throw it.
                        if (error instanceof _GraphQLError.GraphQLError) {
                            return {
                                errors: [error]
                            };
                        }
                        throw error;
                    }
                }
                async function executeSubscription(exeContext) {
                    const {
                        schema,
                        fragments,
                        operation,
                        variableValues,
                        rootValue
                    } = exeContext;
                    const rootType = schema.getSubscriptionType();
                    if (rootType == null) {
                        throw new _GraphQLError.GraphQLError('Schema is not configured to execute subscription operation.', {
                            nodes: operation
                        });
                    }
                    const rootFields = (0, _collectFields.collectFields)(schema, fragments, variableValues, rootType, operation.selectionSet);
                    const [responseName, fieldNodes] = [...rootFields.entries()][0];
                    const fieldDef = (0, _execute.getFieldDef)(schema, rootType, fieldNodes[0]);
                    if (!fieldDef) {
                        const fieldName = fieldNodes[0].name.value;
                        throw new _GraphQLError.GraphQLError(`The subscription field "${fieldName}" is not defined.`, {
                            nodes: fieldNodes
                        });
                    }
                    const path = (0, _Path.addPath)(undefined, responseName, rootType.name);
                    const info = (0, _execute.buildResolveInfo)(exeContext, fieldDef, fieldNodes, rootType, path);
                    try {
                        var _fieldDef$subscribe;

                        // Implements the "ResolveFieldEventStream" algorithm from GraphQL specification.
                        // It differs from "ResolveFieldValue" due to providing a different `resolveFn`.
                        // Build a JS object of arguments from the field.arguments AST, using the
                        // variables scope to fulfill any variable references.
                        const args = (0, _values.getArgumentValues)(fieldDef, fieldNodes[0], variableValues); // The resolve function's optional third argument is a context value that
                        // is provided to every resolve function within an execution. It is commonly
                        // used to represent an authenticated user, or request-specific caches.

                        const contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an
                        // AsyncIterable yielding raw payloads.

                        const resolveFn = (_fieldDef$subscribe = fieldDef.subscribe) !== null && _fieldDef$subscribe !== void 0 ? _fieldDef$subscribe : exeContext.subscribeFieldResolver;
                        const eventStream = await resolveFn(rootValue, args, contextValue, info);
                        if (eventStream instanceof Error) {
                            throw eventStream;
                        }
                        return eventStream;
                    } catch (error) {
                        throw (0, _locatedError.locatedError)(error, fieldNodes, (0, _Path.pathToArray)(path));
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/execution/values.mjs":
            /*!**********************************************************!*\
              !*** ../../../node_modules/graphql/execution/values.mjs ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getArgumentValues = getArgumentValues;
                exports.getDirectiveValues = getDirectiveValues;
                exports.getVariableValues = getVariableValues;
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _keyMap = __webpack_require__( /*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
                var _printPathArray = __webpack_require__( /*! ../jsutils/printPathArray.mjs */ "../../../node_modules/graphql/jsutils/printPathArray.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _printer = __webpack_require__( /*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _coerceInputValue = __webpack_require__( /*! ../utilities/coerceInputValue.mjs */ "../../../node_modules/graphql/utilities/coerceInputValue.mjs");
                var _typeFromAST = __webpack_require__( /*! ../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
                var _valueFromAST = __webpack_require__( /*! ../utilities/valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs");
                /**
                 * Prepares an object map of variableValues of the correct type based on the
                 * provided variable definitions and arbitrary input. If the input cannot be
                 * parsed to match the variable definitions, a GraphQLError will be thrown.
                 *
                 * Note: The returned value is a plain Object with a prototype, since it is
                 * exposed to user code. Care should be taken to not pull values from the
                 * Object prototype.
                 */
                function getVariableValues(schema, varDefNodes, inputs, options) {
                    const errors = [];
                    const maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors;
                    try {
                        const coerced = coerceVariableValues(schema, varDefNodes, inputs, error => {
                            if (maxErrors != null && errors.length >= maxErrors) {
                                throw new _GraphQLError.GraphQLError('Too many errors processing variables, error limit reached. Execution aborted.');
                            }
                            errors.push(error);
                        });
                        if (errors.length === 0) {
                            return {
                                coerced
                            };
                        }
                    } catch (error) {
                        errors.push(error);
                    }
                    return {
                        errors
                    };
                }

                function coerceVariableValues(schema, varDefNodes, inputs, onError) {
                    const coercedValues = {};
                    for (const varDefNode of varDefNodes) {
                        const varName = varDefNode.variable.name.value;
                        const varType = (0, _typeFromAST.typeFromAST)(schema, varDefNode.type);
                        if (!(0, _definition.isInputType)(varType)) {
                            // Must use input types for variables. This should be caught during
                            // validation, however is checked again here for safety.
                            const varTypeStr = (0, _printer.print)(varDefNode.type);
                            onError(new _GraphQLError.GraphQLError(`Variable "$${varName}" expected value of type "${varTypeStr}" which cannot be used as an input type.`, {
                                nodes: varDefNode.type
                            }));
                            continue;
                        }
                        if (!hasOwnProperty(inputs, varName)) {
                            if (varDefNode.defaultValue) {
                                coercedValues[varName] = (0, _valueFromAST.valueFromAST)(varDefNode.defaultValue, varType);
                            } else if ((0, _definition.isNonNullType)(varType)) {
                                const varTypeStr = (0, _inspect.inspect)(varType);
                                onError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of required type "${varTypeStr}" was not provided.`, {
                                    nodes: varDefNode
                                }));
                            }
                            continue;
                        }
                        const value = inputs[varName];
                        if (value === null && (0, _definition.isNonNullType)(varType)) {
                            const varTypeStr = (0, _inspect.inspect)(varType);
                            onError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of non-null type "${varTypeStr}" must not be null.`, {
                                nodes: varDefNode
                            }));
                            continue;
                        }
                        coercedValues[varName] = (0, _coerceInputValue.coerceInputValue)(value, varType, (path, invalidValue, error) => {
                            let prefix = `Variable "$${varName}" got invalid value ` + (0, _inspect.inspect)(invalidValue);
                            if (path.length > 0) {
                                prefix += ` at "${varName}${(0, _printPathArray.printPathArray)(path)}"`;
                            }
                            onError(new _GraphQLError.GraphQLError(prefix + '; ' + error.message, {
                                nodes: varDefNode,
                                originalError: error
                            }));
                        });
                    }
                    return coercedValues;
                }
                /**
                 * Prepares an object map of argument values given a list of argument
                 * definitions and list of argument AST nodes.
                 *
                 * Note: The returned value is a plain Object with a prototype, since it is
                 * exposed to user code. Care should be taken to not pull values from the
                 * Object prototype.
                 */

                function getArgumentValues(def, node, variableValues) {
                    var _node$arguments;
                    const coercedValues = {}; // FIXME: https://github.com/graphql/graphql-js/issues/2203

                    /* c8 ignore next */

                    const argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : [];
                    const argNodeMap = (0, _keyMap.keyMap)(argumentNodes, arg => arg.name.value);
                    for (const argDef of def.args) {
                        const name = argDef.name;
                        const argType = argDef.type;
                        const argumentNode = argNodeMap[name];
                        if (!argumentNode) {
                            if (argDef.defaultValue !== undefined) {
                                coercedValues[name] = argDef.defaultValue;
                            } else if ((0, _definition.isNonNullType)(argType)) {
                                throw new _GraphQLError.GraphQLError(`Argument "${name}" of required type "${(0, _inspect.inspect)(argType)}" ` + 'was not provided.', {
                                    nodes: node
                                });
                            }
                            continue;
                        }
                        const valueNode = argumentNode.value;
                        let isNull = valueNode.kind === _kinds.Kind.NULL;
                        if (valueNode.kind === _kinds.Kind.VARIABLE) {
                            const variableName = valueNode.name.value;
                            if (variableValues == null || !hasOwnProperty(variableValues, variableName)) {
                                if (argDef.defaultValue !== undefined) {
                                    coercedValues[name] = argDef.defaultValue;
                                } else if ((0, _definition.isNonNullType)(argType)) {
                                    throw new _GraphQLError.GraphQLError(`Argument "${name}" of required type "${(0, _inspect.inspect)(argType)}" ` + `was provided the variable "$${variableName}" which was not provided a runtime value.`, {
                                        nodes: valueNode
                                    });
                                }
                                continue;
                            }
                            isNull = variableValues[variableName] == null;
                        }
                        if (isNull && (0, _definition.isNonNullType)(argType)) {
                            throw new _GraphQLError.GraphQLError(`Argument "${name}" of non-null type "${(0, _inspect.inspect)(argType)}" ` + 'must not be null.', {
                                nodes: valueNode
                            });
                        }
                        const coercedValue = (0, _valueFromAST.valueFromAST)(valueNode, argType, variableValues);
                        if (coercedValue === undefined) {
                            // Note: ValuesOfCorrectTypeRule validation should catch this before
                            // execution. This is a runtime check to ensure execution does not
                            // continue with an invalid argument value.
                            throw new _GraphQLError.GraphQLError(`Argument "${name}" has invalid value ${(0, _printer.print)(valueNode)}.`, {
                                nodes: valueNode
                            });
                        }
                        coercedValues[name] = coercedValue;
                    }
                    return coercedValues;
                }
                /**
                 * Prepares an object map of argument values given a directive definition
                 * and a AST node which may contain directives. Optionally also accepts a map
                 * of variable values.
                 *
                 * If the directive does not exist on the node, returns undefined.
                 *
                 * Note: The returned value is a plain Object with a prototype, since it is
                 * exposed to user code. Care should be taken to not pull values from the
                 * Object prototype.
                 */

                function getDirectiveValues(directiveDef, node, variableValues) {
                    var _node$directives;
                    const directiveNode = (_node$directives = node.directives) === null || _node$directives === void 0 ? void 0 : _node$directives.find(directive => directive.name.value === directiveDef.name);
                    if (directiveNode) {
                        return getArgumentValues(directiveDef, directiveNode, variableValues);
                    }
                }

                function hasOwnProperty(obj, prop) {
                    return Object.prototype.hasOwnProperty.call(obj, prop);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/graphql.mjs":
            /*!*************************************************!*\
              !*** ../../../node_modules/graphql/graphql.mjs ***!
              \*************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.graphql = graphql;
                exports.graphqlSync = graphqlSync;
                var _devAssert = __webpack_require__( /*! ./jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _isPromise = __webpack_require__( /*! ./jsutils/isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs");
                var _parser = __webpack_require__( /*! ./language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
                var _validate = __webpack_require__( /*! ./type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs");
                var _validate2 = __webpack_require__( /*! ./validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs");
                var _execute = __webpack_require__( /*! ./execution/execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs");
                /**
                 * This is the primary entry point function for fulfilling GraphQL operations
                 * by parsing, validating, and executing a GraphQL document along side a
                 * GraphQL schema.
                 *
                 * More sophisticated GraphQL servers, such as those which persist queries,
                 * may wish to separate the validation and execution phases to a static time
                 * tooling step, and a server runtime step.
                 *
                 * Accepts either an object with named arguments, or individual arguments:
                 *
                 * schema:
                 *    The GraphQL type system to use when validating and executing a query.
                 * source:
                 *    A GraphQL language formatted string representing the requested operation.
                 * rootValue:
                 *    The value provided as the first argument to resolver functions on the top
                 *    level type (e.g. the query object type).
                 * contextValue:
                 *    The context value is provided as an argument to resolver functions after
                 *    field arguments. It is used to pass shared information useful at any point
                 *    during executing this query, for example the currently logged in user and
                 *    connections to databases or other services.
                 * variableValues:
                 *    A mapping of variable name to runtime value to use for all variables
                 *    defined in the requestString.
                 * operationName:
                 *    The name of the operation to use if requestString contains multiple
                 *    possible operations. Can be omitted if requestString contains only
                 *    one operation.
                 * fieldResolver:
                 *    A resolver function to use when one is not provided by the schema.
                 *    If not provided, the default field resolver is used (which looks for a
                 *    value or method on the source value with the field's name).
                 * typeResolver:
                 *    A type resolver function to use when none is provided by the schema.
                 *    If not provided, the default type resolver is used (which looks for a
                 *    `__typename` field or alternatively calls the `isTypeOf` method).
                 */

                function graphql(args) {
                    // Always return a Promise for a consistent API.
                    return new Promise(resolve => resolve(graphqlImpl(args)));
                }
                /**
                 * The graphqlSync function also fulfills GraphQL operations by parsing,
                 * validating, and executing a GraphQL document along side a GraphQL schema.
                 * However, it guarantees to complete synchronously (or throw an error) assuming
                 * that all field resolvers are also synchronous.
                 */

                function graphqlSync(args) {
                    const result = graphqlImpl(args); // Assert that the execution was synchronous.

                    if ((0, _isPromise.isPromise)(result)) {
                        throw new Error('GraphQL execution failed to complete synchronously.');
                    }
                    return result;
                }

                function graphqlImpl(args) {
                    // Temporary for v15 to v16 migration. Remove in v17
                    arguments.length < 2 || (0, _devAssert.devAssert)(false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.');
                    const {
                        schema,
                        source,
                        rootValue,
                        contextValue,
                        variableValues,
                        operationName,
                        fieldResolver,
                        typeResolver
                    } = args; // Validate Schema

                    const schemaValidationErrors = (0, _validate.validateSchema)(schema);
                    if (schemaValidationErrors.length > 0) {
                        return {
                            errors: schemaValidationErrors
                        };
                    } // Parse

                    let document;
                    try {
                        document = (0, _parser.parse)(source);
                    } catch (syntaxError) {
                        return {
                            errors: [syntaxError]
                        };
                    } // Validate

                    const validationErrors = (0, _validate2.validate)(schema, document);
                    if (validationErrors.length > 0) {
                        return {
                            errors: validationErrors
                        };
                    } // Execute

                    return (0, _execute.execute)({
                        schema,
                        document,
                        rootValue,
                        contextValue,
                        variableValues,
                        operationName,
                        fieldResolver,
                        typeResolver
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/index.mjs":
            /*!***********************************************!*\
              !*** ../../../node_modules/graphql/index.mjs ***!
              \***********************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "BREAK", ({
                    enumerable: true,
                    get: function() {
                        return _index2.BREAK;
                    }
                }));
                Object.defineProperty(exports, "BreakingChangeType", ({
                    enumerable: true,
                    get: function() {
                        return _index6.BreakingChangeType;
                    }
                }));
                Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", ({
                    enumerable: true,
                    get: function() {
                        return _index.DEFAULT_DEPRECATION_REASON;
                    }
                }));
                Object.defineProperty(exports, "DangerousChangeType", ({
                    enumerable: true,
                    get: function() {
                        return _index6.DangerousChangeType;
                    }
                }));
                Object.defineProperty(exports, "DirectiveLocation", ({
                    enumerable: true,
                    get: function() {
                        return _index2.DirectiveLocation;
                    }
                }));
                Object.defineProperty(exports, "ExecutableDefinitionsRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.ExecutableDefinitionsRule;
                    }
                }));
                Object.defineProperty(exports, "FieldsOnCorrectTypeRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.FieldsOnCorrectTypeRule;
                    }
                }));
                Object.defineProperty(exports, "FragmentsOnCompositeTypesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.FragmentsOnCompositeTypesRule;
                    }
                }));
                Object.defineProperty(exports, "GRAPHQL_MAX_INT", ({
                    enumerable: true,
                    get: function() {
                        return _index.GRAPHQL_MAX_INT;
                    }
                }));
                Object.defineProperty(exports, "GRAPHQL_MIN_INT", ({
                    enumerable: true,
                    get: function() {
                        return _index.GRAPHQL_MIN_INT;
                    }
                }));
                Object.defineProperty(exports, "GraphQLBoolean", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLBoolean;
                    }
                }));
                Object.defineProperty(exports, "GraphQLDeprecatedDirective", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLDeprecatedDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLDirective", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLEnumType", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLEnumType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLError", ({
                    enumerable: true,
                    get: function() {
                        return _index5.GraphQLError;
                    }
                }));
                Object.defineProperty(exports, "GraphQLFloat", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLFloat;
                    }
                }));
                Object.defineProperty(exports, "GraphQLID", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLID;
                    }
                }));
                Object.defineProperty(exports, "GraphQLIncludeDirective", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLIncludeDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLInputObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLInputObjectType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLInt", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLInt;
                    }
                }));
                Object.defineProperty(exports, "GraphQLInterfaceType", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLInterfaceType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLList", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLList;
                    }
                }));
                Object.defineProperty(exports, "GraphQLNonNull", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLNonNull;
                    }
                }));
                Object.defineProperty(exports, "GraphQLObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLObjectType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLOneOfDirective", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLOneOfDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLScalarType", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLScalarType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLSchema;
                    }
                }));
                Object.defineProperty(exports, "GraphQLSkipDirective", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLSkipDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLSpecifiedByDirective", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLSpecifiedByDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLString", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLString;
                    }
                }));
                Object.defineProperty(exports, "GraphQLUnionType", ({
                    enumerable: true,
                    get: function() {
                        return _index.GraphQLUnionType;
                    }
                }));
                Object.defineProperty(exports, "Kind", ({
                    enumerable: true,
                    get: function() {
                        return _index2.Kind;
                    }
                }));
                Object.defineProperty(exports, "KnownArgumentNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.KnownArgumentNamesRule;
                    }
                }));
                Object.defineProperty(exports, "KnownDirectivesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.KnownDirectivesRule;
                    }
                }));
                Object.defineProperty(exports, "KnownFragmentNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.KnownFragmentNamesRule;
                    }
                }));
                Object.defineProperty(exports, "KnownTypeNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.KnownTypeNamesRule;
                    }
                }));
                Object.defineProperty(exports, "Lexer", ({
                    enumerable: true,
                    get: function() {
                        return _index2.Lexer;
                    }
                }));
                Object.defineProperty(exports, "Location", ({
                    enumerable: true,
                    get: function() {
                        return _index2.Location;
                    }
                }));
                Object.defineProperty(exports, "LoneAnonymousOperationRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.LoneAnonymousOperationRule;
                    }
                }));
                Object.defineProperty(exports, "LoneSchemaDefinitionRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.LoneSchemaDefinitionRule;
                    }
                }));
                Object.defineProperty(exports, "MaxIntrospectionDepthRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.MaxIntrospectionDepthRule;
                    }
                }));
                Object.defineProperty(exports, "NoDeprecatedCustomRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.NoDeprecatedCustomRule;
                    }
                }));
                Object.defineProperty(exports, "NoFragmentCyclesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.NoFragmentCyclesRule;
                    }
                }));
                Object.defineProperty(exports, "NoSchemaIntrospectionCustomRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.NoSchemaIntrospectionCustomRule;
                    }
                }));
                Object.defineProperty(exports, "NoUndefinedVariablesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.NoUndefinedVariablesRule;
                    }
                }));
                Object.defineProperty(exports, "NoUnusedFragmentsRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.NoUnusedFragmentsRule;
                    }
                }));
                Object.defineProperty(exports, "NoUnusedVariablesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.NoUnusedVariablesRule;
                    }
                }));
                Object.defineProperty(exports, "OperationTypeNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.OperationTypeNode;
                    }
                }));
                Object.defineProperty(exports, "OverlappingFieldsCanBeMergedRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.OverlappingFieldsCanBeMergedRule;
                    }
                }));
                Object.defineProperty(exports, "PossibleFragmentSpreadsRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.PossibleFragmentSpreadsRule;
                    }
                }));
                Object.defineProperty(exports, "PossibleTypeExtensionsRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.PossibleTypeExtensionsRule;
                    }
                }));
                Object.defineProperty(exports, "ProvidedRequiredArgumentsRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.ProvidedRequiredArgumentsRule;
                    }
                }));
                Object.defineProperty(exports, "ScalarLeafsRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.ScalarLeafsRule;
                    }
                }));
                Object.defineProperty(exports, "SchemaMetaFieldDef", ({
                    enumerable: true,
                    get: function() {
                        return _index.SchemaMetaFieldDef;
                    }
                }));
                Object.defineProperty(exports, "SingleFieldSubscriptionsRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.SingleFieldSubscriptionsRule;
                    }
                }));
                Object.defineProperty(exports, "Source", ({
                    enumerable: true,
                    get: function() {
                        return _index2.Source;
                    }
                }));
                Object.defineProperty(exports, "Token", ({
                    enumerable: true,
                    get: function() {
                        return _index2.Token;
                    }
                }));
                Object.defineProperty(exports, "TokenKind", ({
                    enumerable: true,
                    get: function() {
                        return _index2.TokenKind;
                    }
                }));
                Object.defineProperty(exports, "TypeInfo", ({
                    enumerable: true,
                    get: function() {
                        return _index6.TypeInfo;
                    }
                }));
                Object.defineProperty(exports, "TypeKind", ({
                    enumerable: true,
                    get: function() {
                        return _index.TypeKind;
                    }
                }));
                Object.defineProperty(exports, "TypeMetaFieldDef", ({
                    enumerable: true,
                    get: function() {
                        return _index.TypeMetaFieldDef;
                    }
                }));
                Object.defineProperty(exports, "TypeNameMetaFieldDef", ({
                    enumerable: true,
                    get: function() {
                        return _index.TypeNameMetaFieldDef;
                    }
                }));
                Object.defineProperty(exports, "UniqueArgumentDefinitionNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueArgumentDefinitionNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueArgumentNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueArgumentNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueDirectiveNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueDirectiveNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueDirectivesPerLocationRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueDirectivesPerLocationRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueEnumValueNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueEnumValueNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueFieldDefinitionNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueFragmentNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueFragmentNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueInputFieldNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueInputFieldNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueOperationNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueOperationNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueOperationTypesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueOperationTypesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueTypeNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueTypeNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueVariableNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.UniqueVariableNamesRule;
                    }
                }));
                Object.defineProperty(exports, "ValidationContext", ({
                    enumerable: true,
                    get: function() {
                        return _index4.ValidationContext;
                    }
                }));
                Object.defineProperty(exports, "ValuesOfCorrectTypeRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.ValuesOfCorrectTypeRule;
                    }
                }));
                Object.defineProperty(exports, "VariablesAreInputTypesRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.VariablesAreInputTypesRule;
                    }
                }));
                Object.defineProperty(exports, "VariablesInAllowedPositionRule", ({
                    enumerable: true,
                    get: function() {
                        return _index4.VariablesInAllowedPositionRule;
                    }
                }));
                Object.defineProperty(exports, "__Directive", ({
                    enumerable: true,
                    get: function() {
                        return _index.__Directive;
                    }
                }));
                Object.defineProperty(exports, "__DirectiveLocation", ({
                    enumerable: true,
                    get: function() {
                        return _index.__DirectiveLocation;
                    }
                }));
                Object.defineProperty(exports, "__EnumValue", ({
                    enumerable: true,
                    get: function() {
                        return _index.__EnumValue;
                    }
                }));
                Object.defineProperty(exports, "__Field", ({
                    enumerable: true,
                    get: function() {
                        return _index.__Field;
                    }
                }));
                Object.defineProperty(exports, "__InputValue", ({
                    enumerable: true,
                    get: function() {
                        return _index.__InputValue;
                    }
                }));
                Object.defineProperty(exports, "__Schema", ({
                    enumerable: true,
                    get: function() {
                        return _index.__Schema;
                    }
                }));
                Object.defineProperty(exports, "__Type", ({
                    enumerable: true,
                    get: function() {
                        return _index.__Type;
                    }
                }));
                Object.defineProperty(exports, "__TypeKind", ({
                    enumerable: true,
                    get: function() {
                        return _index.__TypeKind;
                    }
                }));
                Object.defineProperty(exports, "assertAbstractType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertAbstractType;
                    }
                }));
                Object.defineProperty(exports, "assertCompositeType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertCompositeType;
                    }
                }));
                Object.defineProperty(exports, "assertDirective", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertDirective;
                    }
                }));
                Object.defineProperty(exports, "assertEnumType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertEnumType;
                    }
                }));
                Object.defineProperty(exports, "assertEnumValueName", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertEnumValueName;
                    }
                }));
                Object.defineProperty(exports, "assertInputObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertInputObjectType;
                    }
                }));
                Object.defineProperty(exports, "assertInputType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertInputType;
                    }
                }));
                Object.defineProperty(exports, "assertInterfaceType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertInterfaceType;
                    }
                }));
                Object.defineProperty(exports, "assertLeafType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertLeafType;
                    }
                }));
                Object.defineProperty(exports, "assertListType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertListType;
                    }
                }));
                Object.defineProperty(exports, "assertName", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertName;
                    }
                }));
                Object.defineProperty(exports, "assertNamedType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertNamedType;
                    }
                }));
                Object.defineProperty(exports, "assertNonNullType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertNonNullType;
                    }
                }));
                Object.defineProperty(exports, "assertNullableType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertNullableType;
                    }
                }));
                Object.defineProperty(exports, "assertObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertObjectType;
                    }
                }));
                Object.defineProperty(exports, "assertOutputType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertOutputType;
                    }
                }));
                Object.defineProperty(exports, "assertScalarType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertScalarType;
                    }
                }));
                Object.defineProperty(exports, "assertSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertSchema;
                    }
                }));
                Object.defineProperty(exports, "assertType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertType;
                    }
                }));
                Object.defineProperty(exports, "assertUnionType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertUnionType;
                    }
                }));
                Object.defineProperty(exports, "assertValidName", ({
                    enumerable: true,
                    get: function() {
                        return _index6.assertValidName;
                    }
                }));
                Object.defineProperty(exports, "assertValidSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertValidSchema;
                    }
                }));
                Object.defineProperty(exports, "assertWrappingType", ({
                    enumerable: true,
                    get: function() {
                        return _index.assertWrappingType;
                    }
                }));
                Object.defineProperty(exports, "astFromValue", ({
                    enumerable: true,
                    get: function() {
                        return _index6.astFromValue;
                    }
                }));
                Object.defineProperty(exports, "buildASTSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index6.buildASTSchema;
                    }
                }));
                Object.defineProperty(exports, "buildClientSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index6.buildClientSchema;
                    }
                }));
                Object.defineProperty(exports, "buildSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index6.buildSchema;
                    }
                }));
                Object.defineProperty(exports, "coerceInputValue", ({
                    enumerable: true,
                    get: function() {
                        return _index6.coerceInputValue;
                    }
                }));
                Object.defineProperty(exports, "concatAST", ({
                    enumerable: true,
                    get: function() {
                        return _index6.concatAST;
                    }
                }));
                Object.defineProperty(exports, "createSourceEventStream", ({
                    enumerable: true,
                    get: function() {
                        return _index3.createSourceEventStream;
                    }
                }));
                Object.defineProperty(exports, "defaultFieldResolver", ({
                    enumerable: true,
                    get: function() {
                        return _index3.defaultFieldResolver;
                    }
                }));
                Object.defineProperty(exports, "defaultTypeResolver", ({
                    enumerable: true,
                    get: function() {
                        return _index3.defaultTypeResolver;
                    }
                }));
                Object.defineProperty(exports, "doTypesOverlap", ({
                    enumerable: true,
                    get: function() {
                        return _index6.doTypesOverlap;
                    }
                }));
                Object.defineProperty(exports, "execute", ({
                    enumerable: true,
                    get: function() {
                        return _index3.execute;
                    }
                }));
                Object.defineProperty(exports, "executeSync", ({
                    enumerable: true,
                    get: function() {
                        return _index3.executeSync;
                    }
                }));
                Object.defineProperty(exports, "extendSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index6.extendSchema;
                    }
                }));
                Object.defineProperty(exports, "findBreakingChanges", ({
                    enumerable: true,
                    get: function() {
                        return _index6.findBreakingChanges;
                    }
                }));
                Object.defineProperty(exports, "findDangerousChanges", ({
                    enumerable: true,
                    get: function() {
                        return _index6.findDangerousChanges;
                    }
                }));
                Object.defineProperty(exports, "formatError", ({
                    enumerable: true,
                    get: function() {
                        return _index5.formatError;
                    }
                }));
                Object.defineProperty(exports, "getArgumentValues", ({
                    enumerable: true,
                    get: function() {
                        return _index3.getArgumentValues;
                    }
                }));
                Object.defineProperty(exports, "getDirectiveValues", ({
                    enumerable: true,
                    get: function() {
                        return _index3.getDirectiveValues;
                    }
                }));
                Object.defineProperty(exports, "getEnterLeaveForKind", ({
                    enumerable: true,
                    get: function() {
                        return _index2.getEnterLeaveForKind;
                    }
                }));
                Object.defineProperty(exports, "getIntrospectionQuery", ({
                    enumerable: true,
                    get: function() {
                        return _index6.getIntrospectionQuery;
                    }
                }));
                Object.defineProperty(exports, "getLocation", ({
                    enumerable: true,
                    get: function() {
                        return _index2.getLocation;
                    }
                }));
                Object.defineProperty(exports, "getNamedType", ({
                    enumerable: true,
                    get: function() {
                        return _index.getNamedType;
                    }
                }));
                Object.defineProperty(exports, "getNullableType", ({
                    enumerable: true,
                    get: function() {
                        return _index.getNullableType;
                    }
                }));
                Object.defineProperty(exports, "getOperationAST", ({
                    enumerable: true,
                    get: function() {
                        return _index6.getOperationAST;
                    }
                }));
                Object.defineProperty(exports, "getOperationRootType", ({
                    enumerable: true,
                    get: function() {
                        return _index6.getOperationRootType;
                    }
                }));
                Object.defineProperty(exports, "getVariableValues", ({
                    enumerable: true,
                    get: function() {
                        return _index3.getVariableValues;
                    }
                }));
                Object.defineProperty(exports, "getVisitFn", ({
                    enumerable: true,
                    get: function() {
                        return _index2.getVisitFn;
                    }
                }));
                Object.defineProperty(exports, "graphql", ({
                    enumerable: true,
                    get: function() {
                        return _graphql.graphql;
                    }
                }));
                Object.defineProperty(exports, "graphqlSync", ({
                    enumerable: true,
                    get: function() {
                        return _graphql.graphqlSync;
                    }
                }));
                Object.defineProperty(exports, "introspectionFromSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index6.introspectionFromSchema;
                    }
                }));
                Object.defineProperty(exports, "introspectionTypes", ({
                    enumerable: true,
                    get: function() {
                        return _index.introspectionTypes;
                    }
                }));
                Object.defineProperty(exports, "isAbstractType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isAbstractType;
                    }
                }));
                Object.defineProperty(exports, "isCompositeType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isCompositeType;
                    }
                }));
                Object.defineProperty(exports, "isConstValueNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isConstValueNode;
                    }
                }));
                Object.defineProperty(exports, "isDefinitionNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isDefinitionNode;
                    }
                }));
                Object.defineProperty(exports, "isDirective", ({
                    enumerable: true,
                    get: function() {
                        return _index.isDirective;
                    }
                }));
                Object.defineProperty(exports, "isEnumType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isEnumType;
                    }
                }));
                Object.defineProperty(exports, "isEqualType", ({
                    enumerable: true,
                    get: function() {
                        return _index6.isEqualType;
                    }
                }));
                Object.defineProperty(exports, "isExecutableDefinitionNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isExecutableDefinitionNode;
                    }
                }));
                Object.defineProperty(exports, "isInputObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isInputObjectType;
                    }
                }));
                Object.defineProperty(exports, "isInputType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isInputType;
                    }
                }));
                Object.defineProperty(exports, "isInterfaceType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isInterfaceType;
                    }
                }));
                Object.defineProperty(exports, "isIntrospectionType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isIntrospectionType;
                    }
                }));
                Object.defineProperty(exports, "isLeafType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isLeafType;
                    }
                }));
                Object.defineProperty(exports, "isListType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isListType;
                    }
                }));
                Object.defineProperty(exports, "isNamedType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isNamedType;
                    }
                }));
                Object.defineProperty(exports, "isNonNullType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isNonNullType;
                    }
                }));
                Object.defineProperty(exports, "isNullableType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isNullableType;
                    }
                }));
                Object.defineProperty(exports, "isObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isObjectType;
                    }
                }));
                Object.defineProperty(exports, "isOutputType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isOutputType;
                    }
                }));
                Object.defineProperty(exports, "isRequiredArgument", ({
                    enumerable: true,
                    get: function() {
                        return _index.isRequiredArgument;
                    }
                }));
                Object.defineProperty(exports, "isRequiredInputField", ({
                    enumerable: true,
                    get: function() {
                        return _index.isRequiredInputField;
                    }
                }));
                Object.defineProperty(exports, "isScalarType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isScalarType;
                    }
                }));
                Object.defineProperty(exports, "isSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index.isSchema;
                    }
                }));
                Object.defineProperty(exports, "isSelectionNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isSelectionNode;
                    }
                }));
                Object.defineProperty(exports, "isSpecifiedDirective", ({
                    enumerable: true,
                    get: function() {
                        return _index.isSpecifiedDirective;
                    }
                }));
                Object.defineProperty(exports, "isSpecifiedScalarType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isSpecifiedScalarType;
                    }
                }));
                Object.defineProperty(exports, "isType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isType;
                    }
                }));
                Object.defineProperty(exports, "isTypeDefinitionNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isTypeDefinitionNode;
                    }
                }));
                Object.defineProperty(exports, "isTypeExtensionNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isTypeExtensionNode;
                    }
                }));
                Object.defineProperty(exports, "isTypeNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isTypeNode;
                    }
                }));
                Object.defineProperty(exports, "isTypeSubTypeOf", ({
                    enumerable: true,
                    get: function() {
                        return _index6.isTypeSubTypeOf;
                    }
                }));
                Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isTypeSystemDefinitionNode;
                    }
                }));
                Object.defineProperty(exports, "isTypeSystemExtensionNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isTypeSystemExtensionNode;
                    }
                }));
                Object.defineProperty(exports, "isUnionType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isUnionType;
                    }
                }));
                Object.defineProperty(exports, "isValidNameError", ({
                    enumerable: true,
                    get: function() {
                        return _index6.isValidNameError;
                    }
                }));
                Object.defineProperty(exports, "isValueNode", ({
                    enumerable: true,
                    get: function() {
                        return _index2.isValueNode;
                    }
                }));
                Object.defineProperty(exports, "isWrappingType", ({
                    enumerable: true,
                    get: function() {
                        return _index.isWrappingType;
                    }
                }));
                Object.defineProperty(exports, "lexicographicSortSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index6.lexicographicSortSchema;
                    }
                }));
                Object.defineProperty(exports, "locatedError", ({
                    enumerable: true,
                    get: function() {
                        return _index5.locatedError;
                    }
                }));
                Object.defineProperty(exports, "parse", ({
                    enumerable: true,
                    get: function() {
                        return _index2.parse;
                    }
                }));
                Object.defineProperty(exports, "parseConstValue", ({
                    enumerable: true,
                    get: function() {
                        return _index2.parseConstValue;
                    }
                }));
                Object.defineProperty(exports, "parseType", ({
                    enumerable: true,
                    get: function() {
                        return _index2.parseType;
                    }
                }));
                Object.defineProperty(exports, "parseValue", ({
                    enumerable: true,
                    get: function() {
                        return _index2.parseValue;
                    }
                }));
                Object.defineProperty(exports, "print", ({
                    enumerable: true,
                    get: function() {
                        return _index2.print;
                    }
                }));
                Object.defineProperty(exports, "printError", ({
                    enumerable: true,
                    get: function() {
                        return _index5.printError;
                    }
                }));
                Object.defineProperty(exports, "printIntrospectionSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index6.printIntrospectionSchema;
                    }
                }));
                Object.defineProperty(exports, "printLocation", ({
                    enumerable: true,
                    get: function() {
                        return _index2.printLocation;
                    }
                }));
                Object.defineProperty(exports, "printSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index6.printSchema;
                    }
                }));
                Object.defineProperty(exports, "printSourceLocation", ({
                    enumerable: true,
                    get: function() {
                        return _index2.printSourceLocation;
                    }
                }));
                Object.defineProperty(exports, "printType", ({
                    enumerable: true,
                    get: function() {
                        return _index6.printType;
                    }
                }));
                Object.defineProperty(exports, "recommendedRules", ({
                    enumerable: true,
                    get: function() {
                        return _index4.recommendedRules;
                    }
                }));
                Object.defineProperty(exports, "resolveObjMapThunk", ({
                    enumerable: true,
                    get: function() {
                        return _index.resolveObjMapThunk;
                    }
                }));
                Object.defineProperty(exports, "resolveReadonlyArrayThunk", ({
                    enumerable: true,
                    get: function() {
                        return _index.resolveReadonlyArrayThunk;
                    }
                }));
                Object.defineProperty(exports, "responsePathAsArray", ({
                    enumerable: true,
                    get: function() {
                        return _index3.responsePathAsArray;
                    }
                }));
                Object.defineProperty(exports, "separateOperations", ({
                    enumerable: true,
                    get: function() {
                        return _index6.separateOperations;
                    }
                }));
                Object.defineProperty(exports, "specifiedDirectives", ({
                    enumerable: true,
                    get: function() {
                        return _index.specifiedDirectives;
                    }
                }));
                Object.defineProperty(exports, "specifiedRules", ({
                    enumerable: true,
                    get: function() {
                        return _index4.specifiedRules;
                    }
                }));
                Object.defineProperty(exports, "specifiedScalarTypes", ({
                    enumerable: true,
                    get: function() {
                        return _index.specifiedScalarTypes;
                    }
                }));
                Object.defineProperty(exports, "stripIgnoredCharacters", ({
                    enumerable: true,
                    get: function() {
                        return _index6.stripIgnoredCharacters;
                    }
                }));
                Object.defineProperty(exports, "subscribe", ({
                    enumerable: true,
                    get: function() {
                        return _index3.subscribe;
                    }
                }));
                Object.defineProperty(exports, "syntaxError", ({
                    enumerable: true,
                    get: function() {
                        return _index5.syntaxError;
                    }
                }));
                Object.defineProperty(exports, "typeFromAST", ({
                    enumerable: true,
                    get: function() {
                        return _index6.typeFromAST;
                    }
                }));
                Object.defineProperty(exports, "validate", ({
                    enumerable: true,
                    get: function() {
                        return _index4.validate;
                    }
                }));
                Object.defineProperty(exports, "validateSchema", ({
                    enumerable: true,
                    get: function() {
                        return _index.validateSchema;
                    }
                }));
                Object.defineProperty(exports, "valueFromAST", ({
                    enumerable: true,
                    get: function() {
                        return _index6.valueFromAST;
                    }
                }));
                Object.defineProperty(exports, "valueFromASTUntyped", ({
                    enumerable: true,
                    get: function() {
                        return _index6.valueFromASTUntyped;
                    }
                }));
                Object.defineProperty(exports, "version", ({
                    enumerable: true,
                    get: function() {
                        return _version.version;
                    }
                }));
                Object.defineProperty(exports, "versionInfo", ({
                    enumerable: true,
                    get: function() {
                        return _version.versionInfo;
                    }
                }));
                Object.defineProperty(exports, "visit", ({
                    enumerable: true,
                    get: function() {
                        return _index2.visit;
                    }
                }));
                Object.defineProperty(exports, "visitInParallel", ({
                    enumerable: true,
                    get: function() {
                        return _index2.visitInParallel;
                    }
                }));
                Object.defineProperty(exports, "visitWithTypeInfo", ({
                    enumerable: true,
                    get: function() {
                        return _index6.visitWithTypeInfo;
                    }
                }));
                var _version = __webpack_require__( /*! ./version.mjs */ "../../../node_modules/graphql/version.mjs");
                var _graphql = __webpack_require__( /*! ./graphql.mjs */ "../../../node_modules/graphql/graphql.mjs");
                var _index = __webpack_require__( /*! ./type/index.mjs */ "../../../node_modules/graphql/type/index.mjs");
                var _index2 = __webpack_require__( /*! ./language/index.mjs */ "../../../node_modules/graphql/language/index.mjs");
                var _index3 = __webpack_require__( /*! ./execution/index.mjs */ "../../../node_modules/graphql/execution/index.mjs");
                var _index4 = __webpack_require__( /*! ./validation/index.mjs */ "../../../node_modules/graphql/validation/index.mjs");
                var _index5 = __webpack_require__( /*! ./error/index.mjs */ "../../../node_modules/graphql/error/index.mjs");
                var _index6 = __webpack_require__( /*! ./utilities/index.mjs */ "../../../node_modules/graphql/utilities/index.mjs");

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/Path.mjs":
            /*!******************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/Path.mjs ***!
              \******************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.addPath = addPath;
                exports.pathToArray = pathToArray;
                /**
                 * Given a Path and a key, return a new Path containing the new key.
                 */
                function addPath(prev, key, typename) {
                    return {
                        prev,
                        key,
                        typename
                    };
                }
                /**
                 * Given a Path, return an Array of the path keys.
                 */

                function pathToArray(path) {
                    const flattened = [];
                    let curr = path;
                    while (curr) {
                        flattened.push(curr.key);
                        curr = curr.prev;
                    }
                    return flattened.reverse();
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/devAssert.mjs":
            /*!***********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/devAssert.mjs ***!
              \***********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.devAssert = devAssert;

                function devAssert(condition, message) {
                    const booleanCondition = Boolean(condition);
                    if (!booleanCondition) {
                        throw new Error(message);
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/didYouMean.mjs":
            /*!************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/didYouMean.mjs ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.didYouMean = didYouMean;
                const MAX_SUGGESTIONS = 5;
                /**
                 * Given [ A, B, C ] return ' Did you mean A, B, or C?'.
                 */

                function didYouMean(firstArg, secondArg) {
                    const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [undefined, firstArg];
                    let message = ' Did you mean ';
                    if (subMessage) {
                        message += subMessage + ' ';
                    }
                    const suggestions = suggestionsArg.map(x => `"${x}"`);
                    switch (suggestions.length) {
                        case 0:
                            return '';
                        case 1:
                            return message + suggestions[0] + '?';
                        case 2:
                            return message + suggestions[0] + ' or ' + suggestions[1] + '?';
                    }
                    const selected = suggestions.slice(0, MAX_SUGGESTIONS);
                    const lastItem = selected.pop();
                    return message + selected.join(', ') + ', or ' + lastItem + '?';
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/groupBy.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/groupBy.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.groupBy = groupBy;
                /**
                 * Groups array items into a Map, given a function to produce grouping key.
                 */
                function groupBy(list, keyFn) {
                    const result = new Map();
                    for (const item of list) {
                        const key = keyFn(item);
                        const group = result.get(key);
                        if (group === undefined) {
                            result.set(key, [item]);
                        } else {
                            group.push(item);
                        }
                    }
                    return result;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/identityFunc.mjs":
            /*!**************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/identityFunc.mjs ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.identityFunc = identityFunc;
                /**
                 * Returns the first argument it receives.
                 */
                function identityFunc(x) {
                    return x;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/inspect.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/inspect.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.inspect = inspect;
                const MAX_ARRAY_LENGTH = 10;
                const MAX_RECURSIVE_DEPTH = 2;
                /**
                 * Used to print values in error messages.
                 */

                function inspect(value) {
                    return formatValue(value, []);
                }

                function formatValue(value, seenValues) {
                    switch (typeof value) {
                        case 'string':
                            return JSON.stringify(value);
                        case 'function':
                            return value.name ? `[function ${value.name}]` : '[function]';
                        case 'object':
                            return formatObjectValue(value, seenValues);
                        default:
                            return String(value);
                    }
                }

                function formatObjectValue(value, previouslySeenValues) {
                    if (value === null) {
                        return 'null';
                    }
                    if (previouslySeenValues.includes(value)) {
                        return '[Circular]';
                    }
                    const seenValues = [...previouslySeenValues, value];
                    if (isJSONable(value)) {
                        const jsonValue = value.toJSON(); // check for infinite recursion

                        if (jsonValue !== value) {
                            return typeof jsonValue === 'string' ? jsonValue : formatValue(jsonValue, seenValues);
                        }
                    } else if (Array.isArray(value)) {
                        return formatArray(value, seenValues);
                    }
                    return formatObject(value, seenValues);
                }

                function isJSONable(value) {
                    return typeof value.toJSON === 'function';
                }

                function formatObject(object, seenValues) {
                    const entries = Object.entries(object);
                    if (entries.length === 0) {
                        return '{}';
                    }
                    if (seenValues.length > MAX_RECURSIVE_DEPTH) {
                        return '[' + getObjectTag(object) + ']';
                    }
                    const properties = entries.map(([key, value]) => key + ': ' + formatValue(value, seenValues));
                    return '{ ' + properties.join(', ') + ' }';
                }

                function formatArray(array, seenValues) {
                    if (array.length === 0) {
                        return '[]';
                    }
                    if (seenValues.length > MAX_RECURSIVE_DEPTH) {
                        return '[Array]';
                    }
                    const len = Math.min(MAX_ARRAY_LENGTH, array.length);
                    const remaining = array.length - len;
                    const items = [];
                    for (let i = 0; i < len; ++i) {
                        items.push(formatValue(array[i], seenValues));
                    }
                    if (remaining === 1) {
                        items.push('... 1 more item');
                    } else if (remaining > 1) {
                        items.push(`... ${remaining} more items`);
                    }
                    return '[' + items.join(', ') + ']';
                }

                function getObjectTag(object) {
                    const tag = Object.prototype.toString.call(object).replace(/^\[object /, '').replace(/]$/, '');
                    if (tag === 'Object' && typeof object.constructor === 'function') {
                        const name = object.constructor.name;
                        if (typeof name === 'string' && name !== '') {
                            return name;
                        }
                    }
                    return tag;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/instanceOf.mjs":
            /*!************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/instanceOf.mjs ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.instanceOf = void 0;
                var _inspect = __webpack_require__( /*! ./inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                /* c8 ignore next 3 */

                const isProduction = globalThis.process &&
                    // eslint-disable-next-line no-undef
                    "development" === 'production';
                /**
                 * A replacement for instanceof which includes an error warning when multi-realm
                 * constructors are detected.
                 * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
                 * See: https://webpack.js.org/guides/production/
                 */

                const instanceOf = exports.instanceOf = /* c8 ignore next 6 */
                    // FIXME: https://github.com/graphql/graphql-js/issues/2317
                    isProduction ? function instanceOf(value, constructor) {
                        return value instanceof constructor;
                    } : function instanceOf(value, constructor) {
                        if (value instanceof constructor) {
                            return true;
                        }
                        if (typeof value === 'object' && value !== null) {
                            var _value$constructor;

                            // Prefer Symbol.toStringTag since it is immune to minification.
                            const className = constructor.prototype[Symbol.toStringTag];
                            const valueClassName =
                                // We still need to support constructor's name to detect conflicts with older versions of this library.
                                Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009
                                ?
                                value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name;
                            if (className === valueClassName) {
                                const stringifiedValue = (0, _inspect.inspect)(value);
                                throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`);
                            }
                        }
                        return false;
                    };

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/invariant.mjs":
            /*!***********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/invariant.mjs ***!
              \***********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.invariant = invariant;

                function invariant(condition, message) {
                    const booleanCondition = Boolean(condition);
                    if (!booleanCondition) {
                        throw new Error(message != null ? message : 'Unexpected invariant triggered.');
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/isAsyncIterable.mjs":
            /*!*****************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/isAsyncIterable.mjs ***!
              \*****************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isAsyncIterable = isAsyncIterable;
                /**
                 * Returns true if the provided object implements the AsyncIterator protocol via
                 * implementing a `Symbol.asyncIterator` method.
                 */
                function isAsyncIterable(maybeAsyncIterable) {
                    return typeof(maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[Symbol.asyncIterator]) === 'function';
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/isIterableObject.mjs":
            /*!******************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/isIterableObject.mjs ***!
              \******************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isIterableObject = isIterableObject;
                /**
                 * Returns true if the provided object is an Object (i.e. not a string literal)
                 * and implements the Iterator protocol.
                 *
                 * This may be used in place of [Array.isArray()][isArray] to determine if
                 * an object should be iterated-over e.g. Array, Map, Set, Int8Array,
                 * TypedArray, etc. but excludes string literals.
                 *
                 * @example
                 * ```ts
                 * isIterableObject([ 1, 2, 3 ]) // true
                 * isIterableObject(new Map()) // true
                 * isIterableObject('ABC') // false
                 * isIterableObject({ key: 'value' }) // false
                 * isIterableObject({ length: 1, 0: 'Alpha' }) // false
                 * ```
                 */
                function isIterableObject(maybeIterable) {
                    return typeof maybeIterable === 'object' && typeof(maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === 'function';
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/isObjectLike.mjs":
            /*!**************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/isObjectLike.mjs ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isObjectLike = isObjectLike;
                /**
                 * Return true if `value` is object-like. A value is object-like if it's not
                 * `null` and has a `typeof` result of "object".
                 */
                function isObjectLike(value) {
                    return typeof value == 'object' && value !== null;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/isPromise.mjs":
            /*!***********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/isPromise.mjs ***!
              \***********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isPromise = isPromise;
                /**
                 * Returns true if the value acts like a Promise, i.e. has a "then" function,
                 * otherwise returns false.
                 */
                function isPromise(value) {
                    return typeof(value === null || value === void 0 ? void 0 : value.then) === 'function';
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/keyMap.mjs":
            /*!********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/keyMap.mjs ***!
              \********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.keyMap = keyMap;
                /**
                 * Creates a keyed JS object from an array, given a function to produce the keys
                 * for each value in the array.
                 *
                 * This provides a convenient lookup for the array items if the key function
                 * produces unique results.
                 * ```ts
                 * const phoneBook = [
                 *   { name: 'Jon', num: '555-1234' },
                 *   { name: 'Jenny', num: '867-5309' }
                 * ]
                 *
                 * const entriesByName = keyMap(
                 *   phoneBook,
                 *   entry => entry.name
                 * )
                 *
                 * // {
                 * //   Jon: { name: 'Jon', num: '555-1234' },
                 * //   Jenny: { name: 'Jenny', num: '867-5309' }
                 * // }
                 *
                 * const jennyEntry = entriesByName['Jenny']
                 *
                 * // { name: 'Jenny', num: '857-6309' }
                 * ```
                 */
                function keyMap(list, keyFn) {
                    const result = Object.create(null);
                    for (const item of list) {
                        result[keyFn(item)] = item;
                    }
                    return result;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/keyValMap.mjs":
            /*!***********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/keyValMap.mjs ***!
              \***********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.keyValMap = keyValMap;
                /**
                 * Creates a keyed JS object from an array, given a function to produce the keys
                 * and a function to produce the values from each item in the array.
                 * ```ts
                 * const phoneBook = [
                 *   { name: 'Jon', num: '555-1234' },
                 *   { name: 'Jenny', num: '867-5309' }
                 * ]
                 *
                 * // { Jon: '555-1234', Jenny: '867-5309' }
                 * const phonesByName = keyValMap(
                 *   phoneBook,
                 *   entry => entry.name,
                 *   entry => entry.num
                 * )
                 * ```
                 */
                function keyValMap(list, keyFn, valFn) {
                    const result = Object.create(null);
                    for (const item of list) {
                        result[keyFn(item)] = valFn(item);
                    }
                    return result;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/mapValue.mjs":
            /*!**********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/mapValue.mjs ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.mapValue = mapValue;
                /**
                 * Creates an object map with the same keys as `map` and values generated by
                 * running each value of `map` thru `fn`.
                 */
                function mapValue(map, fn) {
                    const result = Object.create(null);
                    for (const key of Object.keys(map)) {
                        result[key] = fn(map[key], key);
                    }
                    return result;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/memoize3.mjs":
            /*!**********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/memoize3.mjs ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.memoize3 = memoize3;
                /**
                 * Memoizes the provided three-argument function.
                 */
                function memoize3(fn) {
                    let cache0;
                    return function memoized(a1, a2, a3) {
                        if (cache0 === undefined) {
                            cache0 = new WeakMap();
                        }
                        let cache1 = cache0.get(a1);
                        if (cache1 === undefined) {
                            cache1 = new WeakMap();
                            cache0.set(a1, cache1);
                        }
                        let cache2 = cache1.get(a2);
                        if (cache2 === undefined) {
                            cache2 = new WeakMap();
                            cache1.set(a2, cache2);
                        }
                        let fnResult = cache2.get(a3);
                        if (fnResult === undefined) {
                            fnResult = fn(a1, a2, a3);
                            cache2.set(a3, fnResult);
                        }
                        return fnResult;
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/naturalCompare.mjs":
            /*!****************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/naturalCompare.mjs ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.naturalCompare = naturalCompare;
                /**
                 * Returns a number indicating whether a reference string comes before, or after,
                 * or is the same as the given string in natural sort order.
                 *
                 * See: https://en.wikipedia.org/wiki/Natural_sort_order
                 *
                 */
                function naturalCompare(aStr, bStr) {
                    let aIndex = 0;
                    let bIndex = 0;
                    while (aIndex < aStr.length && bIndex < bStr.length) {
                        let aChar = aStr.charCodeAt(aIndex);
                        let bChar = bStr.charCodeAt(bIndex);
                        if (isDigit(aChar) && isDigit(bChar)) {
                            let aNum = 0;
                            do {
                                ++aIndex;
                                aNum = aNum * 10 + aChar - DIGIT_0;
                                aChar = aStr.charCodeAt(aIndex);
                            } while (isDigit(aChar) && aNum > 0);
                            let bNum = 0;
                            do {
                                ++bIndex;
                                bNum = bNum * 10 + bChar - DIGIT_0;
                                bChar = bStr.charCodeAt(bIndex);
                            } while (isDigit(bChar) && bNum > 0);
                            if (aNum < bNum) {
                                return -1;
                            }
                            if (aNum > bNum) {
                                return 1;
                            }
                        } else {
                            if (aChar < bChar) {
                                return -1;
                            }
                            if (aChar > bChar) {
                                return 1;
                            }
                            ++aIndex;
                            ++bIndex;
                        }
                    }
                    return aStr.length - bStr.length;
                }
                const DIGIT_0 = 48;
                const DIGIT_9 = 57;

                function isDigit(code) {
                    return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/printPathArray.mjs":
            /*!****************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/printPathArray.mjs ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.printPathArray = printPathArray;
                /**
                 * Build a string describing the path.
                 */
                function printPathArray(path) {
                    return path.map(key => typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key).join('');
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/promiseForObject.mjs":
            /*!******************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/promiseForObject.mjs ***!
              \******************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.promiseForObject = promiseForObject;
                /**
                 * This function transforms a JS object `ObjMap<Promise<T>>` into
                 * a `Promise<ObjMap<T>>`
                 *
                 * This is akin to bluebird's `Promise.props`, but implemented only using
                 * `Promise.all` so it will work with any implementation of ES6 promises.
                 */
                function promiseForObject(object) {
                    return Promise.all(Object.values(object)).then(resolvedValues => {
                        const resolvedObject = Object.create(null);
                        for (const [i, key] of Object.keys(object).entries()) {
                            resolvedObject[key] = resolvedValues[i];
                        }
                        return resolvedObject;
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/promiseReduce.mjs":
            /*!***************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/promiseReduce.mjs ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.promiseReduce = promiseReduce;
                var _isPromise = __webpack_require__( /*! ./isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs");
                /**
                 * Similar to Array.prototype.reduce(), however the reducing callback may return
                 * a Promise, in which case reduction will continue after each promise resolves.
                 *
                 * If the callback does not return a Promise, then this function will also not
                 * return a Promise.
                 */
                function promiseReduce(values, callbackFn, initialValue) {
                    let accumulator = initialValue;
                    for (const value of values) {
                        accumulator = (0, _isPromise.isPromise)(accumulator) ? accumulator.then(resolved => callbackFn(resolved, value)) : callbackFn(accumulator, value);
                    }
                    return accumulator;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/suggestionList.mjs":
            /*!****************************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/suggestionList.mjs ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.suggestionList = suggestionList;
                var _naturalCompare = __webpack_require__( /*! ./naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs");
                /**
                 * Given an invalid input string and a list of valid options, returns a filtered
                 * list of valid options sorted based on their similarity with the input.
                 */

                function suggestionList(input, options) {
                    const optionsByDistance = Object.create(null);
                    const lexicalDistance = new LexicalDistance(input);
                    const threshold = Math.floor(input.length * 0.4) + 1;
                    for (const option of options) {
                        const distance = lexicalDistance.measure(option, threshold);
                        if (distance !== undefined) {
                            optionsByDistance[option] = distance;
                        }
                    }
                    return Object.keys(optionsByDistance).sort((a, b) => {
                        const distanceDiff = optionsByDistance[a] - optionsByDistance[b];
                        return distanceDiff !== 0 ? distanceDiff : (0, _naturalCompare.naturalCompare)(a, b);
                    });
                }
                /**
                 * Computes the lexical distance between strings A and B.
                 *
                 * The "distance" between two strings is given by counting the minimum number
                 * of edits needed to transform string A into string B. An edit can be an
                 * insertion, deletion, or substitution of a single character, or a swap of two
                 * adjacent characters.
                 *
                 * Includes a custom alteration from Damerau-Levenshtein to treat case changes
                 * as a single edit which helps identify mis-cased values with an edit distance
                 * of 1.
                 *
                 * This distance can be useful for detecting typos in input or sorting
                 */

                class LexicalDistance {
                    constructor(input) {
                        this._input = input;
                        this._inputLowerCase = input.toLowerCase();
                        this._inputArray = stringToArray(this._inputLowerCase);
                        this._rows = [new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0)];
                    }
                    measure(option, threshold) {
                        if (this._input === option) {
                            return 0;
                        }
                        const optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit

                        if (this._inputLowerCase === optionLowerCase) {
                            return 1;
                        }
                        let a = stringToArray(optionLowerCase);
                        let b = this._inputArray;
                        if (a.length < b.length) {
                            const tmp = a;
                            a = b;
                            b = tmp;
                        }
                        const aLength = a.length;
                        const bLength = b.length;
                        if (aLength - bLength > threshold) {
                            return undefined;
                        }
                        const rows = this._rows;
                        for (let j = 0; j <= bLength; j++) {
                            rows[0][j] = j;
                        }
                        for (let i = 1; i <= aLength; i++) {
                            const upRow = rows[(i - 1) % 3];
                            const currentRow = rows[i % 3];
                            let smallestCell = currentRow[0] = i;
                            for (let j = 1; j <= bLength; j++) {
                                const cost = a[i - 1] === b[j - 1] ? 0 : 1;
                                let currentCell = Math.min(upRow[j] + 1,
                                    // delete
                                    currentRow[j - 1] + 1,
                                    // insert
                                    upRow[j - 1] + cost // substitute
                                );
                                if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
                                    // transposition
                                    const doubleDiagonalCell = rows[(i - 2) % 3][j - 2];
                                    currentCell = Math.min(currentCell, doubleDiagonalCell + 1);
                                }
                                if (currentCell < smallestCell) {
                                    smallestCell = currentCell;
                                }
                                currentRow[j] = currentCell;
                            } // Early exit, since distance can't go smaller than smallest element of the previous row.

                            if (smallestCell > threshold) {
                                return undefined;
                            }
                        }
                        const distance = rows[aLength % 3][bLength];
                        return distance <= threshold ? distance : undefined;
                    }
                }

                function stringToArray(str) {
                    const strLength = str.length;
                    const array = new Array(strLength);
                    for (let i = 0; i < strLength; ++i) {
                        array[i] = str.charCodeAt(i);
                    }
                    return array;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/toError.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/toError.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.toError = toError;
                var _inspect = __webpack_require__( /*! ./inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                /**
                 * Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.
                 */

                function toError(thrownValue) {
                    return thrownValue instanceof Error ? thrownValue : new NonErrorThrown(thrownValue);
                }
                class NonErrorThrown extends Error {
                    constructor(thrownValue) {
                        super('Unexpected error value: ' + (0, _inspect.inspect)(thrownValue));
                        this.name = 'NonErrorThrown';
                        this.thrownValue = thrownValue;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/jsutils/toObjMap.mjs":
            /*!**********************************************************!*\
              !*** ../../../node_modules/graphql/jsutils/toObjMap.mjs ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.toObjMap = toObjMap;

                function toObjMap(obj) {
                    if (obj == null) {
                        return Object.create(null);
                    }
                    if (Object.getPrototypeOf(obj) === null) {
                        return obj;
                    }
                    const map = Object.create(null);
                    for (const [key, value] of Object.entries(obj)) {
                        map[key] = value;
                    }
                    return map;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/ast.mjs":
            /*!******************************************************!*\
              !*** ../../../node_modules/graphql/language/ast.mjs ***!
              \******************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.Token = exports.QueryDocumentKeys = exports.OperationTypeNode = exports.Location = void 0;
                exports.isNode = isNode;
                /**
                 * Contains a range of UTF-8 character offsets and token references that
                 * identify the region of the source from which the AST derived.
                 */
                class Location {
                    /**
                     * The character offset at which this Node begins.
                     */

                    /**
                     * The character offset at which this Node ends.
                     */

                    /**
                     * The Token at which this Node begins.
                     */

                    /**
                     * The Token at which this Node ends.
                     */

                    /**
                     * The Source document the AST represents.
                     */
                    constructor(startToken, endToken, source) {
                        this.start = startToken.start;
                        this.end = endToken.end;
                        this.startToken = startToken;
                        this.endToken = endToken;
                        this.source = source;
                    }
                    get[Symbol.toStringTag]() {
                        return 'Location';
                    }
                    toJSON() {
                        return {
                            start: this.start,
                            end: this.end
                        };
                    }
                }
                /**
                 * Represents a range of characters represented by a lexical token
                 * within a Source.
                 */
                exports.Location = Location;
                class Token {
                    /**
                     * The kind of Token.
                     */

                    /**
                     * The character offset at which this Node begins.
                     */

                    /**
                     * The character offset at which this Node ends.
                     */

                    /**
                     * The 1-indexed line number on which this Token appears.
                     */

                    /**
                     * The 1-indexed column number at which this Token begins.
                     */

                    /**
                     * For non-punctuation tokens, represents the interpreted value of the token.
                     *
                     * Note: is undefined for punctuation tokens, but typed as string for
                     * convenience in the parser.
                     */

                    /**
                     * Tokens exist as nodes in a double-linked-list amongst all tokens
                     * including ignored tokens. <SOF> is always the first node and <EOF>
                     * the last.
                     */
                    constructor(kind, start, end, line, column, value) {
                        this.kind = kind;
                        this.start = start;
                        this.end = end;
                        this.line = line;
                        this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion

                        this.value = value;
                        this.prev = null;
                        this.next = null;
                    }
                    get[Symbol.toStringTag]() {
                        return 'Token';
                    }
                    toJSON() {
                        return {
                            kind: this.kind,
                            value: this.value,
                            line: this.line,
                            column: this.column
                        };
                    }
                }
                /**
                 * The list of all possible AST node types.
                 */

                /**
                 * @internal
                 */
                exports.Token = Token;
                const QueryDocumentKeys = exports.QueryDocumentKeys = {
                    Name: [],
                    Document: ['definitions'],
                    OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'],
                    VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],
                    Variable: ['name'],
                    SelectionSet: ['selections'],
                    Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],
                    Argument: ['name', 'value'],
                    FragmentSpread: ['name', 'directives'],
                    InlineFragment: ['typeCondition', 'directives', 'selectionSet'],
                    FragmentDefinition: ['name',
                        // Note: fragment variable definitions are deprecated and will removed in v17.0.0
                        'variableDefinitions', 'typeCondition', 'directives', 'selectionSet'
                    ],
                    IntValue: [],
                    FloatValue: [],
                    StringValue: [],
                    BooleanValue: [],
                    NullValue: [],
                    EnumValue: [],
                    ListValue: ['values'],
                    ObjectValue: ['fields'],
                    ObjectField: ['name', 'value'],
                    Directive: ['name', 'arguments'],
                    NamedType: ['name'],
                    ListType: ['type'],
                    NonNullType: ['type'],
                    SchemaDefinition: ['description', 'directives', 'operationTypes'],
                    OperationTypeDefinition: ['type'],
                    ScalarTypeDefinition: ['description', 'name', 'directives'],
                    ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],
                    FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],
                    InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'],
                    InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],
                    UnionTypeDefinition: ['description', 'name', 'directives', 'types'],
                    EnumTypeDefinition: ['description', 'name', 'directives', 'values'],
                    EnumValueDefinition: ['description', 'name', 'directives'],
                    InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],
                    DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],
                    SchemaExtension: ['directives', 'operationTypes'],
                    ScalarTypeExtension: ['name', 'directives'],
                    ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
                    InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
                    UnionTypeExtension: ['name', 'directives', 'types'],
                    EnumTypeExtension: ['name', 'directives', 'values'],
                    InputObjectTypeExtension: ['name', 'directives', 'fields']
                };
                const kindValues = new Set(Object.keys(QueryDocumentKeys));
                /**
                 * @internal
                 */

                function isNode(maybeNode) {
                    const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;
                    return typeof maybeKind === 'string' && kindValues.has(maybeKind);
                }
                /** Name */

                var OperationTypeNode;
                (function(OperationTypeNode) {
                    OperationTypeNode['QUERY'] = 'query';
                    OperationTypeNode['MUTATION'] = 'mutation';
                    OperationTypeNode['SUBSCRIPTION'] = 'subscription';
                })(OperationTypeNode || (exports.OperationTypeNode = OperationTypeNode = {}));

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/blockString.mjs":
            /*!**************************************************************!*\
              !*** ../../../node_modules/graphql/language/blockString.mjs ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.dedentBlockStringLines = dedentBlockStringLines;
                exports.isPrintableAsBlockString = isPrintableAsBlockString;
                exports.printBlockString = printBlockString;
                var _characterClasses = __webpack_require__( /*! ./characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs");
                /**
                 * Produces the value of a block string from its parsed raw value, similar to
                 * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.
                 *
                 * This implements the GraphQL spec's BlockStringValue() static algorithm.
                 *
                 * @internal
                 */

                function dedentBlockStringLines(lines) {
                    var _firstNonEmptyLine2;
                    let commonIndent = Number.MAX_SAFE_INTEGER;
                    let firstNonEmptyLine = null;
                    let lastNonEmptyLine = -1;
                    for (let i = 0; i < lines.length; ++i) {
                        var _firstNonEmptyLine;
                        const line = lines[i];
                        const indent = leadingWhitespace(line);
                        if (indent === line.length) {
                            continue; // skip empty lines
                        }
                        firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i;
                        lastNonEmptyLine = i;
                        if (i !== 0 && indent < commonIndent) {
                            commonIndent = indent;
                        }
                    }
                    return lines // Remove common indentation from all lines but first.
                        .map((line, i) => i === 0 ? line : line.slice(commonIndent)) // Remove leading and trailing blank lines.
                        .slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
                }

                function leadingWhitespace(str) {
                    let i = 0;
                    while (i < str.length && (0, _characterClasses.isWhiteSpace)(str.charCodeAt(i))) {
                        ++i;
                    }
                    return i;
                }
                /**
                 * @internal
                 */

                function isPrintableAsBlockString(value) {
                    if (value === '') {
                        return true; // empty string is printable
                    }
                    let isEmptyLine = true;
                    let hasIndent = false;
                    let hasCommonIndent = true;
                    let seenNonEmptyLine = false;
                    for (let i = 0; i < value.length; ++i) {
                        switch (value.codePointAt(i)) {
                            case 0x0000:
                            case 0x0001:
                            case 0x0002:
                            case 0x0003:
                            case 0x0004:
                            case 0x0005:
                            case 0x0006:
                            case 0x0007:
                            case 0x0008:
                            case 0x000b:
                            case 0x000c:
                            case 0x000e:
                            case 0x000f:
                                return false;
                                // Has non-printable characters

                            case 0x000d:
                                //  \r
                                return false;
                                // Has \r or \r\n which will be replaced as \n

                            case 10:
                                //  \n
                                if (isEmptyLine && !seenNonEmptyLine) {
                                    return false; // Has leading new line
                                }
                                seenNonEmptyLine = true;
                                isEmptyLine = true;
                                hasIndent = false;
                                break;
                            case 9: //   \t

                            case 32:
                                //  <space>
                                hasIndent || (hasIndent = isEmptyLine);
                                break;
                            default:
                                hasCommonIndent && (hasCommonIndent = hasIndent);
                                isEmptyLine = false;
                        }
                    }
                    if (isEmptyLine) {
                        return false; // Has trailing empty lines
                    }
                    if (hasCommonIndent && seenNonEmptyLine) {
                        return false; // Has internal indent
                    }
                    return true;
                }
                /**
                 * Print a block string in the indented block form by adding a leading and
                 * trailing blank line. However, if a block string starts with whitespace and is
                 * a single-line, adding a leading blank line would strip that whitespace.
                 *
                 * @internal
                 */

                function printBlockString(value, options) {
                    const escapedValue = value.replace(/"""/g, '\\"""'); // Expand a block string's raw value into independent lines.

                    const lines = escapedValue.split(/\r\n|[\n\r]/g);
                    const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line

                    const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every(line => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line

                    const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""'); // Trailing quote (single or double) or slash forces trailing new line

                    const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
                    const hasTrailingSlash = value.endsWith('\\');
                    const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;
                    const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && (
                        // add leading and trailing new lines only if it improves readability
                        !isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes);
                    let result = ''; // Format a multi-line block quote to account for leading space.

                    const skipLeadingNewLine = isSingleLine && (0, _characterClasses.isWhiteSpace)(value.charCodeAt(0));
                    if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) {
                        result += '\n';
                    }
                    result += escapedValue;
                    if (printAsMultipleLines || forceTrailingNewline) {
                        result += '\n';
                    }
                    return '"""' + result + '"""';
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/characterClasses.mjs":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/graphql/language/characterClasses.mjs ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isDigit = isDigit;
                exports.isLetter = isLetter;
                exports.isNameContinue = isNameContinue;
                exports.isNameStart = isNameStart;
                exports.isWhiteSpace = isWhiteSpace;
                /**
                 * ```
                 * WhiteSpace ::
                 *   - "Horizontal Tab (U+0009)"
                 *   - "Space (U+0020)"
                 * ```
                 * @internal
                 */
                function isWhiteSpace(code) {
                    return code === 0x0009 || code === 0x0020;
                }
                /**
                 * ```
                 * Digit :: one of
                 *   - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`
                 * ```
                 * @internal
                 */

                function isDigit(code) {
                    return code >= 0x0030 && code <= 0x0039;
                }
                /**
                 * ```
                 * Letter :: one of
                 *   - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`
                 *   - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`
                 *   - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`
                 *   - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`
                 * ```
                 * @internal
                 */

                function isLetter(code) {
                    return code >= 0x0061 && code <= 0x007a ||
                        // A-Z
                        code >= 0x0041 && code <= 0x005a // a-z
                    ;
                }
                /**
                 * ```
                 * NameStart ::
                 *   - Letter
                 *   - `_`
                 * ```
                 * @internal
                 */

                function isNameStart(code) {
                    return isLetter(code) || code === 0x005f;
                }
                /**
                 * ```
                 * NameContinue ::
                 *   - Letter
                 *   - Digit
                 *   - `_`
                 * ```
                 * @internal
                 */

                function isNameContinue(code) {
                    return isLetter(code) || isDigit(code) || code === 0x005f;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/directiveLocation.mjs":
            /*!********************************************************************!*\
              !*** ../../../node_modules/graphql/language/directiveLocation.mjs ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.DirectiveLocation = void 0;
                /**
                 * The set of allowed directive location values.
                 */
                var DirectiveLocation;
                (function(DirectiveLocation) {
                    DirectiveLocation['QUERY'] = 'QUERY';
                    DirectiveLocation['MUTATION'] = 'MUTATION';
                    DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';
                    DirectiveLocation['FIELD'] = 'FIELD';
                    DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';
                    DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';
                    DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';
                    DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';
                    DirectiveLocation['SCHEMA'] = 'SCHEMA';
                    DirectiveLocation['SCALAR'] = 'SCALAR';
                    DirectiveLocation['OBJECT'] = 'OBJECT';
                    DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';
                    DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';
                    DirectiveLocation['INTERFACE'] = 'INTERFACE';
                    DirectiveLocation['UNION'] = 'UNION';
                    DirectiveLocation['ENUM'] = 'ENUM';
                    DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';
                    DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';
                    DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';
                })(DirectiveLocation || (exports.DirectiveLocation = DirectiveLocation = {}));

                /**
                 * The enum type representing the directive location values.
                 *
                 * @deprecated Please use `DirectiveLocation`. Will be remove in v17.
                 */

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/index.mjs":
            /*!********************************************************!*\
              !*** ../../../node_modules/graphql/language/index.mjs ***!
              \********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "BREAK", ({
                    enumerable: true,
                    get: function() {
                        return _visitor.BREAK;
                    }
                }));
                Object.defineProperty(exports, "DirectiveLocation", ({
                    enumerable: true,
                    get: function() {
                        return _directiveLocation.DirectiveLocation;
                    }
                }));
                Object.defineProperty(exports, "Kind", ({
                    enumerable: true,
                    get: function() {
                        return _kinds.Kind;
                    }
                }));
                Object.defineProperty(exports, "Lexer", ({
                    enumerable: true,
                    get: function() {
                        return _lexer.Lexer;
                    }
                }));
                Object.defineProperty(exports, "Location", ({
                    enumerable: true,
                    get: function() {
                        return _ast.Location;
                    }
                }));
                Object.defineProperty(exports, "OperationTypeNode", ({
                    enumerable: true,
                    get: function() {
                        return _ast.OperationTypeNode;
                    }
                }));
                Object.defineProperty(exports, "Source", ({
                    enumerable: true,
                    get: function() {
                        return _source.Source;
                    }
                }));
                Object.defineProperty(exports, "Token", ({
                    enumerable: true,
                    get: function() {
                        return _ast.Token;
                    }
                }));
                Object.defineProperty(exports, "TokenKind", ({
                    enumerable: true,
                    get: function() {
                        return _tokenKind.TokenKind;
                    }
                }));
                Object.defineProperty(exports, "getEnterLeaveForKind", ({
                    enumerable: true,
                    get: function() {
                        return _visitor.getEnterLeaveForKind;
                    }
                }));
                Object.defineProperty(exports, "getLocation", ({
                    enumerable: true,
                    get: function() {
                        return _location.getLocation;
                    }
                }));
                Object.defineProperty(exports, "getVisitFn", ({
                    enumerable: true,
                    get: function() {
                        return _visitor.getVisitFn;
                    }
                }));
                Object.defineProperty(exports, "isConstValueNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isConstValueNode;
                    }
                }));
                Object.defineProperty(exports, "isDefinitionNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isDefinitionNode;
                    }
                }));
                Object.defineProperty(exports, "isExecutableDefinitionNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isExecutableDefinitionNode;
                    }
                }));
                Object.defineProperty(exports, "isSelectionNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isSelectionNode;
                    }
                }));
                Object.defineProperty(exports, "isTypeDefinitionNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isTypeDefinitionNode;
                    }
                }));
                Object.defineProperty(exports, "isTypeExtensionNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isTypeExtensionNode;
                    }
                }));
                Object.defineProperty(exports, "isTypeNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isTypeNode;
                    }
                }));
                Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isTypeSystemDefinitionNode;
                    }
                }));
                Object.defineProperty(exports, "isTypeSystemExtensionNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isTypeSystemExtensionNode;
                    }
                }));
                Object.defineProperty(exports, "isValueNode", ({
                    enumerable: true,
                    get: function() {
                        return _predicates.isValueNode;
                    }
                }));
                Object.defineProperty(exports, "parse", ({
                    enumerable: true,
                    get: function() {
                        return _parser.parse;
                    }
                }));
                Object.defineProperty(exports, "parseConstValue", ({
                    enumerable: true,
                    get: function() {
                        return _parser.parseConstValue;
                    }
                }));
                Object.defineProperty(exports, "parseType", ({
                    enumerable: true,
                    get: function() {
                        return _parser.parseType;
                    }
                }));
                Object.defineProperty(exports, "parseValue", ({
                    enumerable: true,
                    get: function() {
                        return _parser.parseValue;
                    }
                }));
                Object.defineProperty(exports, "print", ({
                    enumerable: true,
                    get: function() {
                        return _printer.print;
                    }
                }));
                Object.defineProperty(exports, "printLocation", ({
                    enumerable: true,
                    get: function() {
                        return _printLocation.printLocation;
                    }
                }));
                Object.defineProperty(exports, "printSourceLocation", ({
                    enumerable: true,
                    get: function() {
                        return _printLocation.printSourceLocation;
                    }
                }));
                Object.defineProperty(exports, "visit", ({
                    enumerable: true,
                    get: function() {
                        return _visitor.visit;
                    }
                }));
                Object.defineProperty(exports, "visitInParallel", ({
                    enumerable: true,
                    get: function() {
                        return _visitor.visitInParallel;
                    }
                }));
                var _source = __webpack_require__( /*! ./source.mjs */ "../../../node_modules/graphql/language/source.mjs");
                var _location = __webpack_require__( /*! ./location.mjs */ "../../../node_modules/graphql/language/location.mjs");
                var _printLocation = __webpack_require__( /*! ./printLocation.mjs */ "../../../node_modules/graphql/language/printLocation.mjs");
                var _kinds = __webpack_require__( /*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _tokenKind = __webpack_require__( /*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs");
                var _lexer = __webpack_require__( /*! ./lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs");
                var _parser = __webpack_require__( /*! ./parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
                var _printer = __webpack_require__( /*! ./printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _visitor = __webpack_require__( /*! ./visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
                var _ast = __webpack_require__( /*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
                var _predicates = __webpack_require__( /*! ./predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
                var _directiveLocation = __webpack_require__( /*! ./directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/kinds.mjs":
            /*!********************************************************!*\
              !*** ../../../node_modules/graphql/language/kinds.mjs ***!
              \********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.Kind = void 0;
                /**
                 * The set of allowed kind values for AST nodes.
                 */
                var Kind;
                (function(Kind) {
                    Kind['NAME'] = 'Name';
                    Kind['DOCUMENT'] = 'Document';
                    Kind['OPERATION_DEFINITION'] = 'OperationDefinition';
                    Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';
                    Kind['SELECTION_SET'] = 'SelectionSet';
                    Kind['FIELD'] = 'Field';
                    Kind['ARGUMENT'] = 'Argument';
                    Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';
                    Kind['INLINE_FRAGMENT'] = 'InlineFragment';
                    Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';
                    Kind['VARIABLE'] = 'Variable';
                    Kind['INT'] = 'IntValue';
                    Kind['FLOAT'] = 'FloatValue';
                    Kind['STRING'] = 'StringValue';
                    Kind['BOOLEAN'] = 'BooleanValue';
                    Kind['NULL'] = 'NullValue';
                    Kind['ENUM'] = 'EnumValue';
                    Kind['LIST'] = 'ListValue';
                    Kind['OBJECT'] = 'ObjectValue';
                    Kind['OBJECT_FIELD'] = 'ObjectField';
                    Kind['DIRECTIVE'] = 'Directive';
                    Kind['NAMED_TYPE'] = 'NamedType';
                    Kind['LIST_TYPE'] = 'ListType';
                    Kind['NON_NULL_TYPE'] = 'NonNullType';
                    Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';
                    Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';
                    Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';
                    Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';
                    Kind['FIELD_DEFINITION'] = 'FieldDefinition';
                    Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';
                    Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';
                    Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';
                    Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';
                    Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';
                    Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';
                    Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';
                    Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';
                    Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';
                    Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';
                    Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';
                    Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';
                    Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';
                    Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';
                })(Kind || (exports.Kind = Kind = {}));

                /**
                 * The enum type representing the possible kind values of AST nodes.
                 *
                 * @deprecated Please use `Kind`. Will be remove in v17.
                 */

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/lexer.mjs":
            /*!********************************************************!*\
              !*** ../../../node_modules/graphql/language/lexer.mjs ***!
              \********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.Lexer = void 0;
                exports.isPunctuatorTokenKind = isPunctuatorTokenKind;
                var _syntaxError = __webpack_require__( /*! ../error/syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs");
                var _ast = __webpack_require__( /*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
                var _blockString = __webpack_require__( /*! ./blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs");
                var _characterClasses = __webpack_require__( /*! ./characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs");
                var _tokenKind = __webpack_require__( /*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs");
                /**
                 * Given a Source object, creates a Lexer for that source.
                 * A Lexer is a stateful stream generator in that every time
                 * it is advanced, it returns the next token in the Source. Assuming the
                 * source lexes, the final Token emitted by the lexer will be of kind
                 * EOF, after which the lexer will repeatedly return the same EOF token
                 * whenever called.
                 */

                class Lexer {
                    /**
                     * The previously focused non-ignored token.
                     */

                    /**
                     * The currently focused non-ignored token.
                     */

                    /**
                     * The (1-indexed) line containing the current token.
                     */

                    /**
                     * The character offset at which the current line begins.
                     */
                    constructor(source) {
                        const startOfFileToken = new _ast.Token(_tokenKind.TokenKind.SOF, 0, 0, 0, 0);
                        this.source = source;
                        this.lastToken = startOfFileToken;
                        this.token = startOfFileToken;
                        this.line = 1;
                        this.lineStart = 0;
                    }
                    get[Symbol.toStringTag]() {
                        return 'Lexer';
                    }
                    /**
                     * Advances the token stream to the next non-ignored token.
                     */

                    advance() {
                        this.lastToken = this.token;
                        const token = this.token = this.lookahead();
                        return token;
                    }
                    /**
                     * Looks ahead and returns the next non-ignored token, but does not change
                     * the state of Lexer.
                     */

                    lookahead() {
                        let token = this.token;
                        if (token.kind !== _tokenKind.TokenKind.EOF) {
                            do {
                                if (token.next) {
                                    token = token.next;
                                } else {
                                    // Read the next token and form a link in the token linked-list.
                                    const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.

                                    token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.

                                    nextToken.prev = token;
                                    token = nextToken;
                                }
                            } while (token.kind === _tokenKind.TokenKind.COMMENT);
                        }
                        return token;
                    }
                }
                /**
                 * @internal
                 */
                exports.Lexer = Lexer;

                function isPunctuatorTokenKind(kind) {
                    return kind === _tokenKind.TokenKind.BANG || kind === _tokenKind.TokenKind.DOLLAR || kind === _tokenKind.TokenKind.AMP || kind === _tokenKind.TokenKind.PAREN_L || kind === _tokenKind.TokenKind.PAREN_R || kind === _tokenKind.TokenKind.SPREAD || kind === _tokenKind.TokenKind.COLON || kind === _tokenKind.TokenKind.EQUALS || kind === _tokenKind.TokenKind.AT || kind === _tokenKind.TokenKind.BRACKET_L || kind === _tokenKind.TokenKind.BRACKET_R || kind === _tokenKind.TokenKind.BRACE_L || kind === _tokenKind.TokenKind.PIPE || kind === _tokenKind.TokenKind.BRACE_R;
                }
                /**
                 * A Unicode scalar value is any Unicode code point except surrogate code
                 * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and
                 * 0xE000 to 0x10FFFF.
                 *
                 * SourceCharacter ::
                 *   - "Any Unicode scalar value"
                 */

                function isUnicodeScalarValue(code) {
                    return code >= 0x0000 && code <= 0xd7ff || code >= 0xe000 && code <= 0x10ffff;
                }
                /**
                 * The GraphQL specification defines source text as a sequence of unicode scalar
                 * values (which Unicode defines to exclude surrogate code points). However
                 * JavaScript defines strings as a sequence of UTF-16 code units which may
                 * include surrogates. A surrogate pair is a valid source character as it
                 * encodes a supplementary code point (above U+FFFF), but unpaired surrogate
                 * code points are not valid source characters.
                 */

                function isSupplementaryCodePoint(body, location) {
                    return isLeadingSurrogate(body.charCodeAt(location)) && isTrailingSurrogate(body.charCodeAt(location + 1));
                }

                function isLeadingSurrogate(code) {
                    return code >= 0xd800 && code <= 0xdbff;
                }

                function isTrailingSurrogate(code) {
                    return code >= 0xdc00 && code <= 0xdfff;
                }
                /**
                 * Prints the code point (or end of file reference) at a given location in a
                 * source for use in error messages.
                 *
                 * Printable ASCII is printed quoted, while other points are printed in Unicode
                 * code point form (ie. U+1234).
                 */

                function printCodePointAt(lexer, location) {
                    const code = lexer.source.body.codePointAt(location);
                    if (code === undefined) {
                        return _tokenKind.TokenKind.EOF;
                    } else if (code >= 0x0020 && code <= 0x007e) {
                        // Printable ASCII
                        const char = String.fromCodePoint(code);
                        return char === '"' ? "'\"'" : `"${char}"`;
                    } // Unicode code point

                    return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');
                }
                /**
                 * Create a token with line and column location information.
                 */

                function createToken(lexer, kind, start, end, value) {
                    const line = lexer.line;
                    const col = 1 + start - lexer.lineStart;
                    return new _ast.Token(kind, start, end, line, col, value);
                }
                /**
                 * Gets the next token from the source starting at the given position.
                 *
                 * This skips over whitespace until it finds the next lexable token, then lexes
                 * punctuators immediately or calls the appropriate helper function for more
                 * complicated tokens.
                 */

                function readNextToken(lexer, start) {
                    const body = lexer.source.body;
                    const bodyLength = body.length;
                    let position = start;
                    while (position < bodyLength) {
                        const code = body.charCodeAt(position); // SourceCharacter

                        switch (code) {
                            // Ignored ::
                            //   - UnicodeBOM
                            //   - WhiteSpace
                            //   - LineTerminator
                            //   - Comment
                            //   - Comma
                            //
                            // UnicodeBOM :: "Byte Order Mark (U+FEFF)"
                            //
                            // WhiteSpace ::
                            //   - "Horizontal Tab (U+0009)"
                            //   - "Space (U+0020)"
                            //
                            // Comma :: ,
                            case 0xfeff: // <BOM>

                            case 0x0009: // \t

                            case 0x0020: // <space>

                            case 0x002c:
                                // ,
                                ++position;
                                continue;
                                // LineTerminator ::
                                //   - "New Line (U+000A)"
                                //   - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
                                //   - "Carriage Return (U+000D)" "New Line (U+000A)"

                            case 0x000a:
                                // \n
                                ++position;
                                ++lexer.line;
                                lexer.lineStart = position;
                                continue;
                            case 0x000d:
                                // \r
                                if (body.charCodeAt(position + 1) === 0x000a) {
                                    position += 2;
                                } else {
                                    ++position;
                                }
                                ++lexer.line;
                                lexer.lineStart = position;
                                continue;
                                // Comment

                            case 0x0023:
                                // #
                                return readComment(lexer, position);
                                // Token ::
                                //   - Punctuator
                                //   - Name
                                //   - IntValue
                                //   - FloatValue
                                //   - StringValue
                                //
                                // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }

                            case 0x0021:
                                // !
                                return createToken(lexer, _tokenKind.TokenKind.BANG, position, position + 1);
                            case 0x0024:
                                // $
                                return createToken(lexer, _tokenKind.TokenKind.DOLLAR, position, position + 1);
                            case 0x0026:
                                // &
                                return createToken(lexer, _tokenKind.TokenKind.AMP, position, position + 1);
                            case 0x0028:
                                // (
                                return createToken(lexer, _tokenKind.TokenKind.PAREN_L, position, position + 1);
                            case 0x0029:
                                // )
                                return createToken(lexer, _tokenKind.TokenKind.PAREN_R, position, position + 1);
                            case 0x002e:
                                // .
                                if (body.charCodeAt(position + 1) === 0x002e && body.charCodeAt(position + 2) === 0x002e) {
                                    return createToken(lexer, _tokenKind.TokenKind.SPREAD, position, position + 3);
                                }
                                break;
                            case 0x003a:
                                // :
                                return createToken(lexer, _tokenKind.TokenKind.COLON, position, position + 1);
                            case 0x003d:
                                // =
                                return createToken(lexer, _tokenKind.TokenKind.EQUALS, position, position + 1);
                            case 0x0040:
                                // @
                                return createToken(lexer, _tokenKind.TokenKind.AT, position, position + 1);
                            case 0x005b:
                                // [
                                return createToken(lexer, _tokenKind.TokenKind.BRACKET_L, position, position + 1);
                            case 0x005d:
                                // ]
                                return createToken(lexer, _tokenKind.TokenKind.BRACKET_R, position, position + 1);
                            case 0x007b:
                                // {
                                return createToken(lexer, _tokenKind.TokenKind.BRACE_L, position, position + 1);
                            case 0x007c:
                                // |
                                return createToken(lexer, _tokenKind.TokenKind.PIPE, position, position + 1);
                            case 0x007d:
                                // }
                                return createToken(lexer, _tokenKind.TokenKind.BRACE_R, position, position + 1);
                                // StringValue

                            case 0x0022:
                                // "
                                if (body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022) {
                                    return readBlockString(lexer, position);
                                }
                                return readString(lexer, position);
                        } // IntValue | FloatValue (Digit | -)

                        if ((0, _characterClasses.isDigit)(code) || code === 0x002d) {
                            return readNumber(lexer, position, code);
                        } // Name

                        if ((0, _characterClasses.isNameStart)(code)) {
                            return readName(lexer, position);
                        }
                        throw (0, _syntaxError.syntaxError)(lexer.source, position, code === 0x0027 ? 'Unexpected single quote character (\'), did you mean to use a double quote (")?' : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position) ? `Unexpected character: ${printCodePointAt(lexer, position)}.` : `Invalid character: ${printCodePointAt(lexer, position)}.`);
                    }
                    return createToken(lexer, _tokenKind.TokenKind.EOF, bodyLength, bodyLength);
                }
                /**
                 * Reads a comment token from the source file.
                 *
                 * ```
                 * Comment :: # CommentChar* [lookahead != CommentChar]
                 *
                 * CommentChar :: SourceCharacter but not LineTerminator
                 * ```
                 */

                function readComment(lexer, start) {
                    const body = lexer.source.body;
                    const bodyLength = body.length;
                    let position = start + 1;
                    while (position < bodyLength) {
                        const code = body.charCodeAt(position); // LineTerminator (\n | \r)

                        if (code === 0x000a || code === 0x000d) {
                            break;
                        } // SourceCharacter

                        if (isUnicodeScalarValue(code)) {
                            ++position;
                        } else if (isSupplementaryCodePoint(body, position)) {
                            position += 2;
                        } else {
                            break;
                        }
                    }
                    return createToken(lexer, _tokenKind.TokenKind.COMMENT, start, position, body.slice(start + 1, position));
                }
                /**
                 * Reads a number token from the source file, either a FloatValue or an IntValue
                 * depending on whether a FractionalPart or ExponentPart is encountered.
                 *
                 * ```
                 * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]
                 *
                 * IntegerPart ::
                 *   - NegativeSign? 0
                 *   - NegativeSign? NonZeroDigit Digit*
                 *
                 * NegativeSign :: -
                 *
                 * NonZeroDigit :: Digit but not `0`
                 *
                 * FloatValue ::
                 *   - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]
                 *   - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]
                 *   - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]
                 *
                 * FractionalPart :: . Digit+
                 *
                 * ExponentPart :: ExponentIndicator Sign? Digit+
                 *
                 * ExponentIndicator :: one of `e` `E`
                 *
                 * Sign :: one of + -
                 * ```
                 */

                function readNumber(lexer, start, firstCode) {
                    const body = lexer.source.body;
                    let position = start;
                    let code = firstCode;
                    let isFloat = false; // NegativeSign (-)

                    if (code === 0x002d) {
                        code = body.charCodeAt(++position);
                    } // Zero (0)

                    if (code === 0x0030) {
                        code = body.charCodeAt(++position);
                        if ((0, _characterClasses.isDigit)(code)) {
                            throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid number, unexpected digit after 0: ${printCodePointAt(lexer, position)}.`);
                        }
                    } else {
                        position = readDigits(lexer, position, code);
                        code = body.charCodeAt(position);
                    } // Full stop (.)

                    if (code === 0x002e) {
                        isFloat = true;
                        code = body.charCodeAt(++position);
                        position = readDigits(lexer, position, code);
                        code = body.charCodeAt(position);
                    } // E e

                    if (code === 0x0045 || code === 0x0065) {
                        isFloat = true;
                        code = body.charCodeAt(++position); // + -

                        if (code === 0x002b || code === 0x002d) {
                            code = body.charCodeAt(++position);
                        }
                        position = readDigits(lexer, position, code);
                        code = body.charCodeAt(position);
                    } // Numbers cannot be followed by . or NameStart

                    if (code === 0x002e || (0, _characterClasses.isNameStart)(code)) {
                        throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid number, expected digit but got: ${printCodePointAt(lexer, position)}.`);
                    }
                    return createToken(lexer, isFloat ? _tokenKind.TokenKind.FLOAT : _tokenKind.TokenKind.INT, start, position, body.slice(start, position));
                }
                /**
                 * Returns the new position in the source after reading one or more digits.
                 */

                function readDigits(lexer, start, firstCode) {
                    if (!(0, _characterClasses.isDigit)(firstCode)) {
                        throw (0, _syntaxError.syntaxError)(lexer.source, start, `Invalid number, expected digit but got: ${printCodePointAt(lexer, start)}.`);
                    }
                    const body = lexer.source.body;
                    let position = start + 1; // +1 to skip first firstCode

                    while ((0, _characterClasses.isDigit)(body.charCodeAt(position))) {
                        ++position;
                    }
                    return position;
                }
                /**
                 * Reads a single-quote string token from the source file.
                 *
                 * ```
                 * StringValue ::
                 *   - `""` [lookahead != `"`]
                 *   - `"` StringCharacter+ `"`
                 *
                 * StringCharacter ::
                 *   - SourceCharacter but not `"` or `\` or LineTerminator
                 *   - `\u` EscapedUnicode
                 *   - `\` EscapedCharacter
                 *
                 * EscapedUnicode ::
                 *   - `{` HexDigit+ `}`
                 *   - HexDigit HexDigit HexDigit HexDigit
                 *
                 * EscapedCharacter :: one of `"` `\` `/` `b` `f` `n` `r` `t`
                 * ```
                 */

                function readString(lexer, start) {
                    const body = lexer.source.body;
                    const bodyLength = body.length;
                    let position = start + 1;
                    let chunkStart = position;
                    let value = '';
                    while (position < bodyLength) {
                        const code = body.charCodeAt(position); // Closing Quote (")

                        if (code === 0x0022) {
                            value += body.slice(chunkStart, position);
                            return createToken(lexer, _tokenKind.TokenKind.STRING, start, position + 1, value);
                        } // Escape Sequence (\)

                        if (code === 0x005c) {
                            value += body.slice(chunkStart, position);
                            const escape = body.charCodeAt(position + 1) === 0x0075 // u
                                ?
                                body.charCodeAt(position + 2) === 0x007b // {
                                ?
                                readEscapedUnicodeVariableWidth(lexer, position) : readEscapedUnicodeFixedWidth(lexer, position) : readEscapedCharacter(lexer, position);
                            value += escape.value;
                            position += escape.size;
                            chunkStart = position;
                            continue;
                        } // LineTerminator (\n | \r)

                        if (code === 0x000a || code === 0x000d) {
                            break;
                        } // SourceCharacter

                        if (isUnicodeScalarValue(code)) {
                            ++position;
                        } else if (isSupplementaryCodePoint(body, position)) {
                            position += 2;
                        } else {
                            throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character within String: ${printCodePointAt(lexer, position)}.`);
                        }
                    }
                    throw (0, _syntaxError.syntaxError)(lexer.source, position, 'Unterminated string.');
                } // The string value and lexed size of an escape sequence.

                function readEscapedUnicodeVariableWidth(lexer, position) {
                    const body = lexer.source.body;
                    let point = 0;
                    let size = 3; // Cannot be larger than 12 chars (\u{00000000}).

                    while (size < 12) {
                        const code = body.charCodeAt(position + size++); // Closing Brace (})

                        if (code === 0x007d) {
                            // Must be at least 5 chars (\u{0}) and encode a Unicode scalar value.
                            if (size < 5 || !isUnicodeScalarValue(point)) {
                                break;
                            }
                            return {
                                value: String.fromCodePoint(point),
                                size
                            };
                        } // Append this hex digit to the code point.

                        point = point << 4 | readHexDigit(code);
                        if (point < 0) {
                            break;
                        }
                    }
                    throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid Unicode escape sequence: "${body.slice(position, position + size)}".`);
                }

                function readEscapedUnicodeFixedWidth(lexer, position) {
                    const body = lexer.source.body;
                    const code = read16BitHexCode(body, position + 2);
                    if (isUnicodeScalarValue(code)) {
                        return {
                            value: String.fromCodePoint(code),
                            size: 6
                        };
                    } // GraphQL allows JSON-style surrogate pair escape sequences, but only when
                    // a valid pair is formed.

                    if (isLeadingSurrogate(code)) {
                        // \u
                        if (body.charCodeAt(position + 6) === 0x005c && body.charCodeAt(position + 7) === 0x0075) {
                            const trailingCode = read16BitHexCode(body, position + 8);
                            if (isTrailingSurrogate(trailingCode)) {
                                // JavaScript defines strings as a sequence of UTF-16 code units and
                                // encodes Unicode code points above U+FFFF using a surrogate pair of
                                // code units. Since this is a surrogate pair escape sequence, just
                                // include both codes into the JavaScript string value. Had JavaScript
                                // not been internally based on UTF-16, then this surrogate pair would
                                // be decoded to retrieve the supplementary code point.
                                return {
                                    value: String.fromCodePoint(code, trailingCode),
                                    size: 12
                                };
                            }
                        }
                    }
                    throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid Unicode escape sequence: "${body.slice(position, position + 6)}".`);
                }
                /**
                 * Reads four hexadecimal characters and returns the positive integer that 16bit
                 * hexadecimal string represents. For example, "000f" will return 15, and "dead"
                 * will return 57005.
                 *
                 * Returns a negative number if any char was not a valid hexadecimal digit.
                 */

                function read16BitHexCode(body, position) {
                    // readHexDigit() returns -1 on error. ORing a negative value with any other
                    // value always produces a negative value.
                    return readHexDigit(body.charCodeAt(position)) << 12 | readHexDigit(body.charCodeAt(position + 1)) << 8 | readHexDigit(body.charCodeAt(position + 2)) << 4 | readHexDigit(body.charCodeAt(position + 3));
                }
                /**
                 * Reads a hexadecimal character and returns its positive integer value (0-15).
                 *
                 * '0' becomes 0, '9' becomes 9
                 * 'A' becomes 10, 'F' becomes 15
                 * 'a' becomes 10, 'f' becomes 15
                 *
                 * Returns -1 if the provided character code was not a valid hexadecimal digit.
                 *
                 * HexDigit :: one of
                 *   - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`
                 *   - `A` `B` `C` `D` `E` `F`
                 *   - `a` `b` `c` `d` `e` `f`
                 */

                function readHexDigit(code) {
                    return code >= 0x0030 && code <= 0x0039 // 0-9
                        ?
                        code - 0x0030 : code >= 0x0041 && code <= 0x0046 // A-F
                        ?
                        code - 0x0037 : code >= 0x0061 && code <= 0x0066 // a-f
                        ?
                        code - 0x0057 : -1;
                }
                /**
                 * | Escaped Character | Code Point | Character Name               |
                 * | ----------------- | ---------- | ---------------------------- |
                 * | `"`               | U+0022     | double quote                 |
                 * | `\`               | U+005C     | reverse solidus (back slash) |
                 * | `/`               | U+002F     | solidus (forward slash)      |
                 * | `b`               | U+0008     | backspace                    |
                 * | `f`               | U+000C     | form feed                    |
                 * | `n`               | U+000A     | line feed (new line)         |
                 * | `r`               | U+000D     | carriage return              |
                 * | `t`               | U+0009     | horizontal tab               |
                 */

                function readEscapedCharacter(lexer, position) {
                    const body = lexer.source.body;
                    const code = body.charCodeAt(position + 1);
                    switch (code) {
                        case 0x0022:
                            // "
                            return {
                                value: '\u0022',
                                    size: 2
                            };
                        case 0x005c:
                            // \
                            return {
                                value: '\u005c',
                                    size: 2
                            };
                        case 0x002f:
                            // /
                            return {
                                value: '\u002f',
                                    size: 2
                            };
                        case 0x0062:
                            // b
                            return {
                                value: '\u0008',
                                    size: 2
                            };
                        case 0x0066:
                            // f
                            return {
                                value: '\u000c',
                                    size: 2
                            };
                        case 0x006e:
                            // n
                            return {
                                value: '\u000a',
                                    size: 2
                            };
                        case 0x0072:
                            // r
                            return {
                                value: '\u000d',
                                    size: 2
                            };
                        case 0x0074:
                            // t
                            return {
                                value: '\u0009',
                                    size: 2
                            };
                    }
                    throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character escape sequence: "${body.slice(position, position + 2)}".`);
                }
                /**
                 * Reads a block string token from the source file.
                 *
                 * ```
                 * StringValue ::
                 *   - `"""` BlockStringCharacter* `"""`
                 *
                 * BlockStringCharacter ::
                 *   - SourceCharacter but not `"""` or `\"""`
                 *   - `\"""`
                 * ```
                 */

                function readBlockString(lexer, start) {
                    const body = lexer.source.body;
                    const bodyLength = body.length;
                    let lineStart = lexer.lineStart;
                    let position = start + 3;
                    let chunkStart = position;
                    let currentLine = '';
                    const blockLines = [];
                    while (position < bodyLength) {
                        const code = body.charCodeAt(position); // Closing Triple-Quote (""")

                        if (code === 0x0022 && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022) {
                            currentLine += body.slice(chunkStart, position);
                            blockLines.push(currentLine);
                            const token = createToken(lexer, _tokenKind.TokenKind.BLOCK_STRING, start, position + 3,
                                // Return a string of the lines joined with U+000A.
                                (0, _blockString.dedentBlockStringLines)(blockLines).join('\n'));
                            lexer.line += blockLines.length - 1;
                            lexer.lineStart = lineStart;
                            return token;
                        } // Escaped Triple-Quote (\""")

                        if (code === 0x005c && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022 && body.charCodeAt(position + 3) === 0x0022) {
                            currentLine += body.slice(chunkStart, position);
                            chunkStart = position + 1; // skip only slash

                            position += 4;
                            continue;
                        } // LineTerminator

                        if (code === 0x000a || code === 0x000d) {
                            currentLine += body.slice(chunkStart, position);
                            blockLines.push(currentLine);
                            if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {
                                position += 2;
                            } else {
                                ++position;
                            }
                            currentLine = '';
                            chunkStart = position;
                            lineStart = position;
                            continue;
                        } // SourceCharacter

                        if (isUnicodeScalarValue(code)) {
                            ++position;
                        } else if (isSupplementaryCodePoint(body, position)) {
                            position += 2;
                        } else {
                            throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character within String: ${printCodePointAt(lexer, position)}.`);
                        }
                    }
                    throw (0, _syntaxError.syntaxError)(lexer.source, position, 'Unterminated string.');
                }
                /**
                 * Reads an alphanumeric + underscore name from the source.
                 *
                 * ```
                 * Name ::
                 *   - NameStart NameContinue* [lookahead != NameContinue]
                 * ```
                 */

                function readName(lexer, start) {
                    const body = lexer.source.body;
                    const bodyLength = body.length;
                    let position = start + 1;
                    while (position < bodyLength) {
                        const code = body.charCodeAt(position);
                        if ((0, _characterClasses.isNameContinue)(code)) {
                            ++position;
                        } else {
                            break;
                        }
                    }
                    return createToken(lexer, _tokenKind.TokenKind.NAME, start, position, body.slice(start, position));
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/location.mjs":
            /*!***********************************************************!*\
              !*** ../../../node_modules/graphql/language/location.mjs ***!
              \***********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getLocation = getLocation;
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                const LineRegExp = /\r\n|[\n\r]/g;
                /**
                 * Represents a location in a Source.
                 */

                /**
                 * Takes a Source and a UTF-8 character offset, and returns the corresponding
                 * line and column as a SourceLocation.
                 */
                function getLocation(source, position) {
                    let lastLineStart = 0;
                    let line = 1;
                    for (const match of source.body.matchAll(LineRegExp)) {
                        typeof match.index === 'number' || (0, _invariant.invariant)(false);
                        if (match.index >= position) {
                            break;
                        }
                        lastLineStart = match.index + match[0].length;
                        line += 1;
                    }
                    return {
                        line,
                        column: position + 1 - lastLineStart
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/parser.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/language/parser.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.Parser = void 0;
                exports.parse = parse;
                exports.parseConstValue = parseConstValue;
                exports.parseType = parseType;
                exports.parseValue = parseValue;
                var _syntaxError = __webpack_require__( /*! ../error/syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs");
                var _ast = __webpack_require__( /*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
                var _directiveLocation = __webpack_require__( /*! ./directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");
                var _kinds = __webpack_require__( /*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _lexer = __webpack_require__( /*! ./lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs");
                var _source = __webpack_require__( /*! ./source.mjs */ "../../../node_modules/graphql/language/source.mjs");
                var _tokenKind = __webpack_require__( /*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs");
                /**
                 * Configuration options to control parser behavior
                 */

                /**
                 * Given a GraphQL source, parses it into a Document.
                 * Throws GraphQLError if a syntax error is encountered.
                 */
                function parse(source, options) {
                    const parser = new Parser(source, options);
                    return parser.parseDocument();
                }
                /**
                 * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for
                 * that value.
                 * Throws GraphQLError if a syntax error is encountered.
                 *
                 * This is useful within tools that operate upon GraphQL Values directly and
                 * in isolation of complete GraphQL documents.
                 *
                 * Consider providing the results to the utility function: valueFromAST().
                 */

                function parseValue(source, options) {
                    const parser = new Parser(source, options);
                    parser.expectToken(_tokenKind.TokenKind.SOF);
                    const value = parser.parseValueLiteral(false);
                    parser.expectToken(_tokenKind.TokenKind.EOF);
                    return value;
                }
                /**
                 * Similar to parseValue(), but raises a parse error if it encounters a
                 * variable. The return type will be a constant value.
                 */

                function parseConstValue(source, options) {
                    const parser = new Parser(source, options);
                    parser.expectToken(_tokenKind.TokenKind.SOF);
                    const value = parser.parseConstValueLiteral();
                    parser.expectToken(_tokenKind.TokenKind.EOF);
                    return value;
                }
                /**
                 * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for
                 * that type.
                 * Throws GraphQLError if a syntax error is encountered.
                 *
                 * This is useful within tools that operate upon GraphQL Types directly and
                 * in isolation of complete GraphQL documents.
                 *
                 * Consider providing the results to the utility function: typeFromAST().
                 */

                function parseType(source, options) {
                    const parser = new Parser(source, options);
                    parser.expectToken(_tokenKind.TokenKind.SOF);
                    const type = parser.parseTypeReference();
                    parser.expectToken(_tokenKind.TokenKind.EOF);
                    return type;
                }
                /**
                 * This class is exported only to assist people in implementing their own parsers
                 * without duplicating too much code and should be used only as last resort for cases
                 * such as experimental syntax or if certain features could not be contributed upstream.
                 *
                 * It is still part of the internal API and is versioned, so any changes to it are never
                 * considered breaking changes. If you still need to support multiple versions of the
                 * library, please use the `versionInfo` variable for version detection.
                 *
                 * @internal
                 */

                class Parser {
                    constructor(source, options = {}) {
                        const sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source);
                        this._lexer = new _lexer.Lexer(sourceObj);
                        this._options = options;
                        this._tokenCounter = 0;
                    }
                    /**
                     * Converts a name lex token into a name parse node.
                     */

                    parseName() {
                        const token = this.expectToken(_tokenKind.TokenKind.NAME);
                        return this.node(token, {
                            kind: _kinds.Kind.NAME,
                            value: token.value
                        });
                    } // Implements the parsing rules in the Document section.

                    /**
                     * Document : Definition+
                     */

                    parseDocument() {
                        return this.node(this._lexer.token, {
                            kind: _kinds.Kind.DOCUMENT,
                            definitions: this.many(_tokenKind.TokenKind.SOF, this.parseDefinition, _tokenKind.TokenKind.EOF)
                        });
                    }
                    /**
                     * Definition :
                     *   - ExecutableDefinition
                     *   - TypeSystemDefinition
                     *   - TypeSystemExtension
                     *
                     * ExecutableDefinition :
                     *   - OperationDefinition
                     *   - FragmentDefinition
                     *
                     * TypeSystemDefinition :
                     *   - SchemaDefinition
                     *   - TypeDefinition
                     *   - DirectiveDefinition
                     *
                     * TypeDefinition :
                     *   - ScalarTypeDefinition
                     *   - ObjectTypeDefinition
                     *   - InterfaceTypeDefinition
                     *   - UnionTypeDefinition
                     *   - EnumTypeDefinition
                     *   - InputObjectTypeDefinition
                     */

                    parseDefinition() {
                        if (this.peek(_tokenKind.TokenKind.BRACE_L)) {
                            return this.parseOperationDefinition();
                        } // Many definitions begin with a description and require a lookahead.

                        const hasDescription = this.peekDescription();
                        const keywordToken = hasDescription ? this._lexer.lookahead() : this._lexer.token;
                        if (keywordToken.kind === _tokenKind.TokenKind.NAME) {
                            switch (keywordToken.value) {
                                case 'schema':
                                    return this.parseSchemaDefinition();
                                case 'scalar':
                                    return this.parseScalarTypeDefinition();
                                case 'type':
                                    return this.parseObjectTypeDefinition();
                                case 'interface':
                                    return this.parseInterfaceTypeDefinition();
                                case 'union':
                                    return this.parseUnionTypeDefinition();
                                case 'enum':
                                    return this.parseEnumTypeDefinition();
                                case 'input':
                                    return this.parseInputObjectTypeDefinition();
                                case 'directive':
                                    return this.parseDirectiveDefinition();
                            }
                            if (hasDescription) {
                                throw (0, _syntaxError.syntaxError)(this._lexer.source, this._lexer.token.start, 'Unexpected description, descriptions are supported only on type definitions.');
                            }
                            switch (keywordToken.value) {
                                case 'query':
                                case 'mutation':
                                case 'subscription':
                                    return this.parseOperationDefinition();
                                case 'fragment':
                                    return this.parseFragmentDefinition();
                                case 'extend':
                                    return this.parseTypeSystemExtension();
                            }
                        }
                        throw this.unexpected(keywordToken);
                    } // Implements the parsing rules in the Operations section.

                    /**
                     * OperationDefinition :
                     *  - SelectionSet
                     *  - OperationType Name? VariableDefinitions? Directives? SelectionSet
                     */

                    parseOperationDefinition() {
                        const start = this._lexer.token;
                        if (this.peek(_tokenKind.TokenKind.BRACE_L)) {
                            return this.node(start, {
                                kind: _kinds.Kind.OPERATION_DEFINITION,
                                operation: _ast.OperationTypeNode.QUERY,
                                name: undefined,
                                variableDefinitions: [],
                                directives: [],
                                selectionSet: this.parseSelectionSet()
                            });
                        }
                        const operation = this.parseOperationType();
                        let name;
                        if (this.peek(_tokenKind.TokenKind.NAME)) {
                            name = this.parseName();
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.OPERATION_DEFINITION,
                            operation,
                            name,
                            variableDefinitions: this.parseVariableDefinitions(),
                            directives: this.parseDirectives(false),
                            selectionSet: this.parseSelectionSet()
                        });
                    }
                    /**
                     * OperationType : one of query mutation subscription
                     */

                    parseOperationType() {
                        const operationToken = this.expectToken(_tokenKind.TokenKind.NAME);
                        switch (operationToken.value) {
                            case 'query':
                                return _ast.OperationTypeNode.QUERY;
                            case 'mutation':
                                return _ast.OperationTypeNode.MUTATION;
                            case 'subscription':
                                return _ast.OperationTypeNode.SUBSCRIPTION;
                        }
                        throw this.unexpected(operationToken);
                    }
                    /**
                     * VariableDefinitions : ( VariableDefinition+ )
                     */

                    parseVariableDefinitions() {
                        return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseVariableDefinition, _tokenKind.TokenKind.PAREN_R);
                    }
                    /**
                     * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
                     */

                    parseVariableDefinition() {
                        return this.node(this._lexer.token, {
                            kind: _kinds.Kind.VARIABLE_DEFINITION,
                            variable: this.parseVariable(),
                            type: (this.expectToken(_tokenKind.TokenKind.COLON), this.parseTypeReference()),
                            defaultValue: this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.parseConstValueLiteral() : undefined,
                            directives: this.parseConstDirectives()
                        });
                    }
                    /**
                     * Variable : $ Name
                     */

                    parseVariable() {
                        const start = this._lexer.token;
                        this.expectToken(_tokenKind.TokenKind.DOLLAR);
                        return this.node(start, {
                            kind: _kinds.Kind.VARIABLE,
                            name: this.parseName()
                        });
                    }
                    /**
                     * ```
                     * SelectionSet : { Selection+ }
                     * ```
                     */

                    parseSelectionSet() {
                        return this.node(this._lexer.token, {
                            kind: _kinds.Kind.SELECTION_SET,
                            selections: this.many(_tokenKind.TokenKind.BRACE_L, this.parseSelection, _tokenKind.TokenKind.BRACE_R)
                        });
                    }
                    /**
                     * Selection :
                     *   - Field
                     *   - FragmentSpread
                     *   - InlineFragment
                     */

                    parseSelection() {
                        return this.peek(_tokenKind.TokenKind.SPREAD) ? this.parseFragment() : this.parseField();
                    }
                    /**
                     * Field : Alias? Name Arguments? Directives? SelectionSet?
                     *
                     * Alias : Name :
                     */

                    parseField() {
                        const start = this._lexer.token;
                        const nameOrAlias = this.parseName();
                        let alias;
                        let name;
                        if (this.expectOptionalToken(_tokenKind.TokenKind.COLON)) {
                            alias = nameOrAlias;
                            name = this.parseName();
                        } else {
                            name = nameOrAlias;
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.FIELD,
                            alias,
                            name,
                            arguments: this.parseArguments(false),
                            directives: this.parseDirectives(false),
                            selectionSet: this.peek(_tokenKind.TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined
                        });
                    }
                    /**
                     * Arguments[Const] : ( Argument[?Const]+ )
                     */

                    parseArguments(isConst) {
                        const item = isConst ? this.parseConstArgument : this.parseArgument;
                        return this.optionalMany(_tokenKind.TokenKind.PAREN_L, item, _tokenKind.TokenKind.PAREN_R);
                    }
                    /**
                     * Argument[Const] : Name : Value[?Const]
                     */

                    parseArgument(isConst = false) {
                        const start = this._lexer.token;
                        const name = this.parseName();
                        this.expectToken(_tokenKind.TokenKind.COLON);
                        return this.node(start, {
                            kind: _kinds.Kind.ARGUMENT,
                            name,
                            value: this.parseValueLiteral(isConst)
                        });
                    }
                    parseConstArgument() {
                        return this.parseArgument(true);
                    } // Implements the parsing rules in the Fragments section.

                    /**
                     * Corresponds to both FragmentSpread and InlineFragment in the spec.
                     *
                     * FragmentSpread : ... FragmentName Directives?
                     *
                     * InlineFragment : ... TypeCondition? Directives? SelectionSet
                     */

                    parseFragment() {
                        const start = this._lexer.token;
                        this.expectToken(_tokenKind.TokenKind.SPREAD);
                        const hasTypeCondition = this.expectOptionalKeyword('on');
                        if (!hasTypeCondition && this.peek(_tokenKind.TokenKind.NAME)) {
                            return this.node(start, {
                                kind: _kinds.Kind.FRAGMENT_SPREAD,
                                name: this.parseFragmentName(),
                                directives: this.parseDirectives(false)
                            });
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.INLINE_FRAGMENT,
                            typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,
                            directives: this.parseDirectives(false),
                            selectionSet: this.parseSelectionSet()
                        });
                    }
                    /**
                     * FragmentDefinition :
                     *   - fragment FragmentName on TypeCondition Directives? SelectionSet
                     *
                     * TypeCondition : NamedType
                     */

                    parseFragmentDefinition() {
                        const start = this._lexer.token;
                        this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes
                        // the grammar of FragmentDefinition:
                        //   - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet

                        if (this._options.allowLegacyFragmentVariables === true) {
                            return this.node(start, {
                                kind: _kinds.Kind.FRAGMENT_DEFINITION,
                                name: this.parseFragmentName(),
                                variableDefinitions: this.parseVariableDefinitions(),
                                typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
                                directives: this.parseDirectives(false),
                                selectionSet: this.parseSelectionSet()
                            });
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.FRAGMENT_DEFINITION,
                            name: this.parseFragmentName(),
                            typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
                            directives: this.parseDirectives(false),
                            selectionSet: this.parseSelectionSet()
                        });
                    }
                    /**
                     * FragmentName : Name but not `on`
                     */

                    parseFragmentName() {
                        if (this._lexer.token.value === 'on') {
                            throw this.unexpected();
                        }
                        return this.parseName();
                    } // Implements the parsing rules in the Values section.

                    /**
                     * Value[Const] :
                     *   - [~Const] Variable
                     *   - IntValue
                     *   - FloatValue
                     *   - StringValue
                     *   - BooleanValue
                     *   - NullValue
                     *   - EnumValue
                     *   - ListValue[?Const]
                     *   - ObjectValue[?Const]
                     *
                     * BooleanValue : one of `true` `false`
                     *
                     * NullValue : `null`
                     *
                     * EnumValue : Name but not `true`, `false` or `null`
                     */

                    parseValueLiteral(isConst) {
                        const token = this._lexer.token;
                        switch (token.kind) {
                            case _tokenKind.TokenKind.BRACKET_L:
                                return this.parseList(isConst);
                            case _tokenKind.TokenKind.BRACE_L:
                                return this.parseObject(isConst);
                            case _tokenKind.TokenKind.INT:
                                this.advanceLexer();
                                return this.node(token, {
                                    kind: _kinds.Kind.INT,
                                    value: token.value
                                });
                            case _tokenKind.TokenKind.FLOAT:
                                this.advanceLexer();
                                return this.node(token, {
                                    kind: _kinds.Kind.FLOAT,
                                    value: token.value
                                });
                            case _tokenKind.TokenKind.STRING:
                            case _tokenKind.TokenKind.BLOCK_STRING:
                                return this.parseStringLiteral();
                            case _tokenKind.TokenKind.NAME:
                                this.advanceLexer();
                                switch (token.value) {
                                    case 'true':
                                        return this.node(token, {
                                            kind: _kinds.Kind.BOOLEAN,
                                            value: true
                                        });
                                    case 'false':
                                        return this.node(token, {
                                            kind: _kinds.Kind.BOOLEAN,
                                            value: false
                                        });
                                    case 'null':
                                        return this.node(token, {
                                            kind: _kinds.Kind.NULL
                                        });
                                    default:
                                        return this.node(token, {
                                            kind: _kinds.Kind.ENUM,
                                            value: token.value
                                        });
                                }
                            case _tokenKind.TokenKind.DOLLAR:
                                if (isConst) {
                                    this.expectToken(_tokenKind.TokenKind.DOLLAR);
                                    if (this._lexer.token.kind === _tokenKind.TokenKind.NAME) {
                                        const varName = this._lexer.token.value;
                                        throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Unexpected variable "$${varName}" in constant value.`);
                                    } else {
                                        throw this.unexpected(token);
                                    }
                                }
                                return this.parseVariable();
                            default:
                                throw this.unexpected();
                        }
                    }
                    parseConstValueLiteral() {
                        return this.parseValueLiteral(true);
                    }
                    parseStringLiteral() {
                        const token = this._lexer.token;
                        this.advanceLexer();
                        return this.node(token, {
                            kind: _kinds.Kind.STRING,
                            value: token.value,
                            block: token.kind === _tokenKind.TokenKind.BLOCK_STRING
                        });
                    }
                    /**
                     * ListValue[Const] :
                     *   - [ ]
                     *   - [ Value[?Const]+ ]
                     */

                    parseList(isConst) {
                        const item = () => this.parseValueLiteral(isConst);
                        return this.node(this._lexer.token, {
                            kind: _kinds.Kind.LIST,
                            values: this.any(_tokenKind.TokenKind.BRACKET_L, item, _tokenKind.TokenKind.BRACKET_R)
                        });
                    }
                    /**
                     * ```
                     * ObjectValue[Const] :
                     *   - { }
                     *   - { ObjectField[?Const]+ }
                     * ```
                     */

                    parseObject(isConst) {
                        const item = () => this.parseObjectField(isConst);
                        return this.node(this._lexer.token, {
                            kind: _kinds.Kind.OBJECT,
                            fields: this.any(_tokenKind.TokenKind.BRACE_L, item, _tokenKind.TokenKind.BRACE_R)
                        });
                    }
                    /**
                     * ObjectField[Const] : Name : Value[?Const]
                     */

                    parseObjectField(isConst) {
                        const start = this._lexer.token;
                        const name = this.parseName();
                        this.expectToken(_tokenKind.TokenKind.COLON);
                        return this.node(start, {
                            kind: _kinds.Kind.OBJECT_FIELD,
                            name,
                            value: this.parseValueLiteral(isConst)
                        });
                    } // Implements the parsing rules in the Directives section.

                    /**
                     * Directives[Const] : Directive[?Const]+
                     */

                    parseDirectives(isConst) {
                        const directives = [];
                        while (this.peek(_tokenKind.TokenKind.AT)) {
                            directives.push(this.parseDirective(isConst));
                        }
                        return directives;
                    }
                    parseConstDirectives() {
                        return this.parseDirectives(true);
                    }
                    /**
                     * ```
                     * Directive[Const] : @ Name Arguments[?Const]?
                     * ```
                     */

                    parseDirective(isConst) {
                        const start = this._lexer.token;
                        this.expectToken(_tokenKind.TokenKind.AT);
                        return this.node(start, {
                            kind: _kinds.Kind.DIRECTIVE,
                            name: this.parseName(),
                            arguments: this.parseArguments(isConst)
                        });
                    } // Implements the parsing rules in the Types section.

                    /**
                     * Type :
                     *   - NamedType
                     *   - ListType
                     *   - NonNullType
                     */

                    parseTypeReference() {
                        const start = this._lexer.token;
                        let type;
                        if (this.expectOptionalToken(_tokenKind.TokenKind.BRACKET_L)) {
                            const innerType = this.parseTypeReference();
                            this.expectToken(_tokenKind.TokenKind.BRACKET_R);
                            type = this.node(start, {
                                kind: _kinds.Kind.LIST_TYPE,
                                type: innerType
                            });
                        } else {
                            type = this.parseNamedType();
                        }
                        if (this.expectOptionalToken(_tokenKind.TokenKind.BANG)) {
                            return this.node(start, {
                                kind: _kinds.Kind.NON_NULL_TYPE,
                                type
                            });
                        }
                        return type;
                    }
                    /**
                     * NamedType : Name
                     */

                    parseNamedType() {
                        return this.node(this._lexer.token, {
                            kind: _kinds.Kind.NAMED_TYPE,
                            name: this.parseName()
                        });
                    } // Implements the parsing rules in the Type Definition section.

                    peekDescription() {
                        return this.peek(_tokenKind.TokenKind.STRING) || this.peek(_tokenKind.TokenKind.BLOCK_STRING);
                    }
                    /**
                     * Description : StringValue
                     */

                    parseDescription() {
                        if (this.peekDescription()) {
                            return this.parseStringLiteral();
                        }
                    }
                    /**
                     * ```
                     * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
                     * ```
                     */

                    parseSchemaDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        this.expectKeyword('schema');
                        const directives = this.parseConstDirectives();
                        const operationTypes = this.many(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R);
                        return this.node(start, {
                            kind: _kinds.Kind.SCHEMA_DEFINITION,
                            description,
                            directives,
                            operationTypes
                        });
                    }
                    /**
                     * OperationTypeDefinition : OperationType : NamedType
                     */

                    parseOperationTypeDefinition() {
                        const start = this._lexer.token;
                        const operation = this.parseOperationType();
                        this.expectToken(_tokenKind.TokenKind.COLON);
                        const type = this.parseNamedType();
                        return this.node(start, {
                            kind: _kinds.Kind.OPERATION_TYPE_DEFINITION,
                            operation,
                            type
                        });
                    }
                    /**
                     * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
                     */

                    parseScalarTypeDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        this.expectKeyword('scalar');
                        const name = this.parseName();
                        const directives = this.parseConstDirectives();
                        return this.node(start, {
                            kind: _kinds.Kind.SCALAR_TYPE_DEFINITION,
                            description,
                            name,
                            directives
                        });
                    }
                    /**
                     * ObjectTypeDefinition :
                     *   Description?
                     *   type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
                     */

                    parseObjectTypeDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        this.expectKeyword('type');
                        const name = this.parseName();
                        const interfaces = this.parseImplementsInterfaces();
                        const directives = this.parseConstDirectives();
                        const fields = this.parseFieldsDefinition();
                        return this.node(start, {
                            kind: _kinds.Kind.OBJECT_TYPE_DEFINITION,
                            description,
                            name,
                            interfaces,
                            directives,
                            fields
                        });
                    }
                    /**
                     * ImplementsInterfaces :
                     *   - implements `&`? NamedType
                     *   - ImplementsInterfaces & NamedType
                     */

                    parseImplementsInterfaces() {
                        return this.expectOptionalKeyword('implements') ? this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType) : [];
                    }
                    /**
                     * ```
                     * FieldsDefinition : { FieldDefinition+ }
                     * ```
                     */

                    parseFieldsDefinition() {
                        return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseFieldDefinition, _tokenKind.TokenKind.BRACE_R);
                    }
                    /**
                     * FieldDefinition :
                     *   - Description? Name ArgumentsDefinition? : Type Directives[Const]?
                     */

                    parseFieldDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        const name = this.parseName();
                        const args = this.parseArgumentDefs();
                        this.expectToken(_tokenKind.TokenKind.COLON);
                        const type = this.parseTypeReference();
                        const directives = this.parseConstDirectives();
                        return this.node(start, {
                            kind: _kinds.Kind.FIELD_DEFINITION,
                            description,
                            name,
                            arguments: args,
                            type,
                            directives
                        });
                    }
                    /**
                     * ArgumentsDefinition : ( InputValueDefinition+ )
                     */

                    parseArgumentDefs() {
                        return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseInputValueDef, _tokenKind.TokenKind.PAREN_R);
                    }
                    /**
                     * InputValueDefinition :
                     *   - Description? Name : Type DefaultValue? Directives[Const]?
                     */

                    parseInputValueDef() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        const name = this.parseName();
                        this.expectToken(_tokenKind.TokenKind.COLON);
                        const type = this.parseTypeReference();
                        let defaultValue;
                        if (this.expectOptionalToken(_tokenKind.TokenKind.EQUALS)) {
                            defaultValue = this.parseConstValueLiteral();
                        }
                        const directives = this.parseConstDirectives();
                        return this.node(start, {
                            kind: _kinds.Kind.INPUT_VALUE_DEFINITION,
                            description,
                            name,
                            type,
                            defaultValue,
                            directives
                        });
                    }
                    /**
                     * InterfaceTypeDefinition :
                     *   - Description? interface Name Directives[Const]? FieldsDefinition?
                     */

                    parseInterfaceTypeDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        this.expectKeyword('interface');
                        const name = this.parseName();
                        const interfaces = this.parseImplementsInterfaces();
                        const directives = this.parseConstDirectives();
                        const fields = this.parseFieldsDefinition();
                        return this.node(start, {
                            kind: _kinds.Kind.INTERFACE_TYPE_DEFINITION,
                            description,
                            name,
                            interfaces,
                            directives,
                            fields
                        });
                    }
                    /**
                     * UnionTypeDefinition :
                     *   - Description? union Name Directives[Const]? UnionMemberTypes?
                     */

                    parseUnionTypeDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        this.expectKeyword('union');
                        const name = this.parseName();
                        const directives = this.parseConstDirectives();
                        const types = this.parseUnionMemberTypes();
                        return this.node(start, {
                            kind: _kinds.Kind.UNION_TYPE_DEFINITION,
                            description,
                            name,
                            directives,
                            types
                        });
                    }
                    /**
                     * UnionMemberTypes :
                     *   - = `|`? NamedType
                     *   - UnionMemberTypes | NamedType
                     */

                    parseUnionMemberTypes() {
                        return this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseNamedType) : [];
                    }
                    /**
                     * EnumTypeDefinition :
                     *   - Description? enum Name Directives[Const]? EnumValuesDefinition?
                     */

                    parseEnumTypeDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        this.expectKeyword('enum');
                        const name = this.parseName();
                        const directives = this.parseConstDirectives();
                        const values = this.parseEnumValuesDefinition();
                        return this.node(start, {
                            kind: _kinds.Kind.ENUM_TYPE_DEFINITION,
                            description,
                            name,
                            directives,
                            values
                        });
                    }
                    /**
                     * ```
                     * EnumValuesDefinition : { EnumValueDefinition+ }
                     * ```
                     */

                    parseEnumValuesDefinition() {
                        return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseEnumValueDefinition, _tokenKind.TokenKind.BRACE_R);
                    }
                    /**
                     * EnumValueDefinition : Description? EnumValue Directives[Const]?
                     */

                    parseEnumValueDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        const name = this.parseEnumValueName();
                        const directives = this.parseConstDirectives();
                        return this.node(start, {
                            kind: _kinds.Kind.ENUM_VALUE_DEFINITION,
                            description,
                            name,
                            directives
                        });
                    }
                    /**
                     * EnumValue : Name but not `true`, `false` or `null`
                     */

                    parseEnumValueName() {
                        if (this._lexer.token.value === 'true' || this._lexer.token.value === 'false' || this._lexer.token.value === 'null') {
                            throw (0, _syntaxError.syntaxError)(this._lexer.source, this._lexer.token.start, `${getTokenDesc(this._lexer.token)} is reserved and cannot be used for an enum value.`);
                        }
                        return this.parseName();
                    }
                    /**
                     * InputObjectTypeDefinition :
                     *   - Description? input Name Directives[Const]? InputFieldsDefinition?
                     */

                    parseInputObjectTypeDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        this.expectKeyword('input');
                        const name = this.parseName();
                        const directives = this.parseConstDirectives();
                        const fields = this.parseInputFieldsDefinition();
                        return this.node(start, {
                            kind: _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION,
                            description,
                            name,
                            directives,
                            fields
                        });
                    }
                    /**
                     * ```
                     * InputFieldsDefinition : { InputValueDefinition+ }
                     * ```
                     */

                    parseInputFieldsDefinition() {
                        return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseInputValueDef, _tokenKind.TokenKind.BRACE_R);
                    }
                    /**
                     * TypeSystemExtension :
                     *   - SchemaExtension
                     *   - TypeExtension
                     *
                     * TypeExtension :
                     *   - ScalarTypeExtension
                     *   - ObjectTypeExtension
                     *   - InterfaceTypeExtension
                     *   - UnionTypeExtension
                     *   - EnumTypeExtension
                     *   - InputObjectTypeDefinition
                     */

                    parseTypeSystemExtension() {
                        const keywordToken = this._lexer.lookahead();
                        if (keywordToken.kind === _tokenKind.TokenKind.NAME) {
                            switch (keywordToken.value) {
                                case 'schema':
                                    return this.parseSchemaExtension();
                                case 'scalar':
                                    return this.parseScalarTypeExtension();
                                case 'type':
                                    return this.parseObjectTypeExtension();
                                case 'interface':
                                    return this.parseInterfaceTypeExtension();
                                case 'union':
                                    return this.parseUnionTypeExtension();
                                case 'enum':
                                    return this.parseEnumTypeExtension();
                                case 'input':
                                    return this.parseInputObjectTypeExtension();
                            }
                        }
                        throw this.unexpected(keywordToken);
                    }
                    /**
                     * ```
                     * SchemaExtension :
                     *  - extend schema Directives[Const]? { OperationTypeDefinition+ }
                     *  - extend schema Directives[Const]
                     * ```
                     */

                    parseSchemaExtension() {
                        const start = this._lexer.token;
                        this.expectKeyword('extend');
                        this.expectKeyword('schema');
                        const directives = this.parseConstDirectives();
                        const operationTypes = this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R);
                        if (directives.length === 0 && operationTypes.length === 0) {
                            throw this.unexpected();
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.SCHEMA_EXTENSION,
                            directives,
                            operationTypes
                        });
                    }
                    /**
                     * ScalarTypeExtension :
                     *   - extend scalar Name Directives[Const]
                     */

                    parseScalarTypeExtension() {
                        const start = this._lexer.token;
                        this.expectKeyword('extend');
                        this.expectKeyword('scalar');
                        const name = this.parseName();
                        const directives = this.parseConstDirectives();
                        if (directives.length === 0) {
                            throw this.unexpected();
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.SCALAR_TYPE_EXTENSION,
                            name,
                            directives
                        });
                    }
                    /**
                     * ObjectTypeExtension :
                     *  - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
                     *  - extend type Name ImplementsInterfaces? Directives[Const]
                     *  - extend type Name ImplementsInterfaces
                     */

                    parseObjectTypeExtension() {
                        const start = this._lexer.token;
                        this.expectKeyword('extend');
                        this.expectKeyword('type');
                        const name = this.parseName();
                        const interfaces = this.parseImplementsInterfaces();
                        const directives = this.parseConstDirectives();
                        const fields = this.parseFieldsDefinition();
                        if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
                            throw this.unexpected();
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.OBJECT_TYPE_EXTENSION,
                            name,
                            interfaces,
                            directives,
                            fields
                        });
                    }
                    /**
                     * InterfaceTypeExtension :
                     *  - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
                     *  - extend interface Name ImplementsInterfaces? Directives[Const]
                     *  - extend interface Name ImplementsInterfaces
                     */

                    parseInterfaceTypeExtension() {
                        const start = this._lexer.token;
                        this.expectKeyword('extend');
                        this.expectKeyword('interface');
                        const name = this.parseName();
                        const interfaces = this.parseImplementsInterfaces();
                        const directives = this.parseConstDirectives();
                        const fields = this.parseFieldsDefinition();
                        if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
                            throw this.unexpected();
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.INTERFACE_TYPE_EXTENSION,
                            name,
                            interfaces,
                            directives,
                            fields
                        });
                    }
                    /**
                     * UnionTypeExtension :
                     *   - extend union Name Directives[Const]? UnionMemberTypes
                     *   - extend union Name Directives[Const]
                     */

                    parseUnionTypeExtension() {
                        const start = this._lexer.token;
                        this.expectKeyword('extend');
                        this.expectKeyword('union');
                        const name = this.parseName();
                        const directives = this.parseConstDirectives();
                        const types = this.parseUnionMemberTypes();
                        if (directives.length === 0 && types.length === 0) {
                            throw this.unexpected();
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.UNION_TYPE_EXTENSION,
                            name,
                            directives,
                            types
                        });
                    }
                    /**
                     * EnumTypeExtension :
                     *   - extend enum Name Directives[Const]? EnumValuesDefinition
                     *   - extend enum Name Directives[Const]
                     */

                    parseEnumTypeExtension() {
                        const start = this._lexer.token;
                        this.expectKeyword('extend');
                        this.expectKeyword('enum');
                        const name = this.parseName();
                        const directives = this.parseConstDirectives();
                        const values = this.parseEnumValuesDefinition();
                        if (directives.length === 0 && values.length === 0) {
                            throw this.unexpected();
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.ENUM_TYPE_EXTENSION,
                            name,
                            directives,
                            values
                        });
                    }
                    /**
                     * InputObjectTypeExtension :
                     *   - extend input Name Directives[Const]? InputFieldsDefinition
                     *   - extend input Name Directives[Const]
                     */

                    parseInputObjectTypeExtension() {
                        const start = this._lexer.token;
                        this.expectKeyword('extend');
                        this.expectKeyword('input');
                        const name = this.parseName();
                        const directives = this.parseConstDirectives();
                        const fields = this.parseInputFieldsDefinition();
                        if (directives.length === 0 && fields.length === 0) {
                            throw this.unexpected();
                        }
                        return this.node(start, {
                            kind: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION,
                            name,
                            directives,
                            fields
                        });
                    }
                    /**
                     * ```
                     * DirectiveDefinition :
                     *   - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
                     * ```
                     */

                    parseDirectiveDefinition() {
                        const start = this._lexer.token;
                        const description = this.parseDescription();
                        this.expectKeyword('directive');
                        this.expectToken(_tokenKind.TokenKind.AT);
                        const name = this.parseName();
                        const args = this.parseArgumentDefs();
                        const repeatable = this.expectOptionalKeyword('repeatable');
                        this.expectKeyword('on');
                        const locations = this.parseDirectiveLocations();
                        return this.node(start, {
                            kind: _kinds.Kind.DIRECTIVE_DEFINITION,
                            description,
                            name,
                            arguments: args,
                            repeatable,
                            locations
                        });
                    }
                    /**
                     * DirectiveLocations :
                     *   - `|`? DirectiveLocation
                     *   - DirectiveLocations | DirectiveLocation
                     */

                    parseDirectiveLocations() {
                        return this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseDirectiveLocation);
                    }
                    /*
                     * DirectiveLocation :
                     *   - ExecutableDirectiveLocation
                     *   - TypeSystemDirectiveLocation
                     *
                     * ExecutableDirectiveLocation : one of
                     *   `QUERY`
                     *   `MUTATION`
                     *   `SUBSCRIPTION`
                     *   `FIELD`
                     *   `FRAGMENT_DEFINITION`
                     *   `FRAGMENT_SPREAD`
                     *   `INLINE_FRAGMENT`
                     *
                     * TypeSystemDirectiveLocation : one of
                     *   `SCHEMA`
                     *   `SCALAR`
                     *   `OBJECT`
                     *   `FIELD_DEFINITION`
                     *   `ARGUMENT_DEFINITION`
                     *   `INTERFACE`
                     *   `UNION`
                     *   `ENUM`
                     *   `ENUM_VALUE`
                     *   `INPUT_OBJECT`
                     *   `INPUT_FIELD_DEFINITION`
                     */

                    parseDirectiveLocation() {
                        const start = this._lexer.token;
                        const name = this.parseName();
                        if (Object.prototype.hasOwnProperty.call(_directiveLocation.DirectiveLocation, name.value)) {
                            return name;
                        }
                        throw this.unexpected(start);
                    } // Core parsing utility functions

                    /**
                     * Returns a node that, if configured to do so, sets a "loc" field as a
                     * location object, used to identify the place in the source that created a
                     * given parsed object.
                     */

                    node(startToken, node) {
                        if (this._options.noLocation !== true) {
                            node.loc = new _ast.Location(startToken, this._lexer.lastToken, this._lexer.source);
                        }
                        return node;
                    }
                    /**
                     * Determines if the next token is of a given kind
                     */

                    peek(kind) {
                        return this._lexer.token.kind === kind;
                    }
                    /**
                     * If the next token is of the given kind, return that token after advancing the lexer.
                     * Otherwise, do not change the parser state and throw an error.
                     */

                    expectToken(kind) {
                        const token = this._lexer.token;
                        if (token.kind === kind) {
                            this.advanceLexer();
                            return token;
                        }
                        throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`);
                    }
                    /**
                     * If the next token is of the given kind, return "true" after advancing the lexer.
                     * Otherwise, do not change the parser state and return "false".
                     */

                    expectOptionalToken(kind) {
                        const token = this._lexer.token;
                        if (token.kind === kind) {
                            this.advanceLexer();
                            return true;
                        }
                        return false;
                    }
                    /**
                     * If the next token is a given keyword, advance the lexer.
                     * Otherwise, do not change the parser state and throw an error.
                     */

                    expectKeyword(value) {
                        const token = this._lexer.token;
                        if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) {
                            this.advanceLexer();
                        } else {
                            throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Expected "${value}", found ${getTokenDesc(token)}.`);
                        }
                    }
                    /**
                     * If the next token is a given keyword, return "true" after advancing the lexer.
                     * Otherwise, do not change the parser state and return "false".
                     */

                    expectOptionalKeyword(value) {
                        const token = this._lexer.token;
                        if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) {
                            this.advanceLexer();
                            return true;
                        }
                        return false;
                    }
                    /**
                     * Helper function for creating an error when an unexpected lexed token is encountered.
                     */

                    unexpected(atToken) {
                        const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;
                        return (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Unexpected ${getTokenDesc(token)}.`);
                    }
                    /**
                     * Returns a possibly empty list of parse nodes, determined by the parseFn.
                     * This list begins with a lex token of openKind and ends with a lex token of closeKind.
                     * Advances the parser to the next lex token after the closing token.
                     */

                    any(openKind, parseFn, closeKind) {
                        this.expectToken(openKind);
                        const nodes = [];
                        while (!this.expectOptionalToken(closeKind)) {
                            nodes.push(parseFn.call(this));
                        }
                        return nodes;
                    }
                    /**
                     * Returns a list of parse nodes, determined by the parseFn.
                     * It can be empty only if open token is missing otherwise it will always return non-empty list
                     * that begins with a lex token of openKind and ends with a lex token of closeKind.
                     * Advances the parser to the next lex token after the closing token.
                     */

                    optionalMany(openKind, parseFn, closeKind) {
                        if (this.expectOptionalToken(openKind)) {
                            const nodes = [];
                            do {
                                nodes.push(parseFn.call(this));
                            } while (!this.expectOptionalToken(closeKind));
                            return nodes;
                        }
                        return [];
                    }
                    /**
                     * Returns a non-empty list of parse nodes, determined by the parseFn.
                     * This list begins with a lex token of openKind and ends with a lex token of closeKind.
                     * Advances the parser to the next lex token after the closing token.
                     */

                    many(openKind, parseFn, closeKind) {
                        this.expectToken(openKind);
                        const nodes = [];
                        do {
                            nodes.push(parseFn.call(this));
                        } while (!this.expectOptionalToken(closeKind));
                        return nodes;
                    }
                    /**
                     * Returns a non-empty list of parse nodes, determined by the parseFn.
                     * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
                     * Advances the parser to the next lex token after last item in the list.
                     */

                    delimitedMany(delimiterKind, parseFn) {
                        this.expectOptionalToken(delimiterKind);
                        const nodes = [];
                        do {
                            nodes.push(parseFn.call(this));
                        } while (this.expectOptionalToken(delimiterKind));
                        return nodes;
                    }
                    advanceLexer() {
                        const {
                            maxTokens
                        } = this._options;
                        const token = this._lexer.advance();
                        if (maxTokens !== undefined && token.kind !== _tokenKind.TokenKind.EOF) {
                            ++this._tokenCounter;
                            if (this._tokenCounter > maxTokens) {
                                throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Document contains more that ${maxTokens} tokens. Parsing aborted.`);
                            }
                        }
                    }
                }
                /**
                 * A helper function to describe a token as a string for debugging.
                 */
                exports.Parser = Parser;

                function getTokenDesc(token) {
                    const value = token.value;
                    return getTokenKindDesc(token.kind) + (value != null ? ` "${value}"` : '');
                }
                /**
                 * A helper function to describe a token kind as a string for debugging.
                 */

                function getTokenKindDesc(kind) {
                    return (0, _lexer.isPunctuatorTokenKind)(kind) ? `"${kind}"` : kind;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/predicates.mjs":
            /*!*************************************************************!*\
              !*** ../../../node_modules/graphql/language/predicates.mjs ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isConstValueNode = isConstValueNode;
                exports.isDefinitionNode = isDefinitionNode;
                exports.isExecutableDefinitionNode = isExecutableDefinitionNode;
                exports.isSelectionNode = isSelectionNode;
                exports.isTypeDefinitionNode = isTypeDefinitionNode;
                exports.isTypeExtensionNode = isTypeExtensionNode;
                exports.isTypeNode = isTypeNode;
                exports.isTypeSystemDefinitionNode = isTypeSystemDefinitionNode;
                exports.isTypeSystemExtensionNode = isTypeSystemExtensionNode;
                exports.isValueNode = isValueNode;
                var _kinds = __webpack_require__( /*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");

                function isDefinitionNode(node) {
                    return isExecutableDefinitionNode(node) || isTypeSystemDefinitionNode(node) || isTypeSystemExtensionNode(node);
                }

                function isExecutableDefinitionNode(node) {
                    return node.kind === _kinds.Kind.OPERATION_DEFINITION || node.kind === _kinds.Kind.FRAGMENT_DEFINITION;
                }

                function isSelectionNode(node) {
                    return node.kind === _kinds.Kind.FIELD || node.kind === _kinds.Kind.FRAGMENT_SPREAD || node.kind === _kinds.Kind.INLINE_FRAGMENT;
                }

                function isValueNode(node) {
                    return node.kind === _kinds.Kind.VARIABLE || node.kind === _kinds.Kind.INT || node.kind === _kinds.Kind.FLOAT || node.kind === _kinds.Kind.STRING || node.kind === _kinds.Kind.BOOLEAN || node.kind === _kinds.Kind.NULL || node.kind === _kinds.Kind.ENUM || node.kind === _kinds.Kind.LIST || node.kind === _kinds.Kind.OBJECT;
                }

                function isConstValueNode(node) {
                    return isValueNode(node) && (node.kind === _kinds.Kind.LIST ? node.values.some(isConstValueNode) : node.kind === _kinds.Kind.OBJECT ? node.fields.some(field => isConstValueNode(field.value)) : node.kind !== _kinds.Kind.VARIABLE);
                }

                function isTypeNode(node) {
                    return node.kind === _kinds.Kind.NAMED_TYPE || node.kind === _kinds.Kind.LIST_TYPE || node.kind === _kinds.Kind.NON_NULL_TYPE;
                }

                function isTypeSystemDefinitionNode(node) {
                    return node.kind === _kinds.Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === _kinds.Kind.DIRECTIVE_DEFINITION;
                }

                function isTypeDefinitionNode(node) {
                    return node.kind === _kinds.Kind.SCALAR_TYPE_DEFINITION || node.kind === _kinds.Kind.OBJECT_TYPE_DEFINITION || node.kind === _kinds.Kind.INTERFACE_TYPE_DEFINITION || node.kind === _kinds.Kind.UNION_TYPE_DEFINITION || node.kind === _kinds.Kind.ENUM_TYPE_DEFINITION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION;
                }

                function isTypeSystemExtensionNode(node) {
                    return node.kind === _kinds.Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node);
                }

                function isTypeExtensionNode(node) {
                    return node.kind === _kinds.Kind.SCALAR_TYPE_EXTENSION || node.kind === _kinds.Kind.OBJECT_TYPE_EXTENSION || node.kind === _kinds.Kind.INTERFACE_TYPE_EXTENSION || node.kind === _kinds.Kind.UNION_TYPE_EXTENSION || node.kind === _kinds.Kind.ENUM_TYPE_EXTENSION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/printLocation.mjs":
            /*!****************************************************************!*\
              !*** ../../../node_modules/graphql/language/printLocation.mjs ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.printLocation = printLocation;
                exports.printSourceLocation = printSourceLocation;
                var _location = __webpack_require__( /*! ./location.mjs */ "../../../node_modules/graphql/language/location.mjs");
                /**
                 * Render a helpful description of the location in the GraphQL Source document.
                 */
                function printLocation(location) {
                    return printSourceLocation(location.source, (0, _location.getLocation)(location.source, location.start));
                }
                /**
                 * Render a helpful description of the location in the GraphQL Source document.
                 */

                function printSourceLocation(source, sourceLocation) {
                    const firstLineColumnOffset = source.locationOffset.column - 1;
                    const body = ''.padStart(firstLineColumnOffset) + source.body;
                    const lineIndex = sourceLocation.line - 1;
                    const lineOffset = source.locationOffset.line - 1;
                    const lineNum = sourceLocation.line + lineOffset;
                    const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;
                    const columnNum = sourceLocation.column + columnOffset;
                    const locationStr = `${source.name}:${lineNum}:${columnNum}\n`;
                    const lines = body.split(/\r\n|[\n\r]/g);
                    const locationLine = lines[lineIndex]; // Special case for minified documents

                    if (locationLine.length > 120) {
                        const subLineIndex = Math.floor(columnNum / 80);
                        const subLineColumnNum = columnNum % 80;
                        const subLines = [];
                        for (let i = 0; i < locationLine.length; i += 80) {
                            subLines.push(locationLine.slice(i, i + 80));
                        }
                        return locationStr + printPrefixedLines([
                            [`${lineNum} |`, subLines[0]], ...subLines.slice(1, subLineIndex + 1).map(subLine => ['|', subLine]), ['|', '^'.padStart(subLineColumnNum)],
                            ['|', subLines[subLineIndex + 1]]
                        ]);
                    }
                    return locationStr + printPrefixedLines([
                        // Lines specified like this: ["prefix", "string"],
                        [`${lineNum - 1} |`, lines[lineIndex - 1]],
                        [`${lineNum} |`, locationLine],
                        ['|', '^'.padStart(columnNum)],
                        [`${lineNum + 1} |`, lines[lineIndex + 1]]
                    ]);
                }

                function printPrefixedLines(lines) {
                    const existingLines = lines.filter(([_, line]) => line !== undefined);
                    const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
                    return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : '')).join('\n');
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/printString.mjs":
            /*!**************************************************************!*\
              !*** ../../../node_modules/graphql/language/printString.mjs ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.printString = printString;
                /**
                 * Prints a string as a GraphQL StringValue literal. Replaces control characters
                 * and excluded characters (" U+0022 and \\ U+005C) with escape sequences.
                 */
                function printString(str) {
                    return `"${str.replace(escapedRegExp, escapedReplacer)}"`;
                } // eslint-disable-next-line no-control-regex

                const escapedRegExp = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;

                function escapedReplacer(str) {
                    return escapeSequences[str.charCodeAt(0)];
                } // prettier-ignore

                const escapeSequences = ['\\u0000', '\\u0001', '\\u0002', '\\u0003', '\\u0004', '\\u0005', '\\u0006', '\\u0007', '\\b', '\\t', '\\n', '\\u000B', '\\f', '\\r', '\\u000E', '\\u000F', '\\u0010', '\\u0011', '\\u0012', '\\u0013', '\\u0014', '\\u0015', '\\u0016', '\\u0017', '\\u0018', '\\u0019', '\\u001A', '\\u001B', '\\u001C', '\\u001D', '\\u001E', '\\u001F', '', '', '\\"', '', '', '', '', '', '', '', '', '', '', '', '', '',
                    // 2F
                    '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
                    // 3F
                    '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
                    // 4F
                    '', '', '', '', '', '', '', '', '', '', '', '', '\\\\', '', '', '',
                    // 5F
                    '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
                    // 6F
                    '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '\\u007F', '\\u0080', '\\u0081', '\\u0082', '\\u0083', '\\u0084', '\\u0085', '\\u0086', '\\u0087', '\\u0088', '\\u0089', '\\u008A', '\\u008B', '\\u008C', '\\u008D', '\\u008E', '\\u008F', '\\u0090', '\\u0091', '\\u0092', '\\u0093', '\\u0094', '\\u0095', '\\u0096', '\\u0097', '\\u0098', '\\u0099', '\\u009A', '\\u009B', '\\u009C', '\\u009D', '\\u009E', '\\u009F'
                ];

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/printer.mjs":
            /*!**********************************************************!*\
              !*** ../../../node_modules/graphql/language/printer.mjs ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.print = print;
                var _blockString = __webpack_require__( /*! ./blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs");
                var _printString = __webpack_require__( /*! ./printString.mjs */ "../../../node_modules/graphql/language/printString.mjs");
                var _visitor = __webpack_require__( /*! ./visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
                /**
                 * Converts an AST into a string, using one set of reasonable
                 * formatting rules.
                 */

                function print(ast) {
                    return (0, _visitor.visit)(ast, printDocASTReducer);
                }
                const MAX_LINE_LENGTH = 80;
                const printDocASTReducer = {
                    Name: {
                        leave: node => node.value
                    },
                    Variable: {
                        leave: node => '$' + node.name
                    },
                    // Document
                    Document: {
                        leave: node => join(node.definitions, '\n\n')
                    },
                    OperationDefinition: {
                        leave(node) {
                            const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');
                            const prefix = join([node.operation, join([node.name, varDefs]), join(node.directives, ' ')], ' '); // Anonymous queries with no directives or variable definitions can use
                            // the query short form.

                            return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;
                        }
                    },
                    VariableDefinition: {
                        leave: ({
                            variable,
                            type,
                            defaultValue,
                            directives
                        }) => variable + ': ' + type + wrap(' = ', defaultValue) + wrap(' ', join(directives, ' '))
                    },
                    SelectionSet: {
                        leave: ({
                            selections
                        }) => block(selections)
                    },
                    Field: {
                        leave({
                            alias,
                            name,
                            arguments: args,
                            directives,
                            selectionSet
                        }) {
                            const prefix = wrap('', alias, ': ') + name;
                            let argsLine = prefix + wrap('(', join(args, ', '), ')');
                            if (argsLine.length > MAX_LINE_LENGTH) {
                                argsLine = prefix + wrap('(\n', indent(join(args, '\n')), '\n)');
                            }
                            return join([argsLine, join(directives, ' '), selectionSet], ' ');
                        }
                    },
                    Argument: {
                        leave: ({
                            name,
                            value
                        }) => name + ': ' + value
                    },
                    // Fragments
                    FragmentSpread: {
                        leave: ({
                            name,
                            directives
                        }) => '...' + name + wrap(' ', join(directives, ' '))
                    },
                    InlineFragment: {
                        leave: ({
                            typeCondition,
                            directives,
                            selectionSet
                        }) => join(['...', wrap('on ', typeCondition), join(directives, ' '), selectionSet], ' ')
                    },
                    FragmentDefinition: {
                        leave: ({
                                    name,
                                    typeCondition,
                                    variableDefinitions,
                                    directives,
                                    selectionSet
                                } // Note: fragment variable definitions are experimental and may be changed
                            ) =>
                            // or removed in the future.
                            `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` + `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` + selectionSet
                    },
                    // Value
                    IntValue: {
                        leave: ({
                            value
                        }) => value
                    },
                    FloatValue: {
                        leave: ({
                            value
                        }) => value
                    },
                    StringValue: {
                        leave: ({
                            value,
                            block: isBlockString
                        }) => isBlockString ? (0, _blockString.printBlockString)(value) : (0, _printString.printString)(value)
                    },
                    BooleanValue: {
                        leave: ({
                            value
                        }) => value ? 'true' : 'false'
                    },
                    NullValue: {
                        leave: () => 'null'
                    },
                    EnumValue: {
                        leave: ({
                            value
                        }) => value
                    },
                    ListValue: {
                        leave: ({
                            values
                        }) => '[' + join(values, ', ') + ']'
                    },
                    ObjectValue: {
                        leave: ({
                            fields
                        }) => '{' + join(fields, ', ') + '}'
                    },
                    ObjectField: {
                        leave: ({
                            name,
                            value
                        }) => name + ': ' + value
                    },
                    // Directive
                    Directive: {
                        leave: ({
                            name,
                            arguments: args
                        }) => '@' + name + wrap('(', join(args, ', '), ')')
                    },
                    // Type
                    NamedType: {
                        leave: ({
                            name
                        }) => name
                    },
                    ListType: {
                        leave: ({
                            type
                        }) => '[' + type + ']'
                    },
                    NonNullType: {
                        leave: ({
                            type
                        }) => type + '!'
                    },
                    // Type System Definitions
                    SchemaDefinition: {
                        leave: ({
                            description,
                            directives,
                            operationTypes
                        }) => wrap('', description, '\n') + join(['schema', join(directives, ' '), block(operationTypes)], ' ')
                    },
                    OperationTypeDefinition: {
                        leave: ({
                            operation,
                            type
                        }) => operation + ': ' + type
                    },
                    ScalarTypeDefinition: {
                        leave: ({
                            description,
                            name,
                            directives
                        }) => wrap('', description, '\n') + join(['scalar', name, join(directives, ' ')], ' ')
                    },
                    ObjectTypeDefinition: {
                        leave: ({
                            description,
                            name,
                            interfaces,
                            directives,
                            fields
                        }) => wrap('', description, '\n') + join(['type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ')
                    },
                    FieldDefinition: {
                        leave: ({
                            description,
                            name,
                            arguments: args,
                            type,
                            directives
                        }) => wrap('', description, '\n') + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + ': ' + type + wrap(' ', join(directives, ' '))
                    },
                    InputValueDefinition: {
                        leave: ({
                            description,
                            name,
                            type,
                            defaultValue,
                            directives
                        }) => wrap('', description, '\n') + join([name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')], ' ')
                    },
                    InterfaceTypeDefinition: {
                        leave: ({
                            description,
                            name,
                            interfaces,
                            directives,
                            fields
                        }) => wrap('', description, '\n') + join(['interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ')
                    },
                    UnionTypeDefinition: {
                        leave: ({
                            description,
                            name,
                            directives,
                            types
                        }) => wrap('', description, '\n') + join(['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))], ' ')
                    },
                    EnumTypeDefinition: {
                        leave: ({
                            description,
                            name,
                            directives,
                            values
                        }) => wrap('', description, '\n') + join(['enum', name, join(directives, ' '), block(values)], ' ')
                    },
                    EnumValueDefinition: {
                        leave: ({
                            description,
                            name,
                            directives
                        }) => wrap('', description, '\n') + join([name, join(directives, ' ')], ' ')
                    },
                    InputObjectTypeDefinition: {
                        leave: ({
                            description,
                            name,
                            directives,
                            fields
                        }) => wrap('', description, '\n') + join(['input', name, join(directives, ' '), block(fields)], ' ')
                    },
                    DirectiveDefinition: {
                        leave: ({
                            description,
                            name,
                            arguments: args,
                            repeatable,
                            locations
                        }) => wrap('', description, '\n') + 'directive @' + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + (repeatable ? ' repeatable' : '') + ' on ' + join(locations, ' | ')
                    },
                    SchemaExtension: {
                        leave: ({
                            directives,
                            operationTypes
                        }) => join(['extend schema', join(directives, ' '), block(operationTypes)], ' ')
                    },
                    ScalarTypeExtension: {
                        leave: ({
                            name,
                            directives
                        }) => join(['extend scalar', name, join(directives, ' ')], ' ')
                    },
                    ObjectTypeExtension: {
                        leave: ({
                            name,
                            interfaces,
                            directives,
                            fields
                        }) => join(['extend type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ')
                    },
                    InterfaceTypeExtension: {
                        leave: ({
                            name,
                            interfaces,
                            directives,
                            fields
                        }) => join(['extend interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ')
                    },
                    UnionTypeExtension: {
                        leave: ({
                            name,
                            directives,
                            types
                        }) => join(['extend union', name, join(directives, ' '), wrap('= ', join(types, ' | '))], ' ')
                    },
                    EnumTypeExtension: {
                        leave: ({
                            name,
                            directives,
                            values
                        }) => join(['extend enum', name, join(directives, ' '), block(values)], ' ')
                    },
                    InputObjectTypeExtension: {
                        leave: ({
                            name,
                            directives,
                            fields
                        }) => join(['extend input', name, join(directives, ' '), block(fields)], ' ')
                    }
                };
                /**
                 * Given maybeArray, print an empty string if it is null or empty, otherwise
                 * print all items together separated by separator if provided
                 */

                function join(maybeArray, separator = '') {
                    var _maybeArray$filter$jo;
                    return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(x => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';
                }
                /**
                 * Given array, print each item on its own line, wrapped in an indented `{ }` block.
                 */

                function block(array) {
                    return wrap('{\n', indent(join(array, '\n')), '\n}');
                }
                /**
                 * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.
                 */

                function wrap(start, maybeString, end = '') {
                    return maybeString != null && maybeString !== '' ? start + maybeString + end : '';
                }

                function indent(str) {
                    return wrap('  ', str.replace(/\n/g, '\n  '));
                }

                function hasMultilineItems(maybeArray) {
                    var _maybeArray$some;

                    // FIXME: https://github.com/graphql/graphql-js/issues/2203

                    /* c8 ignore next */
                    return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some(str => str.includes('\n'))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/source.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/language/source.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.Source = void 0;
                exports.isSource = isSource;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _instanceOf = __webpack_require__( /*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs");
                /**
                 * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
                 * optional, but they are useful for clients who store GraphQL documents in source files.
                 * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might
                 * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`.
                 * The `line` and `column` properties in `locationOffset` are 1-indexed.
                 */
                class Source {
                    constructor(body, name = 'GraphQL request', locationOffset = {
                        line: 1,
                        column: 1
                    }) {
                        typeof body === 'string' || (0, _devAssert.devAssert)(false, `Body must be a string. Received: ${(0, _inspect.inspect)(body)}.`);
                        this.body = body;
                        this.name = name;
                        this.locationOffset = locationOffset;
                        this.locationOffset.line > 0 || (0, _devAssert.devAssert)(false, 'line in locationOffset is 1-indexed and must be positive.');
                        this.locationOffset.column > 0 || (0, _devAssert.devAssert)(false, 'column in locationOffset is 1-indexed and must be positive.');
                    }
                    get[Symbol.toStringTag]() {
                        return 'Source';
                    }
                }
                /**
                 * Test if the given value is a Source object.
                 *
                 * @internal
                 */
                exports.Source = Source;

                function isSource(source) {
                    return (0, _instanceOf.instanceOf)(source, Source);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/tokenKind.mjs":
            /*!************************************************************!*\
              !*** ../../../node_modules/graphql/language/tokenKind.mjs ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.TokenKind = void 0;
                /**
                 * An exported enum describing the different kinds of tokens that the
                 * lexer emits.
                 */
                var TokenKind;
                (function(TokenKind) {
                    TokenKind['SOF'] = '<SOF>';
                    TokenKind['EOF'] = '<EOF>';
                    TokenKind['BANG'] = '!';
                    TokenKind['DOLLAR'] = '$';
                    TokenKind['AMP'] = '&';
                    TokenKind['PAREN_L'] = '(';
                    TokenKind['PAREN_R'] = ')';
                    TokenKind['SPREAD'] = '...';
                    TokenKind['COLON'] = ':';
                    TokenKind['EQUALS'] = '=';
                    TokenKind['AT'] = '@';
                    TokenKind['BRACKET_L'] = '[';
                    TokenKind['BRACKET_R'] = ']';
                    TokenKind['BRACE_L'] = '{';
                    TokenKind['PIPE'] = '|';
                    TokenKind['BRACE_R'] = '}';
                    TokenKind['NAME'] = 'Name';
                    TokenKind['INT'] = 'Int';
                    TokenKind['FLOAT'] = 'Float';
                    TokenKind['STRING'] = 'String';
                    TokenKind['BLOCK_STRING'] = 'BlockString';
                    TokenKind['COMMENT'] = 'Comment';
                })(TokenKind || (exports.TokenKind = TokenKind = {}));

                /**
                 * The enum type representing the token kinds values.
                 *
                 * @deprecated Please use `TokenKind`. Will be remove in v17.
                 */

                /***/
            }),

        /***/
        "../../../node_modules/graphql/language/visitor.mjs":
            /*!**********************************************************!*\
              !*** ../../../node_modules/graphql/language/visitor.mjs ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.BREAK = void 0;
                exports.getEnterLeaveForKind = getEnterLeaveForKind;
                exports.getVisitFn = getVisitFn;
                exports.visit = visit;
                exports.visitInParallel = visitInParallel;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _ast = __webpack_require__( /*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
                var _kinds = __webpack_require__( /*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                /**
                 * A visitor is provided to visit, it contains the collection of
                 * relevant functions to be called during the visitor's traversal.
                 */

                const BREAK = exports.BREAK = Object.freeze({});
                /**
                 * visit() will walk through an AST using a depth-first traversal, calling
                 * the visitor's enter function at each node in the traversal, and calling the
                 * leave function after visiting that node and all of its child nodes.
                 *
                 * By returning different values from the enter and leave functions, the
                 * behavior of the visitor can be altered, including skipping over a sub-tree of
                 * the AST (by returning false), editing the AST by returning a value or null
                 * to remove the value, or to stop the whole traversal by returning BREAK.
                 *
                 * When using visit() to edit an AST, the original AST will not be modified, and
                 * a new version of the AST with the changes applied will be returned from the
                 * visit function.
                 *
                 * ```ts
                 * const editedAST = visit(ast, {
                 *   enter(node, key, parent, path, ancestors) {
                 *     // @return
                 *     //   undefined: no action
                 *     //   false: skip visiting this node
                 *     //   visitor.BREAK: stop visiting altogether
                 *     //   null: delete this node
                 *     //   any value: replace this node with the returned value
                 *   },
                 *   leave(node, key, parent, path, ancestors) {
                 *     // @return
                 *     //   undefined: no action
                 *     //   false: no action
                 *     //   visitor.BREAK: stop visiting altogether
                 *     //   null: delete this node
                 *     //   any value: replace this node with the returned value
                 *   }
                 * });
                 * ```
                 *
                 * Alternatively to providing enter() and leave() functions, a visitor can
                 * instead provide functions named the same as the kinds of AST nodes, or
                 * enter/leave visitors at a named key, leading to three permutations of the
                 * visitor API:
                 *
                 * 1) Named visitors triggered when entering a node of a specific kind.
                 *
                 * ```ts
                 * visit(ast, {
                 *   Kind(node) {
                 *     // enter the "Kind" node
                 *   }
                 * })
                 * ```
                 *
                 * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.
                 *
                 * ```ts
                 * visit(ast, {
                 *   Kind: {
                 *     enter(node) {
                 *       // enter the "Kind" node
                 *     }
                 *     leave(node) {
                 *       // leave the "Kind" node
                 *     }
                 *   }
                 * })
                 * ```
                 *
                 * 3) Generic visitors that trigger upon entering and leaving any node.
                 *
                 * ```ts
                 * visit(ast, {
                 *   enter(node) {
                 *     // enter any node
                 *   },
                 *   leave(node) {
                 *     // leave any node
                 *   }
                 * })
                 * ```
                 */

                function visit(root, visitor, visitorKeys = _ast.QueryDocumentKeys) {
                    const enterLeaveMap = new Map();
                    for (const kind of Object.values(_kinds.Kind)) {
                        enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));
                    }
                    /* eslint-disable no-undef-init */

                    let stack = undefined;
                    let inArray = Array.isArray(root);
                    let keys = [root];
                    let index = -1;
                    let edits = [];
                    let node = root;
                    let key = undefined;
                    let parent = undefined;
                    const path = [];
                    const ancestors = [];
                    /* eslint-enable no-undef-init */

                    do {
                        index++;
                        const isLeaving = index === keys.length;
                        const isEdited = isLeaving && edits.length !== 0;
                        if (isLeaving) {
                            key = ancestors.length === 0 ? undefined : path[path.length - 1];
                            node = parent;
                            parent = ancestors.pop();
                            if (isEdited) {
                                if (inArray) {
                                    node = node.slice();
                                    let editOffset = 0;
                                    for (const [editKey, editValue] of edits) {
                                        const arrayKey = editKey - editOffset;
                                        if (editValue === null) {
                                            node.splice(arrayKey, 1);
                                            editOffset++;
                                        } else {
                                            node[arrayKey] = editValue;
                                        }
                                    }
                                } else {
                                    node = Object.defineProperties({}, Object.getOwnPropertyDescriptors(node));
                                    for (const [editKey, editValue] of edits) {
                                        node[editKey] = editValue;
                                    }
                                }
                            }
                            index = stack.index;
                            keys = stack.keys;
                            edits = stack.edits;
                            inArray = stack.inArray;
                            stack = stack.prev;
                        } else if (parent) {
                            key = inArray ? index : keys[index];
                            node = parent[key];
                            if (node === null || node === undefined) {
                                continue;
                            }
                            path.push(key);
                        }
                        let result;
                        if (!Array.isArray(node)) {
                            var _enterLeaveMap$get, _enterLeaveMap$get2;
                            (0, _ast.isNode)(node) || (0, _devAssert.devAssert)(false, `Invalid AST Node: ${(0, _inspect.inspect)(node)}.`);
                            const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter;
                            result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors);
                            if (result === BREAK) {
                                break;
                            }
                            if (result === false) {
                                if (!isLeaving) {
                                    path.pop();
                                    continue;
                                }
                            } else if (result !== undefined) {
                                edits.push([key, result]);
                                if (!isLeaving) {
                                    if ((0, _ast.isNode)(result)) {
                                        node = result;
                                    } else {
                                        path.pop();
                                        continue;
                                    }
                                }
                            }
                        }
                        if (result === undefined && isEdited) {
                            edits.push([key, node]);
                        }
                        if (isLeaving) {
                            path.pop();
                        } else {
                            var _node$kind;
                            stack = {
                                inArray,
                                index,
                                keys,
                                edits,
                                prev: stack
                            };
                            inArray = Array.isArray(node);
                            keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : [];
                            index = -1;
                            edits = [];
                            if (parent) {
                                ancestors.push(parent);
                            }
                            parent = node;
                        }
                    } while (stack !== undefined);
                    if (edits.length !== 0) {
                        // New root
                        return edits[edits.length - 1][1];
                    }
                    return root;
                }
                /**
                 * Creates a new visitor instance which delegates to many visitors to run in
                 * parallel. Each visitor will be visited for each node before moving on.
                 *
                 * If a prior visitor edits a node, no following visitors will see that node.
                 */

                function visitInParallel(visitors) {
                    const skipping = new Array(visitors.length).fill(null);
                    const mergedVisitor = Object.create(null);
                    for (const kind of Object.values(_kinds.Kind)) {
                        let hasVisitor = false;
                        const enterList = new Array(visitors.length).fill(undefined);
                        const leaveList = new Array(visitors.length).fill(undefined);
                        for (let i = 0; i < visitors.length; ++i) {
                            const {
                                enter,
                                leave
                            } = getEnterLeaveForKind(visitors[i], kind);
                            hasVisitor || (hasVisitor = enter != null || leave != null);
                            enterList[i] = enter;
                            leaveList[i] = leave;
                        }
                        if (!hasVisitor) {
                            continue;
                        }
                        const mergedEnterLeave = {
                            enter(...args) {
                                const node = args[0];
                                for (let i = 0; i < visitors.length; i++) {
                                    if (skipping[i] === null) {
                                        var _enterList$i;
                                        const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args);
                                        if (result === false) {
                                            skipping[i] = node;
                                        } else if (result === BREAK) {
                                            skipping[i] = BREAK;
                                        } else if (result !== undefined) {
                                            return result;
                                        }
                                    }
                                }
                            },
                            leave(...args) {
                                const node = args[0];
                                for (let i = 0; i < visitors.length; i++) {
                                    if (skipping[i] === null) {
                                        var _leaveList$i;
                                        const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args);
                                        if (result === BREAK) {
                                            skipping[i] = BREAK;
                                        } else if (result !== undefined && result !== false) {
                                            return result;
                                        }
                                    } else if (skipping[i] === node) {
                                        skipping[i] = null;
                                    }
                                }
                            }
                        };
                        mergedVisitor[kind] = mergedEnterLeave;
                    }
                    return mergedVisitor;
                }
                /**
                 * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.
                 */

                function getEnterLeaveForKind(visitor, kind) {
                    const kindVisitor = visitor[kind];
                    if (typeof kindVisitor === 'object') {
                        // { Kind: { enter() {}, leave() {} } }
                        return kindVisitor;
                    } else if (typeof kindVisitor === 'function') {
                        // { Kind() {} }
                        return {
                            enter: kindVisitor,
                            leave: undefined
                        };
                    } // { enter() {}, leave() {} }

                    return {
                        enter: visitor.enter,
                        leave: visitor.leave
                    };
                }
                /**
                 * Given a visitor instance, if it is leaving or not, and a node kind, return
                 * the function the visitor runtime should call.
                 *
                 * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17
                 */

                /* c8 ignore next 8 */

                function getVisitFn(visitor, kind, isLeaving) {
                    const {
                        enter,
                        leave
                    } = getEnterLeaveForKind(visitor, kind);
                    return isLeaving ? leave : enter;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/type/assertName.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/type/assertName.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.assertEnumValueName = assertEnumValueName;
                exports.assertName = assertName;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _characterClasses = __webpack_require__( /*! ../language/characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs");
                /**
                 * Upholds the spec rules about naming.
                 */

                function assertName(name) {
                    name != null || (0, _devAssert.devAssert)(false, 'Must provide name.');
                    typeof name === 'string' || (0, _devAssert.devAssert)(false, 'Expected name to be a string.');
                    if (name.length === 0) {
                        throw new _GraphQLError.GraphQLError('Expected name to be a non-empty string.');
                    }
                    for (let i = 1; i < name.length; ++i) {
                        if (!(0, _characterClasses.isNameContinue)(name.charCodeAt(i))) {
                            throw new _GraphQLError.GraphQLError(`Names must only contain [_a-zA-Z0-9] but "${name}" does not.`);
                        }
                    }
                    if (!(0, _characterClasses.isNameStart)(name.charCodeAt(0))) {
                        throw new _GraphQLError.GraphQLError(`Names must start with [_a-zA-Z] but "${name}" does not.`);
                    }
                    return name;
                }
                /**
                 * Upholds the spec rules about naming enum values.
                 *
                 * @internal
                 */

                function assertEnumValueName(name) {
                    if (name === 'true' || name === 'false' || name === 'null') {
                        throw new _GraphQLError.GraphQLError(`Enum values cannot be named: ${name}`);
                    }
                    return assertName(name);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/type/definition.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/type/definition.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.GraphQLUnionType = exports.GraphQLScalarType = exports.GraphQLObjectType = exports.GraphQLNonNull = exports.GraphQLList = exports.GraphQLInterfaceType = exports.GraphQLInputObjectType = exports.GraphQLEnumType = void 0;
                exports.argsToArgsConfig = argsToArgsConfig;
                exports.assertAbstractType = assertAbstractType;
                exports.assertCompositeType = assertCompositeType;
                exports.assertEnumType = assertEnumType;
                exports.assertInputObjectType = assertInputObjectType;
                exports.assertInputType = assertInputType;
                exports.assertInterfaceType = assertInterfaceType;
                exports.assertLeafType = assertLeafType;
                exports.assertListType = assertListType;
                exports.assertNamedType = assertNamedType;
                exports.assertNonNullType = assertNonNullType;
                exports.assertNullableType = assertNullableType;
                exports.assertObjectType = assertObjectType;
                exports.assertOutputType = assertOutputType;
                exports.assertScalarType = assertScalarType;
                exports.assertType = assertType;
                exports.assertUnionType = assertUnionType;
                exports.assertWrappingType = assertWrappingType;
                exports.defineArguments = defineArguments;
                exports.getNamedType = getNamedType;
                exports.getNullableType = getNullableType;
                exports.isAbstractType = isAbstractType;
                exports.isCompositeType = isCompositeType;
                exports.isEnumType = isEnumType;
                exports.isInputObjectType = isInputObjectType;
                exports.isInputType = isInputType;
                exports.isInterfaceType = isInterfaceType;
                exports.isLeafType = isLeafType;
                exports.isListType = isListType;
                exports.isNamedType = isNamedType;
                exports.isNonNullType = isNonNullType;
                exports.isNullableType = isNullableType;
                exports.isObjectType = isObjectType;
                exports.isOutputType = isOutputType;
                exports.isRequiredArgument = isRequiredArgument;
                exports.isRequiredInputField = isRequiredInputField;
                exports.isScalarType = isScalarType;
                exports.isType = isType;
                exports.isUnionType = isUnionType;
                exports.isWrappingType = isWrappingType;
                exports.resolveObjMapThunk = resolveObjMapThunk;
                exports.resolveReadonlyArrayThunk = resolveReadonlyArrayThunk;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _didYouMean = __webpack_require__( /*! ../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
                var _identityFunc = __webpack_require__( /*! ../jsutils/identityFunc.mjs */ "../../../node_modules/graphql/jsutils/identityFunc.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _instanceOf = __webpack_require__( /*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs");
                var _isObjectLike = __webpack_require__( /*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
                var _keyMap = __webpack_require__( /*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
                var _keyValMap = __webpack_require__( /*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs");
                var _mapValue = __webpack_require__( /*! ../jsutils/mapValue.mjs */ "../../../node_modules/graphql/jsutils/mapValue.mjs");
                var _suggestionList = __webpack_require__( /*! ../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
                var _toObjMap = __webpack_require__( /*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _printer = __webpack_require__( /*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _valueFromASTUntyped = __webpack_require__( /*! ../utilities/valueFromASTUntyped.mjs */ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs");
                var _assertName = __webpack_require__( /*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs");

                function isType(type) {
                    return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type) || isListType(type) || isNonNullType(type);
                }

                function assertType(type) {
                    if (!isType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL type.`);
                    }
                    return type;
                }
                /**
                 * There are predicates for each kind of GraphQL type.
                 */

                function isScalarType(type) {
                    return (0, _instanceOf.instanceOf)(type, GraphQLScalarType);
                }

                function assertScalarType(type) {
                    if (!isScalarType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Scalar type.`);
                    }
                    return type;
                }

                function isObjectType(type) {
                    return (0, _instanceOf.instanceOf)(type, GraphQLObjectType);
                }

                function assertObjectType(type) {
                    if (!isObjectType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Object type.`);
                    }
                    return type;
                }

                function isInterfaceType(type) {
                    return (0, _instanceOf.instanceOf)(type, GraphQLInterfaceType);
                }

                function assertInterfaceType(type) {
                    if (!isInterfaceType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Interface type.`);
                    }
                    return type;
                }

                function isUnionType(type) {
                    return (0, _instanceOf.instanceOf)(type, GraphQLUnionType);
                }

                function assertUnionType(type) {
                    if (!isUnionType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Union type.`);
                    }
                    return type;
                }

                function isEnumType(type) {
                    return (0, _instanceOf.instanceOf)(type, GraphQLEnumType);
                }

                function assertEnumType(type) {
                    if (!isEnumType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Enum type.`);
                    }
                    return type;
                }

                function isInputObjectType(type) {
                    return (0, _instanceOf.instanceOf)(type, GraphQLInputObjectType);
                }

                function assertInputObjectType(type) {
                    if (!isInputObjectType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Input Object type.`);
                    }
                    return type;
                }

                function isListType(type) {
                    return (0, _instanceOf.instanceOf)(type, GraphQLList);
                }

                function assertListType(type) {
                    if (!isListType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL List type.`);
                    }
                    return type;
                }

                function isNonNullType(type) {
                    return (0, _instanceOf.instanceOf)(type, GraphQLNonNull);
                }

                function assertNonNullType(type) {
                    if (!isNonNullType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Non-Null type.`);
                    }
                    return type;
                }
                /**
                 * These types may be used as input types for arguments and directives.
                 */

                function isInputType(type) {
                    return isScalarType(type) || isEnumType(type) || isInputObjectType(type) || isWrappingType(type) && isInputType(type.ofType);
                }

                function assertInputType(type) {
                    if (!isInputType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL input type.`);
                    }
                    return type;
                }
                /**
                 * These types may be used as output types as the result of fields.
                 */

                function isOutputType(type) {
                    return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isWrappingType(type) && isOutputType(type.ofType);
                }

                function assertOutputType(type) {
                    if (!isOutputType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL output type.`);
                    }
                    return type;
                }
                /**
                 * These types may describe types which may be leaf values.
                 */

                function isLeafType(type) {
                    return isScalarType(type) || isEnumType(type);
                }

                function assertLeafType(type) {
                    if (!isLeafType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL leaf type.`);
                    }
                    return type;
                }
                /**
                 * These types may describe the parent context of a selection set.
                 */

                function isCompositeType(type) {
                    return isObjectType(type) || isInterfaceType(type) || isUnionType(type);
                }

                function assertCompositeType(type) {
                    if (!isCompositeType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL composite type.`);
                    }
                    return type;
                }
                /**
                 * These types may describe the parent context of a selection set.
                 */

                function isAbstractType(type) {
                    return isInterfaceType(type) || isUnionType(type);
                }

                function assertAbstractType(type) {
                    if (!isAbstractType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL abstract type.`);
                    }
                    return type;
                }
                /**
                 * List Type Wrapper
                 *
                 * A list is a wrapping type which points to another type.
                 * Lists are often created within the context of defining the fields of
                 * an object type.
                 *
                 * Example:
                 *
                 * ```ts
                 * const PersonType = new GraphQLObjectType({
                 *   name: 'Person',
                 *   fields: () => ({
                 *     parents: { type: new GraphQLList(PersonType) },
                 *     children: { type: new GraphQLList(PersonType) },
                 *   })
                 * })
                 * ```
                 */

                class GraphQLList {
                    constructor(ofType) {
                        isType(ofType) || (0, _devAssert.devAssert)(false, `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL type.`);
                        this.ofType = ofType;
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLList';
                    }
                    toString() {
                        return '[' + String(this.ofType) + ']';
                    }
                    toJSON() {
                        return this.toString();
                    }
                }
                /**
                 * Non-Null Type Wrapper
                 *
                 * A non-null is a wrapping type which points to another type.
                 * Non-null types enforce that their values are never null and can ensure
                 * an error is raised if this ever occurs during a request. It is useful for
                 * fields which you can make a strong guarantee on non-nullability, for example
                 * usually the id field of a database row will never be null.
                 *
                 * Example:
                 *
                 * ```ts
                 * const RowType = new GraphQLObjectType({
                 *   name: 'Row',
                 *   fields: () => ({
                 *     id: { type: new GraphQLNonNull(GraphQLString) },
                 *   })
                 * })
                 * ```
                 * Note: the enforcement of non-nullability occurs within the executor.
                 */
                exports.GraphQLList = GraphQLList;
                class GraphQLNonNull {
                    constructor(ofType) {
                        isNullableType(ofType) || (0, _devAssert.devAssert)(false, `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL nullable type.`);
                        this.ofType = ofType;
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLNonNull';
                    }
                    toString() {
                        return String(this.ofType) + '!';
                    }
                    toJSON() {
                        return this.toString();
                    }
                }
                /**
                 * These types wrap and modify other types
                 */
                exports.GraphQLNonNull = GraphQLNonNull;

                function isWrappingType(type) {
                    return isListType(type) || isNonNullType(type);
                }

                function assertWrappingType(type) {
                    if (!isWrappingType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL wrapping type.`);
                    }
                    return type;
                }
                /**
                 * These types can all accept null as a value.
                 */

                function isNullableType(type) {
                    return isType(type) && !isNonNullType(type);
                }

                function assertNullableType(type) {
                    if (!isNullableType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL nullable type.`);
                    }
                    return type;
                }

                function getNullableType(type) {
                    if (type) {
                        return isNonNullType(type) ? type.ofType : type;
                    }
                }
                /**
                 * These named types do not include modifiers like List or NonNull.
                 */

                function isNamedType(type) {
                    return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type);
                }

                function assertNamedType(type) {
                    if (!isNamedType(type)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL named type.`);
                    }
                    return type;
                }

                function getNamedType(type) {
                    if (type) {
                        let unwrappedType = type;
                        while (isWrappingType(unwrappedType)) {
                            unwrappedType = unwrappedType.ofType;
                        }
                        return unwrappedType;
                    }
                }
                /**
                 * Used while defining GraphQL types to allow for circular references in
                 * otherwise immutable type definitions.
                 */

                function resolveReadonlyArrayThunk(thunk) {
                    return typeof thunk === 'function' ? thunk() : thunk;
                }

                function resolveObjMapThunk(thunk) {
                    return typeof thunk === 'function' ? thunk() : thunk;
                }
                /**
                 * Custom extensions
                 *
                 * @remarks
                 * Use a unique identifier name for your extension, for example the name of
                 * your library or project. Do not use a shortened identifier as this increases
                 * the risk of conflicts. We recommend you add at most one extension field,
                 * an object which can contain all the values you need.
                 */

                /**
                 * Scalar Type Definition
                 *
                 * The leaf values of any request and input values to arguments are
                 * Scalars (or Enums) and are defined with a name and a series of functions
                 * used to parse input from ast or variables and to ensure validity.
                 *
                 * If a type's serialize function returns `null` or does not return a value
                 * (i.e. it returns `undefined`) then an error will be raised and a `null`
                 * value will be returned in the response. It is always better to validate
                 *
                 * Example:
                 *
                 * ```ts
                 * const OddType = new GraphQLScalarType({
                 *   name: 'Odd',
                 *   serialize(value) {
                 *     if (!Number.isFinite(value)) {
                 *       throw new Error(
                 *         `Scalar "Odd" cannot represent "${value}" since it is not a finite number.`,
                 *       );
                 *     }
                 *
                 *     if (value % 2 === 0) {
                 *       throw new Error(`Scalar "Odd" cannot represent "${value}" since it is even.`);
                 *     }
                 *     return value;
                 *   }
                 * });
                 * ```
                 */
                class GraphQLScalarType {
                    constructor(config) {
                        var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN;
                        const parseValue = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.identityFunc;
                        this.name = (0, _assertName.assertName)(config.name);
                        this.description = config.description;
                        this.specifiedByURL = config.specifiedByURL;
                        this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.identityFunc;
                        this.parseValue = parseValue;
                        this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables));
                        this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
                        this.astNode = config.astNode;
                        this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : [];
                        config.specifiedByURL == null || typeof config.specifiedByURL === 'string' || (0, _devAssert.devAssert)(false, `${this.name} must provide "specifiedByURL" as a string, ` + `but got: ${(0, _inspect.inspect)(config.specifiedByURL)}.`);
                        config.serialize == null || typeof config.serialize === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`);
                        if (config.parseLiteral) {
                            typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide both "parseValue" and "parseLiteral" functions.`);
                        }
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLScalarType';
                    }
                    toConfig() {
                        return {
                            name: this.name,
                            description: this.description,
                            specifiedByURL: this.specifiedByURL,
                            serialize: this.serialize,
                            parseValue: this.parseValue,
                            parseLiteral: this.parseLiteral,
                            extensions: this.extensions,
                            astNode: this.astNode,
                            extensionASTNodes: this.extensionASTNodes
                        };
                    }
                    toString() {
                        return this.name;
                    }
                    toJSON() {
                        return this.toString();
                    }
                }

                /**
                 * Object Type Definition
                 *
                 * Almost all of the GraphQL types you define will be object types. Object types
                 * have a name, but most importantly describe their fields.
                 *
                 * Example:
                 *
                 * ```ts
                 * const AddressType = new GraphQLObjectType({
                 *   name: 'Address',
                 *   fields: {
                 *     street: { type: GraphQLString },
                 *     number: { type: GraphQLInt },
                 *     formatted: {
                 *       type: GraphQLString,
                 *       resolve(obj) {
                 *         return obj.number + ' ' + obj.street
                 *       }
                 *     }
                 *   }
                 * });
                 * ```
                 *
                 * When two types need to refer to each other, or a type needs to refer to
                 * itself in a field, you can use a function expression (aka a closure or a
                 * thunk) to supply the fields lazily.
                 *
                 * Example:
                 *
                 * ```ts
                 * const PersonType = new GraphQLObjectType({
                 *   name: 'Person',
                 *   fields: () => ({
                 *     name: { type: GraphQLString },
                 *     bestFriend: { type: PersonType },
                 *   })
                 * });
                 * ```
                 */
                exports.GraphQLScalarType = GraphQLScalarType;
                class GraphQLObjectType {
                    constructor(config) {
                        var _config$extensionASTN2;
                        this.name = (0, _assertName.assertName)(config.name);
                        this.description = config.description;
                        this.isTypeOf = config.isTypeOf;
                        this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
                        this.astNode = config.astNode;
                        this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : [];
                        this._fields = () => defineFieldMap(config);
                        this._interfaces = () => defineInterfaces(config);
                        config.isTypeOf == null || typeof config.isTypeOf === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "isTypeOf" as a function, ` + `but got: ${(0, _inspect.inspect)(config.isTypeOf)}.`);
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLObjectType';
                    }
                    getFields() {
                        if (typeof this._fields === 'function') {
                            this._fields = this._fields();
                        }
                        return this._fields;
                    }
                    getInterfaces() {
                        if (typeof this._interfaces === 'function') {
                            this._interfaces = this._interfaces();
                        }
                        return this._interfaces;
                    }
                    toConfig() {
                        return {
                            name: this.name,
                            description: this.description,
                            interfaces: this.getInterfaces(),
                            fields: fieldsToFieldsConfig(this.getFields()),
                            isTypeOf: this.isTypeOf,
                            extensions: this.extensions,
                            astNode: this.astNode,
                            extensionASTNodes: this.extensionASTNodes
                        };
                    }
                    toString() {
                        return this.name;
                    }
                    toJSON() {
                        return this.toString();
                    }
                }
                exports.GraphQLObjectType = GraphQLObjectType;

                function defineInterfaces(config) {
                    var _config$interfaces;
                    const interfaces = resolveReadonlyArrayThunk((_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : []);
                    Array.isArray(interfaces) || (0, _devAssert.devAssert)(false, `${config.name} interfaces must be an Array or a function which returns an Array.`);
                    return interfaces;
                }

                function defineFieldMap(config) {
                    const fieldMap = resolveObjMapThunk(config.fields);
                    isPlainObj(fieldMap) || (0, _devAssert.devAssert)(false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`);
                    return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => {
                        var _fieldConfig$args;
                        isPlainObj(fieldConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field config must be an object.`);
                        fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field resolver must be a function if ` + `provided, but got: ${(0, _inspect.inspect)(fieldConfig.resolve)}.`);
                        const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
                        isPlainObj(argsConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} args must be an object with argument names as keys.`);
                        return {
                            name: (0, _assertName.assertName)(fieldName),
                            description: fieldConfig.description,
                            type: fieldConfig.type,
                            args: defineArguments(argsConfig),
                            resolve: fieldConfig.resolve,
                            subscribe: fieldConfig.subscribe,
                            deprecationReason: fieldConfig.deprecationReason,
                            extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions),
                            astNode: fieldConfig.astNode
                        };
                    });
                }

                function defineArguments(config) {
                    return Object.entries(config).map(([argName, argConfig]) => ({
                        name: (0, _assertName.assertName)(argName),
                        description: argConfig.description,
                        type: argConfig.type,
                        defaultValue: argConfig.defaultValue,
                        deprecationReason: argConfig.deprecationReason,
                        extensions: (0, _toObjMap.toObjMap)(argConfig.extensions),
                        astNode: argConfig.astNode
                    }));
                }

                function isPlainObj(obj) {
                    return (0, _isObjectLike.isObjectLike)(obj) && !Array.isArray(obj);
                }

                function fieldsToFieldsConfig(fields) {
                    return (0, _mapValue.mapValue)(fields, field => ({
                        description: field.description,
                        type: field.type,
                        args: argsToArgsConfig(field.args),
                        resolve: field.resolve,
                        subscribe: field.subscribe,
                        deprecationReason: field.deprecationReason,
                        extensions: field.extensions,
                        astNode: field.astNode
                    }));
                }
                /**
                 * @internal
                 */

                function argsToArgsConfig(args) {
                    return (0, _keyValMap.keyValMap)(args, arg => arg.name, arg => ({
                        description: arg.description,
                        type: arg.type,
                        defaultValue: arg.defaultValue,
                        deprecationReason: arg.deprecationReason,
                        extensions: arg.extensions,
                        astNode: arg.astNode
                    }));
                }

                function isRequiredArgument(arg) {
                    return isNonNullType(arg.type) && arg.defaultValue === undefined;
                }

                /**
                 * Interface Type Definition
                 *
                 * When a field can return one of a heterogeneous set of types, a Interface type
                 * is used to describe what types are possible, what fields are in common across
                 * all types, as well as a function to determine which type is actually used
                 * when the field is resolved.
                 *
                 * Example:
                 *
                 * ```ts
                 * const EntityType = new GraphQLInterfaceType({
                 *   name: 'Entity',
                 *   fields: {
                 *     name: { type: GraphQLString }
                 *   }
                 * });
                 * ```
                 */
                class GraphQLInterfaceType {
                    constructor(config) {
                        var _config$extensionASTN3;
                        this.name = (0, _assertName.assertName)(config.name);
                        this.description = config.description;
                        this.resolveType = config.resolveType;
                        this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
                        this.astNode = config.astNode;
                        this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : [];
                        this._fields = defineFieldMap.bind(undefined, config);
                        this._interfaces = defineInterfaces.bind(undefined, config);
                        config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0, _inspect.inspect)(config.resolveType)}.`);
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLInterfaceType';
                    }
                    getFields() {
                        if (typeof this._fields === 'function') {
                            this._fields = this._fields();
                        }
                        return this._fields;
                    }
                    getInterfaces() {
                        if (typeof this._interfaces === 'function') {
                            this._interfaces = this._interfaces();
                        }
                        return this._interfaces;
                    }
                    toConfig() {
                        return {
                            name: this.name,
                            description: this.description,
                            interfaces: this.getInterfaces(),
                            fields: fieldsToFieldsConfig(this.getFields()),
                            resolveType: this.resolveType,
                            extensions: this.extensions,
                            astNode: this.astNode,
                            extensionASTNodes: this.extensionASTNodes
                        };
                    }
                    toString() {
                        return this.name;
                    }
                    toJSON() {
                        return this.toString();
                    }
                }

                /**
                 * Union Type Definition
                 *
                 * When a field can return one of a heterogeneous set of types, a Union type
                 * is used to describe what types are possible as well as providing a function
                 * to determine which type is actually used when the field is resolved.
                 *
                 * Example:
                 *
                 * ```ts
                 * const PetType = new GraphQLUnionType({
                 *   name: 'Pet',
                 *   types: [ DogType, CatType ],
                 *   resolveType(value) {
                 *     if (value instanceof Dog) {
                 *       return DogType;
                 *     }
                 *     if (value instanceof Cat) {
                 *       return CatType;
                 *     }
                 *   }
                 * });
                 * ```
                 */
                exports.GraphQLInterfaceType = GraphQLInterfaceType;
                class GraphQLUnionType {
                    constructor(config) {
                        var _config$extensionASTN4;
                        this.name = (0, _assertName.assertName)(config.name);
                        this.description = config.description;
                        this.resolveType = config.resolveType;
                        this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
                        this.astNode = config.astNode;
                        this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : [];
                        this._types = defineTypes.bind(undefined, config);
                        config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0, _inspect.inspect)(config.resolveType)}.`);
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLUnionType';
                    }
                    getTypes() {
                        if (typeof this._types === 'function') {
                            this._types = this._types();
                        }
                        return this._types;
                    }
                    toConfig() {
                        return {
                            name: this.name,
                            description: this.description,
                            types: this.getTypes(),
                            resolveType: this.resolveType,
                            extensions: this.extensions,
                            astNode: this.astNode,
                            extensionASTNodes: this.extensionASTNodes
                        };
                    }
                    toString() {
                        return this.name;
                    }
                    toJSON() {
                        return this.toString();
                    }
                }
                exports.GraphQLUnionType = GraphQLUnionType;

                function defineTypes(config) {
                    const types = resolveReadonlyArrayThunk(config.types);
                    Array.isArray(types) || (0, _devAssert.devAssert)(false, `Must provide Array of types or a function which returns such an array for Union ${config.name}.`);
                    return types;
                }

                /**
                 * Enum Type Definition
                 *
                 * Some leaf values of requests and input values are Enums. GraphQL serializes
                 * Enum values as strings, however internally Enums can be represented by any
                 * kind of type, often integers.
                 *
                 * Example:
                 *
                 * ```ts
                 * const RGBType = new GraphQLEnumType({
                 *   name: 'RGB',
                 *   values: {
                 *     RED: { value: 0 },
                 *     GREEN: { value: 1 },
                 *     BLUE: { value: 2 }
                 *   }
                 * });
                 * ```
                 *
                 * Note: If a value is not provided in a definition, the name of the enum value
                 * will be used as its internal value.
                 */
                class GraphQLEnumType {
                    /* <T> */
                    constructor(config) {
                        var _config$extensionASTN5;
                        this.name = (0, _assertName.assertName)(config.name);
                        this.description = config.description;
                        this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
                        this.astNode = config.astNode;
                        this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : [];
                        this._values = typeof config.values === 'function' ? config.values : defineEnumValues(this.name, config.values);
                        this._valueLookup = null;
                        this._nameLookup = null;
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLEnumType';
                    }
                    getValues() {
                        if (typeof this._values === 'function') {
                            this._values = defineEnumValues(this.name, this._values());
                        }
                        return this._values;
                    }
                    getValue(name) {
                        if (this._nameLookup === null) {
                            this._nameLookup = (0, _keyMap.keyMap)(this.getValues(), value => value.name);
                        }
                        return this._nameLookup[name];
                    }
                    serialize(outputValue) {
                        if (this._valueLookup === null) {
                            this._valueLookup = new Map(this.getValues().map(enumValue => [enumValue.value, enumValue]));
                        }
                        const enumValue = this._valueLookup.get(outputValue);
                        if (enumValue === undefined) {
                            throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0, _inspect.inspect)(outputValue)}`);
                        }
                        return enumValue.name;
                    }
                    parseValue(inputValue) /* T */ {
                        if (typeof inputValue !== 'string') {
                            const valueStr = (0, _inspect.inspect)(inputValue);
                            throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr));
                        }
                        const enumValue = this.getValue(inputValue);
                        if (enumValue == null) {
                            throw new _GraphQLError.GraphQLError(`Value "${inputValue}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, inputValue));
                        }
                        return enumValue.value;
                    }
                    parseLiteral(valueNode, _variables) /* T */ {
                        // Note: variables will be resolved to a value before calling this function.
                        if (valueNode.kind !== _kinds.Kind.ENUM) {
                            const valueStr = (0, _printer.print)(valueNode);
                            throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr), {
                                nodes: valueNode
                            });
                        }
                        const enumValue = this.getValue(valueNode.value);
                        if (enumValue == null) {
                            const valueStr = (0, _printer.print)(valueNode);
                            throw new _GraphQLError.GraphQLError(`Value "${valueStr}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, valueStr), {
                                nodes: valueNode
                            });
                        }
                        return enumValue.value;
                    }
                    toConfig() {
                        const values = (0, _keyValMap.keyValMap)(this.getValues(), value => value.name, value => ({
                            description: value.description,
                            value: value.value,
                            deprecationReason: value.deprecationReason,
                            extensions: value.extensions,
                            astNode: value.astNode
                        }));
                        return {
                            name: this.name,
                            description: this.description,
                            values,
                            extensions: this.extensions,
                            astNode: this.astNode,
                            extensionASTNodes: this.extensionASTNodes
                        };
                    }
                    toString() {
                        return this.name;
                    }
                    toJSON() {
                        return this.toString();
                    }
                }
                exports.GraphQLEnumType = GraphQLEnumType;

                function didYouMeanEnumValue(enumType, unknownValueStr) {
                    const allNames = enumType.getValues().map(value => value.name);
                    const suggestedValues = (0, _suggestionList.suggestionList)(unknownValueStr, allNames);
                    return (0, _didYouMean.didYouMean)('the enum value', suggestedValues);
                }

                function defineEnumValues(typeName, valueMap) {
                    isPlainObj(valueMap) || (0, _devAssert.devAssert)(false, `${typeName} values must be an object with value names as keys.`);
                    return Object.entries(valueMap).map(([valueName, valueConfig]) => {
                        isPlainObj(valueConfig) || (0, _devAssert.devAssert)(false, `${typeName}.${valueName} must refer to an object with a "value" key ` + `representing an internal value but got: ${(0, _inspect.inspect)(valueConfig)}.`);
                        return {
                            name: (0, _assertName.assertEnumValueName)(valueName),
                            description: valueConfig.description,
                            value: valueConfig.value !== undefined ? valueConfig.value : valueName,
                            deprecationReason: valueConfig.deprecationReason,
                            extensions: (0, _toObjMap.toObjMap)(valueConfig.extensions),
                            astNode: valueConfig.astNode
                        };
                    });
                }

                /**
                 * Input Object Type Definition
                 *
                 * An input object defines a structured collection of fields which may be
                 * supplied to a field argument.
                 *
                 * Using `NonNull` will ensure that a value must be provided by the query
                 *
                 * Example:
                 *
                 * ```ts
                 * const GeoPoint = new GraphQLInputObjectType({
                 *   name: 'GeoPoint',
                 *   fields: {
                 *     lat: { type: new GraphQLNonNull(GraphQLFloat) },
                 *     lon: { type: new GraphQLNonNull(GraphQLFloat) },
                 *     alt: { type: GraphQLFloat, defaultValue: 0 },
                 *   }
                 * });
                 * ```
                 */
                class GraphQLInputObjectType {
                    constructor(config) {
                        var _config$extensionASTN6, _config$isOneOf;
                        this.name = (0, _assertName.assertName)(config.name);
                        this.description = config.description;
                        this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
                        this.astNode = config.astNode;
                        this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : [];
                        this.isOneOf = (_config$isOneOf = config.isOneOf) !== null && _config$isOneOf !== void 0 ? _config$isOneOf : false;
                        this._fields = defineInputFieldMap.bind(undefined, config);
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLInputObjectType';
                    }
                    getFields() {
                        if (typeof this._fields === 'function') {
                            this._fields = this._fields();
                        }
                        return this._fields;
                    }
                    toConfig() {
                        const fields = (0, _mapValue.mapValue)(this.getFields(), field => ({
                            description: field.description,
                            type: field.type,
                            defaultValue: field.defaultValue,
                            deprecationReason: field.deprecationReason,
                            extensions: field.extensions,
                            astNode: field.astNode
                        }));
                        return {
                            name: this.name,
                            description: this.description,
                            fields,
                            extensions: this.extensions,
                            astNode: this.astNode,
                            extensionASTNodes: this.extensionASTNodes,
                            isOneOf: this.isOneOf
                        };
                    }
                    toString() {
                        return this.name;
                    }
                    toJSON() {
                        return this.toString();
                    }
                }
                exports.GraphQLInputObjectType = GraphQLInputObjectType;

                function defineInputFieldMap(config) {
                    const fieldMap = resolveObjMapThunk(config.fields);
                    isPlainObj(fieldMap) || (0, _devAssert.devAssert)(false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`);
                    return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => {
                        !('resolve' in fieldConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.`);
                        return {
                            name: (0, _assertName.assertName)(fieldName),
                            description: fieldConfig.description,
                            type: fieldConfig.type,
                            defaultValue: fieldConfig.defaultValue,
                            deprecationReason: fieldConfig.deprecationReason,
                            extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions),
                            astNode: fieldConfig.astNode
                        };
                    });
                }

                function isRequiredInputField(field) {
                    return isNonNullType(field.type) && field.defaultValue === undefined;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/type/directives.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/type/directives.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.GraphQLSpecifiedByDirective = exports.GraphQLSkipDirective = exports.GraphQLOneOfDirective = exports.GraphQLIncludeDirective = exports.GraphQLDirective = exports.GraphQLDeprecatedDirective = exports.DEFAULT_DEPRECATION_REASON = void 0;
                exports.assertDirective = assertDirective;
                exports.isDirective = isDirective;
                exports.isSpecifiedDirective = isSpecifiedDirective;
                exports.specifiedDirectives = void 0;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _instanceOf = __webpack_require__( /*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs");
                var _isObjectLike = __webpack_require__( /*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
                var _toObjMap = __webpack_require__( /*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs");
                var _directiveLocation = __webpack_require__( /*! ../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");
                var _assertName = __webpack_require__( /*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs");
                var _definition = __webpack_require__( /*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _scalars = __webpack_require__( /*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
                /**
                 * Test if the given value is a GraphQL directive.
                 */

                function isDirective(directive) {
                    return (0, _instanceOf.instanceOf)(directive, GraphQLDirective);
                }

                function assertDirective(directive) {
                    if (!isDirective(directive)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(directive)} to be a GraphQL directive.`);
                    }
                    return directive;
                }
                /**
                 * Custom extensions
                 *
                 * @remarks
                 * Use a unique identifier name for your extension, for example the name of
                 * your library or project. Do not use a shortened identifier as this increases
                 * the risk of conflicts. We recommend you add at most one extension field,
                 * an object which can contain all the values you need.
                 */

                /**
                 * Directives are used by the GraphQL runtime as a way of modifying execution
                 * behavior. Type system creators will usually not create these directly.
                 */
                class GraphQLDirective {
                    constructor(config) {
                        var _config$isRepeatable, _config$args;
                        this.name = (0, _assertName.assertName)(config.name);
                        this.description = config.description;
                        this.locations = config.locations;
                        this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
                        this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
                        this.astNode = config.astNode;
                        Array.isArray(config.locations) || (0, _devAssert.devAssert)(false, `@${config.name} locations must be an Array.`);
                        const args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {};
                        (0, _isObjectLike.isObjectLike)(args) && !Array.isArray(args) || (0, _devAssert.devAssert)(false, `@${config.name} args must be an object with argument names as keys.`);
                        this.args = (0, _definition.defineArguments)(args);
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLDirective';
                    }
                    toConfig() {
                        return {
                            name: this.name,
                            description: this.description,
                            locations: this.locations,
                            args: (0, _definition.argsToArgsConfig)(this.args),
                            isRepeatable: this.isRepeatable,
                            extensions: this.extensions,
                            astNode: this.astNode
                        };
                    }
                    toString() {
                        return '@' + this.name;
                    }
                    toJSON() {
                        return this.toString();
                    }
                }

                /**
                 * Used to conditionally include fields or fragments.
                 */
                exports.GraphQLDirective = GraphQLDirective;
                const GraphQLIncludeDirective = exports.GraphQLIncludeDirective = new GraphQLDirective({
                    name: 'include',
                    description: 'Directs the executor to include this field or fragment only when the `if` argument is true.',
                    locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT],
                    args: {
                        if: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
                            description: 'Included when true.'
                        }
                    }
                });
                /**
                 * Used to conditionally skip (exclude) fields or fragments.
                 */

                const GraphQLSkipDirective = exports.GraphQLSkipDirective = new GraphQLDirective({
                    name: 'skip',
                    description: 'Directs the executor to skip this field or fragment when the `if` argument is true.',
                    locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT],
                    args: {
                        if: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
                            description: 'Skipped when true.'
                        }
                    }
                });
                /**
                 * Constant string used for default reason for a deprecation.
                 */

                const DEFAULT_DEPRECATION_REASON = exports.DEFAULT_DEPRECATION_REASON = 'No longer supported';
                /**
                 * Used to declare element of a GraphQL schema as deprecated.
                 */

                const GraphQLDeprecatedDirective = exports.GraphQLDeprecatedDirective = new GraphQLDirective({
                    name: 'deprecated',
                    description: 'Marks an element of a GraphQL schema as no longer supported.',
                    locations: [_directiveLocation.DirectiveLocation.FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ENUM_VALUE],
                    args: {
                        reason: {
                            type: _scalars.GraphQLString,
                            description: 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',
                            defaultValue: DEFAULT_DEPRECATION_REASON
                        }
                    }
                });
                /**
                 * Used to provide a URL for specifying the behavior of custom scalar definitions.
                 */

                const GraphQLSpecifiedByDirective = exports.GraphQLSpecifiedByDirective = new GraphQLDirective({
                    name: 'specifiedBy',
                    description: 'Exposes a URL that specifies the behavior of this scalar.',
                    locations: [_directiveLocation.DirectiveLocation.SCALAR],
                    args: {
                        url: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
                            description: 'The URL that specifies the behavior of this scalar.'
                        }
                    }
                });
                /**
                 * Used to indicate an Input Object is a OneOf Input Object.
                 */

                const GraphQLOneOfDirective = exports.GraphQLOneOfDirective = new GraphQLDirective({
                    name: 'oneOf',
                    description: 'Indicates exactly one field must be supplied and this field must not be `null`.',
                    locations: [_directiveLocation.DirectiveLocation.INPUT_OBJECT],
                    args: {}
                });
                /**
                 * The full list of specified directives.
                 */

                const specifiedDirectives = exports.specifiedDirectives = Object.freeze([GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective, GraphQLOneOfDirective]);

                function isSpecifiedDirective(directive) {
                    return specifiedDirectives.some(({
                        name
                    }) => name === directive.name);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/type/index.mjs":
            /*!****************************************************!*\
              !*** ../../../node_modules/graphql/type/index.mjs ***!
              \****************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", ({
                    enumerable: true,
                    get: function() {
                        return _directives.DEFAULT_DEPRECATION_REASON;
                    }
                }));
                Object.defineProperty(exports, "GRAPHQL_MAX_INT", ({
                    enumerable: true,
                    get: function() {
                        return _scalars.GRAPHQL_MAX_INT;
                    }
                }));
                Object.defineProperty(exports, "GRAPHQL_MIN_INT", ({
                    enumerable: true,
                    get: function() {
                        return _scalars.GRAPHQL_MIN_INT;
                    }
                }));
                Object.defineProperty(exports, "GraphQLBoolean", ({
                    enumerable: true,
                    get: function() {
                        return _scalars.GraphQLBoolean;
                    }
                }));
                Object.defineProperty(exports, "GraphQLDeprecatedDirective", ({
                    enumerable: true,
                    get: function() {
                        return _directives.GraphQLDeprecatedDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLDirective", ({
                    enumerable: true,
                    get: function() {
                        return _directives.GraphQLDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLEnumType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.GraphQLEnumType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLFloat", ({
                    enumerable: true,
                    get: function() {
                        return _scalars.GraphQLFloat;
                    }
                }));
                Object.defineProperty(exports, "GraphQLID", ({
                    enumerable: true,
                    get: function() {
                        return _scalars.GraphQLID;
                    }
                }));
                Object.defineProperty(exports, "GraphQLIncludeDirective", ({
                    enumerable: true,
                    get: function() {
                        return _directives.GraphQLIncludeDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLInputObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.GraphQLInputObjectType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLInt", ({
                    enumerable: true,
                    get: function() {
                        return _scalars.GraphQLInt;
                    }
                }));
                Object.defineProperty(exports, "GraphQLInterfaceType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.GraphQLInterfaceType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLList", ({
                    enumerable: true,
                    get: function() {
                        return _definition.GraphQLList;
                    }
                }));
                Object.defineProperty(exports, "GraphQLNonNull", ({
                    enumerable: true,
                    get: function() {
                        return _definition.GraphQLNonNull;
                    }
                }));
                Object.defineProperty(exports, "GraphQLObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.GraphQLObjectType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLOneOfDirective", ({
                    enumerable: true,
                    get: function() {
                        return _directives.GraphQLOneOfDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLScalarType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.GraphQLScalarType;
                    }
                }));
                Object.defineProperty(exports, "GraphQLSchema", ({
                    enumerable: true,
                    get: function() {
                        return _schema.GraphQLSchema;
                    }
                }));
                Object.defineProperty(exports, "GraphQLSkipDirective", ({
                    enumerable: true,
                    get: function() {
                        return _directives.GraphQLSkipDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLSpecifiedByDirective", ({
                    enumerable: true,
                    get: function() {
                        return _directives.GraphQLSpecifiedByDirective;
                    }
                }));
                Object.defineProperty(exports, "GraphQLString", ({
                    enumerable: true,
                    get: function() {
                        return _scalars.GraphQLString;
                    }
                }));
                Object.defineProperty(exports, "GraphQLUnionType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.GraphQLUnionType;
                    }
                }));
                Object.defineProperty(exports, "SchemaMetaFieldDef", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.SchemaMetaFieldDef;
                    }
                }));
                Object.defineProperty(exports, "TypeKind", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.TypeKind;
                    }
                }));
                Object.defineProperty(exports, "TypeMetaFieldDef", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.TypeMetaFieldDef;
                    }
                }));
                Object.defineProperty(exports, "TypeNameMetaFieldDef", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.TypeNameMetaFieldDef;
                    }
                }));
                Object.defineProperty(exports, "__Directive", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.__Directive;
                    }
                }));
                Object.defineProperty(exports, "__DirectiveLocation", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.__DirectiveLocation;
                    }
                }));
                Object.defineProperty(exports, "__EnumValue", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.__EnumValue;
                    }
                }));
                Object.defineProperty(exports, "__Field", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.__Field;
                    }
                }));
                Object.defineProperty(exports, "__InputValue", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.__InputValue;
                    }
                }));
                Object.defineProperty(exports, "__Schema", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.__Schema;
                    }
                }));
                Object.defineProperty(exports, "__Type", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.__Type;
                    }
                }));
                Object.defineProperty(exports, "__TypeKind", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.__TypeKind;
                    }
                }));
                Object.defineProperty(exports, "assertAbstractType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertAbstractType;
                    }
                }));
                Object.defineProperty(exports, "assertCompositeType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertCompositeType;
                    }
                }));
                Object.defineProperty(exports, "assertDirective", ({
                    enumerable: true,
                    get: function() {
                        return _directives.assertDirective;
                    }
                }));
                Object.defineProperty(exports, "assertEnumType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertEnumType;
                    }
                }));
                Object.defineProperty(exports, "assertEnumValueName", ({
                    enumerable: true,
                    get: function() {
                        return _assertName.assertEnumValueName;
                    }
                }));
                Object.defineProperty(exports, "assertInputObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertInputObjectType;
                    }
                }));
                Object.defineProperty(exports, "assertInputType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertInputType;
                    }
                }));
                Object.defineProperty(exports, "assertInterfaceType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertInterfaceType;
                    }
                }));
                Object.defineProperty(exports, "assertLeafType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertLeafType;
                    }
                }));
                Object.defineProperty(exports, "assertListType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertListType;
                    }
                }));
                Object.defineProperty(exports, "assertName", ({
                    enumerable: true,
                    get: function() {
                        return _assertName.assertName;
                    }
                }));
                Object.defineProperty(exports, "assertNamedType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertNamedType;
                    }
                }));
                Object.defineProperty(exports, "assertNonNullType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertNonNullType;
                    }
                }));
                Object.defineProperty(exports, "assertNullableType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertNullableType;
                    }
                }));
                Object.defineProperty(exports, "assertObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertObjectType;
                    }
                }));
                Object.defineProperty(exports, "assertOutputType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertOutputType;
                    }
                }));
                Object.defineProperty(exports, "assertScalarType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertScalarType;
                    }
                }));
                Object.defineProperty(exports, "assertSchema", ({
                    enumerable: true,
                    get: function() {
                        return _schema.assertSchema;
                    }
                }));
                Object.defineProperty(exports, "assertType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertType;
                    }
                }));
                Object.defineProperty(exports, "assertUnionType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertUnionType;
                    }
                }));
                Object.defineProperty(exports, "assertValidSchema", ({
                    enumerable: true,
                    get: function() {
                        return _validate.assertValidSchema;
                    }
                }));
                Object.defineProperty(exports, "assertWrappingType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.assertWrappingType;
                    }
                }));
                Object.defineProperty(exports, "getNamedType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.getNamedType;
                    }
                }));
                Object.defineProperty(exports, "getNullableType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.getNullableType;
                    }
                }));
                Object.defineProperty(exports, "introspectionTypes", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.introspectionTypes;
                    }
                }));
                Object.defineProperty(exports, "isAbstractType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isAbstractType;
                    }
                }));
                Object.defineProperty(exports, "isCompositeType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isCompositeType;
                    }
                }));
                Object.defineProperty(exports, "isDirective", ({
                    enumerable: true,
                    get: function() {
                        return _directives.isDirective;
                    }
                }));
                Object.defineProperty(exports, "isEnumType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isEnumType;
                    }
                }));
                Object.defineProperty(exports, "isInputObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isInputObjectType;
                    }
                }));
                Object.defineProperty(exports, "isInputType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isInputType;
                    }
                }));
                Object.defineProperty(exports, "isInterfaceType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isInterfaceType;
                    }
                }));
                Object.defineProperty(exports, "isIntrospectionType", ({
                    enumerable: true,
                    get: function() {
                        return _introspection.isIntrospectionType;
                    }
                }));
                Object.defineProperty(exports, "isLeafType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isLeafType;
                    }
                }));
                Object.defineProperty(exports, "isListType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isListType;
                    }
                }));
                Object.defineProperty(exports, "isNamedType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isNamedType;
                    }
                }));
                Object.defineProperty(exports, "isNonNullType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isNonNullType;
                    }
                }));
                Object.defineProperty(exports, "isNullableType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isNullableType;
                    }
                }));
                Object.defineProperty(exports, "isObjectType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isObjectType;
                    }
                }));
                Object.defineProperty(exports, "isOutputType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isOutputType;
                    }
                }));
                Object.defineProperty(exports, "isRequiredArgument", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isRequiredArgument;
                    }
                }));
                Object.defineProperty(exports, "isRequiredInputField", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isRequiredInputField;
                    }
                }));
                Object.defineProperty(exports, "isScalarType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isScalarType;
                    }
                }));
                Object.defineProperty(exports, "isSchema", ({
                    enumerable: true,
                    get: function() {
                        return _schema.isSchema;
                    }
                }));
                Object.defineProperty(exports, "isSpecifiedDirective", ({
                    enumerable: true,
                    get: function() {
                        return _directives.isSpecifiedDirective;
                    }
                }));
                Object.defineProperty(exports, "isSpecifiedScalarType", ({
                    enumerable: true,
                    get: function() {
                        return _scalars.isSpecifiedScalarType;
                    }
                }));
                Object.defineProperty(exports, "isType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isType;
                    }
                }));
                Object.defineProperty(exports, "isUnionType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isUnionType;
                    }
                }));
                Object.defineProperty(exports, "isWrappingType", ({
                    enumerable: true,
                    get: function() {
                        return _definition.isWrappingType;
                    }
                }));
                Object.defineProperty(exports, "resolveObjMapThunk", ({
                    enumerable: true,
                    get: function() {
                        return _definition.resolveObjMapThunk;
                    }
                }));
                Object.defineProperty(exports, "resolveReadonlyArrayThunk", ({
                    enumerable: true,
                    get: function() {
                        return _definition.resolveReadonlyArrayThunk;
                    }
                }));
                Object.defineProperty(exports, "specifiedDirectives", ({
                    enumerable: true,
                    get: function() {
                        return _directives.specifiedDirectives;
                    }
                }));
                Object.defineProperty(exports, "specifiedScalarTypes", ({
                    enumerable: true,
                    get: function() {
                        return _scalars.specifiedScalarTypes;
                    }
                }));
                Object.defineProperty(exports, "validateSchema", ({
                    enumerable: true,
                    get: function() {
                        return _validate.validateSchema;
                    }
                }));
                var _schema = __webpack_require__( /*! ./schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
                var _definition = __webpack_require__( /*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _directives = __webpack_require__( /*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                var _scalars = __webpack_require__( /*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
                var _introspection = __webpack_require__( /*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                var _validate = __webpack_require__( /*! ./validate.mjs */ "../../../node_modules/graphql/type/validate.mjs");
                var _assertName = __webpack_require__( /*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs");

                /***/
            }),

        /***/
        "../../../node_modules/graphql/type/introspection.mjs":
            /*!************************************************************!*\
              !*** ../../../node_modules/graphql/type/introspection.mjs ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.introspectionTypes = exports.__TypeKind = exports.__Type = exports.__Schema = exports.__InputValue = exports.__Field = exports.__EnumValue = exports.__DirectiveLocation = exports.__Directive = exports.TypeNameMetaFieldDef = exports.TypeMetaFieldDef = exports.TypeKind = exports.SchemaMetaFieldDef = void 0;
                exports.isIntrospectionType = isIntrospectionType;
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _directiveLocation = __webpack_require__( /*! ../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");
                var _printer = __webpack_require__( /*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _astFromValue = __webpack_require__( /*! ../utilities/astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs");
                var _definition = __webpack_require__( /*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _scalars = __webpack_require__( /*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
                const __Schema = exports.__Schema = new _definition.GraphQLObjectType({
                    name: '__Schema',
                    description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.',
                    fields: () => ({
                        description: {
                            type: _scalars.GraphQLString,
                            resolve: schema => schema.description
                        },
                        types: {
                            description: 'A list of all types supported by this server.',
                            type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type))),
                            resolve(schema) {
                                return Object.values(schema.getTypeMap());
                            }
                        },
                        queryType: {
                            description: 'The type that query operations will be rooted at.',
                            type: new _definition.GraphQLNonNull(__Type),
                            resolve: schema => schema.getQueryType()
                        },
                        mutationType: {
                            description: 'If this server supports mutation, the type that mutation operations will be rooted at.',
                            type: __Type,
                            resolve: schema => schema.getMutationType()
                        },
                        subscriptionType: {
                            description: 'If this server support subscription, the type that subscription operations will be rooted at.',
                            type: __Type,
                            resolve: schema => schema.getSubscriptionType()
                        },
                        directives: {
                            description: 'A list of all directives supported by this server.',
                            type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Directive))),
                            resolve: schema => schema.getDirectives()
                        }
                    })
                });
                const __Directive = exports.__Directive = new _definition.GraphQLObjectType({
                    name: '__Directive',
                    description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
                    fields: () => ({
                        name: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
                            resolve: directive => directive.name
                        },
                        description: {
                            type: _scalars.GraphQLString,
                            resolve: directive => directive.description
                        },
                        isRepeatable: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
                            resolve: directive => directive.isRepeatable
                        },
                        locations: {
                            type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__DirectiveLocation))),
                            resolve: directive => directive.locations
                        },
                        args: {
                            type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))),
                            args: {
                                includeDeprecated: {
                                    type: _scalars.GraphQLBoolean,
                                    defaultValue: false
                                }
                            },
                            resolve(field, {
                                includeDeprecated
                            }) {
                                return includeDeprecated ? field.args : field.args.filter(arg => arg.deprecationReason == null);
                            }
                        }
                    })
                });
                const __DirectiveLocation = exports.__DirectiveLocation = new _definition.GraphQLEnumType({
                    name: '__DirectiveLocation',
                    description: 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.',
                    values: {
                        QUERY: {
                            value: _directiveLocation.DirectiveLocation.QUERY,
                            description: 'Location adjacent to a query operation.'
                        },
                        MUTATION: {
                            value: _directiveLocation.DirectiveLocation.MUTATION,
                            description: 'Location adjacent to a mutation operation.'
                        },
                        SUBSCRIPTION: {
                            value: _directiveLocation.DirectiveLocation.SUBSCRIPTION,
                            description: 'Location adjacent to a subscription operation.'
                        },
                        FIELD: {
                            value: _directiveLocation.DirectiveLocation.FIELD,
                            description: 'Location adjacent to a field.'
                        },
                        FRAGMENT_DEFINITION: {
                            value: _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION,
                            description: 'Location adjacent to a fragment definition.'
                        },
                        FRAGMENT_SPREAD: {
                            value: _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD,
                            description: 'Location adjacent to a fragment spread.'
                        },
                        INLINE_FRAGMENT: {
                            value: _directiveLocation.DirectiveLocation.INLINE_FRAGMENT,
                            description: 'Location adjacent to an inline fragment.'
                        },
                        VARIABLE_DEFINITION: {
                            value: _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION,
                            description: 'Location adjacent to a variable definition.'
                        },
                        SCHEMA: {
                            value: _directiveLocation.DirectiveLocation.SCHEMA,
                            description: 'Location adjacent to a schema definition.'
                        },
                        SCALAR: {
                            value: _directiveLocation.DirectiveLocation.SCALAR,
                            description: 'Location adjacent to a scalar definition.'
                        },
                        OBJECT: {
                            value: _directiveLocation.DirectiveLocation.OBJECT,
                            description: 'Location adjacent to an object type definition.'
                        },
                        FIELD_DEFINITION: {
                            value: _directiveLocation.DirectiveLocation.FIELD_DEFINITION,
                            description: 'Location adjacent to a field definition.'
                        },
                        ARGUMENT_DEFINITION: {
                            value: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION,
                            description: 'Location adjacent to an argument definition.'
                        },
                        INTERFACE: {
                            value: _directiveLocation.DirectiveLocation.INTERFACE,
                            description: 'Location adjacent to an interface definition.'
                        },
                        UNION: {
                            value: _directiveLocation.DirectiveLocation.UNION,
                            description: 'Location adjacent to a union definition.'
                        },
                        ENUM: {
                            value: _directiveLocation.DirectiveLocation.ENUM,
                            description: 'Location adjacent to an enum definition.'
                        },
                        ENUM_VALUE: {
                            value: _directiveLocation.DirectiveLocation.ENUM_VALUE,
                            description: 'Location adjacent to an enum value definition.'
                        },
                        INPUT_OBJECT: {
                            value: _directiveLocation.DirectiveLocation.INPUT_OBJECT,
                            description: 'Location adjacent to an input object type definition.'
                        },
                        INPUT_FIELD_DEFINITION: {
                            value: _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION,
                            description: 'Location adjacent to an input object field definition.'
                        }
                    }
                });
                const __Type = exports.__Type = new _definition.GraphQLObjectType({
                    name: '__Type',
                    description: 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.',
                    fields: () => ({
                        kind: {
                            type: new _definition.GraphQLNonNull(__TypeKind),
                            resolve(type) {
                                if ((0, _definition.isScalarType)(type)) {
                                    return TypeKind.SCALAR;
                                }
                                if ((0, _definition.isObjectType)(type)) {
                                    return TypeKind.OBJECT;
                                }
                                if ((0, _definition.isInterfaceType)(type)) {
                                    return TypeKind.INTERFACE;
                                }
                                if ((0, _definition.isUnionType)(type)) {
                                    return TypeKind.UNION;
                                }
                                if ((0, _definition.isEnumType)(type)) {
                                    return TypeKind.ENUM;
                                }
                                if ((0, _definition.isInputObjectType)(type)) {
                                    return TypeKind.INPUT_OBJECT;
                                }
                                if ((0, _definition.isListType)(type)) {
                                    return TypeKind.LIST;
                                }
                                if ((0, _definition.isNonNullType)(type)) {
                                    return TypeKind.NON_NULL;
                                }
                                /* c8 ignore next 3 */
                                // Not reachable, all possible types have been considered)

                                false || (0, _invariant.invariant)(false, `Unexpected type: "${(0, _inspect.inspect)(type)}".`);
                            }
                        },
                        name: {
                            type: _scalars.GraphQLString,
                            resolve: type => 'name' in type ? type.name : undefined
                        },
                        description: {
                            type: _scalars.GraphQLString,
                            resolve: (type // FIXME: add test case
                                ) => /* c8 ignore next */
                                'description' in type ? type.description : undefined
                        },
                        specifiedByURL: {
                            type: _scalars.GraphQLString,
                            resolve: obj => 'specifiedByURL' in obj ? obj.specifiedByURL : undefined
                        },
                        fields: {
                            type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Field)),
                            args: {
                                includeDeprecated: {
                                    type: _scalars.GraphQLBoolean,
                                    defaultValue: false
                                }
                            },
                            resolve(type, {
                                includeDeprecated
                            }) {
                                if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) {
                                    const fields = Object.values(type.getFields());
                                    return includeDeprecated ? fields : fields.filter(field => field.deprecationReason == null);
                                }
                            }
                        },
                        interfaces: {
                            type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),
                            resolve(type) {
                                if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) {
                                    return type.getInterfaces();
                                }
                            }
                        },
                        possibleTypes: {
                            type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),
                            resolve(type, _args, _context, {
                                schema
                            }) {
                                if ((0, _definition.isAbstractType)(type)) {
                                    return schema.getPossibleTypes(type);
                                }
                            }
                        },
                        enumValues: {
                            type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__EnumValue)),
                            args: {
                                includeDeprecated: {
                                    type: _scalars.GraphQLBoolean,
                                    defaultValue: false
                                }
                            },
                            resolve(type, {
                                includeDeprecated
                            }) {
                                if ((0, _definition.isEnumType)(type)) {
                                    const values = type.getValues();
                                    return includeDeprecated ? values : values.filter(field => field.deprecationReason == null);
                                }
                            }
                        },
                        inputFields: {
                            type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue)),
                            args: {
                                includeDeprecated: {
                                    type: _scalars.GraphQLBoolean,
                                    defaultValue: false
                                }
                            },
                            resolve(type, {
                                includeDeprecated
                            }) {
                                if ((0, _definition.isInputObjectType)(type)) {
                                    const values = Object.values(type.getFields());
                                    return includeDeprecated ? values : values.filter(field => field.deprecationReason == null);
                                }
                            }
                        },
                        ofType: {
                            type: __Type,
                            resolve: type => 'ofType' in type ? type.ofType : undefined
                        },
                        isOneOf: {
                            type: _scalars.GraphQLBoolean,
                            resolve: type => {
                                if ((0, _definition.isInputObjectType)(type)) {
                                    return type.isOneOf;
                                }
                            }
                        }
                    })
                });
                const __Field = exports.__Field = new _definition.GraphQLObjectType({
                    name: '__Field',
                    description: 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.',
                    fields: () => ({
                        name: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
                            resolve: field => field.name
                        },
                        description: {
                            type: _scalars.GraphQLString,
                            resolve: field => field.description
                        },
                        args: {
                            type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))),
                            args: {
                                includeDeprecated: {
                                    type: _scalars.GraphQLBoolean,
                                    defaultValue: false
                                }
                            },
                            resolve(field, {
                                includeDeprecated
                            }) {
                                return includeDeprecated ? field.args : field.args.filter(arg => arg.deprecationReason == null);
                            }
                        },
                        type: {
                            type: new _definition.GraphQLNonNull(__Type),
                            resolve: field => field.type
                        },
                        isDeprecated: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
                            resolve: field => field.deprecationReason != null
                        },
                        deprecationReason: {
                            type: _scalars.GraphQLString,
                            resolve: field => field.deprecationReason
                        }
                    })
                });
                const __InputValue = exports.__InputValue = new _definition.GraphQLObjectType({
                    name: '__InputValue',
                    description: 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.',
                    fields: () => ({
                        name: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
                            resolve: inputValue => inputValue.name
                        },
                        description: {
                            type: _scalars.GraphQLString,
                            resolve: inputValue => inputValue.description
                        },
                        type: {
                            type: new _definition.GraphQLNonNull(__Type),
                            resolve: inputValue => inputValue.type
                        },
                        defaultValue: {
                            type: _scalars.GraphQLString,
                            description: 'A GraphQL-formatted string representing the default value for this input value.',
                            resolve(inputValue) {
                                const {
                                    type,
                                    defaultValue
                                } = inputValue;
                                const valueAST = (0, _astFromValue.astFromValue)(defaultValue, type);
                                return valueAST ? (0, _printer.print)(valueAST) : null;
                            }
                        },
                        isDeprecated: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
                            resolve: field => field.deprecationReason != null
                        },
                        deprecationReason: {
                            type: _scalars.GraphQLString,
                            resolve: obj => obj.deprecationReason
                        }
                    })
                });
                const __EnumValue = exports.__EnumValue = new _definition.GraphQLObjectType({
                    name: '__EnumValue',
                    description: 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.',
                    fields: () => ({
                        name: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
                            resolve: enumValue => enumValue.name
                        },
                        description: {
                            type: _scalars.GraphQLString,
                            resolve: enumValue => enumValue.description
                        },
                        isDeprecated: {
                            type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
                            resolve: enumValue => enumValue.deprecationReason != null
                        },
                        deprecationReason: {
                            type: _scalars.GraphQLString,
                            resolve: enumValue => enumValue.deprecationReason
                        }
                    })
                });
                var TypeKind;
                (function(TypeKind) {
                    TypeKind['SCALAR'] = 'SCALAR';
                    TypeKind['OBJECT'] = 'OBJECT';
                    TypeKind['INTERFACE'] = 'INTERFACE';
                    TypeKind['UNION'] = 'UNION';
                    TypeKind['ENUM'] = 'ENUM';
                    TypeKind['INPUT_OBJECT'] = 'INPUT_OBJECT';
                    TypeKind['LIST'] = 'LIST';
                    TypeKind['NON_NULL'] = 'NON_NULL';
                })(TypeKind || (exports.TypeKind = TypeKind = {}));
                const __TypeKind = exports.__TypeKind = new _definition.GraphQLEnumType({
                    name: '__TypeKind',
                    description: 'An enum describing what kind of type a given `__Type` is.',
                    values: {
                        SCALAR: {
                            value: TypeKind.SCALAR,
                            description: 'Indicates this type is a scalar.'
                        },
                        OBJECT: {
                            value: TypeKind.OBJECT,
                            description: 'Indicates this type is an object. `fields` and `interfaces` are valid fields.'
                        },
                        INTERFACE: {
                            value: TypeKind.INTERFACE,
                            description: 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.'
                        },
                        UNION: {
                            value: TypeKind.UNION,
                            description: 'Indicates this type is a union. `possibleTypes` is a valid field.'
                        },
                        ENUM: {
                            value: TypeKind.ENUM,
                            description: 'Indicates this type is an enum. `enumValues` is a valid field.'
                        },
                        INPUT_OBJECT: {
                            value: TypeKind.INPUT_OBJECT,
                            description: 'Indicates this type is an input object. `inputFields` is a valid field.'
                        },
                        LIST: {
                            value: TypeKind.LIST,
                            description: 'Indicates this type is a list. `ofType` is a valid field.'
                        },
                        NON_NULL: {
                            value: TypeKind.NON_NULL,
                            description: 'Indicates this type is a non-null. `ofType` is a valid field.'
                        }
                    }
                });
                /**
                 * Note that these are GraphQLField and not GraphQLFieldConfig,
                 * so the format for args is different.
                 */

                const SchemaMetaFieldDef = exports.SchemaMetaFieldDef = {
                    name: '__schema',
                    type: new _definition.GraphQLNonNull(__Schema),
                    description: 'Access the current type schema of this server.',
                    args: [],
                    resolve: (_source, _args, _context, {
                        schema
                    }) => schema,
                    deprecationReason: undefined,
                    extensions: Object.create(null),
                    astNode: undefined
                };
                const TypeMetaFieldDef = exports.TypeMetaFieldDef = {
                    name: '__type',
                    type: __Type,
                    description: 'Request the type information of a single type.',
                    args: [{
                        name: 'name',
                        description: undefined,
                        type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
                        defaultValue: undefined,
                        deprecationReason: undefined,
                        extensions: Object.create(null),
                        astNode: undefined
                    }],
                    resolve: (_source, {
                        name
                    }, _context, {
                        schema
                    }) => schema.getType(name),
                    deprecationReason: undefined,
                    extensions: Object.create(null),
                    astNode: undefined
                };
                const TypeNameMetaFieldDef = exports.TypeNameMetaFieldDef = {
                    name: '__typename',
                    type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
                    description: 'The name of the current Object type at runtime.',
                    args: [],
                    resolve: (_source, _args, _context, {
                        parentType
                    }) => parentType.name,
                    deprecationReason: undefined,
                    extensions: Object.create(null),
                    astNode: undefined
                };
                const introspectionTypes = exports.introspectionTypes = Object.freeze([__Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind]);

                function isIntrospectionType(type) {
                    return introspectionTypes.some(({
                        name
                    }) => type.name === name);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/type/scalars.mjs":
            /*!******************************************************!*\
              !*** ../../../node_modules/graphql/type/scalars.mjs ***!
              \******************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.GraphQLString = exports.GraphQLInt = exports.GraphQLID = exports.GraphQLFloat = exports.GraphQLBoolean = exports.GRAPHQL_MIN_INT = exports.GRAPHQL_MAX_INT = void 0;
                exports.isSpecifiedScalarType = isSpecifiedScalarType;
                exports.specifiedScalarTypes = void 0;
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _isObjectLike = __webpack_require__( /*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _printer = __webpack_require__( /*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _definition = __webpack_require__( /*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Maximum possible Int value as per GraphQL Spec (32-bit signed integer).
                 * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe up-to 2^53 - 1
                 * */

                const GRAPHQL_MAX_INT = exports.GRAPHQL_MAX_INT = 2147483647;
                /**
                 * Minimum possible Int value as per GraphQL Spec (32-bit signed integer).
                 * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe starting at -(2^53 - 1)
                 * */

                const GRAPHQL_MIN_INT = exports.GRAPHQL_MIN_INT = -2147483648;
                const GraphQLInt = exports.GraphQLInt = new _definition.GraphQLScalarType({
                    name: 'Int',
                    description: 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.',
                    serialize(outputValue) {
                        const coercedValue = serializeObject(outputValue);
                        if (typeof coercedValue === 'boolean') {
                            return coercedValue ? 1 : 0;
                        }
                        let num = coercedValue;
                        if (typeof coercedValue === 'string' && coercedValue !== '') {
                            num = Number(coercedValue);
                        }
                        if (typeof num !== 'number' || !Number.isInteger(num)) {
                            throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _inspect.inspect)(coercedValue)}`);
                        }
                        if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {
                            throw new _GraphQLError.GraphQLError('Int cannot represent non 32-bit signed integer value: ' + (0, _inspect.inspect)(coercedValue));
                        }
                        return num;
                    },
                    parseValue(inputValue) {
                        if (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) {
                            throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _inspect.inspect)(inputValue)}`);
                        }
                        if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) {
                            throw new _GraphQLError.GraphQLError(`Int cannot represent non 32-bit signed integer value: ${inputValue}`);
                        }
                        return inputValue;
                    },
                    parseLiteral(valueNode) {
                        if (valueNode.kind !== _kinds.Kind.INT) {
                            throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _printer.print)(valueNode)}`, {
                                nodes: valueNode
                            });
                        }
                        const num = parseInt(valueNode.value, 10);
                        if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {
                            throw new _GraphQLError.GraphQLError(`Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, {
                                nodes: valueNode
                            });
                        }
                        return num;
                    }
                });
                const GraphQLFloat = exports.GraphQLFloat = new _definition.GraphQLScalarType({
                    name: 'Float',
                    description: 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).',
                    serialize(outputValue) {
                        const coercedValue = serializeObject(outputValue);
                        if (typeof coercedValue === 'boolean') {
                            return coercedValue ? 1 : 0;
                        }
                        let num = coercedValue;
                        if (typeof coercedValue === 'string' && coercedValue !== '') {
                            num = Number(coercedValue);
                        }
                        if (typeof num !== 'number' || !Number.isFinite(num)) {
                            throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _inspect.inspect)(coercedValue)}`);
                        }
                        return num;
                    },
                    parseValue(inputValue) {
                        if (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) {
                            throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _inspect.inspect)(inputValue)}`);
                        }
                        return inputValue;
                    },
                    parseLiteral(valueNode) {
                        if (valueNode.kind !== _kinds.Kind.FLOAT && valueNode.kind !== _kinds.Kind.INT) {
                            throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _printer.print)(valueNode)}`, valueNode);
                        }
                        return parseFloat(valueNode.value);
                    }
                });
                const GraphQLString = exports.GraphQLString = new _definition.GraphQLScalarType({
                    name: 'String',
                    description: 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.',
                    serialize(outputValue) {
                        const coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not
                        // attempt to coerce object, function, symbol, or other types as strings.

                        if (typeof coercedValue === 'string') {
                            return coercedValue;
                        }
                        if (typeof coercedValue === 'boolean') {
                            return coercedValue ? 'true' : 'false';
                        }
                        if (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) {
                            return coercedValue.toString();
                        }
                        throw new _GraphQLError.GraphQLError(`String cannot represent value: ${(0, _inspect.inspect)(outputValue)}`);
                    },
                    parseValue(inputValue) {
                        if (typeof inputValue !== 'string') {
                            throw new _GraphQLError.GraphQLError(`String cannot represent a non string value: ${(0, _inspect.inspect)(inputValue)}`);
                        }
                        return inputValue;
                    },
                    parseLiteral(valueNode) {
                        if (valueNode.kind !== _kinds.Kind.STRING) {
                            throw new _GraphQLError.GraphQLError(`String cannot represent a non string value: ${(0, _printer.print)(valueNode)}`, {
                                nodes: valueNode
                            });
                        }
                        return valueNode.value;
                    }
                });
                const GraphQLBoolean = exports.GraphQLBoolean = new _definition.GraphQLScalarType({
                    name: 'Boolean',
                    description: 'The `Boolean` scalar type represents `true` or `false`.',
                    serialize(outputValue) {
                        const coercedValue = serializeObject(outputValue);
                        if (typeof coercedValue === 'boolean') {
                            return coercedValue;
                        }
                        if (Number.isFinite(coercedValue)) {
                            return coercedValue !== 0;
                        }
                        throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(coercedValue)}`);
                    },
                    parseValue(inputValue) {
                        if (typeof inputValue !== 'boolean') {
                            throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(inputValue)}`);
                        }
                        return inputValue;
                    },
                    parseLiteral(valueNode) {
                        if (valueNode.kind !== _kinds.Kind.BOOLEAN) {
                            throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _printer.print)(valueNode)}`, {
                                nodes: valueNode
                            });
                        }
                        return valueNode.value;
                    }
                });
                const GraphQLID = exports.GraphQLID = new _definition.GraphQLScalarType({
                    name: 'ID',
                    description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',
                    serialize(outputValue) {
                        const coercedValue = serializeObject(outputValue);
                        if (typeof coercedValue === 'string') {
                            return coercedValue;
                        }
                        if (Number.isInteger(coercedValue)) {
                            return String(coercedValue);
                        }
                        throw new _GraphQLError.GraphQLError(`ID cannot represent value: ${(0, _inspect.inspect)(outputValue)}`);
                    },
                    parseValue(inputValue) {
                        if (typeof inputValue === 'string') {
                            return inputValue;
                        }
                        if (typeof inputValue === 'number' && Number.isInteger(inputValue)) {
                            return inputValue.toString();
                        }
                        throw new _GraphQLError.GraphQLError(`ID cannot represent value: ${(0, _inspect.inspect)(inputValue)}`);
                    },
                    parseLiteral(valueNode) {
                        if (valueNode.kind !== _kinds.Kind.STRING && valueNode.kind !== _kinds.Kind.INT) {
                            throw new _GraphQLError.GraphQLError('ID cannot represent a non-string and non-integer value: ' + (0, _printer.print)(valueNode), {
                                nodes: valueNode
                            });
                        }
                        return valueNode.value;
                    }
                });
                const specifiedScalarTypes = exports.specifiedScalarTypes = Object.freeze([GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID]);

                function isSpecifiedScalarType(type) {
                    return specifiedScalarTypes.some(({
                        name
                    }) => type.name === name);
                } // Support serializing objects with custom valueOf() or toJSON() functions -
                // a common way to represent a complex value which can be represented as
                // a string (ex: MongoDB id objects).

                function serializeObject(outputValue) {
                    if ((0, _isObjectLike.isObjectLike)(outputValue)) {
                        if (typeof outputValue.valueOf === 'function') {
                            const valueOfResult = outputValue.valueOf();
                            if (!(0, _isObjectLike.isObjectLike)(valueOfResult)) {
                                return valueOfResult;
                            }
                        }
                        if (typeof outputValue.toJSON === 'function') {
                            return outputValue.toJSON();
                        }
                    }
                    return outputValue;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/type/schema.mjs":
            /*!*****************************************************!*\
              !*** ../../../node_modules/graphql/type/schema.mjs ***!
              \*****************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.GraphQLSchema = void 0;
                exports.assertSchema = assertSchema;
                exports.isSchema = isSchema;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _instanceOf = __webpack_require__( /*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs");
                var _isObjectLike = __webpack_require__( /*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
                var _toObjMap = __webpack_require__( /*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs");
                var _ast = __webpack_require__( /*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
                var _definition = __webpack_require__( /*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _directives = __webpack_require__( /*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                var _introspection = __webpack_require__( /*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                /**
                 * Test if the given value is a GraphQL schema.
                 */

                function isSchema(schema) {
                    return (0, _instanceOf.instanceOf)(schema, GraphQLSchema);
                }

                function assertSchema(schema) {
                    if (!isSchema(schema)) {
                        throw new Error(`Expected ${(0, _inspect.inspect)(schema)} to be a GraphQL schema.`);
                    }
                    return schema;
                }
                /**
                 * Custom extensions
                 *
                 * @remarks
                 * Use a unique identifier name for your extension, for example the name of
                 * your library or project. Do not use a shortened identifier as this increases
                 * the risk of conflicts. We recommend you add at most one extension field,
                 * an object which can contain all the values you need.
                 */

                /**
                 * Schema Definition
                 *
                 * A Schema is created by supplying the root types of each type of operation,
                 * query and mutation (optional). A schema definition is then supplied to the
                 * validator and executor.
                 *
                 * Example:
                 *
                 * ```ts
                 * const MyAppSchema = new GraphQLSchema({
                 *   query: MyAppQueryRootType,
                 *   mutation: MyAppMutationRootType,
                 * })
                 * ```
                 *
                 * Note: When the schema is constructed, by default only the types that are
                 * reachable by traversing the root types are included, other types must be
                 * explicitly referenced.
                 *
                 * Example:
                 *
                 * ```ts
                 * const characterInterface = new GraphQLInterfaceType({
                 *   name: 'Character',
                 *   ...
                 * });
                 *
                 * const humanType = new GraphQLObjectType({
                 *   name: 'Human',
                 *   interfaces: [characterInterface],
                 *   ...
                 * });
                 *
                 * const droidType = new GraphQLObjectType({
                 *   name: 'Droid',
                 *   interfaces: [characterInterface],
                 *   ...
                 * });
                 *
                 * const schema = new GraphQLSchema({
                 *   query: new GraphQLObjectType({
                 *     name: 'Query',
                 *     fields: {
                 *       hero: { type: characterInterface, ... },
                 *     }
                 *   }),
                 *   ...
                 *   // Since this schema references only the `Character` interface it's
                 *   // necessary to explicitly list the types that implement it if
                 *   // you want them to be included in the final schema.
                 *   types: [humanType, droidType],
                 * })
                 * ```
                 *
                 * Note: If an array of `directives` are provided to GraphQLSchema, that will be
                 * the exact list of directives represented and allowed. If `directives` is not
                 * provided then a default set of the specified directives (e.g. `@include` and
                 * `@skip`) will be used. If you wish to provide *additional* directives to these
                 * specified directives, you must explicitly declare them. Example:
                 *
                 * ```ts
                 * const MyAppSchema = new GraphQLSchema({
                 *   ...
                 *   directives: specifiedDirectives.concat([ myCustomDirective ]),
                 * })
                 * ```
                 */
                class GraphQLSchema {
                    // Used as a cache for validateSchema().
                    constructor(config) {
                        var _config$extensionASTN, _config$directives;

                        // If this schema was built from a source known to be valid, then it may be
                        // marked with assumeValid to avoid an additional type system validation.
                        this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors.

                        (0, _isObjectLike.isObjectLike)(config) || (0, _devAssert.devAssert)(false, 'Must provide configuration object.');
                        !config.types || Array.isArray(config.types) || (0, _devAssert.devAssert)(false, `"types" must be Array if provided but got: ${(0, _inspect.inspect)(config.types)}.`);
                        !config.directives || Array.isArray(config.directives) || (0, _devAssert.devAssert)(false, '"directives" must be Array if provided but got: ' + `${(0, _inspect.inspect)(config.directives)}.`);
                        this.description = config.description;
                        this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
                        this.astNode = config.astNode;
                        this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : [];
                        this._queryType = config.query;
                        this._mutationType = config.mutation;
                        this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default.

                        this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives; // To preserve order of user-provided types, we add first to add them to
                        // the set of "collected" types, so `collectReferencedTypes` ignore them.

                        const allReferencedTypes = new Set(config.types);
                        if (config.types != null) {
                            for (const type of config.types) {
                                // When we ready to process this type, we remove it from "collected" types
                                // and then add it together with all dependent types in the correct position.
                                allReferencedTypes.delete(type);
                                collectReferencedTypes(type, allReferencedTypes);
                            }
                        }
                        if (this._queryType != null) {
                            collectReferencedTypes(this._queryType, allReferencedTypes);
                        }
                        if (this._mutationType != null) {
                            collectReferencedTypes(this._mutationType, allReferencedTypes);
                        }
                        if (this._subscriptionType != null) {
                            collectReferencedTypes(this._subscriptionType, allReferencedTypes);
                        }
                        for (const directive of this._directives) {
                            // Directives are not validated until validateSchema() is called.
                            if ((0, _directives.isDirective)(directive)) {
                                for (const arg of directive.args) {
                                    collectReferencedTypes(arg.type, allReferencedTypes);
                                }
                            }
                        }
                        collectReferencedTypes(_introspection.__Schema, allReferencedTypes); // Storing the resulting map for reference by the schema.

                        this._typeMap = Object.create(null);
                        this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name.

                        this._implementationsMap = Object.create(null);
                        for (const namedType of allReferencedTypes) {
                            if (namedType == null) {
                                continue;
                            }
                            const typeName = namedType.name;
                            typeName || (0, _devAssert.devAssert)(false, 'One of the provided types for building the Schema is missing a name.');
                            if (this._typeMap[typeName] !== undefined) {
                                throw new Error(`Schema must contain uniquely named types but contains multiple types named "${typeName}".`);
                            }
                            this._typeMap[typeName] = namedType;
                            if ((0, _definition.isInterfaceType)(namedType)) {
                                // Store implementations by interface.
                                for (const iface of namedType.getInterfaces()) {
                                    if ((0, _definition.isInterfaceType)(iface)) {
                                        let implementations = this._implementationsMap[iface.name];
                                        if (implementations === undefined) {
                                            implementations = this._implementationsMap[iface.name] = {
                                                objects: [],
                                                interfaces: []
                                            };
                                        }
                                        implementations.interfaces.push(namedType);
                                    }
                                }
                            } else if ((0, _definition.isObjectType)(namedType)) {
                                // Store implementations by objects.
                                for (const iface of namedType.getInterfaces()) {
                                    if ((0, _definition.isInterfaceType)(iface)) {
                                        let implementations = this._implementationsMap[iface.name];
                                        if (implementations === undefined) {
                                            implementations = this._implementationsMap[iface.name] = {
                                                objects: [],
                                                interfaces: []
                                            };
                                        }
                                        implementations.objects.push(namedType);
                                    }
                                }
                            }
                        }
                    }
                    get[Symbol.toStringTag]() {
                        return 'GraphQLSchema';
                    }
                    getQueryType() {
                        return this._queryType;
                    }
                    getMutationType() {
                        return this._mutationType;
                    }
                    getSubscriptionType() {
                        return this._subscriptionType;
                    }
                    getRootType(operation) {
                        switch (operation) {
                            case _ast.OperationTypeNode.QUERY:
                                return this.getQueryType();
                            case _ast.OperationTypeNode.MUTATION:
                                return this.getMutationType();
                            case _ast.OperationTypeNode.SUBSCRIPTION:
                                return this.getSubscriptionType();
                        }
                    }
                    getTypeMap() {
                        return this._typeMap;
                    }
                    getType(name) {
                        return this.getTypeMap()[name];
                    }
                    getPossibleTypes(abstractType) {
                        return (0, _definition.isUnionType)(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects;
                    }
                    getImplementations(interfaceType) {
                        const implementations = this._implementationsMap[interfaceType.name];
                        return implementations !== null && implementations !== void 0 ? implementations : {
                            objects: [],
                            interfaces: []
                        };
                    }
                    isSubType(abstractType, maybeSubType) {
                        let map = this._subTypeMap[abstractType.name];
                        if (map === undefined) {
                            map = Object.create(null);
                            if ((0, _definition.isUnionType)(abstractType)) {
                                for (const type of abstractType.getTypes()) {
                                    map[type.name] = true;
                                }
                            } else {
                                const implementations = this.getImplementations(abstractType);
                                for (const type of implementations.objects) {
                                    map[type.name] = true;
                                }
                                for (const type of implementations.interfaces) {
                                    map[type.name] = true;
                                }
                            }
                            this._subTypeMap[abstractType.name] = map;
                        }
                        return map[maybeSubType.name] !== undefined;
                    }
                    getDirectives() {
                        return this._directives;
                    }
                    getDirective(name) {
                        return this.getDirectives().find(directive => directive.name === name);
                    }
                    toConfig() {
                        return {
                            description: this.description,
                            query: this.getQueryType(),
                            mutation: this.getMutationType(),
                            subscription: this.getSubscriptionType(),
                            types: Object.values(this.getTypeMap()),
                            directives: this.getDirectives(),
                            extensions: this.extensions,
                            astNode: this.astNode,
                            extensionASTNodes: this.extensionASTNodes,
                            assumeValid: this.__validationErrors !== undefined
                        };
                    }
                }
                exports.GraphQLSchema = GraphQLSchema;

                function collectReferencedTypes(type, typeSet) {
                    const namedType = (0, _definition.getNamedType)(type);
                    if (!typeSet.has(namedType)) {
                        typeSet.add(namedType);
                        if ((0, _definition.isUnionType)(namedType)) {
                            for (const memberType of namedType.getTypes()) {
                                collectReferencedTypes(memberType, typeSet);
                            }
                        } else if ((0, _definition.isObjectType)(namedType) || (0, _definition.isInterfaceType)(namedType)) {
                            for (const interfaceType of namedType.getInterfaces()) {
                                collectReferencedTypes(interfaceType, typeSet);
                            }
                            for (const field of Object.values(namedType.getFields())) {
                                collectReferencedTypes(field.type, typeSet);
                                for (const arg of field.args) {
                                    collectReferencedTypes(arg.type, typeSet);
                                }
                            }
                        } else if ((0, _definition.isInputObjectType)(namedType)) {
                            for (const field of Object.values(namedType.getFields())) {
                                collectReferencedTypes(field.type, typeSet);
                            }
                        }
                    }
                    return typeSet;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/type/validate.mjs":
            /*!*******************************************************!*\
              !*** ../../../node_modules/graphql/type/validate.mjs ***!
              \*******************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.assertValidSchema = assertValidSchema;
                exports.validateSchema = validateSchema;
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _ast = __webpack_require__( /*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
                var _typeComparators = __webpack_require__( /*! ../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs");
                var _definition = __webpack_require__( /*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _directives = __webpack_require__( /*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                var _introspection = __webpack_require__( /*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                var _schema = __webpack_require__( /*! ./schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
                /**
                 * Implements the "Type Validation" sub-sections of the specification's
                 * "Type System" section.
                 *
                 * Validation runs synchronously, returning an array of encountered errors, or
                 * an empty array if no errors were encountered and the Schema is valid.
                 */

                function validateSchema(schema) {
                    // First check to ensure the provided value is in fact a GraphQLSchema.
                    (0, _schema.assertSchema)(schema); // If this Schema has already been validated, return the previous results.

                    if (schema.__validationErrors) {
                        return schema.__validationErrors;
                    } // Validate the schema, producing a list of errors.

                    const context = new SchemaValidationContext(schema);
                    validateRootTypes(context);
                    validateDirectives(context);
                    validateTypes(context); // Persist the results of validation before returning to ensure validation
                    // does not run multiple times for this schema.

                    const errors = context.getErrors();
                    schema.__validationErrors = errors;
                    return errors;
                }
                /**
                 * Utility function which asserts a schema is valid by throwing an error if
                 * it is invalid.
                 */

                function assertValidSchema(schema) {
                    const errors = validateSchema(schema);
                    if (errors.length !== 0) {
                        throw new Error(errors.map(error => error.message).join('\n\n'));
                    }
                }
                class SchemaValidationContext {
                    constructor(schema) {
                        this._errors = [];
                        this.schema = schema;
                    }
                    reportError(message, nodes) {
                        const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes;
                        this._errors.push(new _GraphQLError.GraphQLError(message, {
                            nodes: _nodes
                        }));
                    }
                    getErrors() {
                        return this._errors;
                    }
                }

                function validateRootTypes(context) {
                    const schema = context.schema;
                    const queryType = schema.getQueryType();
                    if (!queryType) {
                        context.reportError('Query root type must be provided.', schema.astNode);
                    } else if (!(0, _definition.isObjectType)(queryType)) {
                        var _getOperationTypeNode;
                        context.reportError(`Query root type must be Object type, it cannot be ${(0, _inspect.inspect)(queryType)}.`, (_getOperationTypeNode = getOperationTypeNode(schema, _ast.OperationTypeNode.QUERY)) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode);
                    }
                    const mutationType = schema.getMutationType();
                    if (mutationType && !(0, _definition.isObjectType)(mutationType)) {
                        var _getOperationTypeNode2;
                        context.reportError('Mutation root type must be Object type if provided, it cannot be ' + `${(0, _inspect.inspect)(mutationType)}.`, (_getOperationTypeNode2 = getOperationTypeNode(schema, _ast.OperationTypeNode.MUTATION)) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode);
                    }
                    const subscriptionType = schema.getSubscriptionType();
                    if (subscriptionType && !(0, _definition.isObjectType)(subscriptionType)) {
                        var _getOperationTypeNode3;
                        context.reportError('Subscription root type must be Object type if provided, it cannot be ' + `${(0, _inspect.inspect)(subscriptionType)}.`, (_getOperationTypeNode3 = getOperationTypeNode(schema, _ast.OperationTypeNode.SUBSCRIPTION)) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode);
                    }
                }

                function getOperationTypeNode(schema, operation) {
                    var _flatMap$find;
                    return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes].flatMap(
                        // FIXME: https://github.com/graphql/graphql-js/issues/2203
                        schemaNode => {
                            var _schemaNode$operation;
                            return /* c8 ignore next */ (
                                (_schemaNode$operation = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.operationTypes) !== null && _schemaNode$operation !== void 0 ? _schemaNode$operation : []
                            );
                        }).find(operationNode => operationNode.operation === operation)) === null || _flatMap$find === void 0 ? void 0 : _flatMap$find.type;
                }

                function validateDirectives(context) {
                    for (const directive of context.schema.getDirectives()) {
                        // Ensure all directives are in fact GraphQL directives.
                        if (!(0, _directives.isDirective)(directive)) {
                            context.reportError(`Expected directive but got: ${(0, _inspect.inspect)(directive)}.`, directive === null || directive === void 0 ? void 0 : directive.astNode);
                            continue;
                        } // Ensure they are named correctly.

                        validateName(context, directive); // TODO: Ensure proper locations.
                        // Ensure the arguments are valid.

                        for (const arg of directive.args) {
                            // Ensure they are named correctly.
                            validateName(context, arg); // Ensure the type is an input type.

                            if (!(0, _definition.isInputType)(arg.type)) {
                                context.reportError(`The type of @${directive.name}(${arg.name}:) must be Input Type ` + `but got: ${(0, _inspect.inspect)(arg.type)}.`, arg.astNode);
                            }
                            if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) {
                                var _arg$astNode;
                                context.reportError(`Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type]);
                            }
                        }
                    }
                }

                function validateName(context, node) {
                    // Ensure names are valid, however introspection types opt out.
                    if (node.name.startsWith('__')) {
                        context.reportError(`Name "${node.name}" must not begin with "__", which is reserved by GraphQL introspection.`, node.astNode);
                    }
                }

                function validateTypes(context) {
                    const validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context);
                    const typeMap = context.schema.getTypeMap();
                    for (const type of Object.values(typeMap)) {
                        // Ensure all provided types are in fact GraphQL type.
                        if (!(0, _definition.isNamedType)(type)) {
                            context.reportError(`Expected GraphQL named type but got: ${(0, _inspect.inspect)(type)}.`, type.astNode);
                            continue;
                        } // Ensure it is named correctly (excluding introspection types).

                        if (!(0, _introspection.isIntrospectionType)(type)) {
                            validateName(context, type);
                        }
                        if ((0, _definition.isObjectType)(type)) {
                            // Ensure fields are valid
                            validateFields(context, type); // Ensure objects implement the interfaces they claim to.

                            validateInterfaces(context, type);
                        } else if ((0, _definition.isInterfaceType)(type)) {
                            // Ensure fields are valid.
                            validateFields(context, type); // Ensure interfaces implement the interfaces they claim to.

                            validateInterfaces(context, type);
                        } else if ((0, _definition.isUnionType)(type)) {
                            // Ensure Unions include valid member types.
                            validateUnionMembers(context, type);
                        } else if ((0, _definition.isEnumType)(type)) {
                            // Ensure Enums have valid values.
                            validateEnumValues(context, type);
                        } else if ((0, _definition.isInputObjectType)(type)) {
                            // Ensure Input Object fields are valid.
                            validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references

                            validateInputObjectCircularRefs(type);
                        }
                    }
                }

                function validateFields(context, type) {
                    const fields = Object.values(type.getFields()); // Objects and Interfaces both must define one or more fields.

                    if (fields.length === 0) {
                        context.reportError(`Type ${type.name} must define one or more fields.`, [type.astNode, ...type.extensionASTNodes]);
                    }
                    for (const field of fields) {
                        // Ensure they are named correctly.
                        validateName(context, field); // Ensure the type is an output type

                        if (!(0, _definition.isOutputType)(field.type)) {
                            var _field$astNode;
                            context.reportError(`The type of ${type.name}.${field.name} must be Output Type ` + `but got: ${(0, _inspect.inspect)(field.type)}.`, (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type);
                        } // Ensure the arguments are valid

                        for (const arg of field.args) {
                            const argName = arg.name; // Ensure they are named correctly.

                            validateName(context, arg); // Ensure the type is an input type

                            if (!(0, _definition.isInputType)(arg.type)) {
                                var _arg$astNode2;
                                context.reportError(`The type of ${type.name}.${field.name}(${argName}:) must be Input ` + `Type but got: ${(0, _inspect.inspect)(arg.type)}.`, (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type);
                            }
                            if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) {
                                var _arg$astNode3;
                                context.reportError(`Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type]);
                            }
                        }
                    }
                }

                function validateInterfaces(context, type) {
                    const ifaceTypeNames = Object.create(null);
                    for (const iface of type.getInterfaces()) {
                        if (!(0, _definition.isInterfaceType)(iface)) {
                            context.reportError(`Type ${(0, _inspect.inspect)(type)} must only implement Interface types, ` + `it cannot implement ${(0, _inspect.inspect)(iface)}.`, getAllImplementsInterfaceNodes(type, iface));
                            continue;
                        }
                        if (type === iface) {
                            context.reportError(`Type ${type.name} cannot implement itself because it would create a circular reference.`, getAllImplementsInterfaceNodes(type, iface));
                            continue;
                        }
                        if (ifaceTypeNames[iface.name]) {
                            context.reportError(`Type ${type.name} can only implement ${iface.name} once.`, getAllImplementsInterfaceNodes(type, iface));
                            continue;
                        }
                        ifaceTypeNames[iface.name] = true;
                        validateTypeImplementsAncestors(context, type, iface);
                        validateTypeImplementsInterface(context, type, iface);
                    }
                }

                function validateTypeImplementsInterface(context, type, iface) {
                    const typeFieldMap = type.getFields(); // Assert each interface field is implemented.

                    for (const ifaceField of Object.values(iface.getFields())) {
                        const fieldName = ifaceField.name;
                        const typeField = typeFieldMap[fieldName]; // Assert interface field exists on type.

                        if (!typeField) {
                            context.reportError(`Interface field ${iface.name}.${fieldName} expected but ${type.name} does not provide it.`, [ifaceField.astNode, type.astNode, ...type.extensionASTNodes]);
                            continue;
                        } // Assert interface field type is satisfied by type field type, by being
                        // a valid subtype. (covariant)

                        if (!(0, _typeComparators.isTypeSubTypeOf)(context.schema, typeField.type, ifaceField.type)) {
                            var _ifaceField$astNode, _typeField$astNode;
                            context.reportError(`Interface field ${iface.name}.${fieldName} expects type ` + `${(0, _inspect.inspect)(ifaceField.type)} but ${type.name}.${fieldName} ` + `is type ${(0, _inspect.inspect)(typeField.type)}.`, [(_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type]);
                        } // Assert each interface field arg is implemented.

                        for (const ifaceArg of ifaceField.args) {
                            const argName = ifaceArg.name;
                            const typeArg = typeField.args.find(arg => arg.name === argName); // Assert interface field arg exists on object field.

                            if (!typeArg) {
                                context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type.name}.${fieldName} does not provide it.`, [ifaceArg.astNode, typeField.astNode]);
                                continue;
                            } // Assert interface field arg type matches object field arg type.
                            // (invariant)
                            // TODO: change to contravariant?

                            if (!(0, _typeComparators.isEqualType)(ifaceArg.type, typeArg.type)) {
                                var _ifaceArg$astNode, _typeArg$astNode;
                                context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) ` + `expects type ${(0, _inspect.inspect)(ifaceArg.type)} but ` + `${type.name}.${fieldName}(${argName}:) is type ` + `${(0, _inspect.inspect)(typeArg.type)}.`, [(_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type]);
                            } // TODO: validate default values?
                        } // Assert additional arguments must not be required.

                        for (const typeArg of typeField.args) {
                            const argName = typeArg.name;
                            const ifaceArg = ifaceField.args.find(arg => arg.name === argName);
                            if (!ifaceArg && (0, _definition.isRequiredArgument)(typeArg)) {
                                context.reportError(`Object field ${type.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`, [typeArg.astNode, ifaceField.astNode]);
                            }
                        }
                    }
                }

                function validateTypeImplementsAncestors(context, type, iface) {
                    const ifaceInterfaces = type.getInterfaces();
                    for (const transitive of iface.getInterfaces()) {
                        if (!ifaceInterfaces.includes(transitive)) {
                            context.reportError(transitive === type ? `Type ${type.name} cannot implement ${iface.name} because it would create a circular reference.` : `Type ${type.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`, [...getAllImplementsInterfaceNodes(iface, transitive), ...getAllImplementsInterfaceNodes(type, iface)]);
                        }
                    }
                }

                function validateUnionMembers(context, union) {
                    const memberTypes = union.getTypes();
                    if (memberTypes.length === 0) {
                        context.reportError(`Union type ${union.name} must define one or more member types.`, [union.astNode, ...union.extensionASTNodes]);
                    }
                    const includedTypeNames = Object.create(null);
                    for (const memberType of memberTypes) {
                        if (includedTypeNames[memberType.name]) {
                            context.reportError(`Union type ${union.name} can only include type ${memberType.name} once.`, getUnionMemberTypeNodes(union, memberType.name));
                            continue;
                        }
                        includedTypeNames[memberType.name] = true;
                        if (!(0, _definition.isObjectType)(memberType)) {
                            context.reportError(`Union type ${union.name} can only include Object types, ` + `it cannot include ${(0, _inspect.inspect)(memberType)}.`, getUnionMemberTypeNodes(union, String(memberType)));
                        }
                    }
                }

                function validateEnumValues(context, enumType) {
                    const enumValues = enumType.getValues();
                    if (enumValues.length === 0) {
                        context.reportError(`Enum type ${enumType.name} must define one or more values.`, [enumType.astNode, ...enumType.extensionASTNodes]);
                    }
                    for (const enumValue of enumValues) {
                        // Ensure valid name.
                        validateName(context, enumValue);
                    }
                }

                function validateInputFields(context, inputObj) {
                    const fields = Object.values(inputObj.getFields());
                    if (fields.length === 0) {
                        context.reportError(`Input Object type ${inputObj.name} must define one or more fields.`, [inputObj.astNode, ...inputObj.extensionASTNodes]);
                    } // Ensure the arguments are valid

                    for (const field of fields) {
                        // Ensure they are named correctly.
                        validateName(context, field); // Ensure the type is an input type

                        if (!(0, _definition.isInputType)(field.type)) {
                            var _field$astNode2;
                            context.reportError(`The type of ${inputObj.name}.${field.name} must be Input Type ` + `but got: ${(0, _inspect.inspect)(field.type)}.`, (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type);
                        }
                        if ((0, _definition.isRequiredInputField)(field) && field.deprecationReason != null) {
                            var _field$astNode3;
                            context.reportError(`Required input field ${inputObj.name}.${field.name} cannot be deprecated.`, [getDeprecatedDirectiveNode(field.astNode), (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type]);
                        }
                        if (inputObj.isOneOf) {
                            validateOneOfInputObjectField(inputObj, field, context);
                        }
                    }
                }

                function validateOneOfInputObjectField(type, field, context) {
                    if ((0, _definition.isNonNullType)(field.type)) {
                        var _field$astNode4;
                        context.reportError(`OneOf input field ${type.name}.${field.name} must be nullable.`, (_field$astNode4 = field.astNode) === null || _field$astNode4 === void 0 ? void 0 : _field$astNode4.type);
                    }
                    if (field.defaultValue !== undefined) {
                        context.reportError(`OneOf input field ${type.name}.${field.name} cannot have a default value.`, field.astNode);
                    }
                }

                function createInputObjectCircularRefsValidator(context) {
                    // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'.
                    // Tracks already visited types to maintain O(N) and to ensure that cycles
                    // are not redundantly reported.
                    const visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors

                    const fieldPath = []; // Position in the type path

                    const fieldPathIndexByTypeName = Object.create(null);
                    return detectCycleRecursive; // This does a straight-forward DFS to find cycles.
                    // It does not terminate when a cycle was found but continues to explore
                    // the graph to find all possible cycles.

                    function detectCycleRecursive(inputObj) {
                        if (visitedTypes[inputObj.name]) {
                            return;
                        }
                        visitedTypes[inputObj.name] = true;
                        fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;
                        const fields = Object.values(inputObj.getFields());
                        for (const field of fields) {
                            if ((0, _definition.isNonNullType)(field.type) && (0, _definition.isInputObjectType)(field.type.ofType)) {
                                const fieldType = field.type.ofType;
                                const cycleIndex = fieldPathIndexByTypeName[fieldType.name];
                                fieldPath.push(field);
                                if (cycleIndex === undefined) {
                                    detectCycleRecursive(fieldType);
                                } else {
                                    const cyclePath = fieldPath.slice(cycleIndex);
                                    const pathStr = cyclePath.map(fieldObj => fieldObj.name).join('.');
                                    context.reportError(`Cannot reference Input Object "${fieldType.name}" within itself through a series of non-null fields: "${pathStr}".`, cyclePath.map(fieldObj => fieldObj.astNode));
                                }
                                fieldPath.pop();
                            }
                        }
                        fieldPathIndexByTypeName[inputObj.name] = undefined;
                    }
                }

                function getAllImplementsInterfaceNodes(type, iface) {
                    const {
                        astNode,
                        extensionASTNodes
                    } = type;
                    const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203

                    return nodes.flatMap(typeNode => {
                        var _typeNode$interfaces;
                        return /* c8 ignore next */ (
                            (_typeNode$interfaces = typeNode.interfaces) !== null && _typeNode$interfaces !== void 0 ? _typeNode$interfaces : []
                        );
                    }).filter(ifaceNode => ifaceNode.name.value === iface.name);
                }

                function getUnionMemberTypeNodes(union, typeName) {
                    const {
                        astNode,
                        extensionASTNodes
                    } = union;
                    const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203

                    return nodes.flatMap(unionNode => {
                        var _unionNode$types;
                        return /* c8 ignore next */ (
                            (_unionNode$types = unionNode.types) !== null && _unionNode$types !== void 0 ? _unionNode$types : []
                        );
                    }).filter(typeNode => typeNode.name.value === typeName);
                }

                function getDeprecatedDirectiveNode(definitionNode) {
                    var _definitionNode$direc;
                    return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find(node => node.name.value === _directives.GraphQLDeprecatedDirective.name);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/TypeInfo.mjs":
            /*!************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/TypeInfo.mjs ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.TypeInfo = void 0;
                exports.visitWithTypeInfo = visitWithTypeInfo;
                var _ast = __webpack_require__( /*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _visitor = __webpack_require__( /*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _introspection = __webpack_require__( /*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                var _typeFromAST = __webpack_require__( /*! ./typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
                /**
                 * TypeInfo is a utility class which, given a GraphQL schema, can keep track
                 * of the current field and type definitions at any point in a GraphQL document
                 * AST during a recursive descent by calling `enter(node)` and `leave(node)`.
                 */

                class TypeInfo {
                    constructor(schema,
                        /**
                         * Initial type may be provided in rare cases to facilitate traversals
                         *  beginning somewhere other than documents.
                         */
                        initialType, /** @deprecated will be removed in 17.0.0 */
                        getFieldDefFn) {
                        this._schema = schema;
                        this._typeStack = [];
                        this._parentTypeStack = [];
                        this._inputTypeStack = [];
                        this._fieldDefStack = [];
                        this._defaultValueStack = [];
                        this._directive = null;
                        this._argument = null;
                        this._enumValue = null;
                        this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef;
                        if (initialType) {
                            if ((0, _definition.isInputType)(initialType)) {
                                this._inputTypeStack.push(initialType);
                            }
                            if ((0, _definition.isCompositeType)(initialType)) {
                                this._parentTypeStack.push(initialType);
                            }
                            if ((0, _definition.isOutputType)(initialType)) {
                                this._typeStack.push(initialType);
                            }
                        }
                    }
                    get[Symbol.toStringTag]() {
                        return 'TypeInfo';
                    }
                    getType() {
                        if (this._typeStack.length > 0) {
                            return this._typeStack[this._typeStack.length - 1];
                        }
                    }
                    getParentType() {
                        if (this._parentTypeStack.length > 0) {
                            return this._parentTypeStack[this._parentTypeStack.length - 1];
                        }
                    }
                    getInputType() {
                        if (this._inputTypeStack.length > 0) {
                            return this._inputTypeStack[this._inputTypeStack.length - 1];
                        }
                    }
                    getParentInputType() {
                        if (this._inputTypeStack.length > 1) {
                            return this._inputTypeStack[this._inputTypeStack.length - 2];
                        }
                    }
                    getFieldDef() {
                        if (this._fieldDefStack.length > 0) {
                            return this._fieldDefStack[this._fieldDefStack.length - 1];
                        }
                    }
                    getDefaultValue() {
                        if (this._defaultValueStack.length > 0) {
                            return this._defaultValueStack[this._defaultValueStack.length - 1];
                        }
                    }
                    getDirective() {
                        return this._directive;
                    }
                    getArgument() {
                        return this._argument;
                    }
                    getEnumValue() {
                        return this._enumValue;
                    }
                    enter(node) {
                        const schema = this._schema; // Note: many of the types below are explicitly typed as "unknown" to drop
                        // any assumptions of a valid schema to ensure runtime types are properly
                        // checked before continuing since TypeInfo is used as part of validation
                        // which occurs before guarantees of schema and document validity.

                        switch (node.kind) {
                            case _kinds.Kind.SELECTION_SET: {
                                const namedType = (0, _definition.getNamedType)(this.getType());
                                this._parentTypeStack.push((0, _definition.isCompositeType)(namedType) ? namedType : undefined);
                                break;
                            }
                            case _kinds.Kind.FIELD: {
                                const parentType = this.getParentType();
                                let fieldDef;
                                let fieldType;
                                if (parentType) {
                                    fieldDef = this._getFieldDef(schema, parentType, node);
                                    if (fieldDef) {
                                        fieldType = fieldDef.type;
                                    }
                                }
                                this._fieldDefStack.push(fieldDef);
                                this._typeStack.push((0, _definition.isOutputType)(fieldType) ? fieldType : undefined);
                                break;
                            }
                            case _kinds.Kind.DIRECTIVE:
                                this._directive = schema.getDirective(node.name.value);
                                break;
                            case _kinds.Kind.OPERATION_DEFINITION: {
                                const rootType = schema.getRootType(node.operation);
                                this._typeStack.push((0, _definition.isObjectType)(rootType) ? rootType : undefined);
                                break;
                            }
                            case _kinds.Kind.INLINE_FRAGMENT:
                            case _kinds.Kind.FRAGMENT_DEFINITION: {
                                const typeConditionAST = node.typeCondition;
                                const outputType = typeConditionAST ? (0, _typeFromAST.typeFromAST)(schema, typeConditionAST) : (0, _definition.getNamedType)(this.getType());
                                this._typeStack.push((0, _definition.isOutputType)(outputType) ? outputType : undefined);
                                break;
                            }
                            case _kinds.Kind.VARIABLE_DEFINITION: {
                                const inputType = (0, _typeFromAST.typeFromAST)(schema, node.type);
                                this._inputTypeStack.push((0, _definition.isInputType)(inputType) ? inputType : undefined);
                                break;
                            }
                            case _kinds.Kind.ARGUMENT: {
                                var _this$getDirective;
                                let argDef;
                                let argType;
                                const fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef();
                                if (fieldOrDirective) {
                                    argDef = fieldOrDirective.args.find(arg => arg.name === node.name.value);
                                    if (argDef) {
                                        argType = argDef.type;
                                    }
                                }
                                this._argument = argDef;
                                this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined);
                                this._inputTypeStack.push((0, _definition.isInputType)(argType) ? argType : undefined);
                                break;
                            }
                            case _kinds.Kind.LIST: {
                                const listType = (0, _definition.getNullableType)(this.getInputType());
                                const itemType = (0, _definition.isListType)(listType) ? listType.ofType : listType; // List positions never have a default value.

                                this._defaultValueStack.push(undefined);
                                this._inputTypeStack.push((0, _definition.isInputType)(itemType) ? itemType : undefined);
                                break;
                            }
                            case _kinds.Kind.OBJECT_FIELD: {
                                const objectType = (0, _definition.getNamedType)(this.getInputType());
                                let inputFieldType;
                                let inputField;
                                if ((0, _definition.isInputObjectType)(objectType)) {
                                    inputField = objectType.getFields()[node.name.value];
                                    if (inputField) {
                                        inputFieldType = inputField.type;
                                    }
                                }
                                this._defaultValueStack.push(inputField ? inputField.defaultValue : undefined);
                                this._inputTypeStack.push((0, _definition.isInputType)(inputFieldType) ? inputFieldType : undefined);
                                break;
                            }
                            case _kinds.Kind.ENUM: {
                                const enumType = (0, _definition.getNamedType)(this.getInputType());
                                let enumValue;
                                if ((0, _definition.isEnumType)(enumType)) {
                                    enumValue = enumType.getValue(node.value);
                                }
                                this._enumValue = enumValue;
                                break;
                            }
                            default: // Ignore other nodes
                        }
                    }
                    leave(node) {
                        switch (node.kind) {
                            case _kinds.Kind.SELECTION_SET:
                                this._parentTypeStack.pop();
                                break;
                            case _kinds.Kind.FIELD:
                                this._fieldDefStack.pop();
                                this._typeStack.pop();
                                break;
                            case _kinds.Kind.DIRECTIVE:
                                this._directive = null;
                                break;
                            case _kinds.Kind.OPERATION_DEFINITION:
                            case _kinds.Kind.INLINE_FRAGMENT:
                            case _kinds.Kind.FRAGMENT_DEFINITION:
                                this._typeStack.pop();
                                break;
                            case _kinds.Kind.VARIABLE_DEFINITION:
                                this._inputTypeStack.pop();
                                break;
                            case _kinds.Kind.ARGUMENT:
                                this._argument = null;
                                this._defaultValueStack.pop();
                                this._inputTypeStack.pop();
                                break;
                            case _kinds.Kind.LIST:
                            case _kinds.Kind.OBJECT_FIELD:
                                this._defaultValueStack.pop();
                                this._inputTypeStack.pop();
                                break;
                            case _kinds.Kind.ENUM:
                                this._enumValue = null;
                                break;
                            default: // Ignore other nodes
                        }
                    }
                }

                /**
                 * Not exactly the same as the executor's definition of getFieldDef, in this
                 * statically evaluated environment we do not always have an Object type,
                 * and need to handle Interface and Union types.
                 */
                exports.TypeInfo = TypeInfo;

                function getFieldDef(schema, parentType, fieldNode) {
                    const name = fieldNode.name.value;
                    if (name === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) {
                        return _introspection.SchemaMetaFieldDef;
                    }
                    if (name === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) {
                        return _introspection.TypeMetaFieldDef;
                    }
                    if (name === _introspection.TypeNameMetaFieldDef.name && (0, _definition.isCompositeType)(parentType)) {
                        return _introspection.TypeNameMetaFieldDef;
                    }
                    if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) {
                        return parentType.getFields()[name];
                    }
                }
                /**
                 * Creates a new visitor instance which maintains a provided TypeInfo instance
                 * along with visiting visitor.
                 */

                function visitWithTypeInfo(typeInfo, visitor) {
                    return {
                        enter(...args) {
                            const node = args[0];
                            typeInfo.enter(node);
                            const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).enter;
                            if (fn) {
                                const result = fn.apply(visitor, args);
                                if (result !== undefined) {
                                    typeInfo.leave(node);
                                    if ((0, _ast.isNode)(result)) {
                                        typeInfo.enter(result);
                                    }
                                }
                                return result;
                            }
                        },
                        leave(...args) {
                            const node = args[0];
                            const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).leave;
                            let result;
                            if (fn) {
                                result = fn.apply(visitor, args);
                            }
                            typeInfo.leave(node);
                            return result;
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/assertValidName.mjs":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/assertValidName.mjs ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.assertValidName = assertValidName;
                exports.isValidNameError = isValidNameError;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _assertName = __webpack_require__( /*! ../type/assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs");
                /* c8 ignore start */

                /**
                 * Upholds the spec rules about naming.
                 * @deprecated Please use `assertName` instead. Will be removed in v17
                 */

                function assertValidName(name) {
                    const error = isValidNameError(name);
                    if (error) {
                        throw error;
                    }
                    return name;
                }
                /**
                 * Returns an Error if a name is invalid.
                 * @deprecated Please use `assertName` instead. Will be removed in v17
                 */

                function isValidNameError(name) {
                    typeof name === 'string' || (0, _devAssert.devAssert)(false, 'Expected name to be a string.');
                    if (name.startsWith('__')) {
                        return new _GraphQLError.GraphQLError(`Name "${name}" must not begin with "__", which is reserved by GraphQL introspection.`);
                    }
                    try {
                        (0, _assertName.assertName)(name);
                    } catch (error) {
                        return error;
                    }
                }
                /* c8 ignore stop */

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/astFromValue.mjs":
            /*!****************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/astFromValue.mjs ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.astFromValue = astFromValue;
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _isIterableObject = __webpack_require__( /*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs");
                var _isObjectLike = __webpack_require__( /*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _scalars = __webpack_require__( /*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
                /**
                 * Produces a GraphQL Value AST given a JavaScript object.
                 * Function will match JavaScript/JSON values to GraphQL AST schema format
                 * by using suggested GraphQLInputType. For example:
                 *
                 *     astFromValue("value", GraphQLString)
                 *
                 * A GraphQL type must be provided, which will be used to interpret different
                 * JavaScript values.
                 *
                 * | JSON Value    | GraphQL Value        |
                 * | ------------- | -------------------- |
                 * | Object        | Input Object         |
                 * | Array         | List                 |
                 * | Boolean       | Boolean              |
                 * | String        | String / Enum Value  |
                 * | Number        | Int / Float          |
                 * | Unknown       | Enum Value           |
                 * | null          | NullValue            |
                 *
                 */

                function astFromValue(value, type) {
                    if ((0, _definition.isNonNullType)(type)) {
                        const astValue = astFromValue(value, type.ofType);
                        if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) {
                            return null;
                        }
                        return astValue;
                    } // only explicit null, not undefined, NaN

                    if (value === null) {
                        return {
                            kind: _kinds.Kind.NULL
                        };
                    } // undefined

                    if (value === undefined) {
                        return null;
                    } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but
                    // the value is not an array, convert the value using the list's item type.

                    if ((0, _definition.isListType)(type)) {
                        const itemType = type.ofType;
                        if ((0, _isIterableObject.isIterableObject)(value)) {
                            const valuesNodes = [];
                            for (const item of value) {
                                const itemNode = astFromValue(item, itemType);
                                if (itemNode != null) {
                                    valuesNodes.push(itemNode);
                                }
                            }
                            return {
                                kind: _kinds.Kind.LIST,
                                values: valuesNodes
                            };
                        }
                        return astFromValue(value, itemType);
                    } // Populate the fields of the input object by creating ASTs from each value
                    // in the JavaScript object according to the fields in the input type.

                    if ((0, _definition.isInputObjectType)(type)) {
                        if (!(0, _isObjectLike.isObjectLike)(value)) {
                            return null;
                        }
                        const fieldNodes = [];
                        for (const field of Object.values(type.getFields())) {
                            const fieldValue = astFromValue(value[field.name], field.type);
                            if (fieldValue) {
                                fieldNodes.push({
                                    kind: _kinds.Kind.OBJECT_FIELD,
                                    name: {
                                        kind: _kinds.Kind.NAME,
                                        value: field.name
                                    },
                                    value: fieldValue
                                });
                            }
                        }
                        return {
                            kind: _kinds.Kind.OBJECT,
                            fields: fieldNodes
                        };
                    }
                    if ((0, _definition.isLeafType)(type)) {
                        // Since value is an internally represented value, it must be serialized
                        // to an externally represented value before converting into an AST.
                        const serialized = type.serialize(value);
                        if (serialized == null) {
                            return null;
                        } // Others serialize based on their corresponding JavaScript scalar types.

                        if (typeof serialized === 'boolean') {
                            return {
                                kind: _kinds.Kind.BOOLEAN,
                                value: serialized
                            };
                        } // JavaScript numbers can be Int or Float values.

                        if (typeof serialized === 'number' && Number.isFinite(serialized)) {
                            const stringNum = String(serialized);
                            return integerStringRegExp.test(stringNum) ? {
                                kind: _kinds.Kind.INT,
                                value: stringNum
                            } : {
                                kind: _kinds.Kind.FLOAT,
                                value: stringNum
                            };
                        }
                        if (typeof serialized === 'string') {
                            // Enum types use Enum literals.
                            if ((0, _definition.isEnumType)(type)) {
                                return {
                                    kind: _kinds.Kind.ENUM,
                                    value: serialized
                                };
                            } // ID types can use Int literals.

                            if (type === _scalars.GraphQLID && integerStringRegExp.test(serialized)) {
                                return {
                                    kind: _kinds.Kind.INT,
                                    value: serialized
                                };
                            }
                            return {
                                kind: _kinds.Kind.STRING,
                                value: serialized
                            };
                        }
                        throw new TypeError(`Cannot convert value to AST: ${(0, _inspect.inspect)(serialized)}.`);
                    }
                    /* c8 ignore next 3 */
                    // Not reachable, all possible types have been considered.

                    false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type));
                }
                /**
                 * IntValue:
                 *   - NegativeSign? 0
                 *   - NegativeSign? NonZeroDigit ( Digit+ )?
                 */

                const integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/buildASTSchema.mjs":
            /*!******************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/buildASTSchema.mjs ***!
              \******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.buildASTSchema = buildASTSchema;
                exports.buildSchema = buildSchema;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _parser = __webpack_require__( /*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
                var _directives = __webpack_require__( /*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                var _schema = __webpack_require__( /*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
                var _validate = __webpack_require__( /*! ../validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs");
                var _extendSchema = __webpack_require__( /*! ./extendSchema.mjs */ "../../../node_modules/graphql/utilities/extendSchema.mjs");
                /**
                 * This takes the ast of a schema document produced by the parse function in
                 * src/language/parser.js.
                 *
                 * If no schema definition is provided, then it will look for types named Query,
                 * Mutation and Subscription.
                 *
                 * Given that AST it constructs a GraphQLSchema. The resulting schema
                 * has no resolve methods, so execution will use default resolvers.
                 */
                function buildASTSchema(documentAST, options) {
                    documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.');
                    if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {
                        (0, _validate.assertValidSDL)(documentAST);
                    }
                    const emptySchemaConfig = {
                        description: undefined,
                        types: [],
                        directives: [],
                        extensions: Object.create(null),
                        extensionASTNodes: [],
                        assumeValid: false
                    };
                    const config = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
                    if (config.astNode == null) {
                        for (const type of config.types) {
                            switch (type.name) {
                                // Note: While this could make early assertions to get the correctly
                                // typed values below, that would throw immediately while type system
                                // validation with validateSchema() will produce more actionable results.
                                case 'Query':
                                    // @ts-expect-error validated in `validateSchema`
                                    config.query = type;
                                    break;
                                case 'Mutation':
                                    // @ts-expect-error validated in `validateSchema`
                                    config.mutation = type;
                                    break;
                                case 'Subscription':
                                    // @ts-expect-error validated in `validateSchema`
                                    config.subscription = type;
                                    break;
                            }
                        }
                    }
                    const directives = [...config.directives,
                        // If specified directives were not explicitly declared, add them.
                        ..._directives.specifiedDirectives.filter(stdDirective => config.directives.every(directive => directive.name !== stdDirective.name))
                    ];
                    return new _schema.GraphQLSchema({
                        ...config,
                        directives
                    });
                }
                /**
                 * A helper function to build a GraphQLSchema directly from a source
                 * document.
                 */

                function buildSchema(source, options) {
                    const document = (0, _parser.parse)(source, {
                        noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
                        allowLegacyFragmentVariables: options === null || options === void 0 ? void 0 : options.allowLegacyFragmentVariables
                    });
                    return buildASTSchema(document, {
                        assumeValidSDL: options === null || options === void 0 ? void 0 : options.assumeValidSDL,
                        assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/buildClientSchema.mjs":
            /*!*********************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/buildClientSchema.mjs ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.buildClientSchema = buildClientSchema;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _isObjectLike = __webpack_require__( /*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
                var _keyValMap = __webpack_require__( /*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs");
                var _parser = __webpack_require__( /*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _directives = __webpack_require__( /*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                var _introspection = __webpack_require__( /*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                var _scalars = __webpack_require__( /*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
                var _schema = __webpack_require__( /*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
                var _valueFromAST = __webpack_require__( /*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs");
                /**
                 * Build a GraphQLSchema for use by client tools.
                 *
                 * Given the result of a client running the introspection query, creates and
                 * returns a GraphQLSchema instance which can be then used with all graphql-js
                 * tools, but cannot be used to execute a query, as introspection does not
                 * represent the "resolver", "parse" or "serialize" functions or any other
                 * server-internal mechanisms.
                 *
                 * This function expects a complete introspection result. Don't forget to check
                 * the "errors" field of a server response before calling this function.
                 */

                function buildClientSchema(introspection, options) {
                    (0, _isObjectLike.isObjectLike)(introspection) && (0, _isObjectLike.isObjectLike)(introspection.__schema) || (0, _devAssert.devAssert)(false, `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0, _inspect.inspect)(introspection)}.`); // Get the schema from the introspection result.

                    const schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each.

                    const typeMap = (0, _keyValMap.keyValMap)(schemaIntrospection.types, typeIntrospection => typeIntrospection.name, typeIntrospection => buildType(typeIntrospection)); // Include standard types only if they are used.

                    for (const stdType of [..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes]) {
                        if (typeMap[stdType.name]) {
                            typeMap[stdType.name] = stdType;
                        }
                    } // Get the root Query, Mutation, and Subscription types.

                    const queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null;
                    const mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null;
                    const subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; // Get the directives supported by Introspection, assuming empty-set if
                    // directives were not queried for.

                    const directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; // Then produce and return a Schema with these types.

                    return new _schema.GraphQLSchema({
                        description: schemaIntrospection.description,
                        query: queryType,
                        mutation: mutationType,
                        subscription: subscriptionType,
                        types: Object.values(typeMap),
                        directives,
                        assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid
                    }); // Given a type reference in introspection, return the GraphQLType instance.
                    // preferring cached instances before building new instances.

                    function getType(typeRef) {
                        if (typeRef.kind === _introspection.TypeKind.LIST) {
                            const itemRef = typeRef.ofType;
                            if (!itemRef) {
                                throw new Error('Decorated type deeper than introspection query.');
                            }
                            return new _definition.GraphQLList(getType(itemRef));
                        }
                        if (typeRef.kind === _introspection.TypeKind.NON_NULL) {
                            const nullableRef = typeRef.ofType;
                            if (!nullableRef) {
                                throw new Error('Decorated type deeper than introspection query.');
                            }
                            const nullableType = getType(nullableRef);
                            return new _definition.GraphQLNonNull((0, _definition.assertNullableType)(nullableType));
                        }
                        return getNamedType(typeRef);
                    }

                    function getNamedType(typeRef) {
                        const typeName = typeRef.name;
                        if (!typeName) {
                            throw new Error(`Unknown type reference: ${(0, _inspect.inspect)(typeRef)}.`);
                        }
                        const type = typeMap[typeName];
                        if (!type) {
                            throw new Error(`Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.`);
                        }
                        return type;
                    }

                    function getObjectType(typeRef) {
                        return (0, _definition.assertObjectType)(getNamedType(typeRef));
                    }

                    function getInterfaceType(typeRef) {
                        return (0, _definition.assertInterfaceType)(getNamedType(typeRef));
                    } // Given a type's introspection result, construct the correct
                    // GraphQLType instance.

                    function buildType(type) {
                        // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
                        if (type != null && type.name != null && type.kind != null) {
                            // FIXME: Properly type IntrospectionType, it's a breaking change so fix in v17
                            // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
                            switch (type.kind) {
                                case _introspection.TypeKind.SCALAR:
                                    return buildScalarDef(type);
                                case _introspection.TypeKind.OBJECT:
                                    return buildObjectDef(type);
                                case _introspection.TypeKind.INTERFACE:
                                    return buildInterfaceDef(type);
                                case _introspection.TypeKind.UNION:
                                    return buildUnionDef(type);
                                case _introspection.TypeKind.ENUM:
                                    return buildEnumDef(type);
                                case _introspection.TypeKind.INPUT_OBJECT:
                                    return buildInputObjectDef(type);
                            }
                        }
                        const typeStr = (0, _inspect.inspect)(type);
                        throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.`);
                    }

                    function buildScalarDef(scalarIntrospection) {
                        return new _definition.GraphQLScalarType({
                            name: scalarIntrospection.name,
                            description: scalarIntrospection.description,
                            specifiedByURL: scalarIntrospection.specifiedByURL
                        });
                    }

                    function buildImplementationsList(implementingIntrospection) {
                        // TODO: Temporary workaround until GraphQL ecosystem will fully support
                        // 'interfaces' on interface types.
                        if (implementingIntrospection.interfaces === null && implementingIntrospection.kind === _introspection.TypeKind.INTERFACE) {
                            return [];
                        }
                        if (!implementingIntrospection.interfaces) {
                            const implementingIntrospectionStr = (0, _inspect.inspect)(implementingIntrospection);
                            throw new Error(`Introspection result missing interfaces: ${implementingIntrospectionStr}.`);
                        }
                        return implementingIntrospection.interfaces.map(getInterfaceType);
                    }

                    function buildObjectDef(objectIntrospection) {
                        return new _definition.GraphQLObjectType({
                            name: objectIntrospection.name,
                            description: objectIntrospection.description,
                            interfaces: () => buildImplementationsList(objectIntrospection),
                            fields: () => buildFieldDefMap(objectIntrospection)
                        });
                    }

                    function buildInterfaceDef(interfaceIntrospection) {
                        return new _definition.GraphQLInterfaceType({
                            name: interfaceIntrospection.name,
                            description: interfaceIntrospection.description,
                            interfaces: () => buildImplementationsList(interfaceIntrospection),
                            fields: () => buildFieldDefMap(interfaceIntrospection)
                        });
                    }

                    function buildUnionDef(unionIntrospection) {
                        if (!unionIntrospection.possibleTypes) {
                            const unionIntrospectionStr = (0, _inspect.inspect)(unionIntrospection);
                            throw new Error(`Introspection result missing possibleTypes: ${unionIntrospectionStr}.`);
                        }
                        return new _definition.GraphQLUnionType({
                            name: unionIntrospection.name,
                            description: unionIntrospection.description,
                            types: () => unionIntrospection.possibleTypes.map(getObjectType)
                        });
                    }

                    function buildEnumDef(enumIntrospection) {
                        if (!enumIntrospection.enumValues) {
                            const enumIntrospectionStr = (0, _inspect.inspect)(enumIntrospection);
                            throw new Error(`Introspection result missing enumValues: ${enumIntrospectionStr}.`);
                        }
                        return new _definition.GraphQLEnumType({
                            name: enumIntrospection.name,
                            description: enumIntrospection.description,
                            values: (0, _keyValMap.keyValMap)(enumIntrospection.enumValues, valueIntrospection => valueIntrospection.name, valueIntrospection => ({
                                description: valueIntrospection.description,
                                deprecationReason: valueIntrospection.deprecationReason
                            }))
                        });
                    }

                    function buildInputObjectDef(inputObjectIntrospection) {
                        if (!inputObjectIntrospection.inputFields) {
                            const inputObjectIntrospectionStr = (0, _inspect.inspect)(inputObjectIntrospection);
                            throw new Error(`Introspection result missing inputFields: ${inputObjectIntrospectionStr}.`);
                        }
                        return new _definition.GraphQLInputObjectType({
                            name: inputObjectIntrospection.name,
                            description: inputObjectIntrospection.description,
                            fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields),
                            isOneOf: inputObjectIntrospection.isOneOf
                        });
                    }

                    function buildFieldDefMap(typeIntrospection) {
                        if (!typeIntrospection.fields) {
                            throw new Error(`Introspection result missing fields: ${(0, _inspect.inspect)(typeIntrospection)}.`);
                        }
                        return (0, _keyValMap.keyValMap)(typeIntrospection.fields, fieldIntrospection => fieldIntrospection.name, buildField);
                    }

                    function buildField(fieldIntrospection) {
                        const type = getType(fieldIntrospection.type);
                        if (!(0, _definition.isOutputType)(type)) {
                            const typeStr = (0, _inspect.inspect)(type);
                            throw new Error(`Introspection must provide output type for fields, but received: ${typeStr}.`);
                        }
                        if (!fieldIntrospection.args) {
                            const fieldIntrospectionStr = (0, _inspect.inspect)(fieldIntrospection);
                            throw new Error(`Introspection result missing field args: ${fieldIntrospectionStr}.`);
                        }
                        return {
                            description: fieldIntrospection.description,
                            deprecationReason: fieldIntrospection.deprecationReason,
                            type,
                            args: buildInputValueDefMap(fieldIntrospection.args)
                        };
                    }

                    function buildInputValueDefMap(inputValueIntrospections) {
                        return (0, _keyValMap.keyValMap)(inputValueIntrospections, inputValue => inputValue.name, buildInputValue);
                    }

                    function buildInputValue(inputValueIntrospection) {
                        const type = getType(inputValueIntrospection.type);
                        if (!(0, _definition.isInputType)(type)) {
                            const typeStr = (0, _inspect.inspect)(type);
                            throw new Error(`Introspection must provide input type for arguments, but received: ${typeStr}.`);
                        }
                        const defaultValue = inputValueIntrospection.defaultValue != null ? (0, _valueFromAST.valueFromAST)((0, _parser.parseValue)(inputValueIntrospection.defaultValue), type) : undefined;
                        return {
                            description: inputValueIntrospection.description,
                            type,
                            defaultValue,
                            deprecationReason: inputValueIntrospection.deprecationReason
                        };
                    }

                    function buildDirective(directiveIntrospection) {
                        if (!directiveIntrospection.args) {
                            const directiveIntrospectionStr = (0, _inspect.inspect)(directiveIntrospection);
                            throw new Error(`Introspection result missing directive args: ${directiveIntrospectionStr}.`);
                        }
                        if (!directiveIntrospection.locations) {
                            const directiveIntrospectionStr = (0, _inspect.inspect)(directiveIntrospection);
                            throw new Error(`Introspection result missing directive locations: ${directiveIntrospectionStr}.`);
                        }
                        return new _directives.GraphQLDirective({
                            name: directiveIntrospection.name,
                            description: directiveIntrospection.description,
                            isRepeatable: directiveIntrospection.isRepeatable,
                            locations: directiveIntrospection.locations.slice(),
                            args: buildInputValueDefMap(directiveIntrospection.args)
                        });
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/coerceInputValue.mjs":
            /*!********************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/coerceInputValue.mjs ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.coerceInputValue = coerceInputValue;
                var _didYouMean = __webpack_require__( /*! ../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _isIterableObject = __webpack_require__( /*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs");
                var _isObjectLike = __webpack_require__( /*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
                var _Path = __webpack_require__( /*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs");
                var _printPathArray = __webpack_require__( /*! ../jsutils/printPathArray.mjs */ "../../../node_modules/graphql/jsutils/printPathArray.mjs");
                var _suggestionList = __webpack_require__( /*! ../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Coerces a JavaScript value given a GraphQL Input Type.
                 */
                function coerceInputValue(inputValue, type, onError = defaultOnError) {
                    return coerceInputValueImpl(inputValue, type, onError, undefined);
                }

                function defaultOnError(path, invalidValue, error) {
                    let errorPrefix = 'Invalid value ' + (0, _inspect.inspect)(invalidValue);
                    if (path.length > 0) {
                        errorPrefix += ` at "value${(0, _printPathArray.printPathArray)(path)}"`;
                    }
                    error.message = errorPrefix + ': ' + error.message;
                    throw error;
                }

                function coerceInputValueImpl(inputValue, type, onError, path) {
                    if ((0, _definition.isNonNullType)(type)) {
                        if (inputValue != null) {
                            return coerceInputValueImpl(inputValue, type.ofType, onError, path);
                        }
                        onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected non-nullable type "${(0, _inspect.inspect)(type)}" not to be null.`));
                        return;
                    }
                    if (inputValue == null) {
                        // Explicitly return the value null.
                        return null;
                    }
                    if ((0, _definition.isListType)(type)) {
                        const itemType = type.ofType;
                        if ((0, _isIterableObject.isIterableObject)(inputValue)) {
                            return Array.from(inputValue, (itemValue, index) => {
                                const itemPath = (0, _Path.addPath)(path, index, undefined);
                                return coerceInputValueImpl(itemValue, itemType, onError, itemPath);
                            });
                        } // Lists accept a non-list value as a list of one.

                        return [coerceInputValueImpl(inputValue, itemType, onError, path)];
                    }
                    if ((0, _definition.isInputObjectType)(type)) {
                        if (!(0, _isObjectLike.isObjectLike)(inputValue)) {
                            onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}" to be an object.`));
                            return;
                        }
                        const coercedValue = {};
                        const fieldDefs = type.getFields();
                        for (const field of Object.values(fieldDefs)) {
                            const fieldValue = inputValue[field.name];
                            if (fieldValue === undefined) {
                                if (field.defaultValue !== undefined) {
                                    coercedValue[field.name] = field.defaultValue;
                                } else if ((0, _definition.isNonNullType)(field.type)) {
                                    const typeStr = (0, _inspect.inspect)(field.type);
                                    onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Field "${field.name}" of required type "${typeStr}" was not provided.`));
                                }
                                continue;
                            }
                            coercedValue[field.name] = coerceInputValueImpl(fieldValue, field.type, onError, (0, _Path.addPath)(path, field.name, type.name));
                        } // Ensure every provided field is defined.

                        for (const fieldName of Object.keys(inputValue)) {
                            if (!fieldDefs[fieldName]) {
                                const suggestions = (0, _suggestionList.suggestionList)(fieldName, Object.keys(type.getFields()));
                                onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Field "${fieldName}" is not defined by type "${type.name}".` + (0, _didYouMean.didYouMean)(suggestions)));
                            }
                        }
                        if (type.isOneOf) {
                            const keys = Object.keys(coercedValue);
                            if (keys.length !== 1) {
                                onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Exactly one key must be specified for OneOf type "${type.name}".`));
                            }
                            const key = keys[0];
                            const value = coercedValue[key];
                            if (value === null) {
                                onError((0, _Path.pathToArray)(path).concat(key), value, new _GraphQLError.GraphQLError(`Field "${key}" must be non-null.`));
                            }
                        }
                        return coercedValue;
                    }
                    if ((0, _definition.isLeafType)(type)) {
                        let parseResult; // Scalars and Enums determine if a input value is valid via parseValue(),
                        // which can throw to indicate failure. If it throws, maintain a reference
                        // to the original error.

                        try {
                            parseResult = type.parseValue(inputValue);
                        } catch (error) {
                            if (error instanceof _GraphQLError.GraphQLError) {
                                onError((0, _Path.pathToArray)(path), inputValue, error);
                            } else {
                                onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}". ` + error.message, {
                                    originalError: error
                                }));
                            }
                            return;
                        }
                        if (parseResult === undefined) {
                            onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}".`));
                        }
                        return parseResult;
                    }
                    /* c8 ignore next 3 */
                    // Not reachable, all possible types have been considered.

                    false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type));
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/concatAST.mjs":
            /*!*************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/concatAST.mjs ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.concatAST = concatAST;
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                /**
                 * Provided a collection of ASTs, presumably each from different files,
                 * concatenate the ASTs together into batched AST, useful for validating many
                 * GraphQL source files which together represent one conceptual application.
                 */

                function concatAST(documents) {
                    const definitions = [];
                    for (const doc of documents) {
                        definitions.push(...doc.definitions);
                    }
                    return {
                        kind: _kinds.Kind.DOCUMENT,
                        definitions
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/extendSchema.mjs":
            /*!****************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/extendSchema.mjs ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.extendSchema = extendSchema;
                exports.extendSchemaImpl = extendSchemaImpl;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _keyMap = __webpack_require__( /*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
                var _mapValue = __webpack_require__( /*! ../jsutils/mapValue.mjs */ "../../../node_modules/graphql/jsutils/mapValue.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _predicates = __webpack_require__( /*! ../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _directives = __webpack_require__( /*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                var _introspection = __webpack_require__( /*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                var _scalars = __webpack_require__( /*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
                var _schema = __webpack_require__( /*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
                var _validate = __webpack_require__( /*! ../validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs");
                var _values = __webpack_require__( /*! ../execution/values.mjs */ "../../../node_modules/graphql/execution/values.mjs");
                var _valueFromAST = __webpack_require__( /*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs");
                /**
                 * Produces a new schema given an existing schema and a document which may
                 * contain GraphQL type extensions and definitions. The original schema will
                 * remain unaltered.
                 *
                 * Because a schema represents a graph of references, a schema cannot be
                 * extended without effectively making an entire copy. We do not know until it's
                 * too late if subgraphs remain unchanged.
                 *
                 * This algorithm copies the provided schema, applying extensions while
                 * producing the copy. The original schema remains unaltered.
                 */
                function extendSchema(schema, documentAST, options) {
                    (0, _schema.assertSchema)(schema);
                    documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.');
                    if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {
                        (0, _validate.assertValidSDLExtension)(documentAST, schema);
                    }
                    const schemaConfig = schema.toConfig();
                    const extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options);
                    return schemaConfig === extendedConfig ? schema : new _schema.GraphQLSchema(extendedConfig);
                }
                /**
                 * @internal
                 */

                function extendSchemaImpl(schemaConfig, documentAST, options) {
                    var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid;

                    // Collect the type definitions and extensions found in the document.
                    const typeDefs = [];
                    const typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can
                    // have the same name. For example, a type named "skip".

                    const directiveDefs = [];
                    let schemaDef; // Schema extensions are collected which may add additional operation types.

                    const schemaExtensions = [];
                    for (const def of documentAST.definitions) {
                        if (def.kind === _kinds.Kind.SCHEMA_DEFINITION) {
                            schemaDef = def;
                        } else if (def.kind === _kinds.Kind.SCHEMA_EXTENSION) {
                            schemaExtensions.push(def);
                        } else if ((0, _predicates.isTypeDefinitionNode)(def)) {
                            typeDefs.push(def);
                        } else if ((0, _predicates.isTypeExtensionNode)(def)) {
                            const extendedTypeName = def.name.value;
                            const existingTypeExtensions = typeExtensionsMap[extendedTypeName];
                            typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def];
                        } else if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
                            directiveDefs.push(def);
                        }
                    } // If this document contains no new types, extensions, or directives then
                    // return the same unmodified GraphQLSchema instance.

                    if (Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null) {
                        return schemaConfig;
                    }
                    const typeMap = Object.create(null);
                    for (const existingType of schemaConfig.types) {
                        typeMap[existingType.name] = extendNamedType(existingType);
                    }
                    for (const typeNode of typeDefs) {
                        var _stdTypeMap$name;
                        const name = typeNode.name.value;
                        typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode);
                    }
                    const operationTypes = {
                        // Get the extended root operation types.
                        query: schemaConfig.query && replaceNamedType(schemaConfig.query),
                        mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation),
                        subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription),
                        // Then, incorporate schema definition and all schema extensions.
                        ...(schemaDef && getOperationTypes([schemaDef])),
                        ...getOperationTypes(schemaExtensions)
                    }; // Then produce and return a Schema config with these types.

                    return {
                        description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value,
                        ...operationTypes,
                        types: Object.values(typeMap),
                        directives: [...schemaConfig.directives.map(replaceDirective), ...directiveDefs.map(buildDirective)],
                        extensions: Object.create(null),
                        astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode,
                        extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions),
                        assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false
                    }; // Below are functions used for producing this schema that have closed over
                    // this scope and have access to the schema, cache, and newly defined types.

                    function replaceType(type) {
                        if ((0, _definition.isListType)(type)) {
                            // @ts-expect-error
                            return new _definition.GraphQLList(replaceType(type.ofType));
                        }
                        if ((0, _definition.isNonNullType)(type)) {
                            // @ts-expect-error
                            return new _definition.GraphQLNonNull(replaceType(type.ofType));
                        } // @ts-expect-error FIXME

                        return replaceNamedType(type);
                    }

                    function replaceNamedType(type) {
                        // Note: While this could make early assertions to get the correctly
                        // typed values, that would throw immediately while type system
                        // validation with validateSchema() will produce more actionable results.
                        return typeMap[type.name];
                    }

                    function replaceDirective(directive) {
                        const config = directive.toConfig();
                        return new _directives.GraphQLDirective({
                            ...config,
                            args: (0, _mapValue.mapValue)(config.args, extendArg)
                        });
                    }

                    function extendNamedType(type) {
                        if ((0, _introspection.isIntrospectionType)(type) || (0, _scalars.isSpecifiedScalarType)(type)) {
                            // Builtin types are not extended.
                            return type;
                        }
                        if ((0, _definition.isScalarType)(type)) {
                            return extendScalarType(type);
                        }
                        if ((0, _definition.isObjectType)(type)) {
                            return extendObjectType(type);
                        }
                        if ((0, _definition.isInterfaceType)(type)) {
                            return extendInterfaceType(type);
                        }
                        if ((0, _definition.isUnionType)(type)) {
                            return extendUnionType(type);
                        }
                        if ((0, _definition.isEnumType)(type)) {
                            return extendEnumType(type);
                        }
                        if ((0, _definition.isInputObjectType)(type)) {
                            return extendInputObjectType(type);
                        }
                        /* c8 ignore next 3 */
                        // Not reachable, all possible type definition nodes have been considered.

                        false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
                    }

                    function extendInputObjectType(type) {
                        var _typeExtensionsMap$co;
                        const config = type.toConfig();
                        const extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
                        return new _definition.GraphQLInputObjectType({
                            ...config,
                            fields: () => ({
                                ...(0, _mapValue.mapValue)(config.fields, field => ({
                                    ...field,
                                    type: replaceType(field.type)
                                })),
                                ...buildInputFieldMap(extensions)
                            }),
                            extensionASTNodes: config.extensionASTNodes.concat(extensions)
                        });
                    }

                    function extendEnumType(type) {
                        var _typeExtensionsMap$ty;
                        const config = type.toConfig();
                        const extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
                        return new _definition.GraphQLEnumType({
                            ...config,
                            values: {
                                ...config.values,
                                ...buildEnumValueMap(extensions)
                            },
                            extensionASTNodes: config.extensionASTNodes.concat(extensions)
                        });
                    }

                    function extendScalarType(type) {
                        var _typeExtensionsMap$co2;
                        const config = type.toConfig();
                        const extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
                        let specifiedByURL = config.specifiedByURL;
                        for (const extensionNode of extensions) {
                            var _getSpecifiedByURL;
                            specifiedByURL = (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null && _getSpecifiedByURL !== void 0 ? _getSpecifiedByURL : specifiedByURL;
                        }
                        return new _definition.GraphQLScalarType({
                            ...config,
                            specifiedByURL,
                            extensionASTNodes: config.extensionASTNodes.concat(extensions)
                        });
                    }

                    function extendObjectType(type) {
                        var _typeExtensionsMap$co3;
                        const config = type.toConfig();
                        const extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
                        return new _definition.GraphQLObjectType({
                            ...config,
                            interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)],
                            fields: () => ({
                                ...(0, _mapValue.mapValue)(config.fields, extendField),
                                ...buildFieldMap(extensions)
                            }),
                            extensionASTNodes: config.extensionASTNodes.concat(extensions)
                        });
                    }

                    function extendInterfaceType(type) {
                        var _typeExtensionsMap$co4;
                        const config = type.toConfig();
                        const extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
                        return new _definition.GraphQLInterfaceType({
                            ...config,
                            interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)],
                            fields: () => ({
                                ...(0, _mapValue.mapValue)(config.fields, extendField),
                                ...buildFieldMap(extensions)
                            }),
                            extensionASTNodes: config.extensionASTNodes.concat(extensions)
                        });
                    }

                    function extendUnionType(type) {
                        var _typeExtensionsMap$co5;
                        const config = type.toConfig();
                        const extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
                        return new _definition.GraphQLUnionType({
                            ...config,
                            types: () => [...type.getTypes().map(replaceNamedType), ...buildUnionTypes(extensions)],
                            extensionASTNodes: config.extensionASTNodes.concat(extensions)
                        });
                    }

                    function extendField(field) {
                        return {
                            ...field,
                            type: replaceType(field.type),
                            args: field.args && (0, _mapValue.mapValue)(field.args, extendArg)
                        };
                    }

                    function extendArg(arg) {
                        return {
                            ...arg,
                            type: replaceType(arg.type)
                        };
                    }

                    function getOperationTypes(nodes) {
                        const opTypes = {};
                        for (const node of nodes) {
                            var _node$operationTypes;

                            // FIXME: https://github.com/graphql/graphql-js/issues/2203
                            const operationTypesNodes = /* c8 ignore next */
                                (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];
                            for (const operationType of operationTypesNodes) {
                                // Note: While this could make early assertions to get the correctly
                                // typed values below, that would throw immediately while type system
                                // validation with validateSchema() will produce more actionable results.
                                // @ts-expect-error
                                opTypes[operationType.operation] = getNamedType(operationType.type);
                            }
                        }
                        return opTypes;
                    }

                    function getNamedType(node) {
                        var _stdTypeMap$name2;
                        const name = node.name.value;
                        const type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name];
                        if (type === undefined) {
                            throw new Error(`Unknown type: "${name}".`);
                        }
                        return type;
                    }

                    function getWrappedType(node) {
                        if (node.kind === _kinds.Kind.LIST_TYPE) {
                            return new _definition.GraphQLList(getWrappedType(node.type));
                        }
                        if (node.kind === _kinds.Kind.NON_NULL_TYPE) {
                            return new _definition.GraphQLNonNull(getWrappedType(node.type));
                        }
                        return getNamedType(node);
                    }

                    function buildDirective(node) {
                        var _node$description;
                        return new _directives.GraphQLDirective({
                            name: node.name.value,
                            description: (_node$description = node.description) === null || _node$description === void 0 ? void 0 : _node$description.value,
                            // @ts-expect-error
                            locations: node.locations.map(({
                                value
                            }) => value),
                            isRepeatable: node.repeatable,
                            args: buildArgumentMap(node.arguments),
                            astNode: node
                        });
                    }

                    function buildFieldMap(nodes) {
                        const fieldConfigMap = Object.create(null);
                        for (const node of nodes) {
                            var _node$fields;

                            // FIXME: https://github.com/graphql/graphql-js/issues/2203
                            const nodeFields = /* c8 ignore next */
                                (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];
                            for (const field of nodeFields) {
                                var _field$description;
                                fieldConfigMap[field.name.value] = {
                                    // Note: While this could make assertions to get the correctly typed
                                    // value, that would throw immediately while type system validation
                                    // with validateSchema() will produce more actionable results.
                                    type: getWrappedType(field.type),
                                    description: (_field$description = field.description) === null || _field$description === void 0 ? void 0 : _field$description.value,
                                    args: buildArgumentMap(field.arguments),
                                    deprecationReason: getDeprecationReason(field),
                                    astNode: field
                                };
                            }
                        }
                        return fieldConfigMap;
                    }

                    function buildArgumentMap(args) {
                        // FIXME: https://github.com/graphql/graphql-js/issues/2203
                        const argsNodes = /* c8 ignore next */
                            args !== null && args !== void 0 ? args : [];
                        const argConfigMap = Object.create(null);
                        for (const arg of argsNodes) {
                            var _arg$description;

                            // Note: While this could make assertions to get the correctly typed
                            // value, that would throw immediately while type system validation
                            // with validateSchema() will produce more actionable results.
                            const type = getWrappedType(arg.type);
                            argConfigMap[arg.name.value] = {
                                type,
                                description: (_arg$description = arg.description) === null || _arg$description === void 0 ? void 0 : _arg$description.value,
                                defaultValue: (0, _valueFromAST.valueFromAST)(arg.defaultValue, type),
                                deprecationReason: getDeprecationReason(arg),
                                astNode: arg
                            };
                        }
                        return argConfigMap;
                    }

                    function buildInputFieldMap(nodes) {
                        const inputFieldMap = Object.create(null);
                        for (const node of nodes) {
                            var _node$fields2;

                            // FIXME: https://github.com/graphql/graphql-js/issues/2203
                            const fieldsNodes = /* c8 ignore next */
                                (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : [];
                            for (const field of fieldsNodes) {
                                var _field$description2;

                                // Note: While this could make assertions to get the correctly typed
                                // value, that would throw immediately while type system validation
                                // with validateSchema() will produce more actionable results.
                                const type = getWrappedType(field.type);
                                inputFieldMap[field.name.value] = {
                                    type,
                                    description: (_field$description2 = field.description) === null || _field$description2 === void 0 ? void 0 : _field$description2.value,
                                    defaultValue: (0, _valueFromAST.valueFromAST)(field.defaultValue, type),
                                    deprecationReason: getDeprecationReason(field),
                                    astNode: field
                                };
                            }
                        }
                        return inputFieldMap;
                    }

                    function buildEnumValueMap(nodes) {
                        const enumValueMap = Object.create(null);
                        for (const node of nodes) {
                            var _node$values;

                            // FIXME: https://github.com/graphql/graphql-js/issues/2203
                            const valuesNodes = /* c8 ignore next */
                                (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];
                            for (const value of valuesNodes) {
                                var _value$description;
                                enumValueMap[value.name.value] = {
                                    description: (_value$description = value.description) === null || _value$description === void 0 ? void 0 : _value$description.value,
                                    deprecationReason: getDeprecationReason(value),
                                    astNode: value
                                };
                            }
                        }
                        return enumValueMap;
                    }

                    function buildInterfaces(nodes) {
                        // Note: While this could make assertions to get the correctly typed
                        // values below, that would throw immediately while type system
                        // validation with validateSchema() will produce more actionable results.
                        // @ts-expect-error
                        return nodes.flatMap(
                            // FIXME: https://github.com/graphql/graphql-js/issues/2203
                            node => {
                                var _node$interfaces$map, _node$interfaces;
                                return /* c8 ignore next */ (
                                    (_node$interfaces$map = (_node$interfaces = node.interfaces) === null || _node$interfaces === void 0 ? void 0 : _node$interfaces.map(getNamedType)) !== null && _node$interfaces$map !== void 0 ? _node$interfaces$map : []
                                );
                            });
                    }

                    function buildUnionTypes(nodes) {
                        // Note: While this could make assertions to get the correctly typed
                        // values below, that would throw immediately while type system
                        // validation with validateSchema() will produce more actionable results.
                        // @ts-expect-error
                        return nodes.flatMap(
                            // FIXME: https://github.com/graphql/graphql-js/issues/2203
                            node => {
                                var _node$types$map, _node$types;
                                return /* c8 ignore next */ (
                                    (_node$types$map = (_node$types = node.types) === null || _node$types === void 0 ? void 0 : _node$types.map(getNamedType)) !== null && _node$types$map !== void 0 ? _node$types$map : []
                                );
                            });
                    }

                    function buildType(astNode) {
                        var _typeExtensionsMap$na;
                        const name = astNode.name.value;
                        const extensionASTNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : [];
                        switch (astNode.kind) {
                            case _kinds.Kind.OBJECT_TYPE_DEFINITION: {
                                var _astNode$description;
                                const allNodes = [astNode, ...extensionASTNodes];
                                return new _definition.GraphQLObjectType({
                                    name,
                                    description: (_astNode$description = astNode.description) === null || _astNode$description === void 0 ? void 0 : _astNode$description.value,
                                    interfaces: () => buildInterfaces(allNodes),
                                    fields: () => buildFieldMap(allNodes),
                                    astNode,
                                    extensionASTNodes
                                });
                            }
                            case _kinds.Kind.INTERFACE_TYPE_DEFINITION: {
                                var _astNode$description2;
                                const allNodes = [astNode, ...extensionASTNodes];
                                return new _definition.GraphQLInterfaceType({
                                    name,
                                    description: (_astNode$description2 = astNode.description) === null || _astNode$description2 === void 0 ? void 0 : _astNode$description2.value,
                                    interfaces: () => buildInterfaces(allNodes),
                                    fields: () => buildFieldMap(allNodes),
                                    astNode,
                                    extensionASTNodes
                                });
                            }
                            case _kinds.Kind.ENUM_TYPE_DEFINITION: {
                                var _astNode$description3;
                                const allNodes = [astNode, ...extensionASTNodes];
                                return new _definition.GraphQLEnumType({
                                    name,
                                    description: (_astNode$description3 = astNode.description) === null || _astNode$description3 === void 0 ? void 0 : _astNode$description3.value,
                                    values: buildEnumValueMap(allNodes),
                                    astNode,
                                    extensionASTNodes
                                });
                            }
                            case _kinds.Kind.UNION_TYPE_DEFINITION: {
                                var _astNode$description4;
                                const allNodes = [astNode, ...extensionASTNodes];
                                return new _definition.GraphQLUnionType({
                                    name,
                                    description: (_astNode$description4 = astNode.description) === null || _astNode$description4 === void 0 ? void 0 : _astNode$description4.value,
                                    types: () => buildUnionTypes(allNodes),
                                    astNode,
                                    extensionASTNodes
                                });
                            }
                            case _kinds.Kind.SCALAR_TYPE_DEFINITION: {
                                var _astNode$description5;
                                return new _definition.GraphQLScalarType({
                                    name,
                                    description: (_astNode$description5 = astNode.description) === null || _astNode$description5 === void 0 ? void 0 : _astNode$description5.value,
                                    specifiedByURL: getSpecifiedByURL(astNode),
                                    astNode,
                                    extensionASTNodes
                                });
                            }
                            case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION: {
                                var _astNode$description6;
                                const allNodes = [astNode, ...extensionASTNodes];
                                return new _definition.GraphQLInputObjectType({
                                    name,
                                    description: (_astNode$description6 = astNode.description) === null || _astNode$description6 === void 0 ? void 0 : _astNode$description6.value,
                                    fields: () => buildInputFieldMap(allNodes),
                                    astNode,
                                    extensionASTNodes,
                                    isOneOf: isOneOf(astNode)
                                });
                            }
                        }
                    }
                }
                const stdTypeMap = (0, _keyMap.keyMap)([..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes], type => type.name);
                /**
                 * Given a field or enum value node, returns the string value for the
                 * deprecation reason.
                 */

                function getDeprecationReason(node) {
                    const deprecated = (0, _values.getDirectiveValues)(_directives.GraphQLDeprecatedDirective, node); // @ts-expect-error validated by `getDirectiveValues`

                    return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason;
                }
                /**
                 * Given a scalar node, returns the string value for the specifiedByURL.
                 */

                function getSpecifiedByURL(node) {
                    const specifiedBy = (0, _values.getDirectiveValues)(_directives.GraphQLSpecifiedByDirective, node); // @ts-expect-error validated by `getDirectiveValues`

                    return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url;
                }
                /**
                 * Given an input object node, returns if the node should be OneOf.
                 */

                function isOneOf(node) {
                    return Boolean((0, _values.getDirectiveValues)(_directives.GraphQLOneOfDirective, node));
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/findBreakingChanges.mjs":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/findBreakingChanges.mjs ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.DangerousChangeType = exports.BreakingChangeType = void 0;
                exports.findBreakingChanges = findBreakingChanges;
                exports.findDangerousChanges = findDangerousChanges;
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _keyMap = __webpack_require__( /*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
                var _printer = __webpack_require__( /*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _scalars = __webpack_require__( /*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
                var _astFromValue = __webpack_require__( /*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs");
                var _sortValueNode = __webpack_require__( /*! ./sortValueNode.mjs */ "../../../node_modules/graphql/utilities/sortValueNode.mjs");
                var BreakingChangeType;
                (function(BreakingChangeType) {
                    BreakingChangeType['TYPE_REMOVED'] = 'TYPE_REMOVED';
                    BreakingChangeType['TYPE_CHANGED_KIND'] = 'TYPE_CHANGED_KIND';
                    BreakingChangeType['TYPE_REMOVED_FROM_UNION'] = 'TYPE_REMOVED_FROM_UNION';
                    BreakingChangeType['VALUE_REMOVED_FROM_ENUM'] = 'VALUE_REMOVED_FROM_ENUM';
                    BreakingChangeType['REQUIRED_INPUT_FIELD_ADDED'] = 'REQUIRED_INPUT_FIELD_ADDED';
                    BreakingChangeType['IMPLEMENTED_INTERFACE_REMOVED'] = 'IMPLEMENTED_INTERFACE_REMOVED';
                    BreakingChangeType['FIELD_REMOVED'] = 'FIELD_REMOVED';
                    BreakingChangeType['FIELD_CHANGED_KIND'] = 'FIELD_CHANGED_KIND';
                    BreakingChangeType['REQUIRED_ARG_ADDED'] = 'REQUIRED_ARG_ADDED';
                    BreakingChangeType['ARG_REMOVED'] = 'ARG_REMOVED';
                    BreakingChangeType['ARG_CHANGED_KIND'] = 'ARG_CHANGED_KIND';
                    BreakingChangeType['DIRECTIVE_REMOVED'] = 'DIRECTIVE_REMOVED';
                    BreakingChangeType['DIRECTIVE_ARG_REMOVED'] = 'DIRECTIVE_ARG_REMOVED';
                    BreakingChangeType['REQUIRED_DIRECTIVE_ARG_ADDED'] = 'REQUIRED_DIRECTIVE_ARG_ADDED';
                    BreakingChangeType['DIRECTIVE_REPEATABLE_REMOVED'] = 'DIRECTIVE_REPEATABLE_REMOVED';
                    BreakingChangeType['DIRECTIVE_LOCATION_REMOVED'] = 'DIRECTIVE_LOCATION_REMOVED';
                })(BreakingChangeType || (exports.BreakingChangeType = BreakingChangeType = {}));
                var DangerousChangeType;
                (function(DangerousChangeType) {
                    DangerousChangeType['VALUE_ADDED_TO_ENUM'] = 'VALUE_ADDED_TO_ENUM';
                    DangerousChangeType['TYPE_ADDED_TO_UNION'] = 'TYPE_ADDED_TO_UNION';
                    DangerousChangeType['OPTIONAL_INPUT_FIELD_ADDED'] = 'OPTIONAL_INPUT_FIELD_ADDED';
                    DangerousChangeType['OPTIONAL_ARG_ADDED'] = 'OPTIONAL_ARG_ADDED';
                    DangerousChangeType['IMPLEMENTED_INTERFACE_ADDED'] = 'IMPLEMENTED_INTERFACE_ADDED';
                    DangerousChangeType['ARG_DEFAULT_VALUE_CHANGE'] = 'ARG_DEFAULT_VALUE_CHANGE';
                })(DangerousChangeType || (exports.DangerousChangeType = DangerousChangeType = {}));
                /**
                 * Given two schemas, returns an Array containing descriptions of all the types
                 * of breaking changes covered by the other functions down below.
                 */
                function findBreakingChanges(oldSchema, newSchema) {
                    // @ts-expect-error
                    return findSchemaChanges(oldSchema, newSchema).filter(change => change.type in BreakingChangeType);
                }
                /**
                 * Given two schemas, returns an Array containing descriptions of all the types
                 * of potentially dangerous changes covered by the other functions down below.
                 */

                function findDangerousChanges(oldSchema, newSchema) {
                    // @ts-expect-error
                    return findSchemaChanges(oldSchema, newSchema).filter(change => change.type in DangerousChangeType);
                }

                function findSchemaChanges(oldSchema, newSchema) {
                    return [...findTypeChanges(oldSchema, newSchema), ...findDirectiveChanges(oldSchema, newSchema)];
                }

                function findDirectiveChanges(oldSchema, newSchema) {
                    const schemaChanges = [];
                    const directivesDiff = diff(oldSchema.getDirectives(), newSchema.getDirectives());
                    for (const oldDirective of directivesDiff.removed) {
                        schemaChanges.push({
                            type: BreakingChangeType.DIRECTIVE_REMOVED,
                            description: `${oldDirective.name} was removed.`
                        });
                    }
                    for (const [oldDirective, newDirective] of directivesDiff.persisted) {
                        const argsDiff = diff(oldDirective.args, newDirective.args);
                        for (const newArg of argsDiff.added) {
                            if ((0, _definition.isRequiredArgument)(newArg)) {
                                schemaChanges.push({
                                    type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,
                                    description: `A required arg ${newArg.name} on directive ${oldDirective.name} was added.`
                                });
                            }
                        }
                        for (const oldArg of argsDiff.removed) {
                            schemaChanges.push({
                                type: BreakingChangeType.DIRECTIVE_ARG_REMOVED,
                                description: `${oldArg.name} was removed from ${oldDirective.name}.`
                            });
                        }
                        if (oldDirective.isRepeatable && !newDirective.isRepeatable) {
                            schemaChanges.push({
                                type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,
                                description: `Repeatable flag was removed from ${oldDirective.name}.`
                            });
                        }
                        for (const location of oldDirective.locations) {
                            if (!newDirective.locations.includes(location)) {
                                schemaChanges.push({
                                    type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,
                                    description: `${location} was removed from ${oldDirective.name}.`
                                });
                            }
                        }
                    }
                    return schemaChanges;
                }

                function findTypeChanges(oldSchema, newSchema) {
                    const schemaChanges = [];
                    const typesDiff = diff(Object.values(oldSchema.getTypeMap()), Object.values(newSchema.getTypeMap()));
                    for (const oldType of typesDiff.removed) {
                        schemaChanges.push({
                            type: BreakingChangeType.TYPE_REMOVED,
                            description: (0, _scalars.isSpecifiedScalarType)(oldType) ? `Standard scalar ${oldType.name} was removed because it is not referenced anymore.` : `${oldType.name} was removed.`
                        });
                    }
                    for (const [oldType, newType] of typesDiff.persisted) {
                        if ((0, _definition.isEnumType)(oldType) && (0, _definition.isEnumType)(newType)) {
                            schemaChanges.push(...findEnumTypeChanges(oldType, newType));
                        } else if ((0, _definition.isUnionType)(oldType) && (0, _definition.isUnionType)(newType)) {
                            schemaChanges.push(...findUnionTypeChanges(oldType, newType));
                        } else if ((0, _definition.isInputObjectType)(oldType) && (0, _definition.isInputObjectType)(newType)) {
                            schemaChanges.push(...findInputObjectTypeChanges(oldType, newType));
                        } else if ((0, _definition.isObjectType)(oldType) && (0, _definition.isObjectType)(newType)) {
                            schemaChanges.push(...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType));
                        } else if ((0, _definition.isInterfaceType)(oldType) && (0, _definition.isInterfaceType)(newType)) {
                            schemaChanges.push(...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType));
                        } else if (oldType.constructor !== newType.constructor) {
                            schemaChanges.push({
                                type: BreakingChangeType.TYPE_CHANGED_KIND,
                                description: `${oldType.name} changed from ` + `${typeKindName(oldType)} to ${typeKindName(newType)}.`
                            });
                        }
                    }
                    return schemaChanges;
                }

                function findInputObjectTypeChanges(oldType, newType) {
                    const schemaChanges = [];
                    const fieldsDiff = diff(Object.values(oldType.getFields()), Object.values(newType.getFields()));
                    for (const newField of fieldsDiff.added) {
                        if ((0, _definition.isRequiredInputField)(newField)) {
                            schemaChanges.push({
                                type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,
                                description: `A required field ${newField.name} on input type ${oldType.name} was added.`
                            });
                        } else {
                            schemaChanges.push({
                                type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,
                                description: `An optional field ${newField.name} on input type ${oldType.name} was added.`
                            });
                        }
                    }
                    for (const oldField of fieldsDiff.removed) {
                        schemaChanges.push({
                            type: BreakingChangeType.FIELD_REMOVED,
                            description: `${oldType.name}.${oldField.name} was removed.`
                        });
                    }
                    for (const [oldField, newField] of fieldsDiff.persisted) {
                        const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldField.type, newField.type);
                        if (!isSafe) {
                            schemaChanges.push({
                                type: BreakingChangeType.FIELD_CHANGED_KIND,
                                description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.`
                            });
                        }
                    }
                    return schemaChanges;
                }

                function findUnionTypeChanges(oldType, newType) {
                    const schemaChanges = [];
                    const possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes());
                    for (const newPossibleType of possibleTypesDiff.added) {
                        schemaChanges.push({
                            type: DangerousChangeType.TYPE_ADDED_TO_UNION,
                            description: `${newPossibleType.name} was added to union type ${oldType.name}.`
                        });
                    }
                    for (const oldPossibleType of possibleTypesDiff.removed) {
                        schemaChanges.push({
                            type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,
                            description: `${oldPossibleType.name} was removed from union type ${oldType.name}.`
                        });
                    }
                    return schemaChanges;
                }

                function findEnumTypeChanges(oldType, newType) {
                    const schemaChanges = [];
                    const valuesDiff = diff(oldType.getValues(), newType.getValues());
                    for (const newValue of valuesDiff.added) {
                        schemaChanges.push({
                            type: DangerousChangeType.VALUE_ADDED_TO_ENUM,
                            description: `${newValue.name} was added to enum type ${oldType.name}.`
                        });
                    }
                    for (const oldValue of valuesDiff.removed) {
                        schemaChanges.push({
                            type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,
                            description: `${oldValue.name} was removed from enum type ${oldType.name}.`
                        });
                    }
                    return schemaChanges;
                }

                function findImplementedInterfacesChanges(oldType, newType) {
                    const schemaChanges = [];
                    const interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces());
                    for (const newInterface of interfacesDiff.added) {
                        schemaChanges.push({
                            type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,
                            description: `${newInterface.name} added to interfaces implemented by ${oldType.name}.`
                        });
                    }
                    for (const oldInterface of interfacesDiff.removed) {
                        schemaChanges.push({
                            type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,
                            description: `${oldType.name} no longer implements interface ${oldInterface.name}.`
                        });
                    }
                    return schemaChanges;
                }

                function findFieldChanges(oldType, newType) {
                    const schemaChanges = [];
                    const fieldsDiff = diff(Object.values(oldType.getFields()), Object.values(newType.getFields()));
                    for (const oldField of fieldsDiff.removed) {
                        schemaChanges.push({
                            type: BreakingChangeType.FIELD_REMOVED,
                            description: `${oldType.name}.${oldField.name} was removed.`
                        });
                    }
                    for (const [oldField, newField] of fieldsDiff.persisted) {
                        schemaChanges.push(...findArgChanges(oldType, oldField, newField));
                        const isSafe = isChangeSafeForObjectOrInterfaceField(oldField.type, newField.type);
                        if (!isSafe) {
                            schemaChanges.push({
                                type: BreakingChangeType.FIELD_CHANGED_KIND,
                                description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.`
                            });
                        }
                    }
                    return schemaChanges;
                }

                function findArgChanges(oldType, oldField, newField) {
                    const schemaChanges = [];
                    const argsDiff = diff(oldField.args, newField.args);
                    for (const oldArg of argsDiff.removed) {
                        schemaChanges.push({
                            type: BreakingChangeType.ARG_REMOVED,
                            description: `${oldType.name}.${oldField.name} arg ${oldArg.name} was removed.`
                        });
                    }
                    for (const [oldArg, newArg] of argsDiff.persisted) {
                        const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArg.type, newArg.type);
                        if (!isSafe) {
                            schemaChanges.push({
                                type: BreakingChangeType.ARG_CHANGED_KIND,
                                description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed type from ` + `${String(oldArg.type)} to ${String(newArg.type)}.`
                            });
                        } else if (oldArg.defaultValue !== undefined) {
                            if (newArg.defaultValue === undefined) {
                                schemaChanges.push({
                                    type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,
                                    description: `${oldType.name}.${oldField.name} arg ${oldArg.name} defaultValue was removed.`
                                });
                            } else {
                                // Since we looking only for client's observable changes we should
                                // compare default values in the same representation as they are
                                // represented inside introspection.
                                const oldValueStr = stringifyValue(oldArg.defaultValue, oldArg.type);
                                const newValueStr = stringifyValue(newArg.defaultValue, newArg.type);
                                if (oldValueStr !== newValueStr) {
                                    schemaChanges.push({
                                        type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,
                                        description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed defaultValue from ${oldValueStr} to ${newValueStr}.`
                                    });
                                }
                            }
                        }
                    }
                    for (const newArg of argsDiff.added) {
                        if ((0, _definition.isRequiredArgument)(newArg)) {
                            schemaChanges.push({
                                type: BreakingChangeType.REQUIRED_ARG_ADDED,
                                description: `A required arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`
                            });
                        } else {
                            schemaChanges.push({
                                type: DangerousChangeType.OPTIONAL_ARG_ADDED,
                                description: `An optional arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`
                            });
                        }
                    }
                    return schemaChanges;
                }

                function isChangeSafeForObjectOrInterfaceField(oldType, newType) {
                    if ((0, _definition.isListType)(oldType)) {
                        return (
                            // if they're both lists, make sure the underlying types are compatible
                            (0, _definition.isListType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType) ||
                            // moving from nullable to non-null of the same underlying type is safe
                            (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)
                        );
                    }
                    if ((0, _definition.isNonNullType)(oldType)) {
                        // if they're both non-null, make sure the underlying types are compatible
                        return (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType);
                    }
                    return (
                        // if they're both named types, see if their names are equivalent
                        (0, _definition.isNamedType)(newType) && oldType.name === newType.name ||
                        // moving from nullable to non-null of the same underlying type is safe
                        (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)
                    );
                }

                function isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) {
                    if ((0, _definition.isListType)(oldType)) {
                        // if they're both lists, make sure the underlying types are compatible
                        return (0, _definition.isListType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType);
                    }
                    if ((0, _definition.isNonNullType)(oldType)) {
                        return (
                            // if they're both non-null, make sure the underlying types are
                            // compatible
                            (0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType) ||
                            // moving from non-null to nullable of the same underlying type is safe
                            !(0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType)
                        );
                    } // if they're both named types, see if their names are equivalent

                    return (0, _definition.isNamedType)(newType) && oldType.name === newType.name;
                }

                function typeKindName(type) {
                    if ((0, _definition.isScalarType)(type)) {
                        return 'a Scalar type';
                    }
                    if ((0, _definition.isObjectType)(type)) {
                        return 'an Object type';
                    }
                    if ((0, _definition.isInterfaceType)(type)) {
                        return 'an Interface type';
                    }
                    if ((0, _definition.isUnionType)(type)) {
                        return 'a Union type';
                    }
                    if ((0, _definition.isEnumType)(type)) {
                        return 'an Enum type';
                    }
                    if ((0, _definition.isInputObjectType)(type)) {
                        return 'an Input type';
                    }
                    /* c8 ignore next 3 */
                    // Not reachable, all possible types have been considered.

                    false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
                }

                function stringifyValue(value, type) {
                    const ast = (0, _astFromValue.astFromValue)(value, type);
                    ast != null || (0, _invariant.invariant)(false);
                    return (0, _printer.print)((0, _sortValueNode.sortValueNode)(ast));
                }

                function diff(oldArray, newArray) {
                    const added = [];
                    const removed = [];
                    const persisted = [];
                    const oldMap = (0, _keyMap.keyMap)(oldArray, ({
                        name
                    }) => name);
                    const newMap = (0, _keyMap.keyMap)(newArray, ({
                        name
                    }) => name);
                    for (const oldItem of oldArray) {
                        const newItem = newMap[oldItem.name];
                        if (newItem === undefined) {
                            removed.push(oldItem);
                        } else {
                            persisted.push([oldItem, newItem]);
                        }
                    }
                    for (const newItem of newArray) {
                        if (oldMap[newItem.name] === undefined) {
                            added.push(newItem);
                        }
                    }
                    return {
                        added,
                        persisted,
                        removed
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs":
            /*!*************************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs ***!
              \*************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getIntrospectionQuery = getIntrospectionQuery;
                /**
                 * Produce the GraphQL query recommended for a full schema introspection.
                 * Accepts optional IntrospectionOptions.
                 */
                function getIntrospectionQuery(options) {
                    const optionsWithDefault = {
                        descriptions: true,
                        specifiedByUrl: false,
                        directiveIsRepeatable: false,
                        schemaDescription: false,
                        inputValueDeprecation: false,
                        oneOf: false,
                        ...options
                    };
                    const descriptions = optionsWithDefault.descriptions ? 'description' : '';
                    const specifiedByUrl = optionsWithDefault.specifiedByUrl ? 'specifiedByURL' : '';
                    const directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable ? 'isRepeatable' : '';
                    const schemaDescription = optionsWithDefault.schemaDescription ? descriptions : '';

                    function inputDeprecation(str) {
                        return optionsWithDefault.inputValueDeprecation ? str : '';
                    }
                    const oneOf = optionsWithDefault.oneOf ? 'isOneOf' : '';
                    return `
    query IntrospectionQuery {
      __schema {
        ${schemaDescription}
        queryType { name }
        mutationType { name }
        subscriptionType { name }
        types {
          ...FullType
        }
        directives {
          name
          ${descriptions}
          ${directiveIsRepeatable}
          locations
          args${inputDeprecation('(includeDeprecated: true)')} {
            ...InputValue
          }
        }
      }
    }

    fragment FullType on __Type {
      kind
      name
      ${descriptions}
      ${specifiedByUrl}
      ${oneOf}
      fields(includeDeprecated: true) {
        name
        ${descriptions}
        args${inputDeprecation('(includeDeprecated: true)')} {
          ...InputValue
        }
        type {
          ...TypeRef
        }
        isDeprecated
        deprecationReason
      }
      inputFields${inputDeprecation('(includeDeprecated: true)')} {
        ...InputValue
      }
      interfaces {
        ...TypeRef
      }
      enumValues(includeDeprecated: true) {
        name
        ${descriptions}
        isDeprecated
        deprecationReason
      }
      possibleTypes {
        ...TypeRef
      }
    }

    fragment InputValue on __InputValue {
      name
      ${descriptions}
      type { ...TypeRef }
      defaultValue
      ${inputDeprecation('isDeprecated')}
      ${inputDeprecation('deprecationReason')}
    }

    fragment TypeRef on __Type {
      kind
      name
      ofType {
        kind
        name
        ofType {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
                ofType {
                  kind
                  name
                  ofType {
                    kind
                    name
                    ofType {
                      kind
                      name
                      ofType {
                        kind
                        name
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  `;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/getOperationAST.mjs":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/getOperationAST.mjs ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getOperationAST = getOperationAST;
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                /**
                 * Returns an operation AST given a document AST and optionally an operation
                 * name. If a name is not provided, an operation is only returned if only one is
                 * provided in the document.
                 */

                function getOperationAST(documentAST, operationName) {
                    let operation = null;
                    for (const definition of documentAST.definitions) {
                        if (definition.kind === _kinds.Kind.OPERATION_DEFINITION) {
                            var _definition$name;
                            if (operationName == null) {
                                // If no operation name was provided, only return an Operation if there
                                // is one defined in the document. Upon encountering the second, return
                                // null.
                                if (operation) {
                                    return null;
                                }
                                operation = definition;
                            } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {
                                return definition;
                            }
                        }
                    }
                    return operation;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/getOperationRootType.mjs":
            /*!************************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/getOperationRootType.mjs ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getOperationRootType = getOperationRootType;
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Extracts the root type of the operation from the schema.
                 *
                 * @deprecated Please use `GraphQLSchema.getRootType` instead. Will be removed in v17
                 */
                function getOperationRootType(schema, operation) {
                    if (operation.operation === 'query') {
                        const queryType = schema.getQueryType();
                        if (!queryType) {
                            throw new _GraphQLError.GraphQLError('Schema does not define the required query root type.', {
                                nodes: operation
                            });
                        }
                        return queryType;
                    }
                    if (operation.operation === 'mutation') {
                        const mutationType = schema.getMutationType();
                        if (!mutationType) {
                            throw new _GraphQLError.GraphQLError('Schema is not configured for mutations.', {
                                nodes: operation
                            });
                        }
                        return mutationType;
                    }
                    if (operation.operation === 'subscription') {
                        const subscriptionType = schema.getSubscriptionType();
                        if (!subscriptionType) {
                            throw new _GraphQLError.GraphQLError('Schema is not configured for subscriptions.', {
                                nodes: operation
                            });
                        }
                        return subscriptionType;
                    }
                    throw new _GraphQLError.GraphQLError('Can only have query, mutation and subscription operations.', {
                        nodes: operation
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/index.mjs":
            /*!*********************************************************!*\
              !*** ../../../node_modules/graphql/utilities/index.mjs ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "BreakingChangeType", ({
                    enumerable: true,
                    get: function() {
                        return _findBreakingChanges.BreakingChangeType;
                    }
                }));
                Object.defineProperty(exports, "DangerousChangeType", ({
                    enumerable: true,
                    get: function() {
                        return _findBreakingChanges.DangerousChangeType;
                    }
                }));
                Object.defineProperty(exports, "TypeInfo", ({
                    enumerable: true,
                    get: function() {
                        return _TypeInfo.TypeInfo;
                    }
                }));
                Object.defineProperty(exports, "assertValidName", ({
                    enumerable: true,
                    get: function() {
                        return _assertValidName.assertValidName;
                    }
                }));
                Object.defineProperty(exports, "astFromValue", ({
                    enumerable: true,
                    get: function() {
                        return _astFromValue.astFromValue;
                    }
                }));
                Object.defineProperty(exports, "buildASTSchema", ({
                    enumerable: true,
                    get: function() {
                        return _buildASTSchema.buildASTSchema;
                    }
                }));
                Object.defineProperty(exports, "buildClientSchema", ({
                    enumerable: true,
                    get: function() {
                        return _buildClientSchema.buildClientSchema;
                    }
                }));
                Object.defineProperty(exports, "buildSchema", ({
                    enumerable: true,
                    get: function() {
                        return _buildASTSchema.buildSchema;
                    }
                }));
                Object.defineProperty(exports, "coerceInputValue", ({
                    enumerable: true,
                    get: function() {
                        return _coerceInputValue.coerceInputValue;
                    }
                }));
                Object.defineProperty(exports, "concatAST", ({
                    enumerable: true,
                    get: function() {
                        return _concatAST.concatAST;
                    }
                }));
                Object.defineProperty(exports, "doTypesOverlap", ({
                    enumerable: true,
                    get: function() {
                        return _typeComparators.doTypesOverlap;
                    }
                }));
                Object.defineProperty(exports, "extendSchema", ({
                    enumerable: true,
                    get: function() {
                        return _extendSchema.extendSchema;
                    }
                }));
                Object.defineProperty(exports, "findBreakingChanges", ({
                    enumerable: true,
                    get: function() {
                        return _findBreakingChanges.findBreakingChanges;
                    }
                }));
                Object.defineProperty(exports, "findDangerousChanges", ({
                    enumerable: true,
                    get: function() {
                        return _findBreakingChanges.findDangerousChanges;
                    }
                }));
                Object.defineProperty(exports, "getIntrospectionQuery", ({
                    enumerable: true,
                    get: function() {
                        return _getIntrospectionQuery.getIntrospectionQuery;
                    }
                }));
                Object.defineProperty(exports, "getOperationAST", ({
                    enumerable: true,
                    get: function() {
                        return _getOperationAST.getOperationAST;
                    }
                }));
                Object.defineProperty(exports, "getOperationRootType", ({
                    enumerable: true,
                    get: function() {
                        return _getOperationRootType.getOperationRootType;
                    }
                }));
                Object.defineProperty(exports, "introspectionFromSchema", ({
                    enumerable: true,
                    get: function() {
                        return _introspectionFromSchema.introspectionFromSchema;
                    }
                }));
                Object.defineProperty(exports, "isEqualType", ({
                    enumerable: true,
                    get: function() {
                        return _typeComparators.isEqualType;
                    }
                }));
                Object.defineProperty(exports, "isTypeSubTypeOf", ({
                    enumerable: true,
                    get: function() {
                        return _typeComparators.isTypeSubTypeOf;
                    }
                }));
                Object.defineProperty(exports, "isValidNameError", ({
                    enumerable: true,
                    get: function() {
                        return _assertValidName.isValidNameError;
                    }
                }));
                Object.defineProperty(exports, "lexicographicSortSchema", ({
                    enumerable: true,
                    get: function() {
                        return _lexicographicSortSchema.lexicographicSortSchema;
                    }
                }));
                Object.defineProperty(exports, "printIntrospectionSchema", ({
                    enumerable: true,
                    get: function() {
                        return _printSchema.printIntrospectionSchema;
                    }
                }));
                Object.defineProperty(exports, "printSchema", ({
                    enumerable: true,
                    get: function() {
                        return _printSchema.printSchema;
                    }
                }));
                Object.defineProperty(exports, "printType", ({
                    enumerable: true,
                    get: function() {
                        return _printSchema.printType;
                    }
                }));
                Object.defineProperty(exports, "separateOperations", ({
                    enumerable: true,
                    get: function() {
                        return _separateOperations.separateOperations;
                    }
                }));
                Object.defineProperty(exports, "stripIgnoredCharacters", ({
                    enumerable: true,
                    get: function() {
                        return _stripIgnoredCharacters.stripIgnoredCharacters;
                    }
                }));
                Object.defineProperty(exports, "typeFromAST", ({
                    enumerable: true,
                    get: function() {
                        return _typeFromAST.typeFromAST;
                    }
                }));
                Object.defineProperty(exports, "valueFromAST", ({
                    enumerable: true,
                    get: function() {
                        return _valueFromAST.valueFromAST;
                    }
                }));
                Object.defineProperty(exports, "valueFromASTUntyped", ({
                    enumerable: true,
                    get: function() {
                        return _valueFromASTUntyped.valueFromASTUntyped;
                    }
                }));
                Object.defineProperty(exports, "visitWithTypeInfo", ({
                    enumerable: true,
                    get: function() {
                        return _TypeInfo.visitWithTypeInfo;
                    }
                }));
                var _getIntrospectionQuery = __webpack_require__( /*! ./getIntrospectionQuery.mjs */ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs");
                var _getOperationAST = __webpack_require__( /*! ./getOperationAST.mjs */ "../../../node_modules/graphql/utilities/getOperationAST.mjs");
                var _getOperationRootType = __webpack_require__( /*! ./getOperationRootType.mjs */ "../../../node_modules/graphql/utilities/getOperationRootType.mjs");
                var _introspectionFromSchema = __webpack_require__( /*! ./introspectionFromSchema.mjs */ "../../../node_modules/graphql/utilities/introspectionFromSchema.mjs");
                var _buildClientSchema = __webpack_require__( /*! ./buildClientSchema.mjs */ "../../../node_modules/graphql/utilities/buildClientSchema.mjs");
                var _buildASTSchema = __webpack_require__( /*! ./buildASTSchema.mjs */ "../../../node_modules/graphql/utilities/buildASTSchema.mjs");
                var _extendSchema = __webpack_require__( /*! ./extendSchema.mjs */ "../../../node_modules/graphql/utilities/extendSchema.mjs");
                var _lexicographicSortSchema = __webpack_require__( /*! ./lexicographicSortSchema.mjs */ "../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs");
                var _printSchema = __webpack_require__( /*! ./printSchema.mjs */ "../../../node_modules/graphql/utilities/printSchema.mjs");
                var _typeFromAST = __webpack_require__( /*! ./typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
                var _valueFromAST = __webpack_require__( /*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs");
                var _valueFromASTUntyped = __webpack_require__( /*! ./valueFromASTUntyped.mjs */ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs");
                var _astFromValue = __webpack_require__( /*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs");
                var _TypeInfo = __webpack_require__( /*! ./TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs");
                var _coerceInputValue = __webpack_require__( /*! ./coerceInputValue.mjs */ "../../../node_modules/graphql/utilities/coerceInputValue.mjs");
                var _concatAST = __webpack_require__( /*! ./concatAST.mjs */ "../../../node_modules/graphql/utilities/concatAST.mjs");
                var _separateOperations = __webpack_require__( /*! ./separateOperations.mjs */ "../../../node_modules/graphql/utilities/separateOperations.mjs");
                var _stripIgnoredCharacters = __webpack_require__( /*! ./stripIgnoredCharacters.mjs */ "../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs");
                var _typeComparators = __webpack_require__( /*! ./typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs");
                var _assertValidName = __webpack_require__( /*! ./assertValidName.mjs */ "../../../node_modules/graphql/utilities/assertValidName.mjs");
                var _findBreakingChanges = __webpack_require__( /*! ./findBreakingChanges.mjs */ "../../../node_modules/graphql/utilities/findBreakingChanges.mjs");

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/introspectionFromSchema.mjs":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/introspectionFromSchema.mjs ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.introspectionFromSchema = introspectionFromSchema;
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _parser = __webpack_require__( /*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
                var _execute = __webpack_require__( /*! ../execution/execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs");
                var _getIntrospectionQuery = __webpack_require__( /*! ./getIntrospectionQuery.mjs */ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs");
                /**
                 * Build an IntrospectionQuery from a GraphQLSchema
                 *
                 * IntrospectionQuery is useful for utilities that care about type and field
                 * relationships, but do not need to traverse through those relationships.
                 *
                 * This is the inverse of buildClientSchema. The primary use case is outside
                 * of the server context, for instance when doing schema comparisons.
                 */

                function introspectionFromSchema(schema, options) {
                    const optionsWithDefaults = {
                        specifiedByUrl: true,
                        directiveIsRepeatable: true,
                        schemaDescription: true,
                        inputValueDeprecation: true,
                        oneOf: true,
                        ...options
                    };
                    const document = (0, _parser.parse)((0, _getIntrospectionQuery.getIntrospectionQuery)(optionsWithDefaults));
                    const result = (0, _execute.executeSync)({
                        schema,
                        document
                    });
                    !result.errors && result.data || (0, _invariant.invariant)(false);
                    return result.data;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.lexicographicSortSchema = lexicographicSortSchema;
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _keyValMap = __webpack_require__( /*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs");
                var _naturalCompare = __webpack_require__( /*! ../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _directives = __webpack_require__( /*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                var _introspection = __webpack_require__( /*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                var _schema = __webpack_require__( /*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
                /**
                 * Sort GraphQLSchema.
                 *
                 * This function returns a sorted copy of the given GraphQLSchema.
                 */

                function lexicographicSortSchema(schema) {
                    const schemaConfig = schema.toConfig();
                    const typeMap = (0, _keyValMap.keyValMap)(sortByName(schemaConfig.types), type => type.name, sortNamedType);
                    return new _schema.GraphQLSchema({
                        ...schemaConfig,
                        types: Object.values(typeMap),
                        directives: sortByName(schemaConfig.directives).map(sortDirective),
                        query: replaceMaybeType(schemaConfig.query),
                        mutation: replaceMaybeType(schemaConfig.mutation),
                        subscription: replaceMaybeType(schemaConfig.subscription)
                    });

                    function replaceType(type) {
                        if ((0, _definition.isListType)(type)) {
                            // @ts-expect-error
                            return new _definition.GraphQLList(replaceType(type.ofType));
                        } else if ((0, _definition.isNonNullType)(type)) {
                            // @ts-expect-error
                            return new _definition.GraphQLNonNull(replaceType(type.ofType));
                        } // @ts-expect-error FIXME: TS Conversion

                        return replaceNamedType(type);
                    }

                    function replaceNamedType(type) {
                        return typeMap[type.name];
                    }

                    function replaceMaybeType(maybeType) {
                        return maybeType && replaceNamedType(maybeType);
                    }

                    function sortDirective(directive) {
                        const config = directive.toConfig();
                        return new _directives.GraphQLDirective({
                            ...config,
                            locations: sortBy(config.locations, x => x),
                            args: sortArgs(config.args)
                        });
                    }

                    function sortArgs(args) {
                        return sortObjMap(args, arg => ({
                            ...arg,
                            type: replaceType(arg.type)
                        }));
                    }

                    function sortFields(fieldsMap) {
                        return sortObjMap(fieldsMap, field => ({
                            ...field,
                            type: replaceType(field.type),
                            args: field.args && sortArgs(field.args)
                        }));
                    }

                    function sortInputFields(fieldsMap) {
                        return sortObjMap(fieldsMap, field => ({
                            ...field,
                            type: replaceType(field.type)
                        }));
                    }

                    function sortTypes(array) {
                        return sortByName(array).map(replaceNamedType);
                    }

                    function sortNamedType(type) {
                        if ((0, _definition.isScalarType)(type) || (0, _introspection.isIntrospectionType)(type)) {
                            return type;
                        }
                        if ((0, _definition.isObjectType)(type)) {
                            const config = type.toConfig();
                            return new _definition.GraphQLObjectType({
                                ...config,
                                interfaces: () => sortTypes(config.interfaces),
                                fields: () => sortFields(config.fields)
                            });
                        }
                        if ((0, _definition.isInterfaceType)(type)) {
                            const config = type.toConfig();
                            return new _definition.GraphQLInterfaceType({
                                ...config,
                                interfaces: () => sortTypes(config.interfaces),
                                fields: () => sortFields(config.fields)
                            });
                        }
                        if ((0, _definition.isUnionType)(type)) {
                            const config = type.toConfig();
                            return new _definition.GraphQLUnionType({
                                ...config,
                                types: () => sortTypes(config.types)
                            });
                        }
                        if ((0, _definition.isEnumType)(type)) {
                            const config = type.toConfig();
                            return new _definition.GraphQLEnumType({
                                ...config,
                                values: sortObjMap(config.values, value => value)
                            });
                        }
                        if ((0, _definition.isInputObjectType)(type)) {
                            const config = type.toConfig();
                            return new _definition.GraphQLInputObjectType({
                                ...config,
                                fields: () => sortInputFields(config.fields)
                            });
                        }
                        /* c8 ignore next 3 */
                        // Not reachable, all possible types have been considered.

                        false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
                    }
                }

                function sortObjMap(map, sortValueFn) {
                    const sortedMap = Object.create(null);
                    for (const key of Object.keys(map).sort(_naturalCompare.naturalCompare)) {
                        sortedMap[key] = sortValueFn(map[key]);
                    }
                    return sortedMap;
                }

                function sortByName(array) {
                    return sortBy(array, obj => obj.name);
                }

                function sortBy(array, mapToKey) {
                    return array.slice().sort((obj1, obj2) => {
                        const key1 = mapToKey(obj1);
                        const key2 = mapToKey(obj2);
                        return (0, _naturalCompare.naturalCompare)(key1, key2);
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/printSchema.mjs":
            /*!***************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/printSchema.mjs ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.printIntrospectionSchema = printIntrospectionSchema;
                exports.printSchema = printSchema;
                exports.printType = printType;
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _blockString = __webpack_require__( /*! ../language/blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _printer = __webpack_require__( /*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _directives = __webpack_require__( /*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                var _introspection = __webpack_require__( /*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                var _scalars = __webpack_require__( /*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
                var _astFromValue = __webpack_require__( /*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs");

                function printSchema(schema) {
                    return printFilteredSchema(schema, n => !(0, _directives.isSpecifiedDirective)(n), isDefinedType);
                }

                function printIntrospectionSchema(schema) {
                    return printFilteredSchema(schema, _directives.isSpecifiedDirective, _introspection.isIntrospectionType);
                }

                function isDefinedType(type) {
                    return !(0, _scalars.isSpecifiedScalarType)(type) && !(0, _introspection.isIntrospectionType)(type);
                }

                function printFilteredSchema(schema, directiveFilter, typeFilter) {
                    const directives = schema.getDirectives().filter(directiveFilter);
                    const types = Object.values(schema.getTypeMap()).filter(typeFilter);
                    return [printSchemaDefinition(schema), ...directives.map(directive => printDirective(directive)), ...types.map(type => printType(type))].filter(Boolean).join('\n\n');
                }

                function printSchemaDefinition(schema) {
                    if (schema.description == null && isSchemaOfCommonNames(schema)) {
                        return;
                    }
                    const operationTypes = [];
                    const queryType = schema.getQueryType();
                    if (queryType) {
                        operationTypes.push(`  query: ${queryType.name}`);
                    }
                    const mutationType = schema.getMutationType();
                    if (mutationType) {
                        operationTypes.push(`  mutation: ${mutationType.name}`);
                    }
                    const subscriptionType = schema.getSubscriptionType();
                    if (subscriptionType) {
                        operationTypes.push(`  subscription: ${subscriptionType.name}`);
                    }
                    return printDescription(schema) + `schema {\n${operationTypes.join('\n')}\n}`;
                }
                /**
                 * GraphQL schema define root types for each type of operation. These types are
                 * the same as any other type and can be named in any manner, however there is
                 * a common naming convention:
                 *
                 * ```graphql
                 *   schema {
                 *     query: Query
                 *     mutation: Mutation
                 *     subscription: Subscription
                 *   }
                 * ```
                 *
                 * When using this naming convention, the schema description can be omitted.
                 */

                function isSchemaOfCommonNames(schema) {
                    const queryType = schema.getQueryType();
                    if (queryType && queryType.name !== 'Query') {
                        return false;
                    }
                    const mutationType = schema.getMutationType();
                    if (mutationType && mutationType.name !== 'Mutation') {
                        return false;
                    }
                    const subscriptionType = schema.getSubscriptionType();
                    if (subscriptionType && subscriptionType.name !== 'Subscription') {
                        return false;
                    }
                    return true;
                }

                function printType(type) {
                    if ((0, _definition.isScalarType)(type)) {
                        return printScalar(type);
                    }
                    if ((0, _definition.isObjectType)(type)) {
                        return printObject(type);
                    }
                    if ((0, _definition.isInterfaceType)(type)) {
                        return printInterface(type);
                    }
                    if ((0, _definition.isUnionType)(type)) {
                        return printUnion(type);
                    }
                    if ((0, _definition.isEnumType)(type)) {
                        return printEnum(type);
                    }
                    if ((0, _definition.isInputObjectType)(type)) {
                        return printInputObject(type);
                    }
                    /* c8 ignore next 3 */
                    // Not reachable, all possible types have been considered.

                    false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
                }

                function printScalar(type) {
                    return printDescription(type) + `scalar ${type.name}` + printSpecifiedByURL(type);
                }

                function printImplementedInterfaces(type) {
                    const interfaces = type.getInterfaces();
                    return interfaces.length ? ' implements ' + interfaces.map(i => i.name).join(' & ') : '';
                }

                function printObject(type) {
                    return printDescription(type) + `type ${type.name}` + printImplementedInterfaces(type) + printFields(type);
                }

                function printInterface(type) {
                    return printDescription(type) + `interface ${type.name}` + printImplementedInterfaces(type) + printFields(type);
                }

                function printUnion(type) {
                    const types = type.getTypes();
                    const possibleTypes = types.length ? ' = ' + types.join(' | ') : '';
                    return printDescription(type) + 'union ' + type.name + possibleTypes;
                }

                function printEnum(type) {
                    const values = type.getValues().map((value, i) => printDescription(value, '  ', !i) + '  ' + value.name + printDeprecated(value.deprecationReason));
                    return printDescription(type) + `enum ${type.name}` + printBlock(values);
                }

                function printInputObject(type) {
                    const fields = Object.values(type.getFields()).map((f, i) => printDescription(f, '  ', !i) + '  ' + printInputValue(f));
                    return printDescription(type) + `input ${type.name}` + (type.isOneOf ? ' @oneOf' : '') + printBlock(fields);
                }

                function printFields(type) {
                    const fields = Object.values(type.getFields()).map((f, i) => printDescription(f, '  ', !i) + '  ' + f.name + printArgs(f.args, '  ') + ': ' + String(f.type) + printDeprecated(f.deprecationReason));
                    return printBlock(fields);
                }

                function printBlock(items) {
                    return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : '';
                }

                function printArgs(args, indentation = '') {
                    if (args.length === 0) {
                        return '';
                    } // If every arg does not have a description, print them on one line.

                    if (args.every(arg => !arg.description)) {
                        return '(' + args.map(printInputValue).join(', ') + ')';
                    }
                    return '(\n' + args.map((arg, i) => printDescription(arg, '  ' + indentation, !i) + '  ' + indentation + printInputValue(arg)).join('\n') + '\n' + indentation + ')';
                }

                function printInputValue(arg) {
                    const defaultAST = (0, _astFromValue.astFromValue)(arg.defaultValue, arg.type);
                    let argDecl = arg.name + ': ' + String(arg.type);
                    if (defaultAST) {
                        argDecl += ` = ${(0, _printer.print)(defaultAST)}`;
                    }
                    return argDecl + printDeprecated(arg.deprecationReason);
                }

                function printDirective(directive) {
                    return printDescription(directive) + 'directive @' + directive.name + printArgs(directive.args) + (directive.isRepeatable ? ' repeatable' : '') + ' on ' + directive.locations.join(' | ');
                }

                function printDeprecated(reason) {
                    if (reason == null) {
                        return '';
                    }
                    if (reason !== _directives.DEFAULT_DEPRECATION_REASON) {
                        const astValue = (0, _printer.print)({
                            kind: _kinds.Kind.STRING,
                            value: reason
                        });
                        return ` @deprecated(reason: ${astValue})`;
                    }
                    return ' @deprecated';
                }

                function printSpecifiedByURL(scalar) {
                    if (scalar.specifiedByURL == null) {
                        return '';
                    }
                    const astValue = (0, _printer.print)({
                        kind: _kinds.Kind.STRING,
                        value: scalar.specifiedByURL
                    });
                    return ` @specifiedBy(url: ${astValue})`;
                }

                function printDescription(def, indentation = '', firstInBlock = true) {
                    const {
                        description
                    } = def;
                    if (description == null) {
                        return '';
                    }
                    const blockString = (0, _printer.print)({
                        kind: _kinds.Kind.STRING,
                        value: description,
                        block: (0, _blockString.isPrintableAsBlockString)(description)
                    });
                    const prefix = indentation && !firstInBlock ? '\n' + indentation : indentation;
                    return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n';
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/separateOperations.mjs":
            /*!**********************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/separateOperations.mjs ***!
              \**********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.separateOperations = separateOperations;
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _visitor = __webpack_require__( /*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
                /**
                 * separateOperations accepts a single AST document which may contain many
                 * operations and fragments and returns a collection of AST documents each of
                 * which contains a single operation as well the fragment definitions it
                 * refers to.
                 */

                function separateOperations(documentAST) {
                    const operations = [];
                    const depGraph = Object.create(null); // Populate metadata and build a dependency graph.

                    for (const definitionNode of documentAST.definitions) {
                        switch (definitionNode.kind) {
                            case _kinds.Kind.OPERATION_DEFINITION:
                                operations.push(definitionNode);
                                break;
                            case _kinds.Kind.FRAGMENT_DEFINITION:
                                depGraph[definitionNode.name.value] = collectDependencies(definitionNode.selectionSet);
                                break;
                            default: // ignore non-executable definitions
                        }
                    } // For each operation, produce a new synthesized AST which includes only what
                    // is necessary for completing that operation.

                    const separatedDocumentASTs = Object.create(null);
                    for (const operation of operations) {
                        const dependencies = new Set();
                        for (const fragmentName of collectDependencies(operation.selectionSet)) {
                            collectTransitiveDependencies(dependencies, depGraph, fragmentName);
                        } // Provides the empty string for anonymous operations.

                        const operationName = operation.name ? operation.name.value : ''; // The list of definition nodes to be included for this operation, sorted
                        // to retain the same order as the original document.

                        separatedDocumentASTs[operationName] = {
                            kind: _kinds.Kind.DOCUMENT,
                            definitions: documentAST.definitions.filter(node => node === operation || node.kind === _kinds.Kind.FRAGMENT_DEFINITION && dependencies.has(node.name.value))
                        };
                    }
                    return separatedDocumentASTs;
                }

                // From a dependency graph, collects a list of transitive dependencies by
                // recursing through a dependency graph.
                function collectTransitiveDependencies(collected, depGraph, fromName) {
                    if (!collected.has(fromName)) {
                        collected.add(fromName);
                        const immediateDeps = depGraph[fromName];
                        if (immediateDeps !== undefined) {
                            for (const toName of immediateDeps) {
                                collectTransitiveDependencies(collected, depGraph, toName);
                            }
                        }
                    }
                }

                function collectDependencies(selectionSet) {
                    const dependencies = [];
                    (0, _visitor.visit)(selectionSet, {
                        FragmentSpread(node) {
                            dependencies.push(node.name.value);
                        }
                    });
                    return dependencies;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/sortValueNode.mjs":
            /*!*****************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/sortValueNode.mjs ***!
              \*****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.sortValueNode = sortValueNode;
                var _naturalCompare = __webpack_require__( /*! ../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                /**
                 * Sort ValueNode.
                 *
                 * This function returns a sorted copy of the given ValueNode.
                 *
                 * @internal
                 */

                function sortValueNode(valueNode) {
                    switch (valueNode.kind) {
                        case _kinds.Kind.OBJECT:
                            return {
                                ...valueNode,
                                fields: sortFields(valueNode.fields)
                            };
                        case _kinds.Kind.LIST:
                            return {
                                ...valueNode,
                                values: valueNode.values.map(sortValueNode)
                            };
                        case _kinds.Kind.INT:
                        case _kinds.Kind.FLOAT:
                        case _kinds.Kind.STRING:
                        case _kinds.Kind.BOOLEAN:
                        case _kinds.Kind.NULL:
                        case _kinds.Kind.ENUM:
                        case _kinds.Kind.VARIABLE:
                            return valueNode;
                    }
                }

                function sortFields(fields) {
                    return fields.map(fieldNode => ({
                        ...fieldNode,
                        value: sortValueNode(fieldNode.value)
                    })).sort((fieldA, fieldB) => (0, _naturalCompare.naturalCompare)(fieldA.name.value, fieldB.name.value));
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.stripIgnoredCharacters = stripIgnoredCharacters;
                var _blockString = __webpack_require__( /*! ../language/blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs");
                var _lexer = __webpack_require__( /*! ../language/lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs");
                var _source = __webpack_require__( /*! ../language/source.mjs */ "../../../node_modules/graphql/language/source.mjs");
                var _tokenKind = __webpack_require__( /*! ../language/tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs");
                /**
                 * Strips characters that are not significant to the validity or execution
                 * of a GraphQL document:
                 *   - UnicodeBOM
                 *   - WhiteSpace
                 *   - LineTerminator
                 *   - Comment
                 *   - Comma
                 *   - BlockString indentation
                 *
                 * Note: It is required to have a delimiter character between neighboring
                 * non-punctuator tokens and this function always uses single space as delimiter.
                 *
                 * It is guaranteed that both input and output documents if parsed would result
                 * in the exact same AST except for nodes location.
                 *
                 * Warning: It is guaranteed that this function will always produce stable results.
                 * However, it's not guaranteed that it will stay the same between different
                 * releases due to bugfixes or changes in the GraphQL specification.
                 *
                 * Query example:
                 *
                 * ```graphql
                 * query SomeQuery($foo: String!, $bar: String) {
                 *   someField(foo: $foo, bar: $bar) {
                 *     a
                 *     b {
                 *       c
                 *       d
                 *     }
                 *   }
                 * }
                 * ```
                 *
                 * Becomes:
                 *
                 * ```graphql
                 * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}}
                 * ```
                 *
                 * SDL example:
                 *
                 * ```graphql
                 * """
                 * Type description
                 * """
                 * type Foo {
                 *   """
                 *   Field description
                 *   """
                 *   bar: String
                 * }
                 * ```
                 *
                 * Becomes:
                 *
                 * ```graphql
                 * """Type description""" type Foo{"""Field description""" bar:String}
                 * ```
                 */

                function stripIgnoredCharacters(source) {
                    const sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source);
                    const body = sourceObj.body;
                    const lexer = new _lexer.Lexer(sourceObj);
                    let strippedBody = '';
                    let wasLastAddedTokenNonPunctuator = false;
                    while (lexer.advance().kind !== _tokenKind.TokenKind.EOF) {
                        const currentToken = lexer.token;
                        const tokenKind = currentToken.kind;
                        /**
                         * Every two non-punctuator tokens should have space between them.
                         * Also prevent case of non-punctuator token following by spread resulting
                         * in invalid token (e.g. `1...` is invalid Float token).
                         */

                        const isNonPunctuator = !(0, _lexer.isPunctuatorTokenKind)(currentToken.kind);
                        if (wasLastAddedTokenNonPunctuator) {
                            if (isNonPunctuator || currentToken.kind === _tokenKind.TokenKind.SPREAD) {
                                strippedBody += ' ';
                            }
                        }
                        const tokenBody = body.slice(currentToken.start, currentToken.end);
                        if (tokenKind === _tokenKind.TokenKind.BLOCK_STRING) {
                            strippedBody += (0, _blockString.printBlockString)(currentToken.value, {
                                minimize: true
                            });
                        } else {
                            strippedBody += tokenBody;
                        }
                        wasLastAddedTokenNonPunctuator = isNonPunctuator;
                    }
                    return strippedBody;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/typeComparators.mjs":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/typeComparators.mjs ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.doTypesOverlap = doTypesOverlap;
                exports.isEqualType = isEqualType;
                exports.isTypeSubTypeOf = isTypeSubTypeOf;
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Provided two types, return true if the types are equal (invariant).
                 */
                function isEqualType(typeA, typeB) {
                    // Equivalent types are equal.
                    if (typeA === typeB) {
                        return true;
                    } // If either type is non-null, the other must also be non-null.

                    if ((0, _definition.isNonNullType)(typeA) && (0, _definition.isNonNullType)(typeB)) {
                        return isEqualType(typeA.ofType, typeB.ofType);
                    } // If either type is a list, the other must also be a list.

                    if ((0, _definition.isListType)(typeA) && (0, _definition.isListType)(typeB)) {
                        return isEqualType(typeA.ofType, typeB.ofType);
                    } // Otherwise the types are not equal.

                    return false;
                }
                /**
                 * Provided a type and a super type, return true if the first type is either
                 * equal or a subset of the second super type (covariant).
                 */

                function isTypeSubTypeOf(schema, maybeSubType, superType) {
                    // Equivalent type is a valid subtype
                    if (maybeSubType === superType) {
                        return true;
                    } // If superType is non-null, maybeSubType must also be non-null.

                    if ((0, _definition.isNonNullType)(superType)) {
                        if ((0, _definition.isNonNullType)(maybeSubType)) {
                            return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);
                        }
                        return false;
                    }
                    if ((0, _definition.isNonNullType)(maybeSubType)) {
                        // If superType is nullable, maybeSubType may be non-null or nullable.
                        return isTypeSubTypeOf(schema, maybeSubType.ofType, superType);
                    } // If superType type is a list, maybeSubType type must also be a list.

                    if ((0, _definition.isListType)(superType)) {
                        if ((0, _definition.isListType)(maybeSubType)) {
                            return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);
                        }
                        return false;
                    }
                    if ((0, _definition.isListType)(maybeSubType)) {
                        // If superType is not a list, maybeSubType must also be not a list.
                        return false;
                    } // If superType type is an abstract type, check if it is super type of maybeSubType.
                    // Otherwise, the child type is not a valid subtype of the parent type.

                    return (0, _definition.isAbstractType)(superType) && ((0, _definition.isInterfaceType)(maybeSubType) || (0, _definition.isObjectType)(maybeSubType)) && schema.isSubType(superType, maybeSubType);
                }
                /**
                 * Provided two composite types, determine if they "overlap". Two composite
                 * types overlap when the Sets of possible concrete types for each intersect.
                 *
                 * This is often used to determine if a fragment of a given type could possibly
                 * be visited in a context of another type.
                 *
                 * This function is commutative.
                 */

                function doTypesOverlap(schema, typeA, typeB) {
                    // Equivalent types overlap
                    if (typeA === typeB) {
                        return true;
                    }
                    if ((0, _definition.isAbstractType)(typeA)) {
                        if ((0, _definition.isAbstractType)(typeB)) {
                            // If both types are abstract, then determine if there is any intersection
                            // between possible concrete types of each.
                            return schema.getPossibleTypes(typeA).some(type => schema.isSubType(typeB, type));
                        } // Determine if the latter type is a possible concrete type of the former.

                        return schema.isSubType(typeA, typeB);
                    }
                    if ((0, _definition.isAbstractType)(typeB)) {
                        // Determine if the former type is a possible concrete type of the latter.
                        return schema.isSubType(typeB, typeA);
                    } // Otherwise the types do not overlap.

                    return false;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/typeFromAST.mjs":
            /*!***************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/typeFromAST.mjs ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.typeFromAST = typeFromAST;
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");

                function typeFromAST(schema, typeNode) {
                    switch (typeNode.kind) {
                        case _kinds.Kind.LIST_TYPE: {
                            const innerType = typeFromAST(schema, typeNode.type);
                            return innerType && new _definition.GraphQLList(innerType);
                        }
                        case _kinds.Kind.NON_NULL_TYPE: {
                            const innerType = typeFromAST(schema, typeNode.type);
                            return innerType && new _definition.GraphQLNonNull(innerType);
                        }
                        case _kinds.Kind.NAMED_TYPE:
                            return schema.getType(typeNode.name.value);
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/valueFromAST.mjs":
            /*!****************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/valueFromAST.mjs ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.valueFromAST = valueFromAST;
                var _inspect = __webpack_require__( /*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _keyMap = __webpack_require__( /*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _definition = __webpack_require__( /*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Produces a JavaScript value given a GraphQL Value AST.
                 *
                 * A GraphQL type must be provided, which will be used to interpret different
                 * GraphQL Value literals.
                 *
                 * Returns `undefined` when the value could not be validly coerced according to
                 * the provided type.
                 *
                 * | GraphQL Value        | JSON Value    |
                 * | -------------------- | ------------- |
                 * | Input Object         | Object        |
                 * | List                 | Array         |
                 * | Boolean              | Boolean       |
                 * | String               | String        |
                 * | Int / Float          | Number        |
                 * | Enum Value           | Unknown       |
                 * | NullValue            | null          |
                 *
                 */

                function valueFromAST(valueNode, type, variables) {
                    if (!valueNode) {
                        // When there is no node, then there is also no value.
                        // Importantly, this is different from returning the value null.
                        return;
                    }
                    if (valueNode.kind === _kinds.Kind.VARIABLE) {
                        const variableName = valueNode.name.value;
                        if (variables == null || variables[variableName] === undefined) {
                            // No valid return value.
                            return;
                        }
                        const variableValue = variables[variableName];
                        if (variableValue === null && (0, _definition.isNonNullType)(type)) {
                            return; // Invalid: intentionally return no value.
                        } // Note: This does no further checking that this variable is correct.
                        // This assumes that this query has been validated and the variable
                        // usage here is of the correct type.

                        return variableValue;
                    }
                    if ((0, _definition.isNonNullType)(type)) {
                        if (valueNode.kind === _kinds.Kind.NULL) {
                            return; // Invalid: intentionally return no value.
                        }
                        return valueFromAST(valueNode, type.ofType, variables);
                    }
                    if (valueNode.kind === _kinds.Kind.NULL) {
                        // This is explicitly returning the value null.
                        return null;
                    }
                    if ((0, _definition.isListType)(type)) {
                        const itemType = type.ofType;
                        if (valueNode.kind === _kinds.Kind.LIST) {
                            const coercedValues = [];
                            for (const itemNode of valueNode.values) {
                                if (isMissingVariable(itemNode, variables)) {
                                    // If an array contains a missing variable, it is either coerced to
                                    // null or if the item type is non-null, it considered invalid.
                                    if ((0, _definition.isNonNullType)(itemType)) {
                                        return; // Invalid: intentionally return no value.
                                    }
                                    coercedValues.push(null);
                                } else {
                                    const itemValue = valueFromAST(itemNode, itemType, variables);
                                    if (itemValue === undefined) {
                                        return; // Invalid: intentionally return no value.
                                    }
                                    coercedValues.push(itemValue);
                                }
                            }
                            return coercedValues;
                        }
                        const coercedValue = valueFromAST(valueNode, itemType, variables);
                        if (coercedValue === undefined) {
                            return; // Invalid: intentionally return no value.
                        }
                        return [coercedValue];
                    }
                    if ((0, _definition.isInputObjectType)(type)) {
                        if (valueNode.kind !== _kinds.Kind.OBJECT) {
                            return; // Invalid: intentionally return no value.
                        }
                        const coercedObj = Object.create(null);
                        const fieldNodes = (0, _keyMap.keyMap)(valueNode.fields, field => field.name.value);
                        for (const field of Object.values(type.getFields())) {
                            const fieldNode = fieldNodes[field.name];
                            if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {
                                if (field.defaultValue !== undefined) {
                                    coercedObj[field.name] = field.defaultValue;
                                } else if ((0, _definition.isNonNullType)(field.type)) {
                                    return; // Invalid: intentionally return no value.
                                }
                                continue;
                            }
                            const fieldValue = valueFromAST(fieldNode.value, field.type, variables);
                            if (fieldValue === undefined) {
                                return; // Invalid: intentionally return no value.
                            }
                            coercedObj[field.name] = fieldValue;
                        }
                        if (type.isOneOf) {
                            const keys = Object.keys(coercedObj);
                            if (keys.length !== 1) {
                                return; // Invalid: not exactly one key, intentionally return no value.
                            }
                            if (coercedObj[keys[0]] === null) {
                                return; // Invalid: value not non-null, intentionally return no value.
                            }
                        }
                        return coercedObj;
                    }
                    if ((0, _definition.isLeafType)(type)) {
                        // Scalars and Enums fulfill parsing a literal value via parseLiteral().
                        // Invalid values represent a failure to parse correctly, in which case
                        // no value is returned.
                        let result;
                        try {
                            result = type.parseLiteral(valueNode, variables);
                        } catch (_error) {
                            return; // Invalid: intentionally return no value.
                        }
                        if (result === undefined) {
                            return; // Invalid: intentionally return no value.
                        }
                        return result;
                    }
                    /* c8 ignore next 3 */
                    // Not reachable, all possible input types have been considered.

                    false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type));
                } // Returns true if the provided valueNode is a variable which is not defined
                // in the set of variables.

                function isMissingVariable(valueNode, variables) {
                    return valueNode.kind === _kinds.Kind.VARIABLE && (variables == null || variables[valueNode.name.value] === undefined);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.valueFromASTUntyped = valueFromASTUntyped;
                var _keyValMap = __webpack_require__( /*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs");
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                /**
                 * Produces a JavaScript value given a GraphQL Value AST.
                 *
                 * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value
                 * will reflect the provided GraphQL value AST.
                 *
                 * | GraphQL Value        | JavaScript Value |
                 * | -------------------- | ---------------- |
                 * | Input Object         | Object           |
                 * | List                 | Array            |
                 * | Boolean              | Boolean          |
                 * | String / Enum        | String           |
                 * | Int / Float          | Number           |
                 * | Null                 | null             |
                 *
                 */

                function valueFromASTUntyped(valueNode, variables) {
                    switch (valueNode.kind) {
                        case _kinds.Kind.NULL:
                            return null;
                        case _kinds.Kind.INT:
                            return parseInt(valueNode.value, 10);
                        case _kinds.Kind.FLOAT:
                            return parseFloat(valueNode.value);
                        case _kinds.Kind.STRING:
                        case _kinds.Kind.ENUM:
                        case _kinds.Kind.BOOLEAN:
                            return valueNode.value;
                        case _kinds.Kind.LIST:
                            return valueNode.values.map(node => valueFromASTUntyped(node, variables));
                        case _kinds.Kind.OBJECT:
                            return (0, _keyValMap.keyValMap)(valueNode.fields, field => field.name.value, field => valueFromASTUntyped(field.value, variables));
                        case _kinds.Kind.VARIABLE:
                            return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value];
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/ValidationContext.mjs":
            /*!**********************************************************************!*\
              !*** ../../../node_modules/graphql/validation/ValidationContext.mjs ***!
              \**********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.ValidationContext = exports.SDLValidationContext = exports.ASTValidationContext = void 0;
                var _kinds = __webpack_require__( /*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _visitor = __webpack_require__( /*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
                var _TypeInfo = __webpack_require__( /*! ../utilities/TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs");
                /**
                 * An instance of this class is passed as the "this" context to all validators,
                 * allowing access to commonly useful contextual information from within a
                 * validation rule.
                 */
                class ASTValidationContext {
                    constructor(ast, onError) {
                        this._ast = ast;
                        this._fragments = undefined;
                        this._fragmentSpreads = new Map();
                        this._recursivelyReferencedFragments = new Map();
                        this._onError = onError;
                    }
                    get[Symbol.toStringTag]() {
                        return 'ASTValidationContext';
                    }
                    reportError(error) {
                        this._onError(error);
                    }
                    getDocument() {
                        return this._ast;
                    }
                    getFragment(name) {
                        let fragments;
                        if (this._fragments) {
                            fragments = this._fragments;
                        } else {
                            fragments = Object.create(null);
                            for (const defNode of this.getDocument().definitions) {
                                if (defNode.kind === _kinds.Kind.FRAGMENT_DEFINITION) {
                                    fragments[defNode.name.value] = defNode;
                                }
                            }
                            this._fragments = fragments;
                        }
                        return fragments[name];
                    }
                    getFragmentSpreads(node) {
                        let spreads = this._fragmentSpreads.get(node);
                        if (!spreads) {
                            spreads = [];
                            const setsToVisit = [node];
                            let set;
                            while (set = setsToVisit.pop()) {
                                for (const selection of set.selections) {
                                    if (selection.kind === _kinds.Kind.FRAGMENT_SPREAD) {
                                        spreads.push(selection);
                                    } else if (selection.selectionSet) {
                                        setsToVisit.push(selection.selectionSet);
                                    }
                                }
                            }
                            this._fragmentSpreads.set(node, spreads);
                        }
                        return spreads;
                    }
                    getRecursivelyReferencedFragments(operation) {
                        let fragments = this._recursivelyReferencedFragments.get(operation);
                        if (!fragments) {
                            fragments = [];
                            const collectedNames = Object.create(null);
                            const nodesToVisit = [operation.selectionSet];
                            let node;
                            while (node = nodesToVisit.pop()) {
                                for (const spread of this.getFragmentSpreads(node)) {
                                    const fragName = spread.name.value;
                                    if (collectedNames[fragName] !== true) {
                                        collectedNames[fragName] = true;
                                        const fragment = this.getFragment(fragName);
                                        if (fragment) {
                                            fragments.push(fragment);
                                            nodesToVisit.push(fragment.selectionSet);
                                        }
                                    }
                                }
                            }
                            this._recursivelyReferencedFragments.set(operation, fragments);
                        }
                        return fragments;
                    }
                }
                exports.ASTValidationContext = ASTValidationContext;
                class SDLValidationContext extends ASTValidationContext {
                    constructor(ast, schema, onError) {
                        super(ast, onError);
                        this._schema = schema;
                    }
                    get[Symbol.toStringTag]() {
                        return 'SDLValidationContext';
                    }
                    getSchema() {
                        return this._schema;
                    }
                }
                exports.SDLValidationContext = SDLValidationContext;
                class ValidationContext extends ASTValidationContext {
                    constructor(schema, ast, typeInfo, onError) {
                        super(ast, onError);
                        this._schema = schema;
                        this._typeInfo = typeInfo;
                        this._variableUsages = new Map();
                        this._recursiveVariableUsages = new Map();
                    }
                    get[Symbol.toStringTag]() {
                        return 'ValidationContext';
                    }
                    getSchema() {
                        return this._schema;
                    }
                    getVariableUsages(node) {
                        let usages = this._variableUsages.get(node);
                        if (!usages) {
                            const newUsages = [];
                            const typeInfo = new _TypeInfo.TypeInfo(this._schema);
                            (0, _visitor.visit)(node, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, {
                                VariableDefinition: () => false,
                                Variable(variable) {
                                    newUsages.push({
                                        node: variable,
                                        type: typeInfo.getInputType(),
                                        defaultValue: typeInfo.getDefaultValue()
                                    });
                                }
                            }));
                            usages = newUsages;
                            this._variableUsages.set(node, usages);
                        }
                        return usages;
                    }
                    getRecursiveVariableUsages(operation) {
                        let usages = this._recursiveVariableUsages.get(operation);
                        if (!usages) {
                            usages = this.getVariableUsages(operation);
                            for (const frag of this.getRecursivelyReferencedFragments(operation)) {
                                usages = usages.concat(this.getVariableUsages(frag));
                            }
                            this._recursiveVariableUsages.set(operation, usages);
                        }
                        return usages;
                    }
                    getType() {
                        return this._typeInfo.getType();
                    }
                    getParentType() {
                        return this._typeInfo.getParentType();
                    }
                    getInputType() {
                        return this._typeInfo.getInputType();
                    }
                    getParentInputType() {
                        return this._typeInfo.getParentInputType();
                    }
                    getFieldDef() {
                        return this._typeInfo.getFieldDef();
                    }
                    getDirective() {
                        return this._typeInfo.getDirective();
                    }
                    getArgument() {
                        return this._typeInfo.getArgument();
                    }
                    getEnumValue() {
                        return this._typeInfo.getEnumValue();
                    }
                }
                exports.ValidationContext = ValidationContext;

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/index.mjs":
            /*!**********************************************************!*\
              !*** ../../../node_modules/graphql/validation/index.mjs ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "ExecutableDefinitionsRule", ({
                    enumerable: true,
                    get: function() {
                        return _ExecutableDefinitionsRule.ExecutableDefinitionsRule;
                    }
                }));
                Object.defineProperty(exports, "FieldsOnCorrectTypeRule", ({
                    enumerable: true,
                    get: function() {
                        return _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule;
                    }
                }));
                Object.defineProperty(exports, "FragmentsOnCompositeTypesRule", ({
                    enumerable: true,
                    get: function() {
                        return _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule;
                    }
                }));
                Object.defineProperty(exports, "KnownArgumentNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _KnownArgumentNamesRule.KnownArgumentNamesRule;
                    }
                }));
                Object.defineProperty(exports, "KnownDirectivesRule", ({
                    enumerable: true,
                    get: function() {
                        return _KnownDirectivesRule.KnownDirectivesRule;
                    }
                }));
                Object.defineProperty(exports, "KnownFragmentNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _KnownFragmentNamesRule.KnownFragmentNamesRule;
                    }
                }));
                Object.defineProperty(exports, "KnownTypeNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _KnownTypeNamesRule.KnownTypeNamesRule;
                    }
                }));
                Object.defineProperty(exports, "LoneAnonymousOperationRule", ({
                    enumerable: true,
                    get: function() {
                        return _LoneAnonymousOperationRule.LoneAnonymousOperationRule;
                    }
                }));
                Object.defineProperty(exports, "LoneSchemaDefinitionRule", ({
                    enumerable: true,
                    get: function() {
                        return _LoneSchemaDefinitionRule.LoneSchemaDefinitionRule;
                    }
                }));
                Object.defineProperty(exports, "MaxIntrospectionDepthRule", ({
                    enumerable: true,
                    get: function() {
                        return _MaxIntrospectionDepthRule.MaxIntrospectionDepthRule;
                    }
                }));
                Object.defineProperty(exports, "NoDeprecatedCustomRule", ({
                    enumerable: true,
                    get: function() {
                        return _NoDeprecatedCustomRule.NoDeprecatedCustomRule;
                    }
                }));
                Object.defineProperty(exports, "NoFragmentCyclesRule", ({
                    enumerable: true,
                    get: function() {
                        return _NoFragmentCyclesRule.NoFragmentCyclesRule;
                    }
                }));
                Object.defineProperty(exports, "NoSchemaIntrospectionCustomRule", ({
                    enumerable: true,
                    get: function() {
                        return _NoSchemaIntrospectionCustomRule.NoSchemaIntrospectionCustomRule;
                    }
                }));
                Object.defineProperty(exports, "NoUndefinedVariablesRule", ({
                    enumerable: true,
                    get: function() {
                        return _NoUndefinedVariablesRule.NoUndefinedVariablesRule;
                    }
                }));
                Object.defineProperty(exports, "NoUnusedFragmentsRule", ({
                    enumerable: true,
                    get: function() {
                        return _NoUnusedFragmentsRule.NoUnusedFragmentsRule;
                    }
                }));
                Object.defineProperty(exports, "NoUnusedVariablesRule", ({
                    enumerable: true,
                    get: function() {
                        return _NoUnusedVariablesRule.NoUnusedVariablesRule;
                    }
                }));
                Object.defineProperty(exports, "OverlappingFieldsCanBeMergedRule", ({
                    enumerable: true,
                    get: function() {
                        return _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule;
                    }
                }));
                Object.defineProperty(exports, "PossibleFragmentSpreadsRule", ({
                    enumerable: true,
                    get: function() {
                        return _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule;
                    }
                }));
                Object.defineProperty(exports, "PossibleTypeExtensionsRule", ({
                    enumerable: true,
                    get: function() {
                        return _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule;
                    }
                }));
                Object.defineProperty(exports, "ProvidedRequiredArgumentsRule", ({
                    enumerable: true,
                    get: function() {
                        return _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule;
                    }
                }));
                Object.defineProperty(exports, "ScalarLeafsRule", ({
                    enumerable: true,
                    get: function() {
                        return _ScalarLeafsRule.ScalarLeafsRule;
                    }
                }));
                Object.defineProperty(exports, "SingleFieldSubscriptionsRule", ({
                    enumerable: true,
                    get: function() {
                        return _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueArgumentDefinitionNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueArgumentNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueArgumentNamesRule.UniqueArgumentNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueDirectiveNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueDirectivesPerLocationRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueEnumValueNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueFragmentNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueFragmentNamesRule.UniqueFragmentNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueInputFieldNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueOperationNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueOperationNamesRule.UniqueOperationNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueOperationTypesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueOperationTypesRule.UniqueOperationTypesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueTypeNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueTypeNamesRule.UniqueTypeNamesRule;
                    }
                }));
                Object.defineProperty(exports, "UniqueVariableNamesRule", ({
                    enumerable: true,
                    get: function() {
                        return _UniqueVariableNamesRule.UniqueVariableNamesRule;
                    }
                }));
                Object.defineProperty(exports, "ValidationContext", ({
                    enumerable: true,
                    get: function() {
                        return _ValidationContext.ValidationContext;
                    }
                }));
                Object.defineProperty(exports, "ValuesOfCorrectTypeRule", ({
                    enumerable: true,
                    get: function() {
                        return _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule;
                    }
                }));
                Object.defineProperty(exports, "VariablesAreInputTypesRule", ({
                    enumerable: true,
                    get: function() {
                        return _VariablesAreInputTypesRule.VariablesAreInputTypesRule;
                    }
                }));
                Object.defineProperty(exports, "VariablesInAllowedPositionRule", ({
                    enumerable: true,
                    get: function() {
                        return _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule;
                    }
                }));
                Object.defineProperty(exports, "recommendedRules", ({
                    enumerable: true,
                    get: function() {
                        return _specifiedRules.recommendedRules;
                    }
                }));
                Object.defineProperty(exports, "specifiedRules", ({
                    enumerable: true,
                    get: function() {
                        return _specifiedRules.specifiedRules;
                    }
                }));
                Object.defineProperty(exports, "validate", ({
                    enumerable: true,
                    get: function() {
                        return _validate.validate;
                    }
                }));
                var _validate = __webpack_require__( /*! ./validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs");
                var _ValidationContext = __webpack_require__( /*! ./ValidationContext.mjs */ "../../../node_modules/graphql/validation/ValidationContext.mjs");
                var _specifiedRules = __webpack_require__( /*! ./specifiedRules.mjs */ "../../../node_modules/graphql/validation/specifiedRules.mjs");
                var _ExecutableDefinitionsRule = __webpack_require__( /*! ./rules/ExecutableDefinitionsRule.mjs */ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs");
                var _FieldsOnCorrectTypeRule = __webpack_require__( /*! ./rules/FieldsOnCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs");
                var _FragmentsOnCompositeTypesRule = __webpack_require__( /*! ./rules/FragmentsOnCompositeTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs");
                var _KnownArgumentNamesRule = __webpack_require__( /*! ./rules/KnownArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs");
                var _KnownDirectivesRule = __webpack_require__( /*! ./rules/KnownDirectivesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs");
                var _KnownFragmentNamesRule = __webpack_require__( /*! ./rules/KnownFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs");
                var _KnownTypeNamesRule = __webpack_require__( /*! ./rules/KnownTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs");
                var _LoneAnonymousOperationRule = __webpack_require__( /*! ./rules/LoneAnonymousOperationRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs");
                var _NoFragmentCyclesRule = __webpack_require__( /*! ./rules/NoFragmentCyclesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs");
                var _NoUndefinedVariablesRule = __webpack_require__( /*! ./rules/NoUndefinedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs");
                var _NoUnusedFragmentsRule = __webpack_require__( /*! ./rules/NoUnusedFragmentsRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs");
                var _NoUnusedVariablesRule = __webpack_require__( /*! ./rules/NoUnusedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs");
                var _OverlappingFieldsCanBeMergedRule = __webpack_require__( /*! ./rules/OverlappingFieldsCanBeMergedRule.mjs */ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs");
                var _PossibleFragmentSpreadsRule = __webpack_require__( /*! ./rules/PossibleFragmentSpreadsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs");
                var _ProvidedRequiredArgumentsRule = __webpack_require__( /*! ./rules/ProvidedRequiredArgumentsRule.mjs */ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs");
                var _ScalarLeafsRule = __webpack_require__( /*! ./rules/ScalarLeafsRule.mjs */ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs");
                var _SingleFieldSubscriptionsRule = __webpack_require__( /*! ./rules/SingleFieldSubscriptionsRule.mjs */ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs");
                var _UniqueArgumentNamesRule = __webpack_require__( /*! ./rules/UniqueArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs");
                var _UniqueDirectivesPerLocationRule = __webpack_require__( /*! ./rules/UniqueDirectivesPerLocationRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs");
                var _UniqueFragmentNamesRule = __webpack_require__( /*! ./rules/UniqueFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs");
                var _UniqueInputFieldNamesRule = __webpack_require__( /*! ./rules/UniqueInputFieldNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs");
                var _UniqueOperationNamesRule = __webpack_require__( /*! ./rules/UniqueOperationNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs");
                var _UniqueVariableNamesRule = __webpack_require__( /*! ./rules/UniqueVariableNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs");
                var _ValuesOfCorrectTypeRule = __webpack_require__( /*! ./rules/ValuesOfCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs");
                var _VariablesAreInputTypesRule = __webpack_require__( /*! ./rules/VariablesAreInputTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs");
                var _VariablesInAllowedPositionRule = __webpack_require__( /*! ./rules/VariablesInAllowedPositionRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs");
                var _MaxIntrospectionDepthRule = __webpack_require__( /*! ./rules/MaxIntrospectionDepthRule.mjs */ "../../../node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs");
                var _LoneSchemaDefinitionRule = __webpack_require__( /*! ./rules/LoneSchemaDefinitionRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs");
                var _UniqueOperationTypesRule = __webpack_require__( /*! ./rules/UniqueOperationTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs");
                var _UniqueTypeNamesRule = __webpack_require__( /*! ./rules/UniqueTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs");
                var _UniqueEnumValueNamesRule = __webpack_require__( /*! ./rules/UniqueEnumValueNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs");
                var _UniqueFieldDefinitionNamesRule = __webpack_require__( /*! ./rules/UniqueFieldDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs");
                var _UniqueArgumentDefinitionNamesRule = __webpack_require__( /*! ./rules/UniqueArgumentDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs");
                var _UniqueDirectiveNamesRule = __webpack_require__( /*! ./rules/UniqueDirectiveNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs");
                var _PossibleTypeExtensionsRule = __webpack_require__( /*! ./rules/PossibleTypeExtensionsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs");
                var _NoDeprecatedCustomRule = __webpack_require__( /*! ./rules/custom/NoDeprecatedCustomRule.mjs */ "../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs");
                var _NoSchemaIntrospectionCustomRule = __webpack_require__( /*! ./rules/custom/NoSchemaIntrospectionCustomRule.mjs */ "../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs");

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs":
            /*!************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs ***!
              \************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.ExecutableDefinitionsRule = ExecutableDefinitionsRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _predicates = __webpack_require__( /*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
                /**
                 * Executable definitions
                 *
                 * A GraphQL document is only valid for execution if all definitions are either
                 * operation or fragment definitions.
                 *
                 * See https://spec.graphql.org/draft/#sec-Executable-Definitions
                 */
                function ExecutableDefinitionsRule(context) {
                    return {
                        Document(node) {
                            for (const definition of node.definitions) {
                                if (!(0, _predicates.isExecutableDefinitionNode)(definition)) {
                                    const defName = definition.kind === _kinds.Kind.SCHEMA_DEFINITION || definition.kind === _kinds.Kind.SCHEMA_EXTENSION ? 'schema' : '"' + definition.name.value + '"';
                                    context.reportError(new _GraphQLError.GraphQLError(`The ${defName} definition is not executable.`, {
                                        nodes: definition
                                    }));
                                }
                            }
                            return false;
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs":
            /*!**********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs ***!
              \**********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.FieldsOnCorrectTypeRule = FieldsOnCorrectTypeRule;
                var _didYouMean = __webpack_require__( /*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
                var _naturalCompare = __webpack_require__( /*! ../../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs");
                var _suggestionList = __webpack_require__( /*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Fields on correct type
                 *
                 * A GraphQL document is only valid if all fields selected are defined by the
                 * parent type, or are an allowed meta field such as __typename.
                 *
                 * See https://spec.graphql.org/draft/#sec-Field-Selections
                 */
                function FieldsOnCorrectTypeRule(context) {
                    return {
                        Field(node) {
                            const type = context.getParentType();
                            if (type) {
                                const fieldDef = context.getFieldDef();
                                if (!fieldDef) {
                                    // This field doesn't exist, lets look for suggestions.
                                    const schema = context.getSchema();
                                    const fieldName = node.name.value; // First determine if there are any suggested types to condition on.

                                    let suggestion = (0, _didYouMean.didYouMean)('to use an inline fragment on', getSuggestedTypeNames(schema, type, fieldName)); // If there are no suggested types, then perhaps this was a typo?

                                    if (suggestion === '') {
                                        suggestion = (0, _didYouMean.didYouMean)(getSuggestedFieldNames(type, fieldName));
                                    } // Report an error, including helpful suggestions.

                                    context.reportError(new _GraphQLError.GraphQLError(`Cannot query field "${fieldName}" on type "${type.name}".` + suggestion, {
                                        nodes: node
                                    }));
                                }
                            }
                        }
                    };
                }
                /**
                 * Go through all of the implementations of type, as well as the interfaces that
                 * they implement. If any of those types include the provided field, suggest them,
                 * sorted by how often the type is referenced.
                 */

                function getSuggestedTypeNames(schema, type, fieldName) {
                    if (!(0, _definition.isAbstractType)(type)) {
                        // Must be an Object type, which does not have possible fields.
                        return [];
                    }
                    const suggestedTypes = new Set();
                    const usageCount = Object.create(null);
                    for (const possibleType of schema.getPossibleTypes(type)) {
                        if (!possibleType.getFields()[fieldName]) {
                            continue;
                        } // This object type defines this field.

                        suggestedTypes.add(possibleType);
                        usageCount[possibleType.name] = 1;
                        for (const possibleInterface of possibleType.getInterfaces()) {
                            var _usageCount$possibleI;
                            if (!possibleInterface.getFields()[fieldName]) {
                                continue;
                            } // This interface type defines this field.

                            suggestedTypes.add(possibleInterface);
                            usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1;
                        }
                    }
                    return [...suggestedTypes].sort((typeA, typeB) => {
                        // Suggest both interface and object types based on how common they are.
                        const usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name];
                        if (usageCountDiff !== 0) {
                            return usageCountDiff;
                        } // Suggest super types first followed by subtypes

                        if ((0, _definition.isInterfaceType)(typeA) && schema.isSubType(typeA, typeB)) {
                            return -1;
                        }
                        if ((0, _definition.isInterfaceType)(typeB) && schema.isSubType(typeB, typeA)) {
                            return 1;
                        }
                        return (0, _naturalCompare.naturalCompare)(typeA.name, typeB.name);
                    }).map(x => x.name);
                }
                /**
                 * For the field name provided, determine if there are any similar field names
                 * that may be the result of a typo.
                 */

                function getSuggestedFieldNames(type, fieldName) {
                    if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) {
                        const possibleFieldNames = Object.keys(type.getFields());
                        return (0, _suggestionList.suggestionList)(fieldName, possibleFieldNames);
                    } // Otherwise, must be a Union type, which does not define fields.

                    return [];
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs":
            /*!****************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs ***!
              \****************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.FragmentsOnCompositeTypesRule = FragmentsOnCompositeTypesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _printer = __webpack_require__( /*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _typeFromAST = __webpack_require__( /*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
                /**
                 * Fragments on composite type
                 *
                 * Fragments use a type condition to determine if they apply, since fragments
                 * can only be spread into a composite type (object, interface, or union), the
                 * type condition must also be a composite type.
                 *
                 * See https://spec.graphql.org/draft/#sec-Fragments-On-Composite-Types
                 */
                function FragmentsOnCompositeTypesRule(context) {
                    return {
                        InlineFragment(node) {
                            const typeCondition = node.typeCondition;
                            if (typeCondition) {
                                const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition);
                                if (type && !(0, _definition.isCompositeType)(type)) {
                                    const typeStr = (0, _printer.print)(typeCondition);
                                    context.reportError(new _GraphQLError.GraphQLError(`Fragment cannot condition on non composite type "${typeStr}".`, {
                                        nodes: typeCondition
                                    }));
                                }
                            }
                        },
                        FragmentDefinition(node) {
                            const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.typeCondition);
                            if (type && !(0, _definition.isCompositeType)(type)) {
                                const typeStr = (0, _printer.print)(node.typeCondition);
                                context.reportError(new _GraphQLError.GraphQLError(`Fragment "${node.name.value}" cannot condition on non composite type "${typeStr}".`, {
                                    nodes: node.typeCondition
                                }));
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs":
            /*!*********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs ***!
              \*********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.KnownArgumentNamesOnDirectivesRule = KnownArgumentNamesOnDirectivesRule;
                exports.KnownArgumentNamesRule = KnownArgumentNamesRule;
                var _didYouMean = __webpack_require__( /*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
                var _suggestionList = __webpack_require__( /*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _directives = __webpack_require__( /*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                /**
                 * Known argument names
                 *
                 * A GraphQL field is only valid if all supplied arguments are defined by
                 * that field.
                 *
                 * See https://spec.graphql.org/draft/#sec-Argument-Names
                 * See https://spec.graphql.org/draft/#sec-Directives-Are-In-Valid-Locations
                 */
                function KnownArgumentNamesRule(context) {
                    return {
                        // eslint-disable-next-line new-cap
                        ...KnownArgumentNamesOnDirectivesRule(context),
                        Argument(argNode) {
                            const argDef = context.getArgument();
                            const fieldDef = context.getFieldDef();
                            const parentType = context.getParentType();
                            if (!argDef && fieldDef && parentType) {
                                const argName = argNode.name.value;
                                const knownArgsNames = fieldDef.args.map(arg => arg.name);
                                const suggestions = (0, _suggestionList.suggestionList)(argName, knownArgsNames);
                                context.reportError(new _GraphQLError.GraphQLError(`Unknown argument "${argName}" on field "${parentType.name}.${fieldDef.name}".` + (0, _didYouMean.didYouMean)(suggestions), {
                                    nodes: argNode
                                }));
                            }
                        }
                    };
                }
                /**
                 * @internal
                 */

                function KnownArgumentNamesOnDirectivesRule(context) {
                    const directiveArgs = Object.create(null);
                    const schema = context.getSchema();
                    const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives;
                    for (const directive of definedDirectives) {
                        directiveArgs[directive.name] = directive.args.map(arg => arg.name);
                    }
                    const astDefinitions = context.getDocument().definitions;
                    for (const def of astDefinitions) {
                        if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
                            var _def$arguments;

                            // FIXME: https://github.com/graphql/graphql-js/issues/2203

                            /* c8 ignore next */
                            const argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
                            directiveArgs[def.name.value] = argsNodes.map(arg => arg.name.value);
                        }
                    }
                    return {
                        Directive(directiveNode) {
                            const directiveName = directiveNode.name.value;
                            const knownArgs = directiveArgs[directiveName];
                            if (directiveNode.arguments && knownArgs) {
                                for (const argNode of directiveNode.arguments) {
                                    const argName = argNode.name.value;
                                    if (!knownArgs.includes(argName)) {
                                        const suggestions = (0, _suggestionList.suggestionList)(argName, knownArgs);
                                        context.reportError(new _GraphQLError.GraphQLError(`Unknown argument "${argName}" on directive "@${directiveName}".` + (0, _didYouMean.didYouMean)(suggestions), {
                                            nodes: argNode
                                        }));
                                    }
                                }
                            }
                            return false;
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs ***!
              \******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.KnownDirectivesRule = KnownDirectivesRule;
                var _inspect = __webpack_require__( /*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _ast = __webpack_require__( /*! ../../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
                var _directiveLocation = __webpack_require__( /*! ../../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _directives = __webpack_require__( /*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                /**
                 * Known directives
                 *
                 * A GraphQL document is only valid if all `@directives` are known by the
                 * schema and legally positioned.
                 *
                 * See https://spec.graphql.org/draft/#sec-Directives-Are-Defined
                 */
                function KnownDirectivesRule(context) {
                    const locationsMap = Object.create(null);
                    const schema = context.getSchema();
                    const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives;
                    for (const directive of definedDirectives) {
                        locationsMap[directive.name] = directive.locations;
                    }
                    const astDefinitions = context.getDocument().definitions;
                    for (const def of astDefinitions) {
                        if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
                            locationsMap[def.name.value] = def.locations.map(name => name.value);
                        }
                    }
                    return {
                        Directive(node, _key, _parent, _path, ancestors) {
                            const name = node.name.value;
                            const locations = locationsMap[name];
                            if (!locations) {
                                context.reportError(new _GraphQLError.GraphQLError(`Unknown directive "@${name}".`, {
                                    nodes: node
                                }));
                                return;
                            }
                            const candidateLocation = getDirectiveLocationForASTPath(ancestors);
                            if (candidateLocation && !locations.includes(candidateLocation)) {
                                context.reportError(new _GraphQLError.GraphQLError(`Directive "@${name}" may not be used on ${candidateLocation}.`, {
                                    nodes: node
                                }));
                            }
                        }
                    };
                }

                function getDirectiveLocationForASTPath(ancestors) {
                    const appliedTo = ancestors[ancestors.length - 1];
                    'kind' in appliedTo || (0, _invariant.invariant)(false);
                    switch (appliedTo.kind) {
                        case _kinds.Kind.OPERATION_DEFINITION:
                            return getDirectiveLocationForOperation(appliedTo.operation);
                        case _kinds.Kind.FIELD:
                            return _directiveLocation.DirectiveLocation.FIELD;
                        case _kinds.Kind.FRAGMENT_SPREAD:
                            return _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD;
                        case _kinds.Kind.INLINE_FRAGMENT:
                            return _directiveLocation.DirectiveLocation.INLINE_FRAGMENT;
                        case _kinds.Kind.FRAGMENT_DEFINITION:
                            return _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION;
                        case _kinds.Kind.VARIABLE_DEFINITION:
                            return _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION;
                        case _kinds.Kind.SCHEMA_DEFINITION:
                        case _kinds.Kind.SCHEMA_EXTENSION:
                            return _directiveLocation.DirectiveLocation.SCHEMA;
                        case _kinds.Kind.SCALAR_TYPE_DEFINITION:
                        case _kinds.Kind.SCALAR_TYPE_EXTENSION:
                            return _directiveLocation.DirectiveLocation.SCALAR;
                        case _kinds.Kind.OBJECT_TYPE_DEFINITION:
                        case _kinds.Kind.OBJECT_TYPE_EXTENSION:
                            return _directiveLocation.DirectiveLocation.OBJECT;
                        case _kinds.Kind.FIELD_DEFINITION:
                            return _directiveLocation.DirectiveLocation.FIELD_DEFINITION;
                        case _kinds.Kind.INTERFACE_TYPE_DEFINITION:
                        case _kinds.Kind.INTERFACE_TYPE_EXTENSION:
                            return _directiveLocation.DirectiveLocation.INTERFACE;
                        case _kinds.Kind.UNION_TYPE_DEFINITION:
                        case _kinds.Kind.UNION_TYPE_EXTENSION:
                            return _directiveLocation.DirectiveLocation.UNION;
                        case _kinds.Kind.ENUM_TYPE_DEFINITION:
                        case _kinds.Kind.ENUM_TYPE_EXTENSION:
                            return _directiveLocation.DirectiveLocation.ENUM;
                        case _kinds.Kind.ENUM_VALUE_DEFINITION:
                            return _directiveLocation.DirectiveLocation.ENUM_VALUE;
                        case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION:
                        case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION:
                            return _directiveLocation.DirectiveLocation.INPUT_OBJECT;
                        case _kinds.Kind.INPUT_VALUE_DEFINITION: {
                            const parentNode = ancestors[ancestors.length - 3];
                            'kind' in parentNode || (0, _invariant.invariant)(false);
                            return parentNode.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION ? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION : _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION;
                        }
                        // Not reachable, all possible types have been considered.

                        /* c8 ignore next */

                        default:
                            false || (0, _invariant.invariant)(false, 'Unexpected kind: ' + (0, _inspect.inspect)(appliedTo.kind));
                    }
                }

                function getDirectiveLocationForOperation(operation) {
                    switch (operation) {
                        case _ast.OperationTypeNode.QUERY:
                            return _directiveLocation.DirectiveLocation.QUERY;
                        case _ast.OperationTypeNode.MUTATION:
                            return _directiveLocation.DirectiveLocation.MUTATION;
                        case _ast.OperationTypeNode.SUBSCRIPTION:
                            return _directiveLocation.DirectiveLocation.SUBSCRIPTION;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs":
            /*!*********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs ***!
              \*********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.KnownFragmentNamesRule = KnownFragmentNamesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Known fragment names
                 *
                 * A GraphQL document is only valid if all `...Fragment` fragment spreads refer
                 * to fragments defined in the same document.
                 *
                 * See https://spec.graphql.org/draft/#sec-Fragment-spread-target-defined
                 */
                function KnownFragmentNamesRule(context) {
                    return {
                        FragmentSpread(node) {
                            const fragmentName = node.name.value;
                            const fragment = context.getFragment(fragmentName);
                            if (!fragment) {
                                context.reportError(new _GraphQLError.GraphQLError(`Unknown fragment "${fragmentName}".`, {
                                    nodes: node.name
                                }));
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.KnownTypeNamesRule = KnownTypeNamesRule;
                var _didYouMean = __webpack_require__( /*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
                var _suggestionList = __webpack_require__( /*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _predicates = __webpack_require__( /*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
                var _introspection = __webpack_require__( /*! ../../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                var _scalars = __webpack_require__( /*! ../../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
                /**
                 * Known type names
                 *
                 * A GraphQL document is only valid if referenced types (specifically
                 * variable definitions and fragment conditions) are defined by the type schema.
                 *
                 * See https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence
                 */
                function KnownTypeNamesRule(context) {
                    const schema = context.getSchema();
                    const existingTypesMap = schema ? schema.getTypeMap() : Object.create(null);
                    const definedTypes = Object.create(null);
                    for (const def of context.getDocument().definitions) {
                        if ((0, _predicates.isTypeDefinitionNode)(def)) {
                            definedTypes[def.name.value] = true;
                        }
                    }
                    const typeNames = [...Object.keys(existingTypesMap), ...Object.keys(definedTypes)];
                    return {
                        NamedType(node, _1, parent, _2, ancestors) {
                            const typeName = node.name.value;
                            if (!existingTypesMap[typeName] && !definedTypes[typeName]) {
                                var _ancestors$;
                                const definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent;
                                const isSDL = definitionNode != null && isSDLNode(definitionNode);
                                if (isSDL && standardTypeNames.includes(typeName)) {
                                    return;
                                }
                                const suggestedTypes = (0, _suggestionList.suggestionList)(typeName, isSDL ? standardTypeNames.concat(typeNames) : typeNames);
                                context.reportError(new _GraphQLError.GraphQLError(`Unknown type "${typeName}".` + (0, _didYouMean.didYouMean)(suggestedTypes), {
                                    nodes: node
                                }));
                            }
                        }
                    };
                }
                const standardTypeNames = [..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes].map(type => type.name);

                function isSDLNode(value) {
                    return 'kind' in value && ((0, _predicates.isTypeSystemDefinitionNode)(value) || (0, _predicates.isTypeSystemExtensionNode)(value));
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs":
            /*!*************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs ***!
              \*************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.LoneAnonymousOperationRule = LoneAnonymousOperationRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                /**
                 * Lone anonymous operation
                 *
                 * A GraphQL document is only valid if when it contains an anonymous operation
                 * (the query short-hand) that it contains only that one operation definition.
                 *
                 * See https://spec.graphql.org/draft/#sec-Lone-Anonymous-Operation
                 */
                function LoneAnonymousOperationRule(context) {
                    let operationCount = 0;
                    return {
                        Document(node) {
                            operationCount = node.definitions.filter(definition => definition.kind === _kinds.Kind.OPERATION_DEFINITION).length;
                        },
                        OperationDefinition(node) {
                            if (!node.name && operationCount > 1) {
                                context.reportError(new _GraphQLError.GraphQLError('This anonymous operation must be the only defined operation.', {
                                    nodes: node
                                }));
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs":
            /*!***********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs ***!
              \***********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.LoneSchemaDefinitionRule = LoneSchemaDefinitionRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Lone Schema definition
                 *
                 * A GraphQL document is only valid if it contains only one schema definition.
                 */
                function LoneSchemaDefinitionRule(context) {
                    var _ref, _ref2, _oldSchema$astNode;
                    const oldSchema = context.getSchema();
                    const alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType();
                    let schemaDefinitionsCount = 0;
                    return {
                        SchemaDefinition(node) {
                            if (alreadyDefined) {
                                context.reportError(new _GraphQLError.GraphQLError('Cannot define a new schema within a schema extension.', {
                                    nodes: node
                                }));
                                return;
                            }
                            if (schemaDefinitionsCount > 0) {
                                context.reportError(new _GraphQLError.GraphQLError('Must provide only one schema definition.', {
                                    nodes: node
                                }));
                            }
                            ++schemaDefinitionsCount;
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs":
            /*!************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs ***!
              \************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.MaxIntrospectionDepthRule = MaxIntrospectionDepthRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                const MAX_LISTS_DEPTH = 3;

                function MaxIntrospectionDepthRule(context) {
                    /**
                     * Counts the depth of list fields in "__Type" recursively and
                     * returns `true` if the limit has been reached.
                     */
                    function checkDepth(node, visitedFragments = Object.create(null), depth = 0) {
                        if (node.kind === _kinds.Kind.FRAGMENT_SPREAD) {
                            const fragmentName = node.name.value;
                            if (visitedFragments[fragmentName] === true) {
                                // Fragment cycles are handled by `NoFragmentCyclesRule`.
                                return false;
                            }
                            const fragment = context.getFragment(fragmentName);
                            if (!fragment) {
                                // Missing fragments checks are handled by `KnownFragmentNamesRule`.
                                return false;
                            } // Rather than following an immutable programming pattern which has
                            // significant memory and garbage collection overhead, we've opted to
                            // take a mutable approach for efficiency's sake. Importantly visiting a
                            // fragment twice is fine, so long as you don't do one visit inside the
                            // other.

                            try {
                                visitedFragments[fragmentName] = true;
                                return checkDepth(fragment, visitedFragments, depth);
                            } finally {
                                visitedFragments[fragmentName] = undefined;
                            }
                        }
                        if (node.kind === _kinds.Kind.FIELD && (
                                // check all introspection lists
                                node.name.value === 'fields' || node.name.value === 'interfaces' || node.name.value === 'possibleTypes' || node.name.value === 'inputFields')) {
                            // eslint-disable-next-line no-param-reassign
                            depth++;
                            if (depth >= MAX_LISTS_DEPTH) {
                                return true;
                            }
                        } // handles fields and inline fragments

                        if ('selectionSet' in node && node.selectionSet) {
                            for (const child of node.selectionSet.selections) {
                                if (checkDepth(child, visitedFragments, depth)) {
                                    return true;
                                }
                            }
                        }
                        return false;
                    }
                    return {
                        Field(node) {
                            if (node.name.value === '__schema' || node.name.value === '__type') {
                                if (checkDepth(node)) {
                                    context.reportError(new _GraphQLError.GraphQLError('Maximum introspection depth exceeded', {
                                        nodes: [node]
                                    }));
                                    return false;
                                }
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs":
            /*!*******************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs ***!
              \*******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.NoFragmentCyclesRule = NoFragmentCyclesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * No fragment cycles
                 *
                 * The graph of fragment spreads must not form any cycles including spreading itself.
                 * Otherwise an operation could infinitely spread or infinitely execute on cycles in the underlying data.
                 *
                 * See https://spec.graphql.org/draft/#sec-Fragment-spreads-must-not-form-cycles
                 */
                function NoFragmentCyclesRule(context) {
                    // Tracks already visited fragments to maintain O(N) and to ensure that cycles
                    // are not redundantly reported.
                    const visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors

                    const spreadPath = []; // Position in the spread path

                    const spreadPathIndexByName = Object.create(null);
                    return {
                        OperationDefinition: () => false,
                        FragmentDefinition(node) {
                            detectCycleRecursive(node);
                            return false;
                        }
                    }; // This does a straight-forward DFS to find cycles.
                    // It does not terminate when a cycle was found but continues to explore
                    // the graph to find all possible cycles.

                    function detectCycleRecursive(fragment) {
                        if (visitedFrags[fragment.name.value]) {
                            return;
                        }
                        const fragmentName = fragment.name.value;
                        visitedFrags[fragmentName] = true;
                        const spreadNodes = context.getFragmentSpreads(fragment.selectionSet);
                        if (spreadNodes.length === 0) {
                            return;
                        }
                        spreadPathIndexByName[fragmentName] = spreadPath.length;
                        for (const spreadNode of spreadNodes) {
                            const spreadName = spreadNode.name.value;
                            const cycleIndex = spreadPathIndexByName[spreadName];
                            spreadPath.push(spreadNode);
                            if (cycleIndex === undefined) {
                                const spreadFragment = context.getFragment(spreadName);
                                if (spreadFragment) {
                                    detectCycleRecursive(spreadFragment);
                                }
                            } else {
                                const cyclePath = spreadPath.slice(cycleIndex);
                                const viaPath = cyclePath.slice(0, -1).map(s => '"' + s.name.value + '"').join(', ');
                                context.reportError(new _GraphQLError.GraphQLError(`Cannot spread fragment "${spreadName}" within itself` + (viaPath !== '' ? ` via ${viaPath}.` : '.'), {
                                    nodes: cyclePath
                                }));
                            }
                            spreadPath.pop();
                        }
                        spreadPathIndexByName[fragmentName] = undefined;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs":
            /*!***********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs ***!
              \***********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.NoUndefinedVariablesRule = NoUndefinedVariablesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * No undefined variables
                 *
                 * A GraphQL operation is only valid if all variables encountered, both directly
                 * and via fragment spreads, are defined by that operation.
                 *
                 * See https://spec.graphql.org/draft/#sec-All-Variable-Uses-Defined
                 */
                function NoUndefinedVariablesRule(context) {
                    let variableNameDefined = Object.create(null);
                    return {
                        OperationDefinition: {
                            enter() {
                                variableNameDefined = Object.create(null);
                            },
                            leave(operation) {
                                const usages = context.getRecursiveVariableUsages(operation);
                                for (const {
                                        node
                                    }
                                    of usages) {
                                    const varName = node.name.value;
                                    if (variableNameDefined[varName] !== true) {
                                        context.reportError(new _GraphQLError.GraphQLError(operation.name ? `Variable "$${varName}" is not defined by operation "${operation.name.value}".` : `Variable "$${varName}" is not defined.`, {
                                            nodes: [node, operation]
                                        }));
                                    }
                                }
                            }
                        },
                        VariableDefinition(node) {
                            variableNameDefined[node.variable.name.value] = true;
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs":
            /*!********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs ***!
              \********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.NoUnusedFragmentsRule = NoUnusedFragmentsRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * No unused fragments
                 *
                 * A GraphQL document is only valid if all fragment definitions are spread
                 * within operations, or spread within other fragments spread within operations.
                 *
                 * See https://spec.graphql.org/draft/#sec-Fragments-Must-Be-Used
                 */
                function NoUnusedFragmentsRule(context) {
                    const operationDefs = [];
                    const fragmentDefs = [];
                    return {
                        OperationDefinition(node) {
                            operationDefs.push(node);
                            return false;
                        },
                        FragmentDefinition(node) {
                            fragmentDefs.push(node);
                            return false;
                        },
                        Document: {
                            leave() {
                                const fragmentNameUsed = Object.create(null);
                                for (const operation of operationDefs) {
                                    for (const fragment of context.getRecursivelyReferencedFragments(operation)) {
                                        fragmentNameUsed[fragment.name.value] = true;
                                    }
                                }
                                for (const fragmentDef of fragmentDefs) {
                                    const fragName = fragmentDef.name.value;
                                    if (fragmentNameUsed[fragName] !== true) {
                                        context.reportError(new _GraphQLError.GraphQLError(`Fragment "${fragName}" is never used.`, {
                                            nodes: fragmentDef
                                        }));
                                    }
                                }
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs":
            /*!********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs ***!
              \********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.NoUnusedVariablesRule = NoUnusedVariablesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * No unused variables
                 *
                 * A GraphQL operation is only valid if all variables defined by an operation
                 * are used, either directly or within a spread fragment.
                 *
                 * See https://spec.graphql.org/draft/#sec-All-Variables-Used
                 */
                function NoUnusedVariablesRule(context) {
                    let variableDefs = [];
                    return {
                        OperationDefinition: {
                            enter() {
                                variableDefs = [];
                            },
                            leave(operation) {
                                const variableNameUsed = Object.create(null);
                                const usages = context.getRecursiveVariableUsages(operation);
                                for (const {
                                        node
                                    }
                                    of usages) {
                                    variableNameUsed[node.name.value] = true;
                                }
                                for (const variableDef of variableDefs) {
                                    const variableName = variableDef.variable.name.value;
                                    if (variableNameUsed[variableName] !== true) {
                                        context.reportError(new _GraphQLError.GraphQLError(operation.name ? `Variable "$${variableName}" is never used in operation "${operation.name.value}".` : `Variable "$${variableName}" is never used.`, {
                                            nodes: variableDef
                                        }));
                                    }
                                }
                            }
                        },
                        VariableDefinition(def) {
                            variableDefs.push(def);
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs":
            /*!*******************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs ***!
              \*******************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.OverlappingFieldsCanBeMergedRule = OverlappingFieldsCanBeMergedRule;
                var _inspect = __webpack_require__( /*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _printer = __webpack_require__( /*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _sortValueNode = __webpack_require__( /*! ../../utilities/sortValueNode.mjs */ "../../../node_modules/graphql/utilities/sortValueNode.mjs");
                var _typeFromAST = __webpack_require__( /*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");

                function reasonMessage(reason) {
                    if (Array.isArray(reason)) {
                        return reason.map(([responseName, subReason]) => `subfields "${responseName}" conflict because ` + reasonMessage(subReason)).join(' and ');
                    }
                    return reason;
                }
                /**
                 * Overlapping fields can be merged
                 *
                 * A selection set is only valid if all fields (including spreading any
                 * fragments) either correspond to distinct response names or can be merged
                 * without ambiguity.
                 *
                 * See https://spec.graphql.org/draft/#sec-Field-Selection-Merging
                 */

                function OverlappingFieldsCanBeMergedRule(context) {
                    // A memoization for when two fragments are compared "between" each other for
                    // conflicts. Two fragments may be compared many times, so memoizing this can
                    // dramatically improve the performance of this validator.
                    const comparedFragmentPairs = new PairSet(); // A cache for the "field map" and list of fragment names found in any given
                    // selection set. Selection sets may be asked for this information multiple
                    // times, so this improves the performance of this validator.

                    const cachedFieldsAndFragmentNames = new Map();
                    return {
                        SelectionSet(selectionSet) {
                            const conflicts = findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, context.getParentType(), selectionSet);
                            for (const [
                                    [responseName, reason], fields1, fields2
                                ] of conflicts) {
                                const reasonMsg = reasonMessage(reason);
                                context.reportError(new _GraphQLError.GraphQLError(`Fields "${responseName}" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`, {
                                    nodes: fields1.concat(fields2)
                                }));
                            }
                        }
                    };
                }

                /**
                 * Algorithm:
                 *
                 * Conflicts occur when two fields exist in a query which will produce the same
                 * response name, but represent differing values, thus creating a conflict.
                 * The algorithm below finds all conflicts via making a series of comparisons
                 * between fields. In order to compare as few fields as possible, this makes
                 * a series of comparisons "within" sets of fields and "between" sets of fields.
                 *
                 * Given any selection set, a collection produces both a set of fields by
                 * also including all inline fragments, as well as a list of fragments
                 * referenced by fragment spreads.
                 *
                 * A) Each selection set represented in the document first compares "within" its
                 * collected set of fields, finding any conflicts between every pair of
                 * overlapping fields.
                 * Note: This is the *only time* that a the fields "within" a set are compared
                 * to each other. After this only fields "between" sets are compared.
                 *
                 * B) Also, if any fragment is referenced in a selection set, then a
                 * comparison is made "between" the original set of fields and the
                 * referenced fragment.
                 *
                 * C) Also, if multiple fragments are referenced, then comparisons
                 * are made "between" each referenced fragment.
                 *
                 * D) When comparing "between" a set of fields and a referenced fragment, first
                 * a comparison is made between each field in the original set of fields and
                 * each field in the the referenced set of fields.
                 *
                 * E) Also, if any fragment is referenced in the referenced selection set,
                 * then a comparison is made "between" the original set of fields and the
                 * referenced fragment (recursively referring to step D).
                 *
                 * F) When comparing "between" two fragments, first a comparison is made between
                 * each field in the first referenced set of fields and each field in the the
                 * second referenced set of fields.
                 *
                 * G) Also, any fragments referenced by the first must be compared to the
                 * second, and any fragments referenced by the second must be compared to the
                 * first (recursively referring to step F).
                 *
                 * H) When comparing two fields, if both have selection sets, then a comparison
                 * is made "between" both selection sets, first comparing the set of fields in
                 * the first selection set with the set of fields in the second.
                 *
                 * I) Also, if any fragment is referenced in either selection set, then a
                 * comparison is made "between" the other set of fields and the
                 * referenced fragment.
                 *
                 * J) Also, if two fragments are referenced in both selection sets, then a
                 * comparison is made "between" the two fragments.
                 *
                 */
                // Find all conflicts found "within" a selection set, including those found
                // via spreading in fragments. Called when visiting each SelectionSet in the
                // GraphQL Document.
                function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) {
                    const conflicts = [];
                    const [fieldMap, fragmentNames] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet); // (A) Find find all conflicts "within" the fields of this selection set.
                    // Note: this is the *only place* `collectConflictsWithin` is called.

                    collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap);
                    if (fragmentNames.length !== 0) {
                        // (B) Then collect conflicts between these fields and those represented by
                        // each spread fragment name found.
                        for (let i = 0; i < fragmentNames.length; i++) {
                            collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fieldMap, fragmentNames[i]); // (C) Then compare this fragment with all other fragments found in this
                            // selection set to collect conflicts between fragments spread together.
                            // This compares each item in the list of fragment names to every other
                            // item in that same list (except for itself).

                            for (let j = i + 1; j < fragmentNames.length; j++) {
                                collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j]);
                            }
                        }
                    }
                    return conflicts;
                } // Collect all conflicts found between a set of fields and a fragment reference
                // including via spreading in any nested fragments.

                function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) {
                    const fragment = context.getFragment(fragmentName);
                    if (!fragment) {
                        return;
                    }
                    const [fieldMap2, referencedFragmentNames] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment); // Do not compare a fragment's fieldMap to itself.

                    if (fieldMap === fieldMap2) {
                        return;
                    } // (D) First collect any conflicts between the provided collection of fields
                    // and the collection of fields represented by the given fragment.

                    collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2); // (E) Then collect any conflicts between the provided collection of fields
                    // and any fragment names found in the given fragment.

                    for (const referencedFragmentName of referencedFragmentNames) {
                        // Memoize so two fragments are not compared for conflicts more than once.
                        if (comparedFragmentPairs.has(referencedFragmentName, fragmentName, areMutuallyExclusive)) {
                            continue;
                        }
                        comparedFragmentPairs.add(referencedFragmentName, fragmentName, areMutuallyExclusive);
                        collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, referencedFragmentName);
                    }
                } // Collect all conflicts found between two fragments, including via spreading in
                // any nested fragments.

                function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) {
                    // No need to compare a fragment to itself.
                    if (fragmentName1 === fragmentName2) {
                        return;
                    } // Memoize so two fragments are not compared for conflicts more than once.

                    if (comparedFragmentPairs.has(fragmentName1, fragmentName2, areMutuallyExclusive)) {
                        return;
                    }
                    comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive);
                    const fragment1 = context.getFragment(fragmentName1);
                    const fragment2 = context.getFragment(fragmentName2);
                    if (!fragment1 || !fragment2) {
                        return;
                    }
                    const [fieldMap1, referencedFragmentNames1] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment1);
                    const [fieldMap2, referencedFragmentNames2] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment2); // (F) First, collect all conflicts between these two collections of fields
                    // (not including any nested fragments).

                    collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (G) Then collect conflicts between the first fragment and any nested
                    // fragments spread in the second fragment.

                    for (const referencedFragmentName2 of referencedFragmentNames2) {
                        collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, referencedFragmentName2);
                    } // (G) Then collect conflicts between the second fragment and any nested
                    // fragments spread in the first fragment.

                    for (const referencedFragmentName1 of referencedFragmentNames1) {
                        collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, referencedFragmentName1, fragmentName2);
                    }
                } // Find all conflicts found between two selection sets, including those found
                // via spreading in fragments. Called when determining if conflicts exist
                // between the sub-fields of two overlapping fields.

                function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) {
                    const conflicts = [];
                    const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType1, selectionSet1);
                    const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType2, selectionSet2); // (H) First, collect all conflicts between these two collections of field.

                    collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (I) Then collect conflicts between the first collection of fields and
                    // those referenced by each fragment name associated with the second.

                    for (const fragmentName2 of fragmentNames2) {
                        collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentName2);
                    } // (I) Then collect conflicts between the second collection of fields and
                    // those referenced by each fragment name associated with the first.

                    for (const fragmentName1 of fragmentNames1) {
                        collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentName1);
                    } // (J) Also collect conflicts between any fragment names by the first and
                    // fragment names by the second. This compares each item in the first set of
                    // names to each item in the second set of names.

                    for (const fragmentName1 of fragmentNames1) {
                        for (const fragmentName2 of fragmentNames2) {
                            collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2);
                        }
                    }
                    return conflicts;
                } // Collect all Conflicts "within" one collection of fields.

                function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) {
                    // A field map is a keyed collection, where each key represents a response
                    // name and the value at that key is a list of all fields which provide that
                    // response name. For every response name, if there are multiple fields, they
                    // must be compared to find a potential conflict.
                    for (const [responseName, fields] of Object.entries(fieldMap)) {
                        // This compares every field in the list to every other field in this list
                        // (except to itself). If the list only has one item, nothing needs to
                        // be compared.
                        if (fields.length > 1) {
                            for (let i = 0; i < fields.length; i++) {
                                for (let j = i + 1; j < fields.length; j++) {
                                    const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, false,
                                        // within one collection is never mutually exclusive
                                        responseName, fields[i], fields[j]);
                                    if (conflict) {
                                        conflicts.push(conflict);
                                    }
                                }
                            }
                        }
                    }
                } // Collect all Conflicts between two collections of fields. This is similar to,
                // but different from the `collectConflictsWithin` function above. This check
                // assumes that `collectConflictsWithin` has already been called on each
                // provided collection of fields. This is true because this validator traverses
                // each individual selection set.

                function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {
                    // A field map is a keyed collection, where each key represents a response
                    // name and the value at that key is a list of all fields which provide that
                    // response name. For any response name which appears in both provided field
                    // maps, each field from the first field map must be compared to every field
                    // in the second field map to find potential conflicts.
                    for (const [responseName, fields1] of Object.entries(fieldMap1)) {
                        const fields2 = fieldMap2[responseName];
                        if (fields2) {
                            for (const field1 of fields1) {
                                for (const field2 of fields2) {
                                    const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2);
                                    if (conflict) {
                                        conflicts.push(conflict);
                                    }
                                }
                            }
                        }
                    }
                } // Determines if there is a conflict between two particular fields, including
                // comparing their sub-fields.

                function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) {
                    const [parentType1, node1, def1] = field1;
                    const [parentType2, node2, def2] = field2; // If it is known that two fields could not possibly apply at the same
                    // time, due to the parent types, then it is safe to permit them to diverge
                    // in aliased field or arguments used as they will not present any ambiguity
                    // by differing.
                    // It is known that two parent types could never overlap if they are
                    // different Object types. Interface or Union types might overlap - if not
                    // in the current state of the schema, then perhaps in some future version,
                    // thus may not safely diverge.

                    const areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && (0, _definition.isObjectType)(parentType1) && (0, _definition.isObjectType)(parentType2);
                    if (!areMutuallyExclusive) {
                        // Two aliases must refer to the same field.
                        const name1 = node1.name.value;
                        const name2 = node2.name.value;
                        if (name1 !== name2) {
                            return [
                                [responseName, `"${name1}" and "${name2}" are different fields`],
                                [node1],
                                [node2]
                            ];
                        } // Two field calls must have the same arguments.

                        if (!sameArguments(node1, node2)) {
                            return [
                                [responseName, 'they have differing arguments'],
                                [node1],
                                [node2]
                            ];
                        }
                    } // The return type for each field.

                    const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type;
                    const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type;
                    if (type1 && type2 && doTypesConflict(type1, type2)) {
                        return [
                            [responseName, `they return conflicting types "${(0, _inspect.inspect)(type1)}" and "${(0, _inspect.inspect)(type2)}"`],
                            [node1],
                            [node2]
                        ];
                    } // Collect and compare sub-fields. Use the same "visited fragment names" list
                    // for both collections so fields in a fragment reference are never
                    // compared to themselves.

                    const selectionSet1 = node1.selectionSet;
                    const selectionSet2 = node2.selectionSet;
                    if (selectionSet1 && selectionSet2) {
                        const conflicts = findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, (0, _definition.getNamedType)(type1), selectionSet1, (0, _definition.getNamedType)(type2), selectionSet2);
                        return subfieldConflicts(conflicts, responseName, node1, node2);
                    }
                }

                function sameArguments(node1, node2) {
                    const args1 = node1.arguments;
                    const args2 = node2.arguments;
                    if (args1 === undefined || args1.length === 0) {
                        return args2 === undefined || args2.length === 0;
                    }
                    if (args2 === undefined || args2.length === 0) {
                        return false;
                    }
                    /* c8 ignore next */

                    if (args1.length !== args2.length) {
                        /* c8 ignore next */
                        return false;
                        /* c8 ignore next */
                    }
                    const values2 = new Map(args2.map(({
                        name,
                        value
                    }) => [name.value, value]));
                    return args1.every(arg1 => {
                        const value1 = arg1.value;
                        const value2 = values2.get(arg1.name.value);
                        if (value2 === undefined) {
                            return false;
                        }
                        return stringifyValue(value1) === stringifyValue(value2);
                    });
                }

                function stringifyValue(value) {
                    return (0, _printer.print)((0, _sortValueNode.sortValueNode)(value));
                } // Two types conflict if both types could not apply to a value simultaneously.
                // Composite types are ignored as their individual field types will be compared
                // later recursively. However List and Non-Null types must match.

                function doTypesConflict(type1, type2) {
                    if ((0, _definition.isListType)(type1)) {
                        return (0, _definition.isListType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;
                    }
                    if ((0, _definition.isListType)(type2)) {
                        return true;
                    }
                    if ((0, _definition.isNonNullType)(type1)) {
                        return (0, _definition.isNonNullType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;
                    }
                    if ((0, _definition.isNonNullType)(type2)) {
                        return true;
                    }
                    if ((0, _definition.isLeafType)(type1) || (0, _definition.isLeafType)(type2)) {
                        return type1 !== type2;
                    }
                    return false;
                } // Given a selection set, return the collection of fields (a mapping of response
                // name to field nodes and definitions) as well as a list of fragment names
                // referenced via fragment spreads.

                function getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet) {
                    const cached = cachedFieldsAndFragmentNames.get(selectionSet);
                    if (cached) {
                        return cached;
                    }
                    const nodeAndDefs = Object.create(null);
                    const fragmentNames = Object.create(null);
                    _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames);
                    const result = [nodeAndDefs, Object.keys(fragmentNames)];
                    cachedFieldsAndFragmentNames.set(selectionSet, result);
                    return result;
                } // Given a reference to a fragment, return the represented collection of fields
                // as well as a list of nested fragment names referenced via fragment spreads.

                function getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment) {
                    // Short-circuit building a type from the node if possible.
                    const cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet);
                    if (cached) {
                        return cached;
                    }
                    const fragmentType = (0, _typeFromAST.typeFromAST)(context.getSchema(), fragment.typeCondition);
                    return getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragmentType, fragment.selectionSet);
                }

                function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames) {
                    for (const selection of selectionSet.selections) {
                        switch (selection.kind) {
                            case _kinds.Kind.FIELD: {
                                const fieldName = selection.name.value;
                                let fieldDef;
                                if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) {
                                    fieldDef = parentType.getFields()[fieldName];
                                }
                                const responseName = selection.alias ? selection.alias.value : fieldName;
                                if (!nodeAndDefs[responseName]) {
                                    nodeAndDefs[responseName] = [];
                                }
                                nodeAndDefs[responseName].push([parentType, selection, fieldDef]);
                                break;
                            }
                            case _kinds.Kind.FRAGMENT_SPREAD:
                                fragmentNames[selection.name.value] = true;
                                break;
                            case _kinds.Kind.INLINE_FRAGMENT: {
                                const typeCondition = selection.typeCondition;
                                const inlineFragmentType = typeCondition ? (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition) : parentType;
                                _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames);
                                break;
                            }
                        }
                    }
                } // Given a series of Conflicts which occurred between two sub-fields, generate
                // a single Conflict.

                function subfieldConflicts(conflicts, responseName, node1, node2) {
                    if (conflicts.length > 0) {
                        return [
                            [responseName, conflicts.map(([reason]) => reason)],
                            [node1, ...conflicts.map(([, fields1]) => fields1).flat()],
                            [node2, ...conflicts.map(([, , fields2]) => fields2).flat()]
                        ];
                    }
                }
                /**
                 * A way to keep track of pairs of things when the ordering of the pair does not matter.
                 */

                class PairSet {
                    constructor() {
                        this._data = new Map();
                    }
                    has(a, b, areMutuallyExclusive) {
                        var _this$_data$get;
                        const [key1, key2] = a < b ? [a, b] : [b, a];
                        const result = (_this$_data$get = this._data.get(key1)) === null || _this$_data$get === void 0 ? void 0 : _this$_data$get.get(key2);
                        if (result === undefined) {
                            return false;
                        } // areMutuallyExclusive being false is a superset of being true, hence if
                        // we want to know if this PairSet "has" these two with no exclusivity,
                        // we have to ensure it was added as such.

                        return areMutuallyExclusive ? true : areMutuallyExclusive === result;
                    }
                    add(a, b, areMutuallyExclusive) {
                        const [key1, key2] = a < b ? [a, b] : [b, a];
                        const map = this._data.get(key1);
                        if (map === undefined) {
                            this._data.set(key1, new Map([
                                [key2, areMutuallyExclusive]
                            ]));
                        } else {
                            map.set(key2, areMutuallyExclusive);
                        }
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs":
            /*!**************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs ***!
              \**************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.PossibleFragmentSpreadsRule = PossibleFragmentSpreadsRule;
                var _inspect = __webpack_require__( /*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _typeComparators = __webpack_require__( /*! ../../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs");
                var _typeFromAST = __webpack_require__( /*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
                /**
                 * Possible fragment spread
                 *
                 * A fragment spread is only valid if the type condition could ever possibly
                 * be true: if there is a non-empty intersection of the possible parent types,
                 * and possible types which pass the type condition.
                 */
                function PossibleFragmentSpreadsRule(context) {
                    return {
                        InlineFragment(node) {
                            const fragType = context.getType();
                            const parentType = context.getParentType();
                            if ((0, _definition.isCompositeType)(fragType) && (0, _definition.isCompositeType)(parentType) && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) {
                                const parentTypeStr = (0, _inspect.inspect)(parentType);
                                const fragTypeStr = (0, _inspect.inspect)(fragType);
                                context.reportError(new _GraphQLError.GraphQLError(`Fragment cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, {
                                    nodes: node
                                }));
                            }
                        },
                        FragmentSpread(node) {
                            const fragName = node.name.value;
                            const fragType = getFragmentType(context, fragName);
                            const parentType = context.getParentType();
                            if (fragType && parentType && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) {
                                const parentTypeStr = (0, _inspect.inspect)(parentType);
                                const fragTypeStr = (0, _inspect.inspect)(fragType);
                                context.reportError(new _GraphQLError.GraphQLError(`Fragment "${fragName}" cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, {
                                    nodes: node
                                }));
                            }
                        }
                    };
                }

                function getFragmentType(context, name) {
                    const frag = context.getFragment(name);
                    if (frag) {
                        const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), frag.typeCondition);
                        if ((0, _definition.isCompositeType)(type)) {
                            return type;
                        }
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs":
            /*!*************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs ***!
              \*************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.PossibleTypeExtensionsRule = PossibleTypeExtensionsRule;
                var _didYouMean = __webpack_require__( /*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
                var _inspect = __webpack_require__( /*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _invariant = __webpack_require__( /*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _suggestionList = __webpack_require__( /*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _predicates = __webpack_require__( /*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Possible type extension
                 *
                 * A type extension is only valid if the type is defined and has the same kind.
                 */
                function PossibleTypeExtensionsRule(context) {
                    const schema = context.getSchema();
                    const definedTypes = Object.create(null);
                    for (const def of context.getDocument().definitions) {
                        if ((0, _predicates.isTypeDefinitionNode)(def)) {
                            definedTypes[def.name.value] = def;
                        }
                    }
                    return {
                        ScalarTypeExtension: checkExtension,
                        ObjectTypeExtension: checkExtension,
                        InterfaceTypeExtension: checkExtension,
                        UnionTypeExtension: checkExtension,
                        EnumTypeExtension: checkExtension,
                        InputObjectTypeExtension: checkExtension
                    };

                    function checkExtension(node) {
                        const typeName = node.name.value;
                        const defNode = definedTypes[typeName];
                        const existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName);
                        let expectedKind;
                        if (defNode) {
                            expectedKind = defKindToExtKind[defNode.kind];
                        } else if (existingType) {
                            expectedKind = typeToExtKind(existingType);
                        }
                        if (expectedKind) {
                            if (expectedKind !== node.kind) {
                                const kindStr = extensionKindToTypeName(node.kind);
                                context.reportError(new _GraphQLError.GraphQLError(`Cannot extend non-${kindStr} type "${typeName}".`, {
                                    nodes: defNode ? [defNode, node] : node
                                }));
                            }
                        } else {
                            const allTypeNames = Object.keys({
                                ...definedTypes,
                                ...(schema === null || schema === void 0 ? void 0 : schema.getTypeMap())
                            });
                            const suggestedTypes = (0, _suggestionList.suggestionList)(typeName, allTypeNames);
                            context.reportError(new _GraphQLError.GraphQLError(`Cannot extend type "${typeName}" because it is not defined.` + (0, _didYouMean.didYouMean)(suggestedTypes), {
                                nodes: node.name
                            }));
                        }
                    }
                }
                const defKindToExtKind = {
                    [_kinds.Kind.SCALAR_TYPE_DEFINITION]: _kinds.Kind.SCALAR_TYPE_EXTENSION,
                    [_kinds.Kind.OBJECT_TYPE_DEFINITION]: _kinds.Kind.OBJECT_TYPE_EXTENSION,
                    [_kinds.Kind.INTERFACE_TYPE_DEFINITION]: _kinds.Kind.INTERFACE_TYPE_EXTENSION,
                    [_kinds.Kind.UNION_TYPE_DEFINITION]: _kinds.Kind.UNION_TYPE_EXTENSION,
                    [_kinds.Kind.ENUM_TYPE_DEFINITION]: _kinds.Kind.ENUM_TYPE_EXTENSION,
                    [_kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION]: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION
                };

                function typeToExtKind(type) {
                    if ((0, _definition.isScalarType)(type)) {
                        return _kinds.Kind.SCALAR_TYPE_EXTENSION;
                    }
                    if ((0, _definition.isObjectType)(type)) {
                        return _kinds.Kind.OBJECT_TYPE_EXTENSION;
                    }
                    if ((0, _definition.isInterfaceType)(type)) {
                        return _kinds.Kind.INTERFACE_TYPE_EXTENSION;
                    }
                    if ((0, _definition.isUnionType)(type)) {
                        return _kinds.Kind.UNION_TYPE_EXTENSION;
                    }
                    if ((0, _definition.isEnumType)(type)) {
                        return _kinds.Kind.ENUM_TYPE_EXTENSION;
                    }
                    if ((0, _definition.isInputObjectType)(type)) {
                        return _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION;
                    }
                    /* c8 ignore next 3 */
                    // Not reachable. All possible types have been considered

                    false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
                }

                function extensionKindToTypeName(kind) {
                    switch (kind) {
                        case _kinds.Kind.SCALAR_TYPE_EXTENSION:
                            return 'scalar';
                        case _kinds.Kind.OBJECT_TYPE_EXTENSION:
                            return 'object';
                        case _kinds.Kind.INTERFACE_TYPE_EXTENSION:
                            return 'interface';
                        case _kinds.Kind.UNION_TYPE_EXTENSION:
                            return 'union';
                        case _kinds.Kind.ENUM_TYPE_EXTENSION:
                            return 'enum';
                        case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION:
                            return 'input object';
                            // Not reachable. All possible types have been considered

                            /* c8 ignore next */

                        default:
                            false || (0, _invariant.invariant)(false, 'Unexpected kind: ' + (0, _inspect.inspect)(kind));
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs":
            /*!****************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs ***!
              \****************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.ProvidedRequiredArgumentsOnDirectivesRule = ProvidedRequiredArgumentsOnDirectivesRule;
                exports.ProvidedRequiredArgumentsRule = ProvidedRequiredArgumentsRule;
                var _inspect = __webpack_require__( /*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _keyMap = __webpack_require__( /*! ../../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _printer = __webpack_require__( /*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _directives = __webpack_require__( /*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                /**
                 * Provided required arguments
                 *
                 * A field or directive is only valid if all required (non-null without a
                 * default value) field arguments have been provided.
                 */
                function ProvidedRequiredArgumentsRule(context) {
                    return {
                        // eslint-disable-next-line new-cap
                        ...ProvidedRequiredArgumentsOnDirectivesRule(context),
                        Field: {
                            // Validate on leave to allow for deeper errors to appear first.
                            leave(fieldNode) {
                                var _fieldNode$arguments;
                                const fieldDef = context.getFieldDef();
                                if (!fieldDef) {
                                    return false;
                                }
                                const providedArgs = new Set(
                                    // FIXME: https://github.com/graphql/graphql-js/issues/2203
                                    /* c8 ignore next */
                                    (_fieldNode$arguments = fieldNode.arguments) === null || _fieldNode$arguments === void 0 ? void 0 : _fieldNode$arguments.map(arg => arg.name.value));
                                for (const argDef of fieldDef.args) {
                                    if (!providedArgs.has(argDef.name) && (0, _definition.isRequiredArgument)(argDef)) {
                                        const argTypeStr = (0, _inspect.inspect)(argDef.type);
                                        context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldDef.name}" argument "${argDef.name}" of type "${argTypeStr}" is required, but it was not provided.`, {
                                            nodes: fieldNode
                                        }));
                                    }
                                }
                            }
                        }
                    };
                }
                /**
                 * @internal
                 */

                function ProvidedRequiredArgumentsOnDirectivesRule(context) {
                    var _schema$getDirectives;
                    const requiredArgsMap = Object.create(null);
                    const schema = context.getSchema();
                    const definedDirectives = (_schema$getDirectives = schema === null || schema === void 0 ? void 0 : schema.getDirectives()) !== null && _schema$getDirectives !== void 0 ? _schema$getDirectives : _directives.specifiedDirectives;
                    for (const directive of definedDirectives) {
                        requiredArgsMap[directive.name] = (0, _keyMap.keyMap)(directive.args.filter(_definition.isRequiredArgument), arg => arg.name);
                    }
                    const astDefinitions = context.getDocument().definitions;
                    for (const def of astDefinitions) {
                        if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
                            var _def$arguments;

                            // FIXME: https://github.com/graphql/graphql-js/issues/2203

                            /* c8 ignore next */
                            const argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
                            requiredArgsMap[def.name.value] = (0, _keyMap.keyMap)(argNodes.filter(isRequiredArgumentNode), arg => arg.name.value);
                        }
                    }
                    return {
                        Directive: {
                            // Validate on leave to allow for deeper errors to appear first.
                            leave(directiveNode) {
                                const directiveName = directiveNode.name.value;
                                const requiredArgs = requiredArgsMap[directiveName];
                                if (requiredArgs) {
                                    var _directiveNode$argume;

                                    // FIXME: https://github.com/graphql/graphql-js/issues/2203

                                    /* c8 ignore next */
                                    const argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : [];
                                    const argNodeMap = new Set(argNodes.map(arg => arg.name.value));
                                    for (const [argName, argDef] of Object.entries(requiredArgs)) {
                                        if (!argNodeMap.has(argName)) {
                                            const argType = (0, _definition.isType)(argDef.type) ? (0, _inspect.inspect)(argDef.type) : (0, _printer.print)(argDef.type);
                                            context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveName}" argument "${argName}" of type "${argType}" is required, but it was not provided.`, {
                                                nodes: directiveNode
                                            }));
                                        }
                                    }
                                }
                            }
                        }
                    };
                }

                function isRequiredArgumentNode(arg) {
                    return arg.type.kind === _kinds.Kind.NON_NULL_TYPE && arg.defaultValue == null;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.ScalarLeafsRule = ScalarLeafsRule;
                var _inspect = __webpack_require__( /*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Scalar leafs
                 *
                 * A GraphQL document is valid only if all leaf fields (fields without
                 * sub selections) are of scalar or enum types.
                 */
                function ScalarLeafsRule(context) {
                    return {
                        Field(node) {
                            const type = context.getType();
                            const selectionSet = node.selectionSet;
                            if (type) {
                                if ((0, _definition.isLeafType)((0, _definition.getNamedType)(type))) {
                                    if (selectionSet) {
                                        const fieldName = node.name.value;
                                        const typeStr = (0, _inspect.inspect)(type);
                                        context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" must not have a selection since type "${typeStr}" has no subfields.`, {
                                            nodes: selectionSet
                                        }));
                                    }
                                } else if (!selectionSet) {
                                    const fieldName = node.name.value;
                                    const typeStr = (0, _inspect.inspect)(type);
                                    context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" of type "${typeStr}" must have a selection of subfields. Did you mean "${fieldName} { ... }"?`, {
                                        nodes: node
                                    }));
                                }
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs":
            /*!***************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs ***!
              \***************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.SingleFieldSubscriptionsRule = SingleFieldSubscriptionsRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _collectFields = __webpack_require__( /*! ../../execution/collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs");
                /**
                 * Subscriptions must only include a non-introspection field.
                 *
                 * A GraphQL subscription is valid only if it contains a single root field and
                 * that root field is not an introspection field.
                 *
                 * See https://spec.graphql.org/draft/#sec-Single-root-field
                 */
                function SingleFieldSubscriptionsRule(context) {
                    return {
                        OperationDefinition(node) {
                            if (node.operation === 'subscription') {
                                const schema = context.getSchema();
                                const subscriptionType = schema.getSubscriptionType();
                                if (subscriptionType) {
                                    const operationName = node.name ? node.name.value : null;
                                    const variableValues = Object.create(null);
                                    const document = context.getDocument();
                                    const fragments = Object.create(null);
                                    for (const definition of document.definitions) {
                                        if (definition.kind === _kinds.Kind.FRAGMENT_DEFINITION) {
                                            fragments[definition.name.value] = definition;
                                        }
                                    }
                                    const fields = (0, _collectFields.collectFields)(schema, fragments, variableValues, subscriptionType, node.selectionSet);
                                    if (fields.size > 1) {
                                        const fieldSelectionLists = [...fields.values()];
                                        const extraFieldSelectionLists = fieldSelectionLists.slice(1);
                                        const extraFieldSelections = extraFieldSelectionLists.flat();
                                        context.reportError(new _GraphQLError.GraphQLError(operationName != null ? `Subscription "${operationName}" must select only one top level field.` : 'Anonymous Subscription must select only one top level field.', {
                                            nodes: extraFieldSelections
                                        }));
                                    }
                                    for (const fieldNodes of fields.values()) {
                                        const field = fieldNodes[0];
                                        const fieldName = field.name.value;
                                        if (fieldName.startsWith('__')) {
                                            context.reportError(new _GraphQLError.GraphQLError(operationName != null ? `Subscription "${operationName}" must not select an introspection top level field.` : 'Anonymous Subscription must not select an introspection top level field.', {
                                                nodes: fieldNodes
                                            }));
                                        }
                                    }
                                }
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs":
            /*!********************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs ***!
              \********************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueArgumentDefinitionNamesRule = UniqueArgumentDefinitionNamesRule;
                var _groupBy = __webpack_require__( /*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Unique argument definition names
                 *
                 * A GraphQL Object or Interface type is only valid if all its fields have uniquely named arguments.
                 * A GraphQL Directive is only valid if all its arguments are uniquely named.
                 */
                function UniqueArgumentDefinitionNamesRule(context) {
                    return {
                        DirectiveDefinition(directiveNode) {
                            var _directiveNode$argume;

                            // FIXME: https://github.com/graphql/graphql-js/issues/2203

                            /* c8 ignore next */
                            const argumentNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : [];
                            return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes);
                        },
                        InterfaceTypeDefinition: checkArgUniquenessPerField,
                        InterfaceTypeExtension: checkArgUniquenessPerField,
                        ObjectTypeDefinition: checkArgUniquenessPerField,
                        ObjectTypeExtension: checkArgUniquenessPerField
                    };

                    function checkArgUniquenessPerField(typeNode) {
                        var _typeNode$fields;
                        const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203

                        /* c8 ignore next */

                        const fieldNodes = (_typeNode$fields = typeNode.fields) !== null && _typeNode$fields !== void 0 ? _typeNode$fields : [];
                        for (const fieldDef of fieldNodes) {
                            var _fieldDef$arguments;
                            const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203

                            /* c8 ignore next */

                            const argumentNodes = (_fieldDef$arguments = fieldDef.arguments) !== null && _fieldDef$arguments !== void 0 ? _fieldDef$arguments : [];
                            checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes);
                        }
                        return false;
                    }

                    function checkArgUniqueness(parentName, argumentNodes) {
                        const seenArgs = (0, _groupBy.groupBy)(argumentNodes, arg => arg.name.value);
                        for (const [argName, argNodes] of seenArgs) {
                            if (argNodes.length > 1) {
                                context.reportError(new _GraphQLError.GraphQLError(`Argument "${parentName}(${argName}:)" can only be defined once.`, {
                                    nodes: argNodes.map(node => node.name)
                                }));
                            }
                        }
                        return false;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs":
            /*!**********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs ***!
              \**********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueArgumentNamesRule = UniqueArgumentNamesRule;
                var _groupBy = __webpack_require__( /*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Unique argument names
                 *
                 * A GraphQL field or directive is only valid if all supplied arguments are
                 * uniquely named.
                 *
                 * See https://spec.graphql.org/draft/#sec-Argument-Names
                 */
                function UniqueArgumentNamesRule(context) {
                    return {
                        Field: checkArgUniqueness,
                        Directive: checkArgUniqueness
                    };

                    function checkArgUniqueness(parentNode) {
                        var _parentNode$arguments;

                        // FIXME: https://github.com/graphql/graphql-js/issues/2203

                        /* c8 ignore next */
                        const argumentNodes = (_parentNode$arguments = parentNode.arguments) !== null && _parentNode$arguments !== void 0 ? _parentNode$arguments : [];
                        const seenArgs = (0, _groupBy.groupBy)(argumentNodes, arg => arg.name.value);
                        for (const [argName, argNodes] of seenArgs) {
                            if (argNodes.length > 1) {
                                context.reportError(new _GraphQLError.GraphQLError(`There can be only one argument named "${argName}".`, {
                                    nodes: argNodes.map(node => node.name)
                                }));
                            }
                        }
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs":
            /*!***********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs ***!
              \***********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueDirectiveNamesRule = UniqueDirectiveNamesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Unique directive names
                 *
                 * A GraphQL document is only valid if all defined directives have unique names.
                 */
                function UniqueDirectiveNamesRule(context) {
                    const knownDirectiveNames = Object.create(null);
                    const schema = context.getSchema();
                    return {
                        DirectiveDefinition(node) {
                            const directiveName = node.name.value;
                            if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) {
                                context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`, {
                                    nodes: node.name
                                }));
                                return;
                            }
                            if (knownDirectiveNames[directiveName]) {
                                context.reportError(new _GraphQLError.GraphQLError(`There can be only one directive named "@${directiveName}".`, {
                                    nodes: [knownDirectiveNames[directiveName], node.name]
                                }));
                            } else {
                                knownDirectiveNames[directiveName] = node.name;
                            }
                            return false;
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs":
            /*!******************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs ***!
              \******************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueDirectivesPerLocationRule = UniqueDirectivesPerLocationRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _predicates = __webpack_require__( /*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
                var _directives = __webpack_require__( /*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
                /**
                 * Unique directive names per location
                 *
                 * A GraphQL document is only valid if all non-repeatable directives at
                 * a given location are uniquely named.
                 *
                 * See https://spec.graphql.org/draft/#sec-Directives-Are-Unique-Per-Location
                 */
                function UniqueDirectivesPerLocationRule(context) {
                    const uniqueDirectiveMap = Object.create(null);
                    const schema = context.getSchema();
                    const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives;
                    for (const directive of definedDirectives) {
                        uniqueDirectiveMap[directive.name] = !directive.isRepeatable;
                    }
                    const astDefinitions = context.getDocument().definitions;
                    for (const def of astDefinitions) {
                        if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
                            uniqueDirectiveMap[def.name.value] = !def.repeatable;
                        }
                    }
                    const schemaDirectives = Object.create(null);
                    const typeDirectivesMap = Object.create(null);
                    return {
                        // Many different AST nodes may contain directives. Rather than listing
                        // them all, just listen for entering any node, and check to see if it
                        // defines any directives.
                        enter(node) {
                            if (!('directives' in node) || !node.directives) {
                                return;
                            }
                            let seenDirectives;
                            if (node.kind === _kinds.Kind.SCHEMA_DEFINITION || node.kind === _kinds.Kind.SCHEMA_EXTENSION) {
                                seenDirectives = schemaDirectives;
                            } else if ((0, _predicates.isTypeDefinitionNode)(node) || (0, _predicates.isTypeExtensionNode)(node)) {
                                const typeName = node.name.value;
                                seenDirectives = typeDirectivesMap[typeName];
                                if (seenDirectives === undefined) {
                                    typeDirectivesMap[typeName] = seenDirectives = Object.create(null);
                                }
                            } else {
                                seenDirectives = Object.create(null);
                            }
                            for (const directive of node.directives) {
                                const directiveName = directive.name.value;
                                if (uniqueDirectiveMap[directiveName]) {
                                    if (seenDirectives[directiveName]) {
                                        context.reportError(new _GraphQLError.GraphQLError(`The directive "@${directiveName}" can only be used once at this location.`, {
                                            nodes: [seenDirectives[directiveName], directive]
                                        }));
                                    } else {
                                        seenDirectives[directiveName] = directive;
                                    }
                                }
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs":
            /*!***********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs ***!
              \***********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueEnumValueNamesRule = UniqueEnumValueNamesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Unique enum value names
                 *
                 * A GraphQL enum type is only valid if all its values are uniquely named.
                 */
                function UniqueEnumValueNamesRule(context) {
                    const schema = context.getSchema();
                    const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);
                    const knownValueNames = Object.create(null);
                    return {
                        EnumTypeDefinition: checkValueUniqueness,
                        EnumTypeExtension: checkValueUniqueness
                    };

                    function checkValueUniqueness(node) {
                        var _node$values;
                        const typeName = node.name.value;
                        if (!knownValueNames[typeName]) {
                            knownValueNames[typeName] = Object.create(null);
                        } // FIXME: https://github.com/graphql/graphql-js/issues/2203

                        /* c8 ignore next */

                        const valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];
                        const valueNames = knownValueNames[typeName];
                        for (const valueDef of valueNodes) {
                            const valueName = valueDef.name.value;
                            const existingType = existingTypeMap[typeName];
                            if ((0, _definition.isEnumType)(existingType) && existingType.getValue(valueName)) {
                                context.reportError(new _GraphQLError.GraphQLError(`Enum value "${typeName}.${valueName}" already exists in the schema. It cannot also be defined in this type extension.`, {
                                    nodes: valueDef.name
                                }));
                            } else if (valueNames[valueName]) {
                                context.reportError(new _GraphQLError.GraphQLError(`Enum value "${typeName}.${valueName}" can only be defined once.`, {
                                    nodes: [valueNames[valueName], valueDef.name]
                                }));
                            } else {
                                valueNames[valueName] = valueDef.name;
                            }
                        }
                        return false;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs":
            /*!*****************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs ***!
              \*****************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueFieldDefinitionNamesRule = UniqueFieldDefinitionNamesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Unique field definition names
                 *
                 * A GraphQL complex type is only valid if all its fields are uniquely named.
                 */
                function UniqueFieldDefinitionNamesRule(context) {
                    const schema = context.getSchema();
                    const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);
                    const knownFieldNames = Object.create(null);
                    return {
                        InputObjectTypeDefinition: checkFieldUniqueness,
                        InputObjectTypeExtension: checkFieldUniqueness,
                        InterfaceTypeDefinition: checkFieldUniqueness,
                        InterfaceTypeExtension: checkFieldUniqueness,
                        ObjectTypeDefinition: checkFieldUniqueness,
                        ObjectTypeExtension: checkFieldUniqueness
                    };

                    function checkFieldUniqueness(node) {
                        var _node$fields;
                        const typeName = node.name.value;
                        if (!knownFieldNames[typeName]) {
                            knownFieldNames[typeName] = Object.create(null);
                        } // FIXME: https://github.com/graphql/graphql-js/issues/2203

                        /* c8 ignore next */

                        const fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];
                        const fieldNames = knownFieldNames[typeName];
                        for (const fieldDef of fieldNodes) {
                            const fieldName = fieldDef.name.value;
                            if (hasField(existingTypeMap[typeName], fieldName)) {
                                context.reportError(new _GraphQLError.GraphQLError(`Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension.`, {
                                    nodes: fieldDef.name
                                }));
                            } else if (fieldNames[fieldName]) {
                                context.reportError(new _GraphQLError.GraphQLError(`Field "${typeName}.${fieldName}" can only be defined once.`, {
                                    nodes: [fieldNames[fieldName], fieldDef.name]
                                }));
                            } else {
                                fieldNames[fieldName] = fieldDef.name;
                            }
                        }
                        return false;
                    }
                }

                function hasField(type, fieldName) {
                    if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type) || (0, _definition.isInputObjectType)(type)) {
                        return type.getFields()[fieldName] != null;
                    }
                    return false;
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs":
            /*!**********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs ***!
              \**********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueFragmentNamesRule = UniqueFragmentNamesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Unique fragment names
                 *
                 * A GraphQL document is only valid if all defined fragments have unique names.
                 *
                 * See https://spec.graphql.org/draft/#sec-Fragment-Name-Uniqueness
                 */
                function UniqueFragmentNamesRule(context) {
                    const knownFragmentNames = Object.create(null);
                    return {
                        OperationDefinition: () => false,
                        FragmentDefinition(node) {
                            const fragmentName = node.name.value;
                            if (knownFragmentNames[fragmentName]) {
                                context.reportError(new _GraphQLError.GraphQLError(`There can be only one fragment named "${fragmentName}".`, {
                                    nodes: [knownFragmentNames[fragmentName], node.name]
                                }));
                            } else {
                                knownFragmentNames[fragmentName] = node.name;
                            }
                            return false;
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs":
            /*!************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs ***!
              \************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueInputFieldNamesRule = UniqueInputFieldNamesRule;
                var _invariant = __webpack_require__( /*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Unique input field names
                 *
                 * A GraphQL input object value is only valid if all supplied fields are
                 * uniquely named.
                 *
                 * See https://spec.graphql.org/draft/#sec-Input-Object-Field-Uniqueness
                 */
                function UniqueInputFieldNamesRule(context) {
                    const knownNameStack = [];
                    let knownNames = Object.create(null);
                    return {
                        ObjectValue: {
                            enter() {
                                knownNameStack.push(knownNames);
                                knownNames = Object.create(null);
                            },
                            leave() {
                                const prevKnownNames = knownNameStack.pop();
                                prevKnownNames || (0, _invariant.invariant)(false);
                                knownNames = prevKnownNames;
                            }
                        },
                        ObjectField(node) {
                            const fieldName = node.name.value;
                            if (knownNames[fieldName]) {
                                context.reportError(new _GraphQLError.GraphQLError(`There can be only one input field named "${fieldName}".`, {
                                    nodes: [knownNames[fieldName], node.name]
                                }));
                            } else {
                                knownNames[fieldName] = node.name;
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs":
            /*!***********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs ***!
              \***********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueOperationNamesRule = UniqueOperationNamesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Unique operation names
                 *
                 * A GraphQL document is only valid if all defined operations have unique names.
                 *
                 * See https://spec.graphql.org/draft/#sec-Operation-Name-Uniqueness
                 */
                function UniqueOperationNamesRule(context) {
                    const knownOperationNames = Object.create(null);
                    return {
                        OperationDefinition(node) {
                            const operationName = node.name;
                            if (operationName) {
                                if (knownOperationNames[operationName.value]) {
                                    context.reportError(new _GraphQLError.GraphQLError(`There can be only one operation named "${operationName.value}".`, {
                                        nodes: [knownOperationNames[operationName.value], operationName]
                                    }));
                                } else {
                                    knownOperationNames[operationName.value] = operationName;
                                }
                            }
                            return false;
                        },
                        FragmentDefinition: () => false
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs":
            /*!***********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs ***!
              \***********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueOperationTypesRule = UniqueOperationTypesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Unique operation types
                 *
                 * A GraphQL document is only valid if it has only one type per operation.
                 */
                function UniqueOperationTypesRule(context) {
                    const schema = context.getSchema();
                    const definedOperationTypes = Object.create(null);
                    const existingOperationTypes = schema ? {
                        query: schema.getQueryType(),
                        mutation: schema.getMutationType(),
                        subscription: schema.getSubscriptionType()
                    } : {};
                    return {
                        SchemaDefinition: checkOperationTypes,
                        SchemaExtension: checkOperationTypes
                    };

                    function checkOperationTypes(node) {
                        var _node$operationTypes;

                        // See: https://github.com/graphql/graphql-js/issues/2203

                        /* c8 ignore next */
                        const operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];
                        for (const operationType of operationTypesNodes) {
                            const operation = operationType.operation;
                            const alreadyDefinedOperationType = definedOperationTypes[operation];
                            if (existingOperationTypes[operation]) {
                                context.reportError(new _GraphQLError.GraphQLError(`Type for ${operation} already defined in the schema. It cannot be redefined.`, {
                                    nodes: operationType
                                }));
                            } else if (alreadyDefinedOperationType) {
                                context.reportError(new _GraphQLError.GraphQLError(`There can be only one ${operation} type in schema.`, {
                                    nodes: [alreadyDefinedOperationType, operationType]
                                }));
                            } else {
                                definedOperationTypes[operation] = operationType;
                            }
                        }
                        return false;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs ***!
              \******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueTypeNamesRule = UniqueTypeNamesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Unique type names
                 *
                 * A GraphQL document is only valid if all defined types have unique names.
                 */
                function UniqueTypeNamesRule(context) {
                    const knownTypeNames = Object.create(null);
                    const schema = context.getSchema();
                    return {
                        ScalarTypeDefinition: checkTypeName,
                        ObjectTypeDefinition: checkTypeName,
                        InterfaceTypeDefinition: checkTypeName,
                        UnionTypeDefinition: checkTypeName,
                        EnumTypeDefinition: checkTypeName,
                        InputObjectTypeDefinition: checkTypeName
                    };

                    function checkTypeName(node) {
                        const typeName = node.name.value;
                        if (schema !== null && schema !== void 0 && schema.getType(typeName)) {
                            context.reportError(new _GraphQLError.GraphQLError(`Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`, {
                                nodes: node.name
                            }));
                            return;
                        }
                        if (knownTypeNames[typeName]) {
                            context.reportError(new _GraphQLError.GraphQLError(`There can be only one type named "${typeName}".`, {
                                nodes: [knownTypeNames[typeName], node.name]
                            }));
                        } else {
                            knownTypeNames[typeName] = node.name;
                        }
                        return false;
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs":
            /*!**********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs ***!
              \**********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.UniqueVariableNamesRule = UniqueVariableNamesRule;
                var _groupBy = __webpack_require__( /*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                /**
                 * Unique variable names
                 *
                 * A GraphQL operation is only valid if all its variables are uniquely named.
                 */
                function UniqueVariableNamesRule(context) {
                    return {
                        OperationDefinition(operationNode) {
                            var _operationNode$variab;

                            // See: https://github.com/graphql/graphql-js/issues/2203

                            /* c8 ignore next */
                            const variableDefinitions = (_operationNode$variab = operationNode.variableDefinitions) !== null && _operationNode$variab !== void 0 ? _operationNode$variab : [];
                            const seenVariableDefinitions = (0, _groupBy.groupBy)(variableDefinitions, node => node.variable.name.value);
                            for (const [variableName, variableNodes] of seenVariableDefinitions) {
                                if (variableNodes.length > 1) {
                                    context.reportError(new _GraphQLError.GraphQLError(`There can be only one variable named "$${variableName}".`, {
                                        nodes: variableNodes.map(node => node.variable.name)
                                    }));
                                }
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs":
            /*!**********************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs ***!
              \**********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.ValuesOfCorrectTypeRule = ValuesOfCorrectTypeRule;
                var _didYouMean = __webpack_require__( /*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
                var _inspect = __webpack_require__( /*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _keyMap = __webpack_require__( /*! ../../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
                var _suggestionList = __webpack_require__( /*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _printer = __webpack_require__( /*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * Value literals of correct type
                 *
                 * A GraphQL document is only valid if all value literals are of the type
                 * expected at their position.
                 *
                 * See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type
                 */
                function ValuesOfCorrectTypeRule(context) {
                    let variableDefinitions = {};
                    return {
                        OperationDefinition: {
                            enter() {
                                variableDefinitions = {};
                            }
                        },
                        VariableDefinition(definition) {
                            variableDefinitions[definition.variable.name.value] = definition;
                        },
                        ListValue(node) {
                            // Note: TypeInfo will traverse into a list's item type, so look to the
                            // parent input type to check if it is a list.
                            const type = (0, _definition.getNullableType)(context.getParentInputType());
                            if (!(0, _definition.isListType)(type)) {
                                isValidValueNode(context, node);
                                return false; // Don't traverse further.
                            }
                        },
                        ObjectValue(node) {
                            const type = (0, _definition.getNamedType)(context.getInputType());
                            if (!(0, _definition.isInputObjectType)(type)) {
                                isValidValueNode(context, node);
                                return false; // Don't traverse further.
                            } // Ensure every required field exists.

                            const fieldNodeMap = (0, _keyMap.keyMap)(node.fields, field => field.name.value);
                            for (const fieldDef of Object.values(type.getFields())) {
                                const fieldNode = fieldNodeMap[fieldDef.name];
                                if (!fieldNode && (0, _definition.isRequiredInputField)(fieldDef)) {
                                    const typeStr = (0, _inspect.inspect)(fieldDef.type);
                                    context.reportError(new _GraphQLError.GraphQLError(`Field "${type.name}.${fieldDef.name}" of required type "${typeStr}" was not provided.`, {
                                        nodes: node
                                    }));
                                }
                            }
                            if (type.isOneOf) {
                                validateOneOfInputObject(context, node, type, fieldNodeMap, variableDefinitions);
                            }
                        },
                        ObjectField(node) {
                            const parentType = (0, _definition.getNamedType)(context.getParentInputType());
                            const fieldType = context.getInputType();
                            if (!fieldType && (0, _definition.isInputObjectType)(parentType)) {
                                const suggestions = (0, _suggestionList.suggestionList)(node.name.value, Object.keys(parentType.getFields()));
                                context.reportError(new _GraphQLError.GraphQLError(`Field "${node.name.value}" is not defined by type "${parentType.name}".` + (0, _didYouMean.didYouMean)(suggestions), {
                                    nodes: node
                                }));
                            }
                        },
                        NullValue(node) {
                            const type = context.getInputType();
                            if ((0, _definition.isNonNullType)(type)) {
                                context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${(0, _inspect.inspect)(type)}", found ${(0, _printer.print)(node)}.`, {
                                    nodes: node
                                }));
                            }
                        },
                        EnumValue: node => isValidValueNode(context, node),
                        IntValue: node => isValidValueNode(context, node),
                        FloatValue: node => isValidValueNode(context, node),
                        StringValue: node => isValidValueNode(context, node),
                        BooleanValue: node => isValidValueNode(context, node)
                    };
                }
                /**
                 * Any value literal may be a valid representation of a Scalar, depending on
                 * that scalar type.
                 */

                function isValidValueNode(context, node) {
                    // Report any error at the full type expected by the location.
                    const locationType = context.getInputType();
                    if (!locationType) {
                        return;
                    }
                    const type = (0, _definition.getNamedType)(locationType);
                    if (!(0, _definition.isLeafType)(type)) {
                        const typeStr = (0, _inspect.inspect)(locationType);
                        context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}.`, {
                            nodes: node
                        }));
                        return;
                    } // Scalars and Enums determine if a literal value is valid via parseLiteral(),
                    // which may throw or return an invalid value to indicate failure.

                    try {
                        const parseResult = type.parseLiteral(node, undefined
                            /* variables */
                        );
                        if (parseResult === undefined) {
                            const typeStr = (0, _inspect.inspect)(locationType);
                            context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}.`, {
                                nodes: node
                            }));
                        }
                    } catch (error) {
                        const typeStr = (0, _inspect.inspect)(locationType);
                        if (error instanceof _GraphQLError.GraphQLError) {
                            context.reportError(error);
                        } else {
                            context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}; ` + error.message, {
                                nodes: node,
                                originalError: error
                            }));
                        }
                    }
                }

                function validateOneOfInputObject(context, node, type, fieldNodeMap, variableDefinitions) {
                    var _fieldNodeMap$keys$;
                    const keys = Object.keys(fieldNodeMap);
                    const isNotExactlyOneField = keys.length !== 1;
                    if (isNotExactlyOneField) {
                        context.reportError(new _GraphQLError.GraphQLError(`OneOf Input Object "${type.name}" must specify exactly one key.`, {
                            nodes: [node]
                        }));
                        return;
                    }
                    const value = (_fieldNodeMap$keys$ = fieldNodeMap[keys[0]]) === null || _fieldNodeMap$keys$ === void 0 ? void 0 : _fieldNodeMap$keys$.value;
                    const isNullLiteral = !value || value.kind === _kinds.Kind.NULL;
                    const isVariable = (value === null || value === void 0 ? void 0 : value.kind) === _kinds.Kind.VARIABLE;
                    if (isNullLiteral) {
                        context.reportError(new _GraphQLError.GraphQLError(`Field "${type.name}.${keys[0]}" must be non-null.`, {
                            nodes: [node]
                        }));
                        return;
                    }
                    if (isVariable) {
                        const variableName = value.name.value;
                        const definition = variableDefinitions[variableName];
                        const isNullableVariable = definition.type.kind !== _kinds.Kind.NON_NULL_TYPE;
                        if (isNullableVariable) {
                            context.reportError(new _GraphQLError.GraphQLError(`Variable "${variableName}" must be non-nullable to be used for OneOf Input Object "${type.name}".`, {
                                nodes: [node]
                            }));
                        }
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs":
            /*!*************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs ***!
              \*************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.VariablesAreInputTypesRule = VariablesAreInputTypesRule;
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _printer = __webpack_require__( /*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _typeFromAST = __webpack_require__( /*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
                /**
                 * Variables are input types
                 *
                 * A GraphQL operation is only valid if all the variables it defines are of
                 * input types (scalar, enum, or input object).
                 *
                 * See https://spec.graphql.org/draft/#sec-Variables-Are-Input-Types
                 */
                function VariablesAreInputTypesRule(context) {
                    return {
                        VariableDefinition(node) {
                            const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.type);
                            if (type !== undefined && !(0, _definition.isInputType)(type)) {
                                const variableName = node.variable.name.value;
                                const typeName = (0, _printer.print)(node.type);
                                context.reportError(new _GraphQLError.GraphQLError(`Variable "$${variableName}" cannot be non-input type "${typeName}".`, {
                                    nodes: node.type
                                }));
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs":
            /*!*****************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs ***!
              \*****************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.VariablesInAllowedPositionRule = VariablesInAllowedPositionRule;
                var _inspect = __webpack_require__( /*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _kinds = __webpack_require__( /*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
                var _definition = __webpack_require__( /*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _typeComparators = __webpack_require__( /*! ../../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs");
                var _typeFromAST = __webpack_require__( /*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
                /**
                 * Variables in allowed position
                 *
                 * Variable usages must be compatible with the arguments they are passed to.
                 *
                 * See https://spec.graphql.org/draft/#sec-All-Variable-Usages-are-Allowed
                 */
                function VariablesInAllowedPositionRule(context) {
                    let varDefMap = Object.create(null);
                    return {
                        OperationDefinition: {
                            enter() {
                                varDefMap = Object.create(null);
                            },
                            leave(operation) {
                                const usages = context.getRecursiveVariableUsages(operation);
                                for (const {
                                        node,
                                        type,
                                        defaultValue
                                    }
                                    of usages) {
                                    const varName = node.name.value;
                                    const varDef = varDefMap[varName];
                                    if (varDef && type) {
                                        // A var type is allowed if it is the same or more strict (e.g. is
                                        // a subtype of) than the expected type. It can be more strict if
                                        // the variable type is non-null when the expected type is nullable.
                                        // If both are list types, the variable item type can be more strict
                                        // than the expected item type (contravariant).
                                        const schema = context.getSchema();
                                        const varType = (0, _typeFromAST.typeFromAST)(schema, varDef.type);
                                        if (varType && !allowedVariableUsage(schema, varType, varDef.defaultValue, type, defaultValue)) {
                                            const varTypeStr = (0, _inspect.inspect)(varType);
                                            const typeStr = (0, _inspect.inspect)(type);
                                            context.reportError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of type "${varTypeStr}" used in position expecting type "${typeStr}".`, {
                                                nodes: [varDef, node]
                                            }));
                                        }
                                    }
                                }
                            }
                        },
                        VariableDefinition(node) {
                            varDefMap[node.variable.name.value] = node;
                        }
                    };
                }
                /**
                 * Returns true if the variable is allowed in the location it was found,
                 * which includes considering if default values exist for either the variable
                 * or the location at which it is located.
                 */

                function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {
                    if ((0, _definition.isNonNullType)(locationType) && !(0, _definition.isNonNullType)(varType)) {
                        const hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== _kinds.Kind.NULL;
                        const hasLocationDefaultValue = locationDefaultValue !== undefined;
                        if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {
                            return false;
                        }
                        const nullableLocationType = locationType.ofType;
                        return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, nullableLocationType);
                    }
                    return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, locationType);
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs":
            /*!****************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs ***!
              \****************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.NoDeprecatedCustomRule = NoDeprecatedCustomRule;
                var _invariant = __webpack_require__( /*! ../../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
                var _GraphQLError = __webpack_require__( /*! ../../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _definition = __webpack_require__( /*! ../../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                /**
                 * No deprecated
                 *
                 * A GraphQL document is only valid if all selected fields and all used enum values have not been
                 * deprecated.
                 *
                 * Note: This rule is optional and is not part of the Validation section of the GraphQL
                 * Specification. The main purpose of this rule is detection of deprecated usages and not
                 * necessarily to forbid their use when querying a service.
                 */
                function NoDeprecatedCustomRule(context) {
                    return {
                        Field(node) {
                            const fieldDef = context.getFieldDef();
                            const deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason;
                            if (fieldDef && deprecationReason != null) {
                                const parentType = context.getParentType();
                                parentType != null || (0, _invariant.invariant)(false);
                                context.reportError(new _GraphQLError.GraphQLError(`The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`, {
                                    nodes: node
                                }));
                            }
                        },
                        Argument(node) {
                            const argDef = context.getArgument();
                            const deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason;
                            if (argDef && deprecationReason != null) {
                                const directiveDef = context.getDirective();
                                if (directiveDef != null) {
                                    context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, {
                                        nodes: node
                                    }));
                                } else {
                                    const parentType = context.getParentType();
                                    const fieldDef = context.getFieldDef();
                                    parentType != null && fieldDef != null || (0, _invariant.invariant)(false);
                                    context.reportError(new _GraphQLError.GraphQLError(`Field "${parentType.name}.${fieldDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, {
                                        nodes: node
                                    }));
                                }
                            }
                        },
                        ObjectField(node) {
                            const inputObjectDef = (0, _definition.getNamedType)(context.getParentInputType());
                            if ((0, _definition.isInputObjectType)(inputObjectDef)) {
                                const inputFieldDef = inputObjectDef.getFields()[node.name.value];
                                const deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason;
                                if (deprecationReason != null) {
                                    context.reportError(new _GraphQLError.GraphQLError(`The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`, {
                                        nodes: node
                                    }));
                                }
                            }
                        },
                        EnumValue(node) {
                            const enumValueDef = context.getEnumValue();
                            const deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason;
                            if (enumValueDef && deprecationReason != null) {
                                const enumTypeDef = (0, _definition.getNamedType)(context.getInputType());
                                enumTypeDef != null || (0, _invariant.invariant)(false);
                                context.reportError(new _GraphQLError.GraphQLError(`The enum value "${enumTypeDef.name}.${enumValueDef.name}" is deprecated. ${deprecationReason}`, {
                                    nodes: node
                                }));
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs":
            /*!*************************************************************************************************!*\
              !*** ../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs ***!
              \*************************************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.NoSchemaIntrospectionCustomRule = NoSchemaIntrospectionCustomRule;
                var _GraphQLError = __webpack_require__( /*! ../../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _definition = __webpack_require__( /*! ../../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
                var _introspection = __webpack_require__( /*! ../../../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
                /**
                 * Prohibit introspection queries
                 *
                 * A GraphQL document is only valid if all fields selected are not fields that
                 * return an introspection type.
                 *
                 * Note: This rule is optional and is not part of the Validation section of the
                 * GraphQL Specification. This rule effectively disables introspection, which
                 * does not reflect best practices and should only be done if absolutely necessary.
                 */
                function NoSchemaIntrospectionCustomRule(context) {
                    return {
                        Field(node) {
                            const type = (0, _definition.getNamedType)(context.getType());
                            if (type && (0, _introspection.isIntrospectionType)(type)) {
                                context.reportError(new _GraphQLError.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${node.name.value}".`, {
                                    nodes: node
                                }));
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/specifiedRules.mjs":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/graphql/validation/specifiedRules.mjs ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.specifiedSDLRules = exports.specifiedRules = exports.recommendedRules = void 0;
                var _ExecutableDefinitionsRule = __webpack_require__( /*! ./rules/ExecutableDefinitionsRule.mjs */ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs");
                var _FieldsOnCorrectTypeRule = __webpack_require__( /*! ./rules/FieldsOnCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs");
                var _FragmentsOnCompositeTypesRule = __webpack_require__( /*! ./rules/FragmentsOnCompositeTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs");
                var _KnownArgumentNamesRule = __webpack_require__( /*! ./rules/KnownArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs");
                var _KnownDirectivesRule = __webpack_require__( /*! ./rules/KnownDirectivesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs");
                var _KnownFragmentNamesRule = __webpack_require__( /*! ./rules/KnownFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs");
                var _KnownTypeNamesRule = __webpack_require__( /*! ./rules/KnownTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs");
                var _LoneAnonymousOperationRule = __webpack_require__( /*! ./rules/LoneAnonymousOperationRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs");
                var _LoneSchemaDefinitionRule = __webpack_require__( /*! ./rules/LoneSchemaDefinitionRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs");
                var _MaxIntrospectionDepthRule = __webpack_require__( /*! ./rules/MaxIntrospectionDepthRule.mjs */ "../../../node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs");
                var _NoFragmentCyclesRule = __webpack_require__( /*! ./rules/NoFragmentCyclesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs");
                var _NoUndefinedVariablesRule = __webpack_require__( /*! ./rules/NoUndefinedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs");
                var _NoUnusedFragmentsRule = __webpack_require__( /*! ./rules/NoUnusedFragmentsRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs");
                var _NoUnusedVariablesRule = __webpack_require__( /*! ./rules/NoUnusedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs");
                var _OverlappingFieldsCanBeMergedRule = __webpack_require__( /*! ./rules/OverlappingFieldsCanBeMergedRule.mjs */ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs");
                var _PossibleFragmentSpreadsRule = __webpack_require__( /*! ./rules/PossibleFragmentSpreadsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs");
                var _PossibleTypeExtensionsRule = __webpack_require__( /*! ./rules/PossibleTypeExtensionsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs");
                var _ProvidedRequiredArgumentsRule = __webpack_require__( /*! ./rules/ProvidedRequiredArgumentsRule.mjs */ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs");
                var _ScalarLeafsRule = __webpack_require__( /*! ./rules/ScalarLeafsRule.mjs */ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs");
                var _SingleFieldSubscriptionsRule = __webpack_require__( /*! ./rules/SingleFieldSubscriptionsRule.mjs */ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs");
                var _UniqueArgumentDefinitionNamesRule = __webpack_require__( /*! ./rules/UniqueArgumentDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs");
                var _UniqueArgumentNamesRule = __webpack_require__( /*! ./rules/UniqueArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs");
                var _UniqueDirectiveNamesRule = __webpack_require__( /*! ./rules/UniqueDirectiveNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs");
                var _UniqueDirectivesPerLocationRule = __webpack_require__( /*! ./rules/UniqueDirectivesPerLocationRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs");
                var _UniqueEnumValueNamesRule = __webpack_require__( /*! ./rules/UniqueEnumValueNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs");
                var _UniqueFieldDefinitionNamesRule = __webpack_require__( /*! ./rules/UniqueFieldDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs");
                var _UniqueFragmentNamesRule = __webpack_require__( /*! ./rules/UniqueFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs");
                var _UniqueInputFieldNamesRule = __webpack_require__( /*! ./rules/UniqueInputFieldNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs");
                var _UniqueOperationNamesRule = __webpack_require__( /*! ./rules/UniqueOperationNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs");
                var _UniqueOperationTypesRule = __webpack_require__( /*! ./rules/UniqueOperationTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs");
                var _UniqueTypeNamesRule = __webpack_require__( /*! ./rules/UniqueTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs");
                var _UniqueVariableNamesRule = __webpack_require__( /*! ./rules/UniqueVariableNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs");
                var _ValuesOfCorrectTypeRule = __webpack_require__( /*! ./rules/ValuesOfCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs");
                var _VariablesAreInputTypesRule = __webpack_require__( /*! ./rules/VariablesAreInputTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs");
                var _VariablesInAllowedPositionRule = __webpack_require__( /*! ./rules/VariablesInAllowedPositionRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs");
                // Spec Section: "Executable Definitions"
                // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"

                // Spec Section: "Fragments on Composite Types"

                // Spec Section: "Argument Names"

                // Spec Section: "Directives Are Defined"

                // Spec Section: "Fragment spread target defined"

                // Spec Section: "Fragment Spread Type Existence"

                // Spec Section: "Lone Anonymous Operation"

                // SDL-specific validation rules

                // TODO: Spec Section

                // Spec Section: "Fragments must not form cycles"

                // Spec Section: "All Variable Used Defined"

                // Spec Section: "Fragments must be used"

                // Spec Section: "All Variables Used"

                // Spec Section: "Field Selection Merging"

                // Spec Section: "Fragment spread is possible"

                // Spec Section: "Argument Optionality"

                // Spec Section: "Leaf Field Selections"

                // Spec Section: "Subscriptions with Single Root Field"

                // Spec Section: "Argument Uniqueness"

                // Spec Section: "Directives Are Unique Per Location"

                // Spec Section: "Fragment Name Uniqueness"

                // Spec Section: "Input Object Field Uniqueness"

                // Spec Section: "Operation Name Uniqueness"

                // Spec Section: "Variable Uniqueness"

                // Spec Section: "Value Type Correctness"

                // Spec Section: "Variables are Input Types"

                // Spec Section: "All Variable Usages Are Allowed"

                /**
                 * Technically these aren't part of the spec but they are strongly encouraged
                 * validation rules.
                 */
                const recommendedRules = exports.recommendedRules = Object.freeze([_MaxIntrospectionDepthRule.MaxIntrospectionDepthRule]);
                /**
                 * This set includes all validation rules defined by the GraphQL spec.
                 *
                 * The order of the rules in this list has been adjusted to lead to the
                 * most clear output when encountering multiple validation errors.
                 */

                const specifiedRules = exports.specifiedRules = Object.freeze([_ExecutableDefinitionsRule.ExecutableDefinitionsRule, _UniqueOperationNamesRule.UniqueOperationNamesRule, _LoneAnonymousOperationRule.LoneAnonymousOperationRule, _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule, _KnownTypeNamesRule.KnownTypeNamesRule, _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule, _VariablesAreInputTypesRule.VariablesAreInputTypesRule, _ScalarLeafsRule.ScalarLeafsRule, _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule, _UniqueFragmentNamesRule.UniqueFragmentNamesRule, _KnownFragmentNamesRule.KnownFragmentNamesRule, _NoUnusedFragmentsRule.NoUnusedFragmentsRule, _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule, _NoFragmentCyclesRule.NoFragmentCyclesRule, _UniqueVariableNamesRule.UniqueVariableNamesRule, _NoUndefinedVariablesRule.NoUndefinedVariablesRule, _NoUnusedVariablesRule.NoUnusedVariablesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _KnownArgumentNamesRule.KnownArgumentNamesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule, _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule, _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule, ...recommendedRules]);
                /**
                 * @internal
                 */

                const specifiedSDLRules = exports.specifiedSDLRules = Object.freeze([_LoneSchemaDefinitionRule.LoneSchemaDefinitionRule, _UniqueOperationTypesRule.UniqueOperationTypesRule, _UniqueTypeNamesRule.UniqueTypeNamesRule, _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule, _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule, _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule, _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule, _KnownTypeNamesRule.KnownTypeNamesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule, _KnownArgumentNamesRule.KnownArgumentNamesOnDirectivesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsOnDirectivesRule]);

                /***/
            }),

        /***/
        "../../../node_modules/graphql/validation/validate.mjs":
            /*!*************************************************************!*\
              !*** ../../../node_modules/graphql/validation/validate.mjs ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.assertValidSDL = assertValidSDL;
                exports.assertValidSDLExtension = assertValidSDLExtension;
                exports.validate = validate;
                exports.validateSDL = validateSDL;
                var _devAssert = __webpack_require__( /*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
                var _GraphQLError = __webpack_require__( /*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
                var _visitor = __webpack_require__( /*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
                var _validate = __webpack_require__( /*! ../type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs");
                var _TypeInfo = __webpack_require__( /*! ../utilities/TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs");
                var _specifiedRules = __webpack_require__( /*! ./specifiedRules.mjs */ "../../../node_modules/graphql/validation/specifiedRules.mjs");
                var _ValidationContext = __webpack_require__( /*! ./ValidationContext.mjs */ "../../../node_modules/graphql/validation/ValidationContext.mjs");
                /**
                 * Implements the "Validation" section of the spec.
                 *
                 * Validation runs synchronously, returning an array of encountered errors, or
                 * an empty array if no errors were encountered and the document is valid.
                 *
                 * A list of specific validation rules may be provided. If not provided, the
                 * default list of rules defined by the GraphQL specification will be used.
                 *
                 * Each validation rules is a function which returns a visitor
                 * (see the language/visitor API). Visitor methods are expected to return
                 * GraphQLErrors, or Arrays of GraphQLErrors when invalid.
                 *
                 * Validate will stop validation after a `maxErrors` limit has been reached.
                 * Attackers can send pathologically invalid queries to induce a DoS attack,
                 * so by default `maxErrors` set to 100 errors.
                 *
                 * Optionally a custom TypeInfo instance may be provided. If not provided, one
                 * will be created from the provided schema.
                 */

                function validate(schema, documentAST, rules = _specifiedRules.specifiedRules, options, /** @deprecated will be removed in 17.0.0 */
                    typeInfo = new _TypeInfo.TypeInfo(schema)) {
                    var _options$maxErrors;
                    const maxErrors = (_options$maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors) !== null && _options$maxErrors !== void 0 ? _options$maxErrors : 100;
                    documentAST || (0, _devAssert.devAssert)(false, 'Must provide document.'); // If the schema used for validation is invalid, throw an error.

                    (0, _validate.assertValidSchema)(schema);
                    const abortObj = Object.freeze({});
                    const errors = [];
                    const context = new _ValidationContext.ValidationContext(schema, documentAST, typeInfo, error => {
                        if (errors.length >= maxErrors) {
                            errors.push(new _GraphQLError.GraphQLError('Too many validation errors, error limit reached. Validation aborted.')); // eslint-disable-next-line @typescript-eslint/no-throw-literal

                            throw abortObj;
                        }
                        errors.push(error);
                    }); // This uses a specialized visitor which runs multiple visitors in parallel,
                    // while maintaining the visitor skip and break API.

                    const visitor = (0, _visitor.visitInParallel)(rules.map(rule => rule(context))); // Visit the whole document with each instance of all provided rules.

                    try {
                        (0, _visitor.visit)(documentAST, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, visitor));
                    } catch (e) {
                        if (e !== abortObj) {
                            throw e;
                        }
                    }
                    return errors;
                }
                /**
                 * @internal
                 */

                function validateSDL(documentAST, schemaToExtend, rules = _specifiedRules.specifiedSDLRules) {
                    const errors = [];
                    const context = new _ValidationContext.SDLValidationContext(documentAST, schemaToExtend, error => {
                        errors.push(error);
                    });
                    const visitors = rules.map(rule => rule(context));
                    (0, _visitor.visit)(documentAST, (0, _visitor.visitInParallel)(visitors));
                    return errors;
                }
                /**
                 * Utility function which asserts a SDL document is valid by throwing an error
                 * if it is invalid.
                 *
                 * @internal
                 */

                function assertValidSDL(documentAST) {
                    const errors = validateSDL(documentAST);
                    if (errors.length !== 0) {
                        throw new Error(errors.map(error => error.message).join('\n\n'));
                    }
                }
                /**
                 * Utility function which asserts a SDL document is valid by throwing an error
                 * if it is invalid.
                 *
                 * @internal
                 */

                function assertValidSDLExtension(documentAST, schema) {
                    const errors = validateSDL(documentAST, schema);
                    if (errors.length !== 0) {
                        throw new Error(errors.map(error => error.message).join('\n\n'));
                    }
                }

                /***/
            }),

        /***/
        "../../../node_modules/graphql/version.mjs":
            /*!*************************************************!*\
              !*** ../../../node_modules/graphql/version.mjs ***!
              \*************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.versionInfo = exports.version = void 0;
                // Note: This file is autogenerated using "resources/gen-version.js" script and
                // automatically updated by "npm version" command.

                /**
                 * A string containing the version of the GraphQL.js library
                 */
                const version = exports.version = '16.9.0';
                /**
                 * An object containing the components of the GraphQL.js version string
                 */

                const versionInfo = exports.versionInfo = Object.freeze({
                    major: 16,
                    minor: 9,
                    patch: 0,
                    preReleaseTag: null
                });

                /***/
            }),

        /***/
        "../../../node_modules/hey-listen/dist/hey-listen.es.js":
            /*!**************************************************************!*\
              !*** ../../../node_modules/hey-listen/dist/hey-listen.es.js ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.warning = exports.invariant = void 0;
                var warning = function() {};
                exports.warning = warning;
                var invariant = function() {};
                exports.invariant = invariant;
                if (true) {
                    exports.warning = warning = function(check, message) {
                        if (!check && typeof console !== 'undefined') {
                            console.warn(message);
                        }
                    };
                    exports.invariant = invariant = function(check, message) {
                        if (!check) {
                            throw new Error(message);
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/is-plain-object/index.js":
            /*!******************************************************!*\
              !*** ../../../node_modules/is-plain-object/index.js ***!
              \******************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";
                /*!
                 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
                 *
                 * Copyright (c) 2014-2017, Jon Schlinkert.
                 * Released under the MIT License.
                 */



                var isObject = __webpack_require__( /*! isobject */ "../../../node_modules/isobject/index.js");

                function isObjectObject(o) {
                    return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]';
                }
                module.exports = function isPlainObject(o) {
                    var ctor, prot;
                    if (isObjectObject(o) === false) return false;

                    // If has modified constructor
                    ctor = o.constructor;
                    if (typeof ctor !== 'function') return false;

                    // If has modified prototype
                    prot = ctor.prototype;
                    if (isObjectObject(prot) === false) return false;

                    // If constructor does not have an Object-specific method
                    if (prot.hasOwnProperty('isPrototypeOf') === false) {
                        return false;
                    }

                    // Most likely a plain Object
                    return true;
                };

                /***/
            }),

        /***/
        "../../../node_modules/is-primitive/index.js":
            /*!***************************************************!*\
              !*** ../../../node_modules/is-primitive/index.js ***!
              \***************************************************/
            /***/
            (function(module) {

                "use strict";
                /*!
                 * is-primitive <https://github.com/jonschlinkert/is-primitive>
                 *
                 * Copyright (c) 2014-present, Jon Schlinkert.
                 * Released under the MIT License.
                 */



                module.exports = function isPrimitive(val) {
                    if (typeof val === 'object') {
                        return val === null;
                    }
                    return typeof val !== 'function';
                };

                /***/
            }),

        /***/
        "../../../node_modules/isarray/index.js":
            /*!**********************************************!*\
              !*** ../../../node_modules/isarray/index.js ***!
              \**********************************************/
            /***/
            (function(module) {

                "use strict";


                var toString = {}.toString;
                module.exports = Array.isArray || function(arr) {
                    return toString.call(arr) == '[object Array]';
                };

                /***/
            }),

        /***/
        "../../../node_modules/isobject/index.js":
            /*!***********************************************!*\
              !*** ../../../node_modules/isobject/index.js ***!
              \***********************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";
                /*!
                 * isobject <https://github.com/jonschlinkert/isobject>
                 *
                 * Copyright (c) 2014-2015, Jon Schlinkert.
                 * Licensed under the MIT License.
                 */



                var isArray = __webpack_require__( /*! isarray */ "../../../node_modules/isarray/index.js");
                module.exports = function isObject(val) {
                    return val != null && typeof val === 'object' && isArray(val) === false;
                };

                /***/
            }),

        /***/
        "../../../node_modules/linkify-it/build/index.cjs.js":
            /*!***********************************************************!*\
              !*** ../../../node_modules/linkify-it/build/index.cjs.js ***!
              \***********************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var uc_micro = __webpack_require__( /*! uc.micro */ "../../../node_modules/uc.micro/build/index.cjs.js");

                function reFactory(opts) {
                    const re = {};
                    opts = opts || {};
                    re.src_Any = uc_micro.Any.source;
                    re.src_Cc = uc_micro.Cc.source;
                    re.src_Z = uc_micro.Z.source;
                    re.src_P = uc_micro.P.source;

                    // \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation)
                    re.src_ZPCc = [re.src_Z, re.src_P, re.src_Cc].join('|');

                    // \p{\Z\Cc} (white spaces + control)
                    re.src_ZCc = [re.src_Z, re.src_Cc].join('|');

                    // Experimental. List of chars, completely prohibited in links
                    // because can separate it from other part of text
                    const text_separators = '[><\uff5c]';

                    // All possible word characters (everything without punctuation, spaces & controls)
                    // Defined via punctuation & spaces to save space
                    // Should be something like \p{\L\N\S\M} (\w but without `_`)
                    re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';
                    // The same as abothe but without [0-9]
                    // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';

                    re.src_ip4 = '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';

                    // Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch.
                    re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\[\\]()]).)+@)?';
                    re.src_port = '(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?';
                    re.src_host_terminator = '(?=$|' + text_separators + '|' + re.src_ZPCc + ')' + '(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))';
                    re.src_path = '(?:' + '[/?#]' + '(?:' + '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-;]).|' + '\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' + '\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' + '\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' + '\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' + "\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
                        // allow `I'm_king` if no pair found
                        "\\'(?=" + re.src_pseudo_letter + '|[-])|' +
                        // google has many dots in "google search" links (#66, #81).
                        // github has ... in commit range links,
                        // Restrict to
                        // - english
                        // - percent-encoded
                        // - parts of file path
                        // - params separator
                        // until more examples found.
                        '\\.{2,}[a-zA-Z0-9%/&]|' + '\\.(?!' + re.src_ZCc + '|[.]|$)|' + (opts['---'] ? '\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate
                            :
                            '\\-+|') +
                        // allow `,,,` in paths
                        ',(?!' + re.src_ZCc + '|$)|' +
                        // allow `;` if not followed by space-like char
                        ';(?!' + re.src_ZCc + '|$)|' +
                        // allow `!!!` in paths, but not at the end
                        '\\!+(?!' + re.src_ZCc + '|[!]|$)|' + '\\?(?!' + re.src_ZCc + '|[?]|$)' + ')+' + '|\\/' + ')?';

                    // Allow anything in markdown spec, forbid quote (") at the first position
                    // because emails enclosed in quotes are far more common
                    re.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*';
                    re.src_xn = 'xn--[a-z0-9\\-]{1,59}';

                    // More to read about domain names
                    // http://serverfault.com/questions/638260/

                    re.src_domain_root =
                        // Allow letters & digits (http://test1)
                        '(?:' + re.src_xn + '|' + re.src_pseudo_letter + '{1,63}' + ')';
                    re.src_domain = '(?:' + re.src_xn + '|' + '(?:' + re.src_pseudo_letter + ')' + '|' + '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' + ')';
                    re.src_host = '(?:' +
                        // Don't need IP check, because digits are already allowed in normal domain names
                        //   src_ip4 +
                        // '|' +
                        '(?:(?:(?:' + re.src_domain + ')\\.)*' + re.src_domain /* _root */ + ')' + ')';
                    re.tpl_host_fuzzy = '(?:' + re.src_ip4 + '|' + '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))' + ')';
                    re.tpl_host_no_ip_fuzzy = '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))';
                    re.src_host_strict = re.src_host + re.src_host_terminator;
                    re.tpl_host_fuzzy_strict = re.tpl_host_fuzzy + re.src_host_terminator;
                    re.src_host_port_strict = re.src_host + re.src_port + re.src_host_terminator;
                    re.tpl_host_port_fuzzy_strict = re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;
                    re.tpl_host_port_no_ip_fuzzy_strict = re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;

                    //
                    // Main rules
                    //

                    // Rude test fuzzy links by host, for quick deny
                    re.tpl_host_fuzzy_test = 'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';
                    re.tpl_email_fuzzy = '(^|' + text_separators + '|"|\\(|' + re.src_ZCc + ')' + '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';
                    re.tpl_link_fuzzy =
                        // Fuzzy link can't be prepended with .:/\- and non punctuation.
                        // but can start with > (markdown blockquote)
                        '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' + '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';
                    re.tpl_link_no_ip_fuzzy =
                        // Fuzzy link can't be prepended with .:/\- and non punctuation.
                        // but can start with > (markdown blockquote)
                        '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' + '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';
                    return re;
                }

                //
                // Helpers
                //

                // Merge objects
                //
                function assign(obj /* from1, from2, from3, ... */ ) {
                    const sources = Array.prototype.slice.call(arguments, 1);
                    sources.forEach(function(source) {
                        if (!source) {
                            return;
                        }
                        Object.keys(source).forEach(function(key) {
                            obj[key] = source[key];
                        });
                    });
                    return obj;
                }

                function _class(obj) {
                    return Object.prototype.toString.call(obj);
                }

                function isString(obj) {
                    return _class(obj) === '[object String]';
                }

                function isObject(obj) {
                    return _class(obj) === '[object Object]';
                }

                function isRegExp(obj) {
                    return _class(obj) === '[object RegExp]';
                }

                function isFunction(obj) {
                    return _class(obj) === '[object Function]';
                }

                function escapeRE(str) {
                    return str.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&');
                }

                //

                const defaultOptions = {
                    fuzzyLink: true,
                    fuzzyEmail: true,
                    fuzzyIP: false
                };

                function isOptionsObj(obj) {
                    return Object.keys(obj || {}).reduce(function(acc, k) {
                        /* eslint-disable-next-line no-prototype-builtins */
                        return acc || defaultOptions.hasOwnProperty(k);
                    }, false);
                }
                const defaultSchemas = {
                    'http:': {
                        validate: function(text, pos, self) {
                            const tail = text.slice(pos);
                            if (!self.re.http) {
                                // compile lazily, because "host"-containing variables can change on tlds update.
                                self.re.http = new RegExp('^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i');
                            }
                            if (self.re.http.test(tail)) {
                                return tail.match(self.re.http)[0].length;
                            }
                            return 0;
                        }
                    },
                    'https:': 'http:',
                    'ftp:': 'http:',
                    '//': {
                        validate: function(text, pos, self) {
                            const tail = text.slice(pos);
                            if (!self.re.no_http) {
                                // compile lazily, because "host"-containing variables can change on tlds update.
                                self.re.no_http = new RegExp('^' + self.re.src_auth +
                                    // Don't allow single-level domains, because of false positives like '//test'
                                    // with code comments
                                    '(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' + self.re.src_port + self.re.src_host_terminator + self.re.src_path, 'i');
                            }
                            if (self.re.no_http.test(tail)) {
                                // should not be `://` & `///`, that protects from errors in protocol name
                                if (pos >= 3 && text[pos - 3] === ':') {
                                    return 0;
                                }
                                if (pos >= 3 && text[pos - 3] === '/') {
                                    return 0;
                                }
                                return tail.match(self.re.no_http)[0].length;
                            }
                            return 0;
                        }
                    },
                    'mailto:': {
                        validate: function(text, pos, self) {
                            const tail = text.slice(pos);
                            if (!self.re.mailto) {
                                self.re.mailto = new RegExp('^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i');
                            }
                            if (self.re.mailto.test(tail)) {
                                return tail.match(self.re.mailto)[0].length;
                            }
                            return 0;
                        }
                    }
                };

                // RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)
                /* eslint-disable-next-line max-len */
                const tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';

                // DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
                const tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');

                function resetScanCache(self) {
                    self.__index__ = -1;
                    self.__text_cache__ = '';
                }

                function createValidator(re) {
                    return function(text, pos) {
                        const tail = text.slice(pos);
                        if (re.test(tail)) {
                            return tail.match(re)[0].length;
                        }
                        return 0;
                    };
                }

                function createNormalizer() {
                    return function(match, self) {
                        self.normalize(match);
                    };
                }

                // Schemas compiler. Build regexps.
                //
                function compile(self) {
                    // Load & clone RE patterns.
                    const re = self.re = reFactory(self.__opts__);

                    // Define dynamic patterns
                    const tlds = self.__tlds__.slice();
                    self.onCompile();
                    if (!self.__tlds_replaced__) {
                        tlds.push(tlds_2ch_src_re);
                    }
                    tlds.push(re.src_xn);
                    re.src_tlds = tlds.join('|');

                    function untpl(tpl) {
                        return tpl.replace('%TLDS%', re.src_tlds);
                    }
                    re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');
                    re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');
                    re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');
                    re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');

                    //
                    // Compile each schema
                    //

                    const aliases = [];
                    self.__compiled__ = {}; // Reset compiled data

                    function schemaError(name, val) {
                        throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val);
                    }
                    Object.keys(self.__schemas__).forEach(function(name) {
                        const val = self.__schemas__[name];

                        // skip disabled methods
                        if (val === null) {
                            return;
                        }
                        const compiled = {
                            validate: null,
                            link: null
                        };
                        self.__compiled__[name] = compiled;
                        if (isObject(val)) {
                            if (isRegExp(val.validate)) {
                                compiled.validate = createValidator(val.validate);
                            } else if (isFunction(val.validate)) {
                                compiled.validate = val.validate;
                            } else {
                                schemaError(name, val);
                            }
                            if (isFunction(val.normalize)) {
                                compiled.normalize = val.normalize;
                            } else if (!val.normalize) {
                                compiled.normalize = createNormalizer();
                            } else {
                                schemaError(name, val);
                            }
                            return;
                        }
                        if (isString(val)) {
                            aliases.push(name);
                            return;
                        }
                        schemaError(name, val);
                    });

                    //
                    // Compile postponed aliases
                    //

                    aliases.forEach(function(alias) {
                        if (!self.__compiled__[self.__schemas__[alias]]) {
                            // Silently fail on missed schemas to avoid errons on disable.
                            // schemaError(alias, self.__schemas__[alias]);
                            return;
                        }
                        self.__compiled__[alias].validate = self.__compiled__[self.__schemas__[alias]].validate;
                        self.__compiled__[alias].normalize = self.__compiled__[self.__schemas__[alias]].normalize;
                    });

                    //
                    // Fake record for guessed links
                    //
                    self.__compiled__[''] = {
                        validate: null,
                        normalize: createNormalizer()
                    };

                    //
                    // Build schema condition
                    //
                    const slist = Object.keys(self.__compiled__).filter(function(name) {
                        // Filter disabled & fake schemas
                        return name.length > 0 && self.__compiled__[name];
                    }).map(escapeRE).join('|');
                    // (?!_) cause 1.5x slowdown
                    self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');
                    self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');
                    self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i');
                    self.re.pretest = RegExp('(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@', 'i');

                    //
                    // Cleanup
                    //

                    resetScanCache(self);
                }

                /**
                 * class Match
                 *
                 * Match result. Single element of array, returned by [[LinkifyIt#match]]
                 **/
                function Match(self, shift) {
                    const start = self.__index__;
                    const end = self.__last_index__;
                    const text = self.__text_cache__.slice(start, end);

                    /**
                     * Match#schema -> String
                     *
                     * Prefix (protocol) for matched string.
                     **/
                    this.schema = self.__schema__.toLowerCase();
                    /**
                     * Match#index -> Number
                     *
                     * First position of matched string.
                     **/
                    this.index = start + shift;
                    /**
                     * Match#lastIndex -> Number
                     *
                     * Next position after matched string.
                     **/
                    this.lastIndex = end + shift;
                    /**
                     * Match#raw -> String
                     *
                     * Matched string.
                     **/
                    this.raw = text;
                    /**
                     * Match#text -> String
                     *
                     * Notmalized text of matched string.
                     **/
                    this.text = text;
                    /**
                     * Match#url -> String
                     *
                     * Normalized url of matched string.
                     **/
                    this.url = text;
                }

                function createMatch(self, shift) {
                    const match = new Match(self, shift);
                    self.__compiled__[match.schema].normalize(match, self);
                    return match;
                }

                /**
                 * class LinkifyIt
                 **/

                /**
                 * new LinkifyIt(schemas, options)
                 * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
                 * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
                 *
                 * Creates new linkifier instance with optional additional schemas.
                 * Can be called without `new` keyword for convenience.
                 *
                 * By default understands:
                 *
                 * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
                 * - "fuzzy" links and emails (example.com, foo@bar.com).
                 *
                 * `schemas` is an object, where each key/value describes protocol/rule:
                 *
                 * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
                 *   for example). `linkify-it` makes shure that prefix is not preceeded with
                 *   alphanumeric char and symbols. Only whitespaces and punctuation allowed.
                 * - __value__ - rule to check tail after link prefix
                 *   - _String_ - just alias to existing rule
                 *   - _Object_
                 *     - _validate_ - validator function (should return matched length on success),
                 *       or `RegExp`.
                 *     - _normalize_ - optional function to normalize text & url of matched result
                 *       (for example, for @twitter mentions).
                 *
                 * `options`:
                 *
                 * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.
                 * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts
                 *   like version numbers. Default `false`.
                 * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.
                 *
                 **/
                function LinkifyIt(schemas, options) {
                    if (!(this instanceof LinkifyIt)) {
                        return new LinkifyIt(schemas, options);
                    }
                    if (!options) {
                        if (isOptionsObj(schemas)) {
                            options = schemas;
                            schemas = {};
                        }
                    }
                    this.__opts__ = assign({}, defaultOptions, options);

                    // Cache last tested result. Used to skip repeating steps on next `match` call.
                    this.__index__ = -1;
                    this.__last_index__ = -1; // Next scan position
                    this.__schema__ = '';
                    this.__text_cache__ = '';
                    this.__schemas__ = assign({}, defaultSchemas, schemas);
                    this.__compiled__ = {};
                    this.__tlds__ = tlds_default;
                    this.__tlds_replaced__ = false;
                    this.re = {};
                    compile(this);
                }

                /** chainable
                 * LinkifyIt#add(schema, definition)
                 * - schema (String): rule name (fixed pattern prefix)
                 * - definition (String|RegExp|Object): schema definition
                 *
                 * Add new rule definition. See constructor description for details.
                 **/
                LinkifyIt.prototype.add = function add(schema, definition) {
                    this.__schemas__[schema] = definition;
                    compile(this);
                    return this;
                };

                /** chainable
                 * LinkifyIt#set(options)
                 * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
                 *
                 * Set recognition options for links without schema.
                 **/
                LinkifyIt.prototype.set = function set(options) {
                    this.__opts__ = assign(this.__opts__, options);
                    return this;
                };

                /**
                 * LinkifyIt#test(text) -> Boolean
                 *
                 * Searches linkifiable pattern and returns `true` on success or `false` on fail.
                 **/
                LinkifyIt.prototype.test = function test(text) {
                    // Reset scan cache
                    this.__text_cache__ = text;
                    this.__index__ = -1;
                    if (!text.length) {
                        return false;
                    }
                    let m, ml, me, len, shift, next, re, tld_pos, at_pos;

                    // try to scan for link with schema - that's the most simple rule
                    if (this.re.schema_test.test(text)) {
                        re = this.re.schema_search;
                        re.lastIndex = 0;
                        while ((m = re.exec(text)) !== null) {
                            len = this.testSchemaAt(text, m[2], re.lastIndex);
                            if (len) {
                                this.__schema__ = m[2];
                                this.__index__ = m.index + m[1].length;
                                this.__last_index__ = m.index + m[0].length + len;
                                break;
                            }
                        }
                    }
                    if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
                        // guess schemaless links
                        tld_pos = text.search(this.re.host_fuzzy_test);
                        if (tld_pos >= 0) {
                            // if tld is located after found link - no need to check fuzzy pattern
                            if (this.__index__ < 0 || tld_pos < this.__index__) {
                                if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
                                    shift = ml.index + ml[1].length;
                                    if (this.__index__ < 0 || shift < this.__index__) {
                                        this.__schema__ = '';
                                        this.__index__ = shift;
                                        this.__last_index__ = ml.index + ml[0].length;
                                    }
                                }
                            }
                        }
                    }
                    if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
                        // guess schemaless emails
                        at_pos = text.indexOf('@');
                        if (at_pos >= 0) {
                            // We can't skip this check, because this cases are possible:
                            // 192.168.1.1@gmail.com, my.in@example.com
                            if ((me = text.match(this.re.email_fuzzy)) !== null) {
                                shift = me.index + me[1].length;
                                next = me.index + me[0].length;
                                if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) {
                                    this.__schema__ = 'mailto:';
                                    this.__index__ = shift;
                                    this.__last_index__ = next;
                                }
                            }
                        }
                    }
                    return this.__index__ >= 0;
                };

                /**
                 * LinkifyIt#pretest(text) -> Boolean
                 *
                 * Very quick check, that can give false positives. Returns true if link MAY BE
                 * can exists. Can be used for speed optimization, when you need to check that
                 * link NOT exists.
                 **/
                LinkifyIt.prototype.pretest = function pretest(text) {
                    return this.re.pretest.test(text);
                };

                /**
                 * LinkifyIt#testSchemaAt(text, name, position) -> Number
                 * - text (String): text to scan
                 * - name (String): rule (schema) name
                 * - position (Number): text offset to check from
                 *
                 * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly
                 * at given position. Returns length of found pattern (0 on fail).
                 **/
                LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {
                    // If not supported schema check requested - terminate
                    if (!this.__compiled__[schema.toLowerCase()]) {
                        return 0;
                    }
                    return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);
                };

                /**
                 * LinkifyIt#match(text) -> Array|null
                 *
                 * Returns array of found link descriptions or `null` on fail. We strongly
                 * recommend to use [[LinkifyIt#test]] first, for best speed.
                 *
                 * ##### Result match description
                 *
                 * - __schema__ - link schema, can be empty for fuzzy links, or `//` for
                 *   protocol-neutral  links.
                 * - __index__ - offset of matched text
                 * - __lastIndex__ - index of next char after mathch end
                 * - __raw__ - matched text
                 * - __text__ - normalized text
                 * - __url__ - link, generated from matched text
                 **/
                LinkifyIt.prototype.match = function match(text) {
                    const result = [];
                    let shift = 0;

                    // Try to take previous element from cache, if .test() called before
                    if (this.__index__ >= 0 && this.__text_cache__ === text) {
                        result.push(createMatch(this, shift));
                        shift = this.__last_index__;
                    }

                    // Cut head if cache was used
                    let tail = shift ? text.slice(shift) : text;

                    // Scan string until end reached
                    while (this.test(tail)) {
                        result.push(createMatch(this, shift));
                        tail = tail.slice(this.__last_index__);
                        shift += this.__last_index__;
                    }
                    if (result.length) {
                        return result;
                    }
                    return null;
                };

                /**
                 * LinkifyIt#matchAtStart(text) -> Match|null
                 *
                 * Returns fully-formed (not fuzzy) link if it starts at the beginning
                 * of the string, and null otherwise.
                 **/
                LinkifyIt.prototype.matchAtStart = function matchAtStart(text) {
                    // Reset scan cache
                    this.__text_cache__ = text;
                    this.__index__ = -1;
                    if (!text.length) return null;
                    const m = this.re.schema_at_start.exec(text);
                    if (!m) return null;
                    const len = this.testSchemaAt(text, m[2], m[0].length);
                    if (!len) return null;
                    this.__schema__ = m[2];
                    this.__index__ = m.index + m[1].length;
                    this.__last_index__ = m.index + m[0].length + len;
                    return createMatch(this, 0);
                };

                /** chainable
                 * LinkifyIt#tlds(list [, keepOld]) -> this
                 * - list (Array): list of tlds
                 * - keepOld (Boolean): merge with current list if `true` (`false` by default)
                 *
                 * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
                 * to avoid false positives. By default this algorythm used:
                 *
                 * - hostname with any 2-letter root zones are ok.
                 * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
                 *   are ok.
                 * - encoded (`xn--...`) root zones are ok.
                 *
                 * If list is replaced, then exact match for 2-chars root zones will be checked.
                 **/
                LinkifyIt.prototype.tlds = function tlds(list, keepOld) {
                    list = Array.isArray(list) ? list : [list];
                    if (!keepOld) {
                        this.__tlds__ = list.slice();
                        this.__tlds_replaced__ = true;
                        compile(this);
                        return this;
                    }
                    this.__tlds__ = this.__tlds__.concat(list).sort().filter(function(el, idx, arr) {
                        return el !== arr[idx - 1];
                    }).reverse();
                    compile(this);
                    return this;
                };

                /**
                 * LinkifyIt#normalize(match)
                 *
                 * Default normalizer (if schema does not define it's own).
                 **/
                LinkifyIt.prototype.normalize = function normalize(match) {
                    // Do minimal possible changes by default. Need to collect feedback prior
                    // to move forward https://github.com/markdown-it/linkify-it/issues/1

                    if (!match.schema) {
                        match.url = 'http://' + match.url;
                    }
                    if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {
                        match.url = 'mailto:' + match.url;
                    }
                };

                /**
                 * LinkifyIt#onCompile()
                 *
                 * Override to modify basic RegExp-s.
                 **/
                LinkifyIt.prototype.onCompile = function onCompile() {};
                module.exports = LinkifyIt;

                /***/
            }),

        /***/
        "../../../node_modules/markdown-it/dist/index.cjs.js":
            /*!***********************************************************!*\
              !*** ../../../node_modules/markdown-it/dist/index.cjs.js ***!
              \***********************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var mdurl = __webpack_require__( /*! mdurl */ "../../../node_modules/mdurl/build/index.cjs.js");
                var ucmicro = __webpack_require__( /*! uc.micro */ "../../../node_modules/uc.micro/build/index.cjs.js");
                var entities = __webpack_require__( /*! entities */ "../../../node_modules/entities/lib/index.js");
                var LinkifyIt = __webpack_require__( /*! linkify-it */ "../../../node_modules/linkify-it/build/index.cjs.js");
                var punycode = __webpack_require__( /*! punycode.js */ "../../../node_modules/punycode.js/punycode.es6.js");

                function _interopNamespaceDefault(e) {
                    var n = Object.create(null);
                    if (e) {
                        Object.keys(e).forEach(function(k) {
                            if (k !== 'default') {
                                var d = Object.getOwnPropertyDescriptor(e, k);
                                Object.defineProperty(n, k, d.get ? d : {
                                    enumerable: true,
                                    get: function() {
                                        return e[k];
                                    }
                                });
                            }
                        });
                    }
                    n.default = e;
                    return Object.freeze(n);
                }
                var mdurl__namespace = /*#__PURE__*/ _interopNamespaceDefault(mdurl);
                var ucmicro__namespace = /*#__PURE__*/ _interopNamespaceDefault(ucmicro);

                // Utilities
                //

                function _class(obj) {
                    return Object.prototype.toString.call(obj);
                }

                function isString(obj) {
                    return _class(obj) === '[object String]';
                }
                const _hasOwnProperty = Object.prototype.hasOwnProperty;

                function has(object, key) {
                    return _hasOwnProperty.call(object, key);
                }

                // Merge objects
                //
                function assign(obj /* from1, from2, from3, ... */ ) {
                    const sources = Array.prototype.slice.call(arguments, 1);
                    sources.forEach(function(source) {
                        if (!source) {
                            return;
                        }
                        if (typeof source !== 'object') {
                            throw new TypeError(source + 'must be object');
                        }
                        Object.keys(source).forEach(function(key) {
                            obj[key] = source[key];
                        });
                    });
                    return obj;
                }

                // Remove element from array and put another array at those position.
                // Useful for some operations with tokens
                function arrayReplaceAt(src, pos, newElements) {
                    return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));
                }

                function isValidEntityCode(c) {
                    /* eslint no-bitwise:0 */
                    // broken sequence
                    if (c >= 0xD800 && c <= 0xDFFF) {
                        return false;
                    }
                    // never used
                    if (c >= 0xFDD0 && c <= 0xFDEF) {
                        return false;
                    }
                    if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) {
                        return false;
                    }
                    // control codes
                    if (c >= 0x00 && c <= 0x08) {
                        return false;
                    }
                    if (c === 0x0B) {
                        return false;
                    }
                    if (c >= 0x0E && c <= 0x1F) {
                        return false;
                    }
                    if (c >= 0x7F && c <= 0x9F) {
                        return false;
                    }
                    // out of range
                    if (c > 0x10FFFF) {
                        return false;
                    }
                    return true;
                }

                function fromCodePoint(c) {
                    /* eslint no-bitwise:0 */
                    if (c > 0xffff) {
                        c -= 0x10000;
                        const surrogate1 = 0xd800 + (c >> 10);
                        const surrogate2 = 0xdc00 + (c & 0x3ff);
                        return String.fromCharCode(surrogate1, surrogate2);
                    }
                    return String.fromCharCode(c);
                }
                const UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g;
                const ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;
                const UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');
                const DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;

                function replaceEntityPattern(match, name) {
                    if (name.charCodeAt(0) === 0x23 /* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {
                        const code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);
                        if (isValidEntityCode(code)) {
                            return fromCodePoint(code);
                        }
                        return match;
                    }
                    const decoded = entities.decodeHTML(match);
                    if (decoded !== match) {
                        return decoded;
                    }
                    return match;
                }

                /* function replaceEntities(str) {
                  if (str.indexOf('&') < 0) { return str; }

                  return str.replace(ENTITY_RE, replaceEntityPattern);
                } */

                function unescapeMd(str) {
                    if (str.indexOf('\\') < 0) {
                        return str;
                    }
                    return str.replace(UNESCAPE_MD_RE, '$1');
                }

                function unescapeAll(str) {
                    if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) {
                        return str;
                    }
                    return str.replace(UNESCAPE_ALL_RE, function(match, escaped, entity) {
                        if (escaped) {
                            return escaped;
                        }
                        return replaceEntityPattern(match, entity);
                    });
                }
                const HTML_ESCAPE_TEST_RE = /[&<>"]/;
                const HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
                const HTML_REPLACEMENTS = {
                    '&': '&amp;',
                    '<': '&lt;',
                    '>': '&gt;',
                    '"': '&quot;'
                };

                function replaceUnsafeChar(ch) {
                    return HTML_REPLACEMENTS[ch];
                }

                function escapeHtml(str) {
                    if (HTML_ESCAPE_TEST_RE.test(str)) {
                        return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
                    }
                    return str;
                }
                const REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g;

                function escapeRE(str) {
                    return str.replace(REGEXP_ESCAPE_RE, '\\$&');
                }

                function isSpace(code) {
                    switch (code) {
                        case 0x09:
                        case 0x20:
                            return true;
                    }
                    return false;
                }

                // Zs (unicode class) || [\t\f\v\r\n]
                function isWhiteSpace(code) {
                    if (code >= 0x2000 && code <= 0x200A) {
                        return true;
                    }
                    switch (code) {
                        case 0x09: // \t
                        case 0x0A: // \n
                        case 0x0B: // \v
                        case 0x0C: // \f
                        case 0x0D: // \r
                        case 0x20:
                        case 0xA0:
                        case 0x1680:
                        case 0x202F:
                        case 0x205F:
                        case 0x3000:
                            return true;
                    }
                    return false;
                }

                /* eslint-disable max-len */

                // Currently without astral characters support.
                function isPunctChar(ch) {
                    return ucmicro__namespace.P.test(ch) || ucmicro__namespace.S.test(ch);
                }

                // Markdown ASCII punctuation characters.
                //
                // !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
                // http://spec.commonmark.org/0.15/#ascii-punctuation-character
                //
                // Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
                //
                function isMdAsciiPunct(ch) {
                    switch (ch) {
                        case 0x21 /* ! */ :
                        case 0x22 /* " */ :
                        case 0x23 /* # */ :
                        case 0x24 /* $ */ :
                        case 0x25 /* % */ :
                        case 0x26 /* & */ :
                        case 0x27 /* ' */ :
                        case 0x28 /* ( */ :
                        case 0x29 /* ) */ :
                        case 0x2A /* * */ :
                        case 0x2B /* + */ :
                        case 0x2C /* , */ :
                        case 0x2D /* - */ :
                        case 0x2E /* . */ :
                        case 0x2F /* / */ :
                        case 0x3A /* : */ :
                        case 0x3B /* ; */ :
                        case 0x3C /* < */ :
                        case 0x3D /* = */ :
                        case 0x3E /* > */ :
                        case 0x3F /* ? */ :
                        case 0x40 /* @ */ :
                        case 0x5B /* [ */ :
                        case 0x5C /* \ */ :
                        case 0x5D /* ] */ :
                        case 0x5E /* ^ */ :
                        case 0x5F /* _ */ :
                        case 0x60 /* ` */ :
                        case 0x7B /* { */ :
                        case 0x7C /* | */ :
                        case 0x7D /* } */ :
                        case 0x7E /* ~ */ :
                            return true;
                        default:
                            return false;
                    }
                }

                // Hepler to unify [reference labels].
                //
                function normalizeReference(str) {
                    // Trim and collapse whitespace
                    //
                    str = str.trim().replace(/\s+/g, ' ');

                    // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug
                    // fixed in v12 (couldn't find any details).
                    //
                    // So treat this one as a special case
                    // (remove this when node v10 is no longer supported).
                    //
                    if ('ẞ'.toLowerCase() === 'Ṿ') {
                        str = str.replace(/ẞ/g, 'ß');
                    }

                    // .toLowerCase().toUpperCase() should get rid of all differences
                    // between letter variants.
                    //
                    // Simple .toLowerCase() doesn't normalize 125 code points correctly,
                    // and .toUpperCase doesn't normalize 6 of them (list of exceptions:
                    // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently
                    // uppercased versions).
                    //
                    // Here's an example showing how it happens. Lets take greek letter omega:
                    // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)
                    //
                    // Unicode entries:
                    // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;
                    // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398
                    // 03D1;GREEK THETA SYMBOL;Ll;0;L;<compat> 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398
                    // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L;<compat> 0398;;;;N;;;;03B8;
                    //
                    // Case-insensitive comparison should treat all of them as equivalent.
                    //
                    // But .toLowerCase() doesn't change ϑ (it's already lowercase),
                    // and .toUpperCase() doesn't change ϴ (already uppercase).
                    //
                    // Applying first lower then upper case normalizes any character:
                    // '\u0398\u03f4\u03b8\u03d1'.toLowerCase().toUpperCase() === '\u0398\u0398\u0398\u0398'
                    //
                    // Note: this is equivalent to unicode case folding; unicode normalization
                    // is a different step that is not required here.
                    //
                    // Final result should be uppercased, because it's later stored in an object
                    // (this avoid a conflict with Object.prototype members,
                    // most notably, `__proto__`)
                    //
                    return str.toLowerCase().toUpperCase();
                }

                // Re-export libraries commonly used in both markdown-it and its plugins,
                // so plugins won't have to depend on them explicitly, which reduces their
                // bundled size (e.g. a browser build).
                //
                const lib = {
                    mdurl: mdurl__namespace,
                    ucmicro: ucmicro__namespace
                };
                var utils = /*#__PURE__*/ Object.freeze({
                    __proto__: null,
                    arrayReplaceAt: arrayReplaceAt,
                    assign: assign,
                    escapeHtml: escapeHtml,
                    escapeRE: escapeRE,
                    fromCodePoint: fromCodePoint,
                    has: has,
                    isMdAsciiPunct: isMdAsciiPunct,
                    isPunctChar: isPunctChar,
                    isSpace: isSpace,
                    isString: isString,
                    isValidEntityCode: isValidEntityCode,
                    isWhiteSpace: isWhiteSpace,
                    lib: lib,
                    normalizeReference: normalizeReference,
                    unescapeAll: unescapeAll,
                    unescapeMd: unescapeMd
                });

                // Parse link label
                //
                // this function assumes that first character ("[") already matches;
                // returns the end of the label
                //

                function parseLinkLabel(state, start, disableNested) {
                    let level, found, marker, prevPos;
                    const max = state.posMax;
                    const oldPos = state.pos;
                    state.pos = start + 1;
                    level = 1;
                    while (state.pos < max) {
                        marker = state.src.charCodeAt(state.pos);
                        if (marker === 0x5D /* ] */ ) {
                            level--;
                            if (level === 0) {
                                found = true;
                                break;
                            }
                        }
                        prevPos = state.pos;
                        state.md.inline.skipToken(state);
                        if (marker === 0x5B /* [ */ ) {
                            if (prevPos === state.pos - 1) {
                                // increase level if we find text `[`, which is not a part of any token
                                level++;
                            } else if (disableNested) {
                                state.pos = oldPos;
                                return -1;
                            }
                        }
                    }
                    let labelEnd = -1;
                    if (found) {
                        labelEnd = state.pos;
                    }

                    // restore old state
                    state.pos = oldPos;
                    return labelEnd;
                }

                // Parse link destination
                //

                function parseLinkDestination(str, start, max) {
                    let code;
                    let pos = start;
                    const result = {
                        ok: false,
                        pos: 0,
                        str: ''
                    };
                    if (str.charCodeAt(pos) === 0x3C /* < */ ) {
                        pos++;
                        while (pos < max) {
                            code = str.charCodeAt(pos);
                            if (code === 0x0A /* \n */ ) {
                                return result;
                            }
                            if (code === 0x3C /* < */ ) {
                                return result;
                            }
                            if (code === 0x3E /* > */ ) {
                                result.pos = pos + 1;
                                result.str = unescapeAll(str.slice(start + 1, pos));
                                result.ok = true;
                                return result;
                            }
                            if (code === 0x5C /* \ */ && pos + 1 < max) {
                                pos += 2;
                                continue;
                            }
                            pos++;
                        }

                        // no closing '>'
                        return result;
                    }

                    // this should be ... } else { ... branch

                    let level = 0;
                    while (pos < max) {
                        code = str.charCodeAt(pos);
                        if (code === 0x20) {
                            break;
                        }

                        // ascii control characters
                        if (code < 0x20 || code === 0x7F) {
                            break;
                        }
                        if (code === 0x5C /* \ */ && pos + 1 < max) {
                            if (str.charCodeAt(pos + 1) === 0x20) {
                                break;
                            }
                            pos += 2;
                            continue;
                        }
                        if (code === 0x28 /* ( */ ) {
                            level++;
                            if (level > 32) {
                                return result;
                            }
                        }
                        if (code === 0x29 /* ) */ ) {
                            if (level === 0) {
                                break;
                            }
                            level--;
                        }
                        pos++;
                    }
                    if (start === pos) {
                        return result;
                    }
                    if (level !== 0) {
                        return result;
                    }
                    result.str = unescapeAll(str.slice(start, pos));
                    result.pos = pos;
                    result.ok = true;
                    return result;
                }

                // Parse link title
                //

                // Parse link title within `str` in [start, max] range,
                // or continue previous parsing if `prev_state` is defined (equal to result of last execution).
                //
                function parseLinkTitle(str, start, max, prev_state) {
                    let code;
                    let pos = start;
                    const state = {
                        // if `true`, this is a valid link title
                        ok: false,
                        // if `true`, this link can be continued on the next line
                        can_continue: false,
                        // if `ok`, it's the position of the first character after the closing marker
                        pos: 0,
                        // if `ok`, it's the unescaped title
                        str: '',
                        // expected closing marker character code
                        marker: 0
                    };
                    if (prev_state) {
                        // this is a continuation of a previous parseLinkTitle call on the next line,
                        // used in reference links only
                        state.str = prev_state.str;
                        state.marker = prev_state.marker;
                    } else {
                        if (pos >= max) {
                            return state;
                        }
                        let marker = str.charCodeAt(pos);
                        if (marker !== 0x22 /* " */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */ ) {
                            return state;
                        }
                        start++;
                        pos++;

                        // if opening marker is "(", switch it to closing marker ")"
                        if (marker === 0x28) {
                            marker = 0x29;
                        }
                        state.marker = marker;
                    }
                    while (pos < max) {
                        code = str.charCodeAt(pos);
                        if (code === state.marker) {
                            state.pos = pos + 1;
                            state.str += unescapeAll(str.slice(start, pos));
                            state.ok = true;
                            return state;
                        } else if (code === 0x28 /* ( */ && state.marker === 0x29 /* ) */ ) {
                            return state;
                        } else if (code === 0x5C /* \ */ && pos + 1 < max) {
                            pos++;
                        }
                        pos++;
                    }

                    // no closing marker found, but this link title may continue on the next line (for references)
                    state.can_continue = true;
                    state.str += unescapeAll(str.slice(start, pos));
                    return state;
                }

                // Just a shortcut for bulk export

                var helpers = /*#__PURE__*/ Object.freeze({
                    __proto__: null,
                    parseLinkDestination: parseLinkDestination,
                    parseLinkLabel: parseLinkLabel,
                    parseLinkTitle: parseLinkTitle
                });

                /**
                 * class Renderer
                 *
                 * Generates HTML from parsed token stream. Each instance has independent
                 * copy of rules. Those can be rewritten with ease. Also, you can add new
                 * rules if you create plugin and adds new token types.
                 **/

                const default_rules = {};
                default_rules.code_inline = function(tokens, idx, options, env, slf) {
                    const token = tokens[idx];
                    return '<code' + slf.renderAttrs(token) + '>' + escapeHtml(token.content) + '</code>';
                };
                default_rules.code_block = function(tokens, idx, options, env, slf) {
                    const token = tokens[idx];
                    return '<pre' + slf.renderAttrs(token) + '><code>' + escapeHtml(tokens[idx].content) + '</code></pre>\n';
                };
                default_rules.fence = function(tokens, idx, options, env, slf) {
                    const token = tokens[idx];
                    const info = token.info ? unescapeAll(token.info).trim() : '';
                    let langName = '';
                    let langAttrs = '';
                    if (info) {
                        const arr = info.split(/(\s+)/g);
                        langName = arr[0];
                        langAttrs = arr.slice(2).join('');
                    }
                    let highlighted;
                    if (options.highlight) {
                        highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);
                    } else {
                        highlighted = escapeHtml(token.content);
                    }
                    if (highlighted.indexOf('<pre') === 0) {
                        return highlighted + '\n';
                    }

                    // If language exists, inject class gently, without modifying original token.
                    // May be, one day we will add .deepClone() for token and simplify this part, but
                    // now we prefer to keep things local.
                    if (info) {
                        const i = token.attrIndex('class');
                        const tmpAttrs = token.attrs ? token.attrs.slice() : [];
                        if (i < 0) {
                            tmpAttrs.push(['class', options.langPrefix + langName]);
                        } else {
                            tmpAttrs[i] = tmpAttrs[i].slice();
                            tmpAttrs[i][1] += ' ' + options.langPrefix + langName;
                        }

                        // Fake token just to render attributes
                        const tmpToken = {
                            attrs: tmpAttrs
                        };
                        return `<pre><code${slf.renderAttrs(tmpToken)}>${highlighted}</code></pre>\n`;
                    }
                    return `<pre><code${slf.renderAttrs(token)}>${highlighted}</code></pre>\n`;
                };
                default_rules.image = function(tokens, idx, options, env, slf) {
                    const token = tokens[idx];

                    // "alt" attr MUST be set, even if empty. Because it's mandatory and
                    // should be placed on proper position for tests.
                    //
                    // Replace content with actual value

                    token.attrs[token.attrIndex('alt')][1] = slf.renderInlineAsText(token.children, options, env);
                    return slf.renderToken(tokens, idx, options);
                };
                default_rules.hardbreak = function(tokens, idx, options /*, env */ ) {
                    return options.xhtmlOut ? '<br />\n' : '<br>\n';
                };
                default_rules.softbreak = function(tokens, idx, options /*, env */ ) {
                    return options.breaks ? options.xhtmlOut ? '<br />\n' : '<br>\n' : '\n';
                };
                default_rules.text = function(tokens, idx /*, options, env */ ) {
                    return escapeHtml(tokens[idx].content);
                };
                default_rules.html_block = function(tokens, idx /*, options, env */ ) {
                    return tokens[idx].content;
                };
                default_rules.html_inline = function(tokens, idx /*, options, env */ ) {
                    return tokens[idx].content;
                };

                /**
                 * new Renderer()
                 *
                 * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.
                 **/
                function Renderer() {
                    /**
                     * Renderer#rules -> Object
                     *
                     * Contains render rules for tokens. Can be updated and extended.
                     *
                     * ##### Example
                     *
                     * ```javascript
                     * var md = require('markdown-it')();
                     *
                     * md.renderer.rules.strong_open  = function () { return '<b>'; };
                     * md.renderer.rules.strong_close = function () { return '</b>'; };
                     *
                     * var result = md.renderInline(...);
                     * ```
                     *
                     * Each rule is called as independent static function with fixed signature:
                     *
                     * ```javascript
                     * function my_token_render(tokens, idx, options, env, renderer) {
                     *   // ...
                     *   return renderedHTML;
                     * }
                     * ```
                     *
                     * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs)
                     * for more details and examples.
                     **/
                    this.rules = assign({}, default_rules);
                }

                /**
                 * Renderer.renderAttrs(token) -> String
                 *
                 * Render token attributes to string.
                 **/
                Renderer.prototype.renderAttrs = function renderAttrs(token) {
                    let i, l, result;
                    if (!token.attrs) {
                        return '';
                    }
                    result = '';
                    for (i = 0, l = token.attrs.length; i < l; i++) {
                        result += ' ' + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"';
                    }
                    return result;
                };

                /**
                 * Renderer.renderToken(tokens, idx, options) -> String
                 * - tokens (Array): list of tokens
                 * - idx (Numbed): token index to render
                 * - options (Object): params of parser instance
                 *
                 * Default token renderer. Can be overriden by custom function
                 * in [[Renderer#rules]].
                 **/
                Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
                    const token = tokens[idx];
                    let result = '';

                    // Tight list paragraphs
                    if (token.hidden) {
                        return '';
                    }

                    // Insert a newline between hidden paragraph and subsequent opening
                    // block-level tag.
                    //
                    // For example, here we should insert a newline before blockquote:
                    //  - a
                    //    >
                    //
                    if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {
                        result += '\n';
                    }

                    // Add token name, e.g. `<img`
                    result += (token.nesting === -1 ? '</' : '<') + token.tag;

                    // Encode attributes, e.g. `<img src="foo"`
                    result += this.renderAttrs(token);

                    // Add a slash for self-closing tags, e.g. `<img src="foo" /`
                    if (token.nesting === 0 && options.xhtmlOut) {
                        result += ' /';
                    }

                    // Check if we need to add a newline after this tag
                    let needLf = false;
                    if (token.block) {
                        needLf = true;
                        if (token.nesting === 1) {
                            if (idx + 1 < tokens.length) {
                                const nextToken = tokens[idx + 1];
                                if (nextToken.type === 'inline' || nextToken.hidden) {
                                    // Block-level tag containing an inline tag.
                                    //
                                    needLf = false;
                                } else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {
                                    // Opening tag + closing tag of the same type. E.g. `<li></li>`.
                                    //
                                    needLf = false;
                                }
                            }
                        }
                    }
                    result += needLf ? '>\n' : '>';
                    return result;
                };

                /**
                 * Renderer.renderInline(tokens, options, env) -> String
                 * - tokens (Array): list on block tokens to render
                 * - options (Object): params of parser instance
                 * - env (Object): additional data from parsed input (references, for example)
                 *
                 * The same as [[Renderer.render]], but for single token of `inline` type.
                 **/
                Renderer.prototype.renderInline = function(tokens, options, env) {
                    let result = '';
                    const rules = this.rules;
                    for (let i = 0, len = tokens.length; i < len; i++) {
                        const type = tokens[i].type;
                        if (typeof rules[type] !== 'undefined') {
                            result += rules[type](tokens, i, options, env, this);
                        } else {
                            result += this.renderToken(tokens, i, options);
                        }
                    }
                    return result;
                };

                /** internal
                 * Renderer.renderInlineAsText(tokens, options, env) -> String
                 * - tokens (Array): list on block tokens to render
                 * - options (Object): params of parser instance
                 * - env (Object): additional data from parsed input (references, for example)
                 *
                 * Special kludge for image `alt` attributes to conform CommonMark spec.
                 * Don't try to use it! Spec requires to show `alt` content with stripped markup,
                 * instead of simple escaping.
                 **/
                Renderer.prototype.renderInlineAsText = function(tokens, options, env) {
                    let result = '';
                    for (let i = 0, len = tokens.length; i < len; i++) {
                        switch (tokens[i].type) {
                            case 'text':
                                result += tokens[i].content;
                                break;
                            case 'image':
                                result += this.renderInlineAsText(tokens[i].children, options, env);
                                break;
                            case 'html_inline':
                            case 'html_block':
                                result += tokens[i].content;
                                break;
                            case 'softbreak':
                            case 'hardbreak':
                                result += '\n';
                                break;
                                // all other tokens are skipped
                        }
                    }
                    return result;
                };

                /**
                 * Renderer.render(tokens, options, env) -> String
                 * - tokens (Array): list on block tokens to render
                 * - options (Object): params of parser instance
                 * - env (Object): additional data from parsed input (references, for example)
                 *
                 * Takes token stream and generates HTML. Probably, you will never need to call
                 * this method directly.
                 **/
                Renderer.prototype.render = function(tokens, options, env) {
                    let result = '';
                    const rules = this.rules;
                    for (let i = 0, len = tokens.length; i < len; i++) {
                        const type = tokens[i].type;
                        if (type === 'inline') {
                            result += this.renderInline(tokens[i].children, options, env);
                        } else if (typeof rules[type] !== 'undefined') {
                            result += rules[type](tokens, i, options, env, this);
                        } else {
                            result += this.renderToken(tokens, i, options, env);
                        }
                    }
                    return result;
                };

                /**
                 * class Ruler
                 *
                 * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
                 * [[MarkdownIt#inline]] to manage sequences of functions (rules):
                 *
                 * - keep rules in defined order
                 * - assign the name to each rule
                 * - enable/disable rules
                 * - add/replace rules
                 * - allow assign rules to additional named chains (in the same)
                 * - cacheing lists of active rules
                 *
                 * You will not need use this class directly until write plugins. For simple
                 * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and
                 * [[MarkdownIt.use]].
                 **/

                /**
                 * new Ruler()
                 **/
                function Ruler() {
                    // List of added rules. Each element is:
                    //
                    // {
                    //   name: XXX,
                    //   enabled: Boolean,
                    //   fn: Function(),
                    //   alt: [ name2, name3 ]
                    // }
                    //
                    this.__rules__ = [];

                    // Cached rule chains.
                    //
                    // First level - chain name, '' for default.
                    // Second level - diginal anchor for fast filtering by charcodes.
                    //
                    this.__cache__ = null;
                }

                // Helper methods, should not be used directly

                // Find rule index by name
                //
                Ruler.prototype.__find__ = function(name) {
                    for (let i = 0; i < this.__rules__.length; i++) {
                        if (this.__rules__[i].name === name) {
                            return i;
                        }
                    }
                    return -1;
                };

                // Build rules lookup cache
                //
                Ruler.prototype.__compile__ = function() {
                    const self = this;
                    const chains = [''];

                    // collect unique names
                    self.__rules__.forEach(function(rule) {
                        if (!rule.enabled) {
                            return;
                        }
                        rule.alt.forEach(function(altName) {
                            if (chains.indexOf(altName) < 0) {
                                chains.push(altName);
                            }
                        });
                    });
                    self.__cache__ = {};
                    chains.forEach(function(chain) {
                        self.__cache__[chain] = [];
                        self.__rules__.forEach(function(rule) {
                            if (!rule.enabled) {
                                return;
                            }
                            if (chain && rule.alt.indexOf(chain) < 0) {
                                return;
                            }
                            self.__cache__[chain].push(rule.fn);
                        });
                    });
                };

                /**
                 * Ruler.at(name, fn [, options])
                 * - name (String): rule name to replace.
                 * - fn (Function): new rule function.
                 * - options (Object): new rule options (not mandatory).
                 *
                 * Replace rule by name with new function & options. Throws error if name not
                 * found.
                 *
                 * ##### Options:
                 *
                 * - __alt__ - array with names of "alternate" chains.
                 *
                 * ##### Example
                 *
                 * Replace existing typographer replacement rule with new one:
                 *
                 * ```javascript
                 * var md = require('markdown-it')();
                 *
                 * md.core.ruler.at('replacements', function replace(state) {
                 *   //...
                 * });
                 * ```
                 **/
                Ruler.prototype.at = function(name, fn, options) {
                    const index = this.__find__(name);
                    const opt = options || {};
                    if (index === -1) {
                        throw new Error('Parser rule not found: ' + name);
                    }
                    this.__rules__[index].fn = fn;
                    this.__rules__[index].alt = opt.alt || [];
                    this.__cache__ = null;
                };

                /**
                 * Ruler.before(beforeName, ruleName, fn [, options])
                 * - beforeName (String): new rule will be added before this one.
                 * - ruleName (String): name of added rule.
                 * - fn (Function): rule function.
                 * - options (Object): rule options (not mandatory).
                 *
                 * Add new rule to chain before one with given name. See also
                 * [[Ruler.after]], [[Ruler.push]].
                 *
                 * ##### Options:
                 *
                 * - __alt__ - array with names of "alternate" chains.
                 *
                 * ##### Example
                 *
                 * ```javascript
                 * var md = require('markdown-it')();
                 *
                 * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
                 *   //...
                 * });
                 * ```
                 **/
                Ruler.prototype.before = function(beforeName, ruleName, fn, options) {
                    const index = this.__find__(beforeName);
                    const opt = options || {};
                    if (index === -1) {
                        throw new Error('Parser rule not found: ' + beforeName);
                    }
                    this.__rules__.splice(index, 0, {
                        name: ruleName,
                        enabled: true,
                        fn,
                        alt: opt.alt || []
                    });
                    this.__cache__ = null;
                };

                /**
                 * Ruler.after(afterName, ruleName, fn [, options])
                 * - afterName (String): new rule will be added after this one.
                 * - ruleName (String): name of added rule.
                 * - fn (Function): rule function.
                 * - options (Object): rule options (not mandatory).
                 *
                 * Add new rule to chain after one with given name. See also
                 * [[Ruler.before]], [[Ruler.push]].
                 *
                 * ##### Options:
                 *
                 * - __alt__ - array with names of "alternate" chains.
                 *
                 * ##### Example
                 *
                 * ```javascript
                 * var md = require('markdown-it')();
                 *
                 * md.inline.ruler.after('text', 'my_rule', function replace(state) {
                 *   //...
                 * });
                 * ```
                 **/
                Ruler.prototype.after = function(afterName, ruleName, fn, options) {
                    const index = this.__find__(afterName);
                    const opt = options || {};
                    if (index === -1) {
                        throw new Error('Parser rule not found: ' + afterName);
                    }
                    this.__rules__.splice(index + 1, 0, {
                        name: ruleName,
                        enabled: true,
                        fn,
                        alt: opt.alt || []
                    });
                    this.__cache__ = null;
                };

                /**
                 * Ruler.push(ruleName, fn [, options])
                 * - ruleName (String): name of added rule.
                 * - fn (Function): rule function.
                 * - options (Object): rule options (not mandatory).
                 *
                 * Push new rule to the end of chain. See also
                 * [[Ruler.before]], [[Ruler.after]].
                 *
                 * ##### Options:
                 *
                 * - __alt__ - array with names of "alternate" chains.
                 *
                 * ##### Example
                 *
                 * ```javascript
                 * var md = require('markdown-it')();
                 *
                 * md.core.ruler.push('my_rule', function replace(state) {
                 *   //...
                 * });
                 * ```
                 **/
                Ruler.prototype.push = function(ruleName, fn, options) {
                    const opt = options || {};
                    this.__rules__.push({
                        name: ruleName,
                        enabled: true,
                        fn,
                        alt: opt.alt || []
                    });
                    this.__cache__ = null;
                };

                /**
                 * Ruler.enable(list [, ignoreInvalid]) -> Array
                 * - list (String|Array): list of rule names to enable.
                 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
                 *
                 * Enable rules with given names. If any rule name not found - throw Error.
                 * Errors can be disabled by second param.
                 *
                 * Returns list of found rule names (if no exception happened).
                 *
                 * See also [[Ruler.disable]], [[Ruler.enableOnly]].
                 **/
                Ruler.prototype.enable = function(list, ignoreInvalid) {
                    if (!Array.isArray(list)) {
                        list = [list];
                    }
                    const result = [];

                    // Search by name and enable
                    list.forEach(function(name) {
                        const idx = this.__find__(name);
                        if (idx < 0) {
                            if (ignoreInvalid) {
                                return;
                            }
                            throw new Error('Rules manager: invalid rule name ' + name);
                        }
                        this.__rules__[idx].enabled = true;
                        result.push(name);
                    }, this);
                    this.__cache__ = null;
                    return result;
                };

                /**
                 * Ruler.enableOnly(list [, ignoreInvalid])
                 * - list (String|Array): list of rule names to enable (whitelist).
                 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
                 *
                 * Enable rules with given names, and disable everything else. If any rule name
                 * not found - throw Error. Errors can be disabled by second param.
                 *
                 * See also [[Ruler.disable]], [[Ruler.enable]].
                 **/
                Ruler.prototype.enableOnly = function(list, ignoreInvalid) {
                    if (!Array.isArray(list)) {
                        list = [list];
                    }
                    this.__rules__.forEach(function(rule) {
                        rule.enabled = false;
                    });
                    this.enable(list, ignoreInvalid);
                };

                /**
                 * Ruler.disable(list [, ignoreInvalid]) -> Array
                 * - list (String|Array): list of rule names to disable.
                 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
                 *
                 * Disable rules with given names. If any rule name not found - throw Error.
                 * Errors can be disabled by second param.
                 *
                 * Returns list of found rule names (if no exception happened).
                 *
                 * See also [[Ruler.enable]], [[Ruler.enableOnly]].
                 **/
                Ruler.prototype.disable = function(list, ignoreInvalid) {
                    if (!Array.isArray(list)) {
                        list = [list];
                    }
                    const result = [];

                    // Search by name and disable
                    list.forEach(function(name) {
                        const idx = this.__find__(name);
                        if (idx < 0) {
                            if (ignoreInvalid) {
                                return;
                            }
                            throw new Error('Rules manager: invalid rule name ' + name);
                        }
                        this.__rules__[idx].enabled = false;
                        result.push(name);
                    }, this);
                    this.__cache__ = null;
                    return result;
                };

                /**
                 * Ruler.getRules(chainName) -> Array
                 *
                 * Return array of active functions (rules) for given chain name. It analyzes
                 * rules configuration, compiles caches if not exists and returns result.
                 *
                 * Default chain name is `''` (empty string). It can't be skipped. That's
                 * done intentionally, to keep signature monomorphic for high speed.
                 **/
                Ruler.prototype.getRules = function(chainName) {
                    if (this.__cache__ === null) {
                        this.__compile__();
                    }

                    // Chain can be empty, if rules disabled. But we still have to return Array.
                    return this.__cache__[chainName] || [];
                };

                // Token class

                /**
                 * class Token
                 **/

                /**
                 * new Token(type, tag, nesting)
                 *
                 * Create new token and fill passed properties.
                 **/
                function Token(type, tag, nesting) {
                    /**
                     * Token#type -> String
                     *
                     * Type of the token (string, e.g. "paragraph_open")
                     **/
                    this.type = type;

                    /**
                     * Token#tag -> String
                     *
                     * html tag name, e.g. "p"
                     **/
                    this.tag = tag;

                    /**
                     * Token#attrs -> Array
                     *
                     * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
                     **/
                    this.attrs = null;

                    /**
                     * Token#map -> Array
                     *
                     * Source map info. Format: `[ line_begin, line_end ]`
                     **/
                    this.map = null;

                    /**
                     * Token#nesting -> Number
                     *
                     * Level change (number in {-1, 0, 1} set), where:
                     *
                     * -  `1` means the tag is opening
                     * -  `0` means the tag is self-closing
                     * - `-1` means the tag is closing
                     **/
                    this.nesting = nesting;

                    /**
                     * Token#level -> Number
                     *
                     * nesting level, the same as `state.level`
                     **/
                    this.level = 0;

                    /**
                     * Token#children -> Array
                     *
                     * An array of child nodes (inline and img tokens)
                     **/
                    this.children = null;

                    /**
                     * Token#content -> String
                     *
                     * In a case of self-closing tag (code, html, fence, etc.),
                     * it has contents of this tag.
                     **/
                    this.content = '';

                    /**
                     * Token#markup -> String
                     *
                     * '*' or '_' for emphasis, fence string for fence, etc.
                     **/
                    this.markup = '';

                    /**
                     * Token#info -> String
                     *
                     * Additional information:
                     *
                     * - Info string for "fence" tokens
                     * - The value "auto" for autolink "link_open" and "link_close" tokens
                     * - The string value of the item marker for ordered-list "list_item_open" tokens
                     **/
                    this.info = '';

                    /**
                     * Token#meta -> Object
                     *
                     * A place for plugins to store an arbitrary data
                     **/
                    this.meta = null;

                    /**
                     * Token#block -> Boolean
                     *
                     * True for block-level tokens, false for inline tokens.
                     * Used in renderer to calculate line breaks
                     **/
                    this.block = false;

                    /**
                     * Token#hidden -> Boolean
                     *
                     * If it's true, ignore this element when rendering. Used for tight lists
                     * to hide paragraphs.
                     **/
                    this.hidden = false;
                }

                /**
                 * Token.attrIndex(name) -> Number
                 *
                 * Search attribute index by name.
                 **/
                Token.prototype.attrIndex = function attrIndex(name) {
                    if (!this.attrs) {
                        return -1;
                    }
                    const attrs = this.attrs;
                    for (let i = 0, len = attrs.length; i < len; i++) {
                        if (attrs[i][0] === name) {
                            return i;
                        }
                    }
                    return -1;
                };

                /**
                 * Token.attrPush(attrData)
                 *
                 * Add `[ name, value ]` attribute to list. Init attrs if necessary
                 **/
                Token.prototype.attrPush = function attrPush(attrData) {
                    if (this.attrs) {
                        this.attrs.push(attrData);
                    } else {
                        this.attrs = [attrData];
                    }
                };

                /**
                 * Token.attrSet(name, value)
                 *
                 * Set `name` attribute to `value`. Override old value if exists.
                 **/
                Token.prototype.attrSet = function attrSet(name, value) {
                    const idx = this.attrIndex(name);
                    const attrData = [name, value];
                    if (idx < 0) {
                        this.attrPush(attrData);
                    } else {
                        this.attrs[idx] = attrData;
                    }
                };

                /**
                 * Token.attrGet(name)
                 *
                 * Get the value of attribute `name`, or null if it does not exist.
                 **/
                Token.prototype.attrGet = function attrGet(name) {
                    const idx = this.attrIndex(name);
                    let value = null;
                    if (idx >= 0) {
                        value = this.attrs[idx][1];
                    }
                    return value;
                };

                /**
                 * Token.attrJoin(name, value)
                 *
                 * Join value to existing attribute via space. Or create new attribute if not
                 * exists. Useful to operate with token classes.
                 **/
                Token.prototype.attrJoin = function attrJoin(name, value) {
                    const idx = this.attrIndex(name);
                    if (idx < 0) {
                        this.attrPush([name, value]);
                    } else {
                        this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;
                    }
                };

                // Core state object
                //

                function StateCore(src, md, env) {
                    this.src = src;
                    this.env = env;
                    this.tokens = [];
                    this.inlineMode = false;
                    this.md = md; // link to parser instance
                }

                // re-export Token class to use in core rules
                StateCore.prototype.Token = Token;

                // Normalize input string

                // https://spec.commonmark.org/0.29/#line-ending
                const NEWLINES_RE = /\r\n?|\n/g;
                const NULL_RE = /\0/g;

                function normalize(state) {
                    let str;

                    // Normalize newlines
                    str = state.src.replace(NEWLINES_RE, '\n');

                    // Replace NULL characters
                    str = str.replace(NULL_RE, '\uFFFD');
                    state.src = str;
                }

                function block(state) {
                    let token;
                    if (state.inlineMode) {
                        token = new state.Token('inline', '', 0);
                        token.content = state.src;
                        token.map = [0, 1];
                        token.children = [];
                        state.tokens.push(token);
                    } else {
                        state.md.block.parse(state.src, state.md, state.env, state.tokens);
                    }
                }

                function inline(state) {
                    const tokens = state.tokens;

                    // Parse inlines
                    for (let i = 0, l = tokens.length; i < l; i++) {
                        const tok = tokens[i];
                        if (tok.type === 'inline') {
                            state.md.inline.parse(tok.content, state.md, state.env, tok.children);
                        }
                    }
                }

                // Replace link-like texts with link nodes.
                //
                // Currently restricted by `md.validateLink()` to http/https/ftp
                //

                function isLinkOpen$1(str) {
                    return /^<a[>\s]/i.test(str);
                }

                function isLinkClose$1(str) {
                    return /^<\/a\s*>/i.test(str);
                }

                function linkify$1(state) {
                    const blockTokens = state.tokens;
                    if (!state.md.options.linkify) {
                        return;
                    }
                    for (let j = 0, l = blockTokens.length; j < l; j++) {
                        if (blockTokens[j].type !== 'inline' || !state.md.linkify.pretest(blockTokens[j].content)) {
                            continue;
                        }
                        let tokens = blockTokens[j].children;
                        let htmlLinkLevel = 0;

                        // We scan from the end, to keep position when new tags added.
                        // Use reversed logic in links start/end match
                        for (let i = tokens.length - 1; i >= 0; i--) {
                            const currentToken = tokens[i];

                            // Skip content of markdown links
                            if (currentToken.type === 'link_close') {
                                i--;
                                while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {
                                    i--;
                                }
                                continue;
                            }

                            // Skip content of html tag links
                            if (currentToken.type === 'html_inline') {
                                if (isLinkOpen$1(currentToken.content) && htmlLinkLevel > 0) {
                                    htmlLinkLevel--;
                                }
                                if (isLinkClose$1(currentToken.content)) {
                                    htmlLinkLevel++;
                                }
                            }
                            if (htmlLinkLevel > 0) {
                                continue;
                            }
                            if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {
                                const text = currentToken.content;
                                let links = state.md.linkify.match(text);

                                // Now split string to nodes
                                const nodes = [];
                                let level = currentToken.level;
                                let lastPos = 0;

                                // forbid escape sequence at the start of the string,
                                // this avoids http\://example.com/ from being linkified as
                                // http:<a href="//example.com/">//example.com/</a>
                                if (links.length > 0 && links[0].index === 0 && i > 0 && tokens[i - 1].type === 'text_special') {
                                    links = links.slice(1);
                                }
                                for (let ln = 0; ln < links.length; ln++) {
                                    const url = links[ln].url;
                                    const fullUrl = state.md.normalizeLink(url);
                                    if (!state.md.validateLink(fullUrl)) {
                                        continue;
                                    }
                                    let urlText = links[ln].text;

                                    // Linkifier might send raw hostnames like "example.com", where url
                                    // starts with domain name. So we prepend http:// in those cases,
                                    // and remove it afterwards.
                                    //
                                    if (!links[ln].schema) {
                                        urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\/\//, '');
                                    } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {
                                        urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');
                                    } else {
                                        urlText = state.md.normalizeLinkText(urlText);
                                    }
                                    const pos = links[ln].index;
                                    if (pos > lastPos) {
                                        const token = new state.Token('text', '', 0);
                                        token.content = text.slice(lastPos, pos);
                                        token.level = level;
                                        nodes.push(token);
                                    }
                                    const token_o = new state.Token('link_open', 'a', 1);
                                    token_o.attrs = [
                                        ['href', fullUrl]
                                    ];
                                    token_o.level = level++;
                                    token_o.markup = 'linkify';
                                    token_o.info = 'auto';
                                    nodes.push(token_o);
                                    const token_t = new state.Token('text', '', 0);
                                    token_t.content = urlText;
                                    token_t.level = level;
                                    nodes.push(token_t);
                                    const token_c = new state.Token('link_close', 'a', -1);
                                    token_c.level = --level;
                                    token_c.markup = 'linkify';
                                    token_c.info = 'auto';
                                    nodes.push(token_c);
                                    lastPos = links[ln].lastIndex;
                                }
                                if (lastPos < text.length) {
                                    const token = new state.Token('text', '', 0);
                                    token.content = text.slice(lastPos);
                                    token.level = level;
                                    nodes.push(token);
                                }

                                // replace current node
                                blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
                            }
                        }
                    }
                }

                // Simple typographic replacements
                //
                // (c) (C) → ©
                // (tm) (TM) → ™
                // (r) (R) → ®
                // +- → ±
                // ... → … (also ?.... → ?.., !.... → !..)
                // ???????? → ???, !!!!! → !!!, `,,` → `,`
                // -- → &ndash;, --- → &mdash;
                //

                // TODO:
                // - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
                // - multiplications 2 x 4 -> 2 × 4

                const RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/;

                // Workaround for phantomjs - need regex without /g flag,
                // or root check will fail every second time
                const SCOPED_ABBR_TEST_RE = /\((c|tm|r)\)/i;
                const SCOPED_ABBR_RE = /\((c|tm|r)\)/ig;
                const SCOPED_ABBR = {
                    c: '©',
                    r: '®',
                    tm: '™'
                };

                function replaceFn(match, name) {
                    return SCOPED_ABBR[name.toLowerCase()];
                }

                function replace_scoped(inlineTokens) {
                    let inside_autolink = 0;
                    for (let i = inlineTokens.length - 1; i >= 0; i--) {
                        const token = inlineTokens[i];
                        if (token.type === 'text' && !inside_autolink) {
                            token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);
                        }
                        if (token.type === 'link_open' && token.info === 'auto') {
                            inside_autolink--;
                        }
                        if (token.type === 'link_close' && token.info === 'auto') {
                            inside_autolink++;
                        }
                    }
                }

                function replace_rare(inlineTokens) {
                    let inside_autolink = 0;
                    for (let i = inlineTokens.length - 1; i >= 0; i--) {
                        const token = inlineTokens[i];
                        if (token.type === 'text' && !inside_autolink) {
                            if (RARE_RE.test(token.content)) {
                                token.content = token.content.replace(/\+-/g, '±')
                                    // .., ..., ....... -> …
                                    // but ?..... & !..... -> ?.. & !..
                                    .replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..').replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')
                                    // em-dash
                                    .replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\u2014')
                                    // en-dash
                                    .replace(/(^|\s)--(?=\s|$)/mg, '$1\u2013').replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, '$1\u2013');
                            }
                        }
                        if (token.type === 'link_open' && token.info === 'auto') {
                            inside_autolink--;
                        }
                        if (token.type === 'link_close' && token.info === 'auto') {
                            inside_autolink++;
                        }
                    }
                }

                function replace(state) {
                    let blkIdx;
                    if (!state.md.options.typographer) {
                        return;
                    }
                    for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
                        if (state.tokens[blkIdx].type !== 'inline') {
                            continue;
                        }
                        if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {
                            replace_scoped(state.tokens[blkIdx].children);
                        }
                        if (RARE_RE.test(state.tokens[blkIdx].content)) {
                            replace_rare(state.tokens[blkIdx].children);
                        }
                    }
                }

                // Convert straight quotation marks to typographic ones
                //

                const QUOTE_TEST_RE = /['"]/;
                const QUOTE_RE = /['"]/g;
                const APOSTROPHE = '\u2019'; /* ’ */

                function replaceAt(str, index, ch) {
                    return str.slice(0, index) + ch + str.slice(index + 1);
                }

                function process_inlines(tokens, state) {
                    let j;
                    const stack = [];
                    for (let i = 0; i < tokens.length; i++) {
                        const token = tokens[i];
                        const thisLevel = tokens[i].level;
                        for (j = stack.length - 1; j >= 0; j--) {
                            if (stack[j].level <= thisLevel) {
                                break;
                            }
                        }
                        stack.length = j + 1;
                        if (token.type !== 'text') {
                            continue;
                        }
                        let text = token.content;
                        let pos = 0;
                        let max = text.length;

                        /* eslint no-labels:0,block-scoped-var:0 */
                        OUTER: while (pos < max) {
                            QUOTE_RE.lastIndex = pos;
                            const t = QUOTE_RE.exec(text);
                            if (!t) {
                                break;
                            }
                            let canOpen = true;
                            let canClose = true;
                            pos = t.index + 1;
                            const isSingle = t[0] === "'";

                            // Find previous character,
                            // default to space if it's the beginning of the line
                            //
                            let lastChar = 0x20;
                            if (t.index - 1 >= 0) {
                                lastChar = text.charCodeAt(t.index - 1);
                            } else {
                                for (j = i - 1; j >= 0; j--) {
                                    if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20
                                    if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'

                                    lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
                                    break;
                                }
                            }

                            // Find next character,
                            // default to space if it's the end of the line
                            //
                            let nextChar = 0x20;
                            if (pos < max) {
                                nextChar = text.charCodeAt(pos);
                            } else {
                                for (j = i + 1; j < tokens.length; j++) {
                                    if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20
                                    if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'

                                    nextChar = tokens[j].content.charCodeAt(0);
                                    break;
                                }
                            }
                            const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
                            const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
                            const isLastWhiteSpace = isWhiteSpace(lastChar);
                            const isNextWhiteSpace = isWhiteSpace(nextChar);
                            if (isNextWhiteSpace) {
                                canOpen = false;
                            } else if (isNextPunctChar) {
                                if (!(isLastWhiteSpace || isLastPunctChar)) {
                                    canOpen = false;
                                }
                            }
                            if (isLastWhiteSpace) {
                                canClose = false;
                            } else if (isLastPunctChar) {
                                if (!(isNextWhiteSpace || isNextPunctChar)) {
                                    canClose = false;
                                }
                            }
                            if (nextChar === 0x22 /* " */ && t[0] === '"') {
                                if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */ ) {
                                    // special case: 1"" - count first quote as an inch
                                    canClose = canOpen = false;
                                }
                            }
                            if (canOpen && canClose) {
                                // Replace quotes in the middle of punctuation sequence, but not
                                // in the middle of the words, i.e.:
                                //
                                // 1. foo " bar " baz - not replaced
                                // 2. foo-"-bar-"-baz - replaced
                                // 3. foo"bar"baz     - not replaced
                                //
                                canOpen = isLastPunctChar;
                                canClose = isNextPunctChar;
                            }
                            if (!canOpen && !canClose) {
                                // middle of word
                                if (isSingle) {
                                    token.content = replaceAt(token.content, t.index, APOSTROPHE);
                                }
                                continue;
                            }
                            if (canClose) {
                                // this could be a closing quote, rewind the stack to get a match
                                for (j = stack.length - 1; j >= 0; j--) {
                                    let item = stack[j];
                                    if (stack[j].level < thisLevel) {
                                        break;
                                    }
                                    if (item.single === isSingle && stack[j].level === thisLevel) {
                                        item = stack[j];
                                        let openQuote;
                                        let closeQuote;
                                        if (isSingle) {
                                            openQuote = state.md.options.quotes[2];
                                            closeQuote = state.md.options.quotes[3];
                                        } else {
                                            openQuote = state.md.options.quotes[0];
                                            closeQuote = state.md.options.quotes[1];
                                        }

                                        // replace token.content *before* tokens[item.token].content,
                                        // because, if they are pointing at the same token, replaceAt
                                        // could mess up indices when quote length != 1
                                        token.content = replaceAt(token.content, t.index, closeQuote);
                                        tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, openQuote);
                                        pos += closeQuote.length - 1;
                                        if (item.token === i) {
                                            pos += openQuote.length - 1;
                                        }
                                        text = token.content;
                                        max = text.length;
                                        stack.length = j;
                                        continue OUTER;
                                    }
                                }
                            }
                            if (canOpen) {
                                stack.push({
                                    token: i,
                                    pos: t.index,
                                    single: isSingle,
                                    level: thisLevel
                                });
                            } else if (canClose && isSingle) {
                                token.content = replaceAt(token.content, t.index, APOSTROPHE);
                            }
                        }
                    }
                }

                function smartquotes(state) {
                    /* eslint max-depth:0 */
                    if (!state.md.options.typographer) {
                        return;
                    }
                    for (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
                        if (state.tokens[blkIdx].type !== 'inline' || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {
                            continue;
                        }
                        process_inlines(state.tokens[blkIdx].children, state);
                    }
                }

                // Join raw text tokens with the rest of the text
                //
                // This is set as a separate rule to provide an opportunity for plugins
                // to run text replacements after text join, but before escape join.
                //
                // For example, `\:)` shouldn't be replaced with an emoji.
                //

                function text_join(state) {
                    let curr, last;
                    const blockTokens = state.tokens;
                    const l = blockTokens.length;
                    for (let j = 0; j < l; j++) {
                        if (blockTokens[j].type !== 'inline') continue;
                        const tokens = blockTokens[j].children;
                        const max = tokens.length;
                        for (curr = 0; curr < max; curr++) {
                            if (tokens[curr].type === 'text_special') {
                                tokens[curr].type = 'text';
                            }
                        }
                        for (curr = last = 0; curr < max; curr++) {
                            if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') {
                                // collapse two adjacent text nodes
                                tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
                            } else {
                                if (curr !== last) {
                                    tokens[last] = tokens[curr];
                                }
                                last++;
                            }
                        }
                        if (curr !== last) {
                            tokens.length = last;
                        }
                    }
                }

                /** internal
                 * class Core
                 *
                 * Top-level rules executor. Glues block/inline parsers and does intermediate
                 * transformations.
                 **/

                const _rules$2 = [
                    ['normalize', normalize],
                    ['block', block],
                    ['inline', inline],
                    ['linkify', linkify$1],
                    ['replacements', replace],
                    ['smartquotes', smartquotes],
                    // `text_join` finds `text_special` tokens (for escape sequences)
                    // and joins them with the rest of the text
                    ['text_join', text_join]
                ];

                /**
                 * new Core()
                 **/
                function Core() {
                    /**
                     * Core#ruler -> Ruler
                     *
                     * [[Ruler]] instance. Keep configuration of core rules.
                     **/
                    this.ruler = new Ruler();
                    for (let i = 0; i < _rules$2.length; i++) {
                        this.ruler.push(_rules$2[i][0], _rules$2[i][1]);
                    }
                }

                /**
                 * Core.process(state)
                 *
                 * Executes core chain rules.
                 **/
                Core.prototype.process = function(state) {
                    const rules = this.ruler.getRules('');
                    for (let i = 0, l = rules.length; i < l; i++) {
                        rules[i](state);
                    }
                };
                Core.prototype.State = StateCore;

                // Parser state class

                function StateBlock(src, md, env, tokens) {
                    this.src = src;

                    // link to parser instance
                    this.md = md;
                    this.env = env;

                    //
                    // Internal state vartiables
                    //

                    this.tokens = tokens;
                    this.bMarks = []; // line begin offsets for fast jumps
                    this.eMarks = []; // line end offsets for fast jumps
                    this.tShift = []; // offsets of the first non-space characters (tabs not expanded)
                    this.sCount = []; // indents for each line (tabs expanded)

                    // An amount of virtual spaces (tabs expanded) between beginning
                    // of each line (bMarks) and real beginning of that line.
                    //
                    // It exists only as a hack because blockquotes override bMarks
                    // losing information in the process.
                    //
                    // It's used only when expanding tabs, you can think about it as
                    // an initial tab length, e.g. bsCount=21 applied to string `\t123`
                    // means first tab should be expanded to 4-21%4 === 3 spaces.
                    //
                    this.bsCount = [];

                    // block parser variables

                    // required block content indent (for example, if we are
                    // inside a list, it would be positioned after list marker)
                    this.blkIndent = 0;
                    this.line = 0; // line index in src
                    this.lineMax = 0; // lines count
                    this.tight = false; // loose/tight mode for lists
                    this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)
                    this.listIndent = -1; // indent of the current list block (-1 if there isn't any)

                    // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'
                    // used in lists to determine if they interrupt a paragraph
                    this.parentType = 'root';
                    this.level = 0;

                    // Create caches
                    // Generate markers.
                    const s = this.src;
                    for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) {
                        const ch = s.charCodeAt(pos);
                        if (!indent_found) {
                            if (isSpace(ch)) {
                                indent++;
                                if (ch === 0x09) {
                                    offset += 4 - offset % 4;
                                } else {
                                    offset++;
                                }
                                continue;
                            } else {
                                indent_found = true;
                            }
                        }
                        if (ch === 0x0A || pos === len - 1) {
                            if (ch !== 0x0A) {
                                pos++;
                            }
                            this.bMarks.push(start);
                            this.eMarks.push(pos);
                            this.tShift.push(indent);
                            this.sCount.push(offset);
                            this.bsCount.push(0);
                            indent_found = false;
                            indent = 0;
                            offset = 0;
                            start = pos + 1;
                        }
                    }

                    // Push fake entry to simplify cache bounds checks
                    this.bMarks.push(s.length);
                    this.eMarks.push(s.length);
                    this.tShift.push(0);
                    this.sCount.push(0);
                    this.bsCount.push(0);
                    this.lineMax = this.bMarks.length - 1; // don't count last fake line
                }

                // Push new token to "stream".
                //
                StateBlock.prototype.push = function(type, tag, nesting) {
                    const token = new Token(type, tag, nesting);
                    token.block = true;
                    if (nesting < 0) this.level--; // closing tag
                    token.level = this.level;
                    if (nesting > 0) this.level++; // opening tag

                    this.tokens.push(token);
                    return token;
                };
                StateBlock.prototype.isEmpty = function isEmpty(line) {
                    return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
                };
                StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {
                    for (let max = this.lineMax; from < max; from++) {
                        if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {
                            break;
                        }
                    }
                    return from;
                };

                // Skip spaces from given position.
                StateBlock.prototype.skipSpaces = function skipSpaces(pos) {
                    for (let max = this.src.length; pos < max; pos++) {
                        const ch = this.src.charCodeAt(pos);
                        if (!isSpace(ch)) {
                            break;
                        }
                    }
                    return pos;
                };

                // Skip spaces from given position in reverse.
                StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {
                    if (pos <= min) {
                        return pos;
                    }
                    while (pos > min) {
                        if (!isSpace(this.src.charCodeAt(--pos))) {
                            return pos + 1;
                        }
                    }
                    return pos;
                };

                // Skip char codes from given position
                StateBlock.prototype.skipChars = function skipChars(pos, code) {
                    for (let max = this.src.length; pos < max; pos++) {
                        if (this.src.charCodeAt(pos) !== code) {
                            break;
                        }
                    }
                    return pos;
                };

                // Skip char codes reverse from given position - 1
                StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {
                    if (pos <= min) {
                        return pos;
                    }
                    while (pos > min) {
                        if (code !== this.src.charCodeAt(--pos)) {
                            return pos + 1;
                        }
                    }
                    return pos;
                };

                // cut lines range from source.
                StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
                    if (begin >= end) {
                        return '';
                    }
                    const queue = new Array(end - begin);
                    for (let i = 0, line = begin; line < end; line++, i++) {
                        let lineIndent = 0;
                        const lineStart = this.bMarks[line];
                        let first = lineStart;
                        let last;
                        if (line + 1 < end || keepLastLF) {
                            // No need for bounds check because we have fake entry on tail.
                            last = this.eMarks[line] + 1;
                        } else {
                            last = this.eMarks[line];
                        }
                        while (first < last && lineIndent < indent) {
                            const ch = this.src.charCodeAt(first);
                            if (isSpace(ch)) {
                                if (ch === 0x09) {
                                    lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;
                                } else {
                                    lineIndent++;
                                }
                            } else if (first - lineStart < this.tShift[line]) {
                                // patched tShift masked characters to look like spaces (blockquotes, list markers)
                                lineIndent++;
                            } else {
                                break;
                            }
                            first++;
                        }
                        if (lineIndent > indent) {
                            // partially expanding tabs in code blocks, e.g '\t\tfoobar'
                            // with indent=2 becomes '  \tfoobar'
                            queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);
                        } else {
                            queue[i] = this.src.slice(first, last);
                        }
                    }
                    return queue.join('');
                };

                // re-export Token class to use in block rules
                StateBlock.prototype.Token = Token;

                // GFM table, https://github.github.com/gfm/#tables-extension-

                // Limit the amount of empty autocompleted cells in a table,
                // see https://github.com/markdown-it/markdown-it/issues/1000,
                //
                // Both pulldown-cmark and commonmark-hs limit the number of cells this way to ~200k.
                // We set it to 65k, which can expand user input by a factor of x370
                // (256x256 square is 1.8kB expanded into 650kB).
                const MAX_AUTOCOMPLETED_CELLS = 0x10000;

                function getLine(state, line) {
                    const pos = state.bMarks[line] + state.tShift[line];
                    const max = state.eMarks[line];
                    return state.src.slice(pos, max);
                }

                function escapedSplit(str) {
                    const result = [];
                    const max = str.length;
                    let pos = 0;
                    let ch = str.charCodeAt(pos);
                    let isEscaped = false;
                    let lastPos = 0;
                    let current = '';
                    while (pos < max) {
                        if (ch === 0x7c /* | */ ) {
                            if (!isEscaped) {
                                // pipe separating cells, '|'
                                result.push(current + str.substring(lastPos, pos));
                                current = '';
                                lastPos = pos + 1;
                            } else {
                                // escaped pipe, '\|'
                                current += str.substring(lastPos, pos - 1);
                                lastPos = pos;
                            }
                        }
                        isEscaped = ch === 0x5c /* \ */ ;
                        pos++;
                        ch = str.charCodeAt(pos);
                    }
                    result.push(current + str.substring(lastPos));
                    return result;
                }

                function table(state, startLine, endLine, silent) {
                    // should have at least two lines
                    if (startLine + 2 > endLine) {
                        return false;
                    }
                    let nextLine = startLine + 1;
                    if (state.sCount[nextLine] < state.blkIndent) {
                        return false;
                    }

                    // if it's indented more than 3 spaces, it should be a code block
                    if (state.sCount[nextLine] - state.blkIndent >= 4) {
                        return false;
                    }

                    // first character of the second line should be '|', '-', ':',
                    // and no other characters are allowed but spaces;
                    // basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp

                    let pos = state.bMarks[nextLine] + state.tShift[nextLine];
                    if (pos >= state.eMarks[nextLine]) {
                        return false;
                    }
                    const firstCh = state.src.charCodeAt(pos++);
                    if (firstCh !== 0x7C /* | */ && firstCh !== 0x2D /* - */ && firstCh !== 0x3A /* : */ ) {
                        return false;
                    }
                    if (pos >= state.eMarks[nextLine]) {
                        return false;
                    }
                    const secondCh = state.src.charCodeAt(pos++);
                    if (secondCh !== 0x7C /* | */ && secondCh !== 0x2D /* - */ && secondCh !== 0x3A /* : */ && !isSpace(secondCh)) {
                        return false;
                    }

                    // if first character is '-', then second character must not be a space
                    // (due to parsing ambiguity with list)
                    if (firstCh === 0x2D /* - */ && isSpace(secondCh)) {
                        return false;
                    }
                    while (pos < state.eMarks[nextLine]) {
                        const ch = state.src.charCodeAt(pos);
                        if (ch !== 0x7C /* | */ && ch !== 0x2D /* - */ && ch !== 0x3A /* : */ && !isSpace(ch)) {
                            return false;
                        }
                        pos++;
                    }
                    let lineText = getLine(state, startLine + 1);
                    let columns = lineText.split('|');
                    const aligns = [];
                    for (let i = 0; i < columns.length; i++) {
                        const t = columns[i].trim();
                        if (!t) {
                            // allow empty columns before and after table, but not in between columns;
                            // e.g. allow ` |---| `, disallow ` ---||--- `
                            if (i === 0 || i === columns.length - 1) {
                                continue;
                            } else {
                                return false;
                            }
                        }
                        if (!/^:?-+:?$/.test(t)) {
                            return false;
                        }
                        if (t.charCodeAt(t.length - 1) === 0x3A /* : */ ) {
                            aligns.push(t.charCodeAt(0) === 0x3A /* : */ ? 'center' : 'right');
                        } else if (t.charCodeAt(0) === 0x3A /* : */ ) {
                            aligns.push('left');
                        } else {
                            aligns.push('');
                        }
                    }
                    lineText = getLine(state, startLine).trim();
                    if (lineText.indexOf('|') === -1) {
                        return false;
                    }
                    if (state.sCount[startLine] - state.blkIndent >= 4) {
                        return false;
                    }
                    columns = escapedSplit(lineText);
                    if (columns.length && columns[0] === '') columns.shift();
                    if (columns.length && columns[columns.length - 1] === '') columns.pop();

                    // header row will define an amount of columns in the entire table,
                    // and align row should be exactly the same (the rest of the rows can differ)
                    const columnCount = columns.length;
                    if (columnCount === 0 || columnCount !== aligns.length) {
                        return false;
                    }
                    if (silent) {
                        return true;
                    }
                    const oldParentType = state.parentType;
                    state.parentType = 'table';

                    // use 'blockquote' lists for termination because it's
                    // the most similar to tables
                    const terminatorRules = state.md.block.ruler.getRules('blockquote');
                    const token_to = state.push('table_open', 'table', 1);
                    const tableLines = [startLine, 0];
                    token_to.map = tableLines;
                    const token_tho = state.push('thead_open', 'thead', 1);
                    token_tho.map = [startLine, startLine + 1];
                    const token_htro = state.push('tr_open', 'tr', 1);
                    token_htro.map = [startLine, startLine + 1];
                    for (let i = 0; i < columns.length; i++) {
                        const token_ho = state.push('th_open', 'th', 1);
                        if (aligns[i]) {
                            token_ho.attrs = [
                                ['style', 'text-align:' + aligns[i]]
                            ];
                        }
                        const token_il = state.push('inline', '', 0);
                        token_il.content = columns[i].trim();
                        token_il.children = [];
                        state.push('th_close', 'th', -1);
                    }
                    state.push('tr_close', 'tr', -1);
                    state.push('thead_close', 'thead', -1);
                    let tbodyLines;
                    let autocompletedCells = 0;
                    for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {
                        if (state.sCount[nextLine] < state.blkIndent) {
                            break;
                        }
                        let terminate = false;
                        for (let i = 0, l = terminatorRules.length; i < l; i++) {
                            if (terminatorRules[i](state, nextLine, endLine, true)) {
                                terminate = true;
                                break;
                            }
                        }
                        if (terminate) {
                            break;
                        }
                        lineText = getLine(state, nextLine).trim();
                        if (!lineText) {
                            break;
                        }
                        if (state.sCount[nextLine] - state.blkIndent >= 4) {
                            break;
                        }
                        columns = escapedSplit(lineText);
                        if (columns.length && columns[0] === '') columns.shift();
                        if (columns.length && columns[columns.length - 1] === '') columns.pop();

                        // note: autocomplete count can be negative if user specifies more columns than header,
                        // but that does not affect intended use (which is limiting expansion)
                        autocompletedCells += columnCount - columns.length;
                        if (autocompletedCells > MAX_AUTOCOMPLETED_CELLS) {
                            break;
                        }
                        if (nextLine === startLine + 2) {
                            const token_tbo = state.push('tbody_open', 'tbody', 1);
                            token_tbo.map = tbodyLines = [startLine + 2, 0];
                        }
                        const token_tro = state.push('tr_open', 'tr', 1);
                        token_tro.map = [nextLine, nextLine + 1];
                        for (let i = 0; i < columnCount; i++) {
                            const token_tdo = state.push('td_open', 'td', 1);
                            if (aligns[i]) {
                                token_tdo.attrs = [
                                    ['style', 'text-align:' + aligns[i]]
                                ];
                            }
                            const token_il = state.push('inline', '', 0);
                            token_il.content = columns[i] ? columns[i].trim() : '';
                            token_il.children = [];
                            state.push('td_close', 'td', -1);
                        }
                        state.push('tr_close', 'tr', -1);
                    }
                    if (tbodyLines) {
                        state.push('tbody_close', 'tbody', -1);
                        tbodyLines[1] = nextLine;
                    }
                    state.push('table_close', 'table', -1);
                    tableLines[1] = nextLine;
                    state.parentType = oldParentType;
                    state.line = nextLine;
                    return true;
                }

                // Code block (4 spaces padded)

                function code(state, startLine, endLine /*, silent */ ) {
                    if (state.sCount[startLine] - state.blkIndent < 4) {
                        return false;
                    }
                    let nextLine = startLine + 1;
                    let last = nextLine;
                    while (nextLine < endLine) {
                        if (state.isEmpty(nextLine)) {
                            nextLine++;
                            continue;
                        }
                        if (state.sCount[nextLine] - state.blkIndent >= 4) {
                            nextLine++;
                            last = nextLine;
                            continue;
                        }
                        break;
                    }
                    state.line = last;
                    const token = state.push('code_block', 'code', 0);
                    token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\n';
                    token.map = [startLine, state.line];
                    return true;
                }

                // fences (``` lang, ~~~ lang)

                function fence(state, startLine, endLine, silent) {
                    let pos = state.bMarks[startLine] + state.tShift[startLine];
                    let max = state.eMarks[startLine];

                    // if it's indented more than 3 spaces, it should be a code block
                    if (state.sCount[startLine] - state.blkIndent >= 4) {
                        return false;
                    }
                    if (pos + 3 > max) {
                        return false;
                    }
                    const marker = state.src.charCodeAt(pos);
                    if (marker !== 0x7E /* ~ */ && marker !== 0x60 /* ` */ ) {
                        return false;
                    }

                    // scan marker length
                    let mem = pos;
                    pos = state.skipChars(pos, marker);
                    let len = pos - mem;
                    if (len < 3) {
                        return false;
                    }
                    const markup = state.src.slice(mem, pos);
                    const params = state.src.slice(pos, max);
                    if (marker === 0x60 /* ` */ ) {
                        if (params.indexOf(String.fromCharCode(marker)) >= 0) {
                            return false;
                        }
                    }

                    // Since start is found, we can report success here in validation mode
                    if (silent) {
                        return true;
                    }

                    // search end of block
                    let nextLine = startLine;
                    let haveEndMarker = false;
                    for (;;) {
                        nextLine++;
                        if (nextLine >= endLine) {
                            // unclosed block should be autoclosed by end of document.
                            // also block seems to be autoclosed by end of parent
                            break;
                        }
                        pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];
                        max = state.eMarks[nextLine];
                        if (pos < max && state.sCount[nextLine] < state.blkIndent) {
                            // non-empty line with negative indent should stop the list:
                            // - ```
                            //  test
                            break;
                        }
                        if (state.src.charCodeAt(pos) !== marker) {
                            continue;
                        }
                        if (state.sCount[nextLine] - state.blkIndent >= 4) {
                            // closing fence should be indented less than 4 spaces
                            continue;
                        }
                        pos = state.skipChars(pos, marker);

                        // closing code fence must be at least as long as the opening one
                        if (pos - mem < len) {
                            continue;
                        }

                        // make sure tail has spaces only
                        pos = state.skipSpaces(pos);
                        if (pos < max) {
                            continue;
                        }
                        haveEndMarker = true;
                        // found!
                        break;
                    }

                    // If a fence has heading spaces, they should be removed from its inner block
                    len = state.sCount[startLine];
                    state.line = nextLine + (haveEndMarker ? 1 : 0);
                    const token = state.push('fence', 'code', 0);
                    token.info = params;
                    token.content = state.getLines(startLine + 1, nextLine, len, true);
                    token.markup = markup;
                    token.map = [startLine, state.line];
                    return true;
                }

                // Block quotes

                function blockquote(state, startLine, endLine, silent) {
                    let pos = state.bMarks[startLine] + state.tShift[startLine];
                    let max = state.eMarks[startLine];
                    const oldLineMax = state.lineMax;

                    // if it's indented more than 3 spaces, it should be a code block
                    if (state.sCount[startLine] - state.blkIndent >= 4) {
                        return false;
                    }

                    // check the block quote marker
                    if (state.src.charCodeAt(pos) !== 0x3E /* > */ ) {
                        return false;
                    }

                    // we know that it's going to be a valid blockquote,
                    // so no point trying to find the end of it in silent mode
                    if (silent) {
                        return true;
                    }
                    const oldBMarks = [];
                    const oldBSCount = [];
                    const oldSCount = [];
                    const oldTShift = [];
                    const terminatorRules = state.md.block.ruler.getRules('blockquote');
                    const oldParentType = state.parentType;
                    state.parentType = 'blockquote';
                    let lastLineEmpty = false;
                    let nextLine;

                    // Search the end of the block
                    //
                    // Block ends with either:
                    //  1. an empty line outside:
                    //     ```
                    //     > test
                    //
                    //     ```
                    //  2. an empty line inside:
                    //     ```
                    //     >
                    //     test
                    //     ```
                    //  3. another tag:
                    //     ```
                    //     > test
                    //      - - -
                    //     ```
                    for (nextLine = startLine; nextLine < endLine; nextLine++) {
                        // check if it's outdented, i.e. it's inside list item and indented
                        // less than said list item:
                        //
                        // ```
                        // 1. anything
                        //    > current blockquote
                        // 2. checking this line
                        // ```
                        const isOutdented = state.sCount[nextLine] < state.blkIndent;
                        pos = state.bMarks[nextLine] + state.tShift[nextLine];
                        max = state.eMarks[nextLine];
                        if (pos >= max) {
                            // Case 1: line is not inside the blockquote, and this line is empty.
                            break;
                        }
                        if (state.src.charCodeAt(pos++) === 0x3E /* > */ && !isOutdented) {
                            // This line is inside the blockquote.

                            // set offset past spaces and ">"
                            let initial = state.sCount[nextLine] + 1;
                            let spaceAfterMarker;
                            let adjustTab;

                            // skip one optional space after '>'
                            if (state.src.charCodeAt(pos) === 0x20 /* space */ ) {
                                // ' >   test '
                                //     ^ -- position start of line here:
                                pos++;
                                initial++;
                                adjustTab = false;
                                spaceAfterMarker = true;
                            } else if (state.src.charCodeAt(pos) === 0x09 /* tab */ ) {
                                spaceAfterMarker = true;
                                if ((state.bsCount[nextLine] + initial) % 4 === 3) {
                                    // '  >\t  test '
                                    //       ^ -- position start of line here (tab has width===1)
                                    pos++;
                                    initial++;
                                    adjustTab = false;
                                } else {
                                    // ' >\t  test '
                                    //    ^ -- position start of line here + shift bsCount slightly
                                    //         to make extra space appear
                                    adjustTab = true;
                                }
                            } else {
                                spaceAfterMarker = false;
                            }
                            let offset = initial;
                            oldBMarks.push(state.bMarks[nextLine]);
                            state.bMarks[nextLine] = pos;
                            while (pos < max) {
                                const ch = state.src.charCodeAt(pos);
                                if (isSpace(ch)) {
                                    if (ch === 0x09) {
                                        offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;
                                    } else {
                                        offset++;
                                    }
                                } else {
                                    break;
                                }
                                pos++;
                            }
                            lastLineEmpty = pos >= max;
                            oldBSCount.push(state.bsCount[nextLine]);
                            state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);
                            oldSCount.push(state.sCount[nextLine]);
                            state.sCount[nextLine] = offset - initial;
                            oldTShift.push(state.tShift[nextLine]);
                            state.tShift[nextLine] = pos - state.bMarks[nextLine];
                            continue;
                        }

                        // Case 2: line is not inside the blockquote, and the last line was empty.
                        if (lastLineEmpty) {
                            break;
                        }

                        // Case 3: another tag found.
                        let terminate = false;
                        for (let i = 0, l = terminatorRules.length; i < l; i++) {
                            if (terminatorRules[i](state, nextLine, endLine, true)) {
                                terminate = true;
                                break;
                            }
                        }
                        if (terminate) {
                            // Quirk to enforce "hard termination mode" for paragraphs;
                            // normally if you call `tokenize(state, startLine, nextLine)`,
                            // paragraphs will look below nextLine for paragraph continuation,
                            // but if blockquote is terminated by another tag, they shouldn't
                            state.lineMax = nextLine;
                            if (state.blkIndent !== 0) {
                                // state.blkIndent was non-zero, we now set it to zero,
                                // so we need to re-calculate all offsets to appear as
                                // if indent wasn't changed
                                oldBMarks.push(state.bMarks[nextLine]);
                                oldBSCount.push(state.bsCount[nextLine]);
                                oldTShift.push(state.tShift[nextLine]);
                                oldSCount.push(state.sCount[nextLine]);
                                state.sCount[nextLine] -= state.blkIndent;
                            }
                            break;
                        }
                        oldBMarks.push(state.bMarks[nextLine]);
                        oldBSCount.push(state.bsCount[nextLine]);
                        oldTShift.push(state.tShift[nextLine]);
                        oldSCount.push(state.sCount[nextLine]);

                        // A negative indentation means that this is a paragraph continuation
                        //
                        state.sCount[nextLine] = -1;
                    }
                    const oldIndent = state.blkIndent;
                    state.blkIndent = 0;
                    const token_o = state.push('blockquote_open', 'blockquote', 1);
                    token_o.markup = '>';
                    const lines = [startLine, 0];
                    token_o.map = lines;
                    state.md.block.tokenize(state, startLine, nextLine);
                    const token_c = state.push('blockquote_close', 'blockquote', -1);
                    token_c.markup = '>';
                    state.lineMax = oldLineMax;
                    state.parentType = oldParentType;
                    lines[1] = state.line;

                    // Restore original tShift; this might not be necessary since the parser
                    // has already been here, but just to make sure we can do that.
                    for (let i = 0; i < oldTShift.length; i++) {
                        state.bMarks[i + startLine] = oldBMarks[i];
                        state.tShift[i + startLine] = oldTShift[i];
                        state.sCount[i + startLine] = oldSCount[i];
                        state.bsCount[i + startLine] = oldBSCount[i];
                    }
                    state.blkIndent = oldIndent;
                    return true;
                }

                // Horizontal rule

                function hr(state, startLine, endLine, silent) {
                    const max = state.eMarks[startLine];
                    // if it's indented more than 3 spaces, it should be a code block
                    if (state.sCount[startLine] - state.blkIndent >= 4) {
                        return false;
                    }
                    let pos = state.bMarks[startLine] + state.tShift[startLine];
                    const marker = state.src.charCodeAt(pos++);

                    // Check hr marker
                    if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x5F /* _ */ ) {
                        return false;
                    }

                    // markers can be mixed with spaces, but there should be at least 3 of them

                    let cnt = 1;
                    while (pos < max) {
                        const ch = state.src.charCodeAt(pos++);
                        if (ch !== marker && !isSpace(ch)) {
                            return false;
                        }
                        if (ch === marker) {
                            cnt++;
                        }
                    }
                    if (cnt < 3) {
                        return false;
                    }
                    if (silent) {
                        return true;
                    }
                    state.line = startLine + 1;
                    const token = state.push('hr', 'hr', 0);
                    token.map = [startLine, state.line];
                    token.markup = Array(cnt + 1).join(String.fromCharCode(marker));
                    return true;
                }

                // Lists

                // Search `[-+*][\n ]`, returns next pos after marker on success
                // or -1 on fail.
                function skipBulletListMarker(state, startLine) {
                    const max = state.eMarks[startLine];
                    let pos = state.bMarks[startLine] + state.tShift[startLine];
                    const marker = state.src.charCodeAt(pos++);
                    // Check bullet
                    if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x2B /* + */ ) {
                        return -1;
                    }
                    if (pos < max) {
                        const ch = state.src.charCodeAt(pos);
                        if (!isSpace(ch)) {
                            // " -test " - is not a list item
                            return -1;
                        }
                    }
                    return pos;
                }

                // Search `\d+[.)][\n ]`, returns next pos after marker on success
                // or -1 on fail.
                function skipOrderedListMarker(state, startLine) {
                    const start = state.bMarks[startLine] + state.tShift[startLine];
                    const max = state.eMarks[startLine];
                    let pos = start;

                    // List marker should have at least 2 chars (digit + dot)
                    if (pos + 1 >= max) {
                        return -1;
                    }
                    let ch = state.src.charCodeAt(pos++);
                    if (ch < 0x30 /* 0 */ || ch > 0x39 /* 9 */ ) {
                        return -1;
                    }
                    for (;;) {
                        // EOL -> fail
                        if (pos >= max) {
                            return -1;
                        }
                        ch = state.src.charCodeAt(pos++);
                        if (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ ) {
                            // List marker should have no more than 9 digits
                            // (prevents integer overflow in browsers)
                            if (pos - start >= 10) {
                                return -1;
                            }
                            continue;
                        }

                        // found valid marker
                        if (ch === 0x29 /* ) */ || ch === 0x2e /* . */ ) {
                            break;
                        }
                        return -1;
                    }
                    if (pos < max) {
                        ch = state.src.charCodeAt(pos);
                        if (!isSpace(ch)) {
                            // " 1.test " - is not a list item
                            return -1;
                        }
                    }
                    return pos;
                }

                function markTightParagraphs(state, idx) {
                    const level = state.level + 2;
                    for (let i = idx + 2, l = state.tokens.length - 2; i < l; i++) {
                        if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {
                            state.tokens[i + 2].hidden = true;
                            state.tokens[i].hidden = true;
                            i += 2;
                        }
                    }
                }

                function list(state, startLine, endLine, silent) {
                    let max, pos, start, token;
                    let nextLine = startLine;
                    let tight = true;

                    // if it's indented more than 3 spaces, it should be a code block
                    if (state.sCount[nextLine] - state.blkIndent >= 4) {
                        return false;
                    }

                    // Special case:
                    //  - item 1
                    //   - item 2
                    //    - item 3
                    //     - item 4
                    //      - this one is a paragraph continuation
                    if (state.listIndent >= 0 && state.sCount[nextLine] - state.listIndent >= 4 && state.sCount[nextLine] < state.blkIndent) {
                        return false;
                    }
                    let isTerminatingParagraph = false;

                    // limit conditions when list can interrupt
                    // a paragraph (validation mode only)
                    if (silent && state.parentType === 'paragraph') {
                        // Next list item should still terminate previous list item;
                        //
                        // This code can fail if plugins use blkIndent as well as lists,
                        // but I hope the spec gets fixed long before that happens.
                        //
                        if (state.sCount[nextLine] >= state.blkIndent) {
                            isTerminatingParagraph = true;
                        }
                    }

                    // Detect list type and position after marker
                    let isOrdered;
                    let markerValue;
                    let posAfterMarker;
                    if ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) {
                        isOrdered = true;
                        start = state.bMarks[nextLine] + state.tShift[nextLine];
                        markerValue = Number(state.src.slice(start, posAfterMarker - 1));

                        // If we're starting a new ordered list right after
                        // a paragraph, it should start with 1.
                        if (isTerminatingParagraph && markerValue !== 1) return false;
                    } else if ((posAfterMarker = skipBulletListMarker(state, nextLine)) >= 0) {
                        isOrdered = false;
                    } else {
                        return false;
                    }

                    // If we're starting a new unordered list right after
                    // a paragraph, first line should not be empty.
                    if (isTerminatingParagraph) {
                        if (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false;
                    }

                    // For validation mode we can terminate immediately
                    if (silent) {
                        return true;
                    }

                    // We should terminate list on style change. Remember first one to compare.
                    const markerCharCode = state.src.charCodeAt(posAfterMarker - 1);

                    // Start list
                    const listTokIdx = state.tokens.length;
                    if (isOrdered) {
                        token = state.push('ordered_list_open', 'ol', 1);
                        if (markerValue !== 1) {
                            token.attrs = [
                                ['start', markerValue]
                            ];
                        }
                    } else {
                        token = state.push('bullet_list_open', 'ul', 1);
                    }
                    const listLines = [nextLine, 0];
                    token.map = listLines;
                    token.markup = String.fromCharCode(markerCharCode);

                    //
                    // Iterate list items
                    //

                    let prevEmptyEnd = false;
                    const terminatorRules = state.md.block.ruler.getRules('list');
                    const oldParentType = state.parentType;
                    state.parentType = 'list';
                    while (nextLine < endLine) {
                        pos = posAfterMarker;
                        max = state.eMarks[nextLine];
                        const initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine]);
                        let offset = initial;
                        while (pos < max) {
                            const ch = state.src.charCodeAt(pos);
                            if (ch === 0x09) {
                                offset += 4 - (offset + state.bsCount[nextLine]) % 4;
                            } else if (ch === 0x20) {
                                offset++;
                            } else {
                                break;
                            }
                            pos++;
                        }
                        const contentStart = pos;
                        let indentAfterMarker;
                        if (contentStart >= max) {
                            // trimming space in "-    \n  3" case, indent is 1 here
                            indentAfterMarker = 1;
                        } else {
                            indentAfterMarker = offset - initial;
                        }

                        // If we have more than 4 spaces, the indent is 1
                        // (the rest is just indented code block)
                        if (indentAfterMarker > 4) {
                            indentAfterMarker = 1;
                        }

                        // "  -  test"
                        //  ^^^^^ - calculating total length of this thing
                        const indent = initial + indentAfterMarker;

                        // Run subparser & write tokens
                        token = state.push('list_item_open', 'li', 1);
                        token.markup = String.fromCharCode(markerCharCode);
                        const itemLines = [nextLine, 0];
                        token.map = itemLines;
                        if (isOrdered) {
                            token.info = state.src.slice(start, posAfterMarker - 1);
                        }

                        // change current state, then restore it after parser subcall
                        const oldTight = state.tight;
                        const oldTShift = state.tShift[nextLine];
                        const oldSCount = state.sCount[nextLine];

                        //  - example list
                        // ^ listIndent position will be here
                        //   ^ blkIndent position will be here
                        //
                        const oldListIndent = state.listIndent;
                        state.listIndent = state.blkIndent;
                        state.blkIndent = indent;
                        state.tight = true;
                        state.tShift[nextLine] = contentStart - state.bMarks[nextLine];
                        state.sCount[nextLine] = offset;
                        if (contentStart >= max && state.isEmpty(nextLine + 1)) {
                            // workaround for this case
                            // (list item is empty, list terminates before "foo"):
                            // ~~~~~~~~
                            //   -
                            //
                            //     foo
                            // ~~~~~~~~
                            state.line = Math.min(state.line + 2, endLine);
                        } else {
                            state.md.block.tokenize(state, nextLine, endLine, true);
                        }

                        // If any of list item is tight, mark list as tight
                        if (!state.tight || prevEmptyEnd) {
                            tight = false;
                        }
                        // Item become loose if finish with empty line,
                        // but we should filter last element, because it means list finish
                        prevEmptyEnd = state.line - nextLine > 1 && state.isEmpty(state.line - 1);
                        state.blkIndent = state.listIndent;
                        state.listIndent = oldListIndent;
                        state.tShift[nextLine] = oldTShift;
                        state.sCount[nextLine] = oldSCount;
                        state.tight = oldTight;
                        token = state.push('list_item_close', 'li', -1);
                        token.markup = String.fromCharCode(markerCharCode);
                        nextLine = state.line;
                        itemLines[1] = nextLine;
                        if (nextLine >= endLine) {
                            break;
                        }

                        //
                        // Try to check if list is terminated or continued.
                        //
                        if (state.sCount[nextLine] < state.blkIndent) {
                            break;
                        }

                        // if it's indented more than 3 spaces, it should be a code block
                        if (state.sCount[nextLine] - state.blkIndent >= 4) {
                            break;
                        }

                        // fail if terminating block found
                        let terminate = false;
                        for (let i = 0, l = terminatorRules.length; i < l; i++) {
                            if (terminatorRules[i](state, nextLine, endLine, true)) {
                                terminate = true;
                                break;
                            }
                        }
                        if (terminate) {
                            break;
                        }

                        // fail if list has another type
                        if (isOrdered) {
                            posAfterMarker = skipOrderedListMarker(state, nextLine);
                            if (posAfterMarker < 0) {
                                break;
                            }
                            start = state.bMarks[nextLine] + state.tShift[nextLine];
                        } else {
                            posAfterMarker = skipBulletListMarker(state, nextLine);
                            if (posAfterMarker < 0) {
                                break;
                            }
                        }
                        if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) {
                            break;
                        }
                    }

                    // Finalize list
                    if (isOrdered) {
                        token = state.push('ordered_list_close', 'ol', -1);
                    } else {
                        token = state.push('bullet_list_close', 'ul', -1);
                    }
                    token.markup = String.fromCharCode(markerCharCode);
                    listLines[1] = nextLine;
                    state.line = nextLine;
                    state.parentType = oldParentType;

                    // mark paragraphs tight if needed
                    if (tight) {
                        markTightParagraphs(state, listTokIdx);
                    }
                    return true;
                }

                function reference(state, startLine, _endLine, silent) {
                    let pos = state.bMarks[startLine] + state.tShift[startLine];
                    let max = state.eMarks[startLine];
                    let nextLine = startLine + 1;

                    // if it's indented more than 3 spaces, it should be a code block
                    if (state.sCount[startLine] - state.blkIndent >= 4) {
                        return false;
                    }
                    if (state.src.charCodeAt(pos) !== 0x5B /* [ */ ) {
                        return false;
                    }

                    function getNextLine(nextLine) {
                        const endLine = state.lineMax;
                        if (nextLine >= endLine || state.isEmpty(nextLine)) {
                            // empty line or end of input
                            return null;
                        }
                        let isContinuation = false;

                        // this would be a code block normally, but after paragraph
                        // it's considered a lazy continuation regardless of what's there
                        if (state.sCount[nextLine] - state.blkIndent > 3) {
                            isContinuation = true;
                        }

                        // quirk for blockquotes, this line should already be checked by that rule
                        if (state.sCount[nextLine] < 0) {
                            isContinuation = true;
                        }
                        if (!isContinuation) {
                            const terminatorRules = state.md.block.ruler.getRules('reference');
                            const oldParentType = state.parentType;
                            state.parentType = 'reference';

                            // Some tags can terminate paragraph without empty line.
                            let terminate = false;
                            for (let i = 0, l = terminatorRules.length; i < l; i++) {
                                if (terminatorRules[i](state, nextLine, endLine, true)) {
                                    terminate = true;
                                    break;
                                }
                            }
                            state.parentType = oldParentType;
                            if (terminate) {
                                // terminated by another block
                                return null;
                            }
                        }
                        const pos = state.bMarks[nextLine] + state.tShift[nextLine];
                        const max = state.eMarks[nextLine];

                        // max + 1 explicitly includes the newline
                        return state.src.slice(pos, max + 1);
                    }
                    let str = state.src.slice(pos, max + 1);
                    max = str.length;
                    let labelEnd = -1;
                    for (pos = 1; pos < max; pos++) {
                        const ch = str.charCodeAt(pos);
                        if (ch === 0x5B /* [ */ ) {
                            return false;
                        } else if (ch === 0x5D /* ] */ ) {
                            labelEnd = pos;
                            break;
                        } else if (ch === 0x0A /* \n */ ) {
                            const lineContent = getNextLine(nextLine);
                            if (lineContent !== null) {
                                str += lineContent;
                                max = str.length;
                                nextLine++;
                            }
                        } else if (ch === 0x5C /* \ */ ) {
                            pos++;
                            if (pos < max && str.charCodeAt(pos) === 0x0A) {
                                const lineContent = getNextLine(nextLine);
                                if (lineContent !== null) {
                                    str += lineContent;
                                    max = str.length;
                                    nextLine++;
                                }
                            }
                        }
                    }
                    if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A /* : */ ) {
                        return false;
                    }

                    // [label]:   destination   'title'
                    //         ^^^ skip optional whitespace here
                    for (pos = labelEnd + 2; pos < max; pos++) {
                        const ch = str.charCodeAt(pos);
                        if (ch === 0x0A) {
                            const lineContent = getNextLine(nextLine);
                            if (lineContent !== null) {
                                str += lineContent;
                                max = str.length;
                                nextLine++;
                            }
                        } else if (isSpace(ch));
                        else {
                            break;
                        }
                    }

                    // [label]:   destination   'title'
                    //            ^^^^^^^^^^^ parse this
                    const destRes = state.md.helpers.parseLinkDestination(str, pos, max);
                    if (!destRes.ok) {
                        return false;
                    }
                    const href = state.md.normalizeLink(destRes.str);
                    if (!state.md.validateLink(href)) {
                        return false;
                    }
                    pos = destRes.pos;

                    // save cursor state, we could require to rollback later
                    const destEndPos = pos;
                    const destEndLineNo = nextLine;

                    // [label]:   destination   'title'
                    //                       ^^^ skipping those spaces
                    const start = pos;
                    for (; pos < max; pos++) {
                        const ch = str.charCodeAt(pos);
                        if (ch === 0x0A) {
                            const lineContent = getNextLine(nextLine);
                            if (lineContent !== null) {
                                str += lineContent;
                                max = str.length;
                                nextLine++;
                            }
                        } else if (isSpace(ch));
                        else {
                            break;
                        }
                    }

                    // [label]:   destination   'title'
                    //                          ^^^^^^^ parse this
                    let titleRes = state.md.helpers.parseLinkTitle(str, pos, max);
                    while (titleRes.can_continue) {
                        const lineContent = getNextLine(nextLine);
                        if (lineContent === null) break;
                        str += lineContent;
                        pos = max;
                        max = str.length;
                        nextLine++;
                        titleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes);
                    }
                    let title;
                    if (pos < max && start !== pos && titleRes.ok) {
                        title = titleRes.str;
                        pos = titleRes.pos;
                    } else {
                        title = '';
                        pos = destEndPos;
                        nextLine = destEndLineNo;
                    }

                    // skip trailing spaces until the rest of the line
                    while (pos < max) {
                        const ch = str.charCodeAt(pos);
                        if (!isSpace(ch)) {
                            break;
                        }
                        pos++;
                    }
                    if (pos < max && str.charCodeAt(pos) !== 0x0A) {
                        if (title) {
                            // garbage at the end of the line after title,
                            // but it could still be a valid reference if we roll back
                            title = '';
                            pos = destEndPos;
                            nextLine = destEndLineNo;
                            while (pos < max) {
                                const ch = str.charCodeAt(pos);
                                if (!isSpace(ch)) {
                                    break;
                                }
                                pos++;
                            }
                        }
                    }
                    if (pos < max && str.charCodeAt(pos) !== 0x0A) {
                        // garbage at the end of the line
                        return false;
                    }
                    const label = normalizeReference(str.slice(1, labelEnd));
                    if (!label) {
                        // CommonMark 0.20 disallows empty labels
                        return false;
                    }

                    // Reference can not terminate anything. This check is for safety only.
                    /* istanbul ignore if */
                    if (silent) {
                        return true;
                    }
                    if (typeof state.env.references === 'undefined') {
                        state.env.references = {};
                    }
                    if (typeof state.env.references[label] === 'undefined') {
                        state.env.references[label] = {
                            title,
                            href
                        };
                    }
                    state.line = nextLine;
                    return true;
                }

                // List of valid html blocks names, according to commonmark spec
                // https://spec.commonmark.org/0.30/#html-blocks

                var block_names = ['address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dialog', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'iframe', 'legend', 'li', 'link', 'main', 'menu', 'menuitem', 'nav', 'noframes', 'ol', 'optgroup', 'option', 'p', 'param', 'search', 'section', 'summary', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul'];

                // Regexps to match html elements

                const attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
                const unquoted = '[^"\'=<>`\\x00-\\x20]+';
                const single_quoted = "'[^']*'";
                const double_quoted = '"[^"]*"';
                const attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';
                const attribute = '(?:\\s+' + attr_name + '(?:\\s*=\\s*' + attr_value + ')?)';
                const open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>';
                const close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>';
                const comment = '<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->';
                const processing = '<[?][\\s\\S]*?[?]>';
                const declaration = '<![A-Za-z][^>]*>';
                const cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';
                const HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment + '|' + processing + '|' + declaration + '|' + cdata + ')');
                const HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');

                // HTML block

                // An array of opening and corresponding closing sequences for html tags,
                // last argument defines whether it can terminate a paragraph or not
                //
                const HTML_SEQUENCES = [
                    [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, true],
                    [/^<!--/, /-->/, true],
                    [/^<\?/, /\?>/, true],
                    [/^<![A-Z]/, />/, true],
                    [/^<!\[CDATA\[/, /\]\]>/, true],
                    [new RegExp('^</?(' + block_names.join('|') + ')(?=(\\s|/?>|$))', 'i'), /^$/, true],
                    [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\s*$'), /^$/, false]
                ];

                function html_block(state, startLine, endLine, silent) {
                    let pos = state.bMarks[startLine] + state.tShift[startLine];
                    let max = state.eMarks[startLine];

                    // if it's indented more than 3 spaces, it should be a code block
                    if (state.sCount[startLine] - state.blkIndent >= 4) {
                        return false;
                    }
                    if (!state.md.options.html) {
                        return false;
                    }
                    if (state.src.charCodeAt(pos) !== 0x3C /* < */ ) {
                        return false;
                    }
                    let lineText = state.src.slice(pos, max);
                    let i = 0;
                    for (; i < HTML_SEQUENCES.length; i++) {
                        if (HTML_SEQUENCES[i][0].test(lineText)) {
                            break;
                        }
                    }
                    if (i === HTML_SEQUENCES.length) {
                        return false;
                    }
                    if (silent) {
                        // true if this sequence can be a terminator, false otherwise
                        return HTML_SEQUENCES[i][2];
                    }
                    let nextLine = startLine + 1;

                    // If we are here - we detected HTML block.
                    // Let's roll down till block end.
                    if (!HTML_SEQUENCES[i][1].test(lineText)) {
                        for (; nextLine < endLine; nextLine++) {
                            if (state.sCount[nextLine] < state.blkIndent) {
                                break;
                            }
                            pos = state.bMarks[nextLine] + state.tShift[nextLine];
                            max = state.eMarks[nextLine];
                            lineText = state.src.slice(pos, max);
                            if (HTML_SEQUENCES[i][1].test(lineText)) {
                                if (lineText.length !== 0) {
                                    nextLine++;
                                }
                                break;
                            }
                        }
                    }
                    state.line = nextLine;
                    const token = state.push('html_block', '', 0);
                    token.map = [startLine, nextLine];
                    token.content = state.getLines(startLine, nextLine, state.blkIndent, true);
                    return true;
                }

                // heading (#, ##, ...)

                function heading(state, startLine, endLine, silent) {
                    let pos = state.bMarks[startLine] + state.tShift[startLine];
                    let max = state.eMarks[startLine];

                    // if it's indented more than 3 spaces, it should be a code block
                    if (state.sCount[startLine] - state.blkIndent >= 4) {
                        return false;
                    }
                    let ch = state.src.charCodeAt(pos);
                    if (ch !== 0x23 /* # */ || pos >= max) {
                        return false;
                    }

                    // count heading level
                    let level = 1;
                    ch = state.src.charCodeAt(++pos);
                    while (ch === 0x23 /* # */ && pos < max && level <= 6) {
                        level++;
                        ch = state.src.charCodeAt(++pos);
                    }
                    if (level > 6 || pos < max && !isSpace(ch)) {
                        return false;
                    }
                    if (silent) {
                        return true;
                    }

                    // Let's cut tails like '    ###  ' from the end of string

                    max = state.skipSpacesBack(max, pos);
                    const tmp = state.skipCharsBack(max, 0x23, pos); // #
                    if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {
                        max = tmp;
                    }
                    state.line = startLine + 1;
                    const token_o = state.push('heading_open', 'h' + String(level), 1);
                    token_o.markup = '########'.slice(0, level);
                    token_o.map = [startLine, state.line];
                    const token_i = state.push('inline', '', 0);
                    token_i.content = state.src.slice(pos, max).trim();
                    token_i.map = [startLine, state.line];
                    token_i.children = [];
                    const token_c = state.push('heading_close', 'h' + String(level), -1);
                    token_c.markup = '########'.slice(0, level);
                    return true;
                }

                // lheading (---, ===)

                function lheading(state, startLine, endLine /*, silent */ ) {
                    const terminatorRules = state.md.block.ruler.getRules('paragraph');

                    // if it's indented more than 3 spaces, it should be a code block
                    if (state.sCount[startLine] - state.blkIndent >= 4) {
                        return false;
                    }
                    const oldParentType = state.parentType;
                    state.parentType = 'paragraph'; // use paragraph to match terminatorRules

                    // jump line-by-line until empty one or EOF
                    let level = 0;
                    let marker;
                    let nextLine = startLine + 1;
                    for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
                        // this would be a code block normally, but after paragraph
                        // it's considered a lazy continuation regardless of what's there
                        if (state.sCount[nextLine] - state.blkIndent > 3) {
                            continue;
                        }

                        //
                        // Check for underline in setext header
                        //
                        if (state.sCount[nextLine] >= state.blkIndent) {
                            let pos = state.bMarks[nextLine] + state.tShift[nextLine];
                            const max = state.eMarks[nextLine];
                            if (pos < max) {
                                marker = state.src.charCodeAt(pos);
                                if (marker === 0x2D /* - */ || marker === 0x3D /* = */ ) {
                                    pos = state.skipChars(pos, marker);
                                    pos = state.skipSpaces(pos);
                                    if (pos >= max) {
                                        level = marker === 0x3D /* = */ ? 1 : 2;
                                        break;
                                    }
                                }
                            }
                        }

                        // quirk for blockquotes, this line should already be checked by that rule
                        if (state.sCount[nextLine] < 0) {
                            continue;
                        }

                        // Some tags can terminate paragraph without empty line.
                        let terminate = false;
                        for (let i = 0, l = terminatorRules.length; i < l; i++) {
                            if (terminatorRules[i](state, nextLine, endLine, true)) {
                                terminate = true;
                                break;
                            }
                        }
                        if (terminate) {
                            break;
                        }
                    }
                    if (!level) {
                        // Didn't find valid underline
                        return false;
                    }
                    const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
                    state.line = nextLine + 1;
                    const token_o = state.push('heading_open', 'h' + String(level), 1);
                    token_o.markup = String.fromCharCode(marker);
                    token_o.map = [startLine, state.line];
                    const token_i = state.push('inline', '', 0);
                    token_i.content = content;
                    token_i.map = [startLine, state.line - 1];
                    token_i.children = [];
                    const token_c = state.push('heading_close', 'h' + String(level), -1);
                    token_c.markup = String.fromCharCode(marker);
                    state.parentType = oldParentType;
                    return true;
                }

                // Paragraph

                function paragraph(state, startLine, endLine) {
                    const terminatorRules = state.md.block.ruler.getRules('paragraph');
                    const oldParentType = state.parentType;
                    let nextLine = startLine + 1;
                    state.parentType = 'paragraph';

                    // jump line-by-line until empty one or EOF
                    for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
                        // this would be a code block normally, but after paragraph
                        // it's considered a lazy continuation regardless of what's there
                        if (state.sCount[nextLine] - state.blkIndent > 3) {
                            continue;
                        }

                        // quirk for blockquotes, this line should already be checked by that rule
                        if (state.sCount[nextLine] < 0) {
                            continue;
                        }

                        // Some tags can terminate paragraph without empty line.
                        let terminate = false;
                        for (let i = 0, l = terminatorRules.length; i < l; i++) {
                            if (terminatorRules[i](state, nextLine, endLine, true)) {
                                terminate = true;
                                break;
                            }
                        }
                        if (terminate) {
                            break;
                        }
                    }
                    const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
                    state.line = nextLine;
                    const token_o = state.push('paragraph_open', 'p', 1);
                    token_o.map = [startLine, state.line];
                    const token_i = state.push('inline', '', 0);
                    token_i.content = content;
                    token_i.map = [startLine, state.line];
                    token_i.children = [];
                    state.push('paragraph_close', 'p', -1);
                    state.parentType = oldParentType;
                    return true;
                }

                /** internal
                 * class ParserBlock
                 *
                 * Block-level tokenizer.
                 **/

                const _rules$1 = [
                    // First 2 params - rule name & source. Secondary array - list of rules,
                    // which can be terminated by this one.
                    ['table', table, ['paragraph', 'reference']],
                    ['code', code],
                    ['fence', fence, ['paragraph', 'reference', 'blockquote', 'list']],
                    ['blockquote', blockquote, ['paragraph', 'reference', 'blockquote', 'list']],
                    ['hr', hr, ['paragraph', 'reference', 'blockquote', 'list']],
                    ['list', list, ['paragraph', 'reference', 'blockquote']],
                    ['reference', reference],
                    ['html_block', html_block, ['paragraph', 'reference', 'blockquote']],
                    ['heading', heading, ['paragraph', 'reference', 'blockquote']],
                    ['lheading', lheading],
                    ['paragraph', paragraph]
                ];

                /**
                 * new ParserBlock()
                 **/
                function ParserBlock() {
                    /**
                     * ParserBlock#ruler -> Ruler
                     *
                     * [[Ruler]] instance. Keep configuration of block rules.
                     **/
                    this.ruler = new Ruler();
                    for (let i = 0; i < _rules$1.length; i++) {
                        this.ruler.push(_rules$1[i][0], _rules$1[i][1], {
                            alt: (_rules$1[i][2] || []).slice()
                        });
                    }
                }

                // Generate tokens for input range
                //
                ParserBlock.prototype.tokenize = function(state, startLine, endLine) {
                    const rules = this.ruler.getRules('');
                    const len = rules.length;
                    const maxNesting = state.md.options.maxNesting;
                    let line = startLine;
                    let hasEmptyLines = false;
                    while (line < endLine) {
                        state.line = line = state.skipEmptyLines(line);
                        if (line >= endLine) {
                            break;
                        }

                        // Termination condition for nested calls.
                        // Nested calls currently used for blockquotes & lists
                        if (state.sCount[line] < state.blkIndent) {
                            break;
                        }

                        // If nesting level exceeded - skip tail to the end. That's not ordinary
                        // situation and we should not care about content.
                        if (state.level >= maxNesting) {
                            state.line = endLine;
                            break;
                        }

                        // Try all possible rules.
                        // On success, rule should:
                        //
                        // - update `state.line`
                        // - update `state.tokens`
                        // - return true
                        const prevLine = state.line;
                        let ok = false;
                        for (let i = 0; i < len; i++) {
                            ok = rules[i](state, line, endLine, false);
                            if (ok) {
                                if (prevLine >= state.line) {
                                    throw new Error("block rule didn't increment state.line");
                                }
                                break;
                            }
                        }

                        // this can only happen if user disables paragraph rule
                        if (!ok) throw new Error('none of the block rules matched');

                        // set state.tight if we had an empty line before current tag
                        // i.e. latest empty line should not count
                        state.tight = !hasEmptyLines;

                        // paragraph might "eat" one newline after it in nested lists
                        if (state.isEmpty(state.line - 1)) {
                            hasEmptyLines = true;
                        }
                        line = state.line;
                        if (line < endLine && state.isEmpty(line)) {
                            hasEmptyLines = true;
                            line++;
                            state.line = line;
                        }
                    }
                };

                /**
                 * ParserBlock.parse(str, md, env, outTokens)
                 *
                 * Process input string and push block tokens into `outTokens`
                 **/
                ParserBlock.prototype.parse = function(src, md, env, outTokens) {
                    if (!src) {
                        return;
                    }
                    const state = new this.State(src, md, env, outTokens);
                    this.tokenize(state, state.line, state.lineMax);
                };
                ParserBlock.prototype.State = StateBlock;

                // Inline parser state

                function StateInline(src, md, env, outTokens) {
                    this.src = src;
                    this.env = env;
                    this.md = md;
                    this.tokens = outTokens;
                    this.tokens_meta = Array(outTokens.length);
                    this.pos = 0;
                    this.posMax = this.src.length;
                    this.level = 0;
                    this.pending = '';
                    this.pendingLevel = 0;

                    // Stores { start: end } pairs. Useful for backtrack
                    // optimization of pairs parse (emphasis, strikes).
                    this.cache = {};

                    // List of emphasis-like delimiters for current tag
                    this.delimiters = [];

                    // Stack of delimiter lists for upper level tags
                    this._prev_delimiters = [];

                    // backtick length => last seen position
                    this.backticks = {};
                    this.backticksScanned = false;

                    // Counter used to disable inline linkify-it execution
                    // inside <a> and markdown links
                    this.linkLevel = 0;
                }

                // Flush pending text
                //
                StateInline.prototype.pushPending = function() {
                    const token = new Token('text', '', 0);
                    token.content = this.pending;
                    token.level = this.pendingLevel;
                    this.tokens.push(token);
                    this.pending = '';
                    return token;
                };

                // Push new token to "stream".
                // If pending text exists - flush it as text token
                //
                StateInline.prototype.push = function(type, tag, nesting) {
                    if (this.pending) {
                        this.pushPending();
                    }
                    const token = new Token(type, tag, nesting);
                    let token_meta = null;
                    if (nesting < 0) {
                        // closing tag
                        this.level--;
                        this.delimiters = this._prev_delimiters.pop();
                    }
                    token.level = this.level;
                    if (nesting > 0) {
                        // opening tag
                        this.level++;
                        this._prev_delimiters.push(this.delimiters);
                        this.delimiters = [];
                        token_meta = {
                            delimiters: this.delimiters
                        };
                    }
                    this.pendingLevel = this.level;
                    this.tokens.push(token);
                    this.tokens_meta.push(token_meta);
                    return token;
                };

                // Scan a sequence of emphasis-like markers, and determine whether
                // it can start an emphasis sequence or end an emphasis sequence.
                //
                //  - start - position to scan from (it should point at a valid marker);
                //  - canSplitWord - determine if these markers can be found inside a word
                //
                StateInline.prototype.scanDelims = function(start, canSplitWord) {
                    const max = this.posMax;
                    const marker = this.src.charCodeAt(start);

                    // treat beginning of the line as a whitespace
                    const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;
                    let pos = start;
                    while (pos < max && this.src.charCodeAt(pos) === marker) {
                        pos++;
                    }
                    const count = pos - start;

                    // treat end of the line as a whitespace
                    const nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;
                    const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
                    const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
                    const isLastWhiteSpace = isWhiteSpace(lastChar);
                    const isNextWhiteSpace = isWhiteSpace(nextChar);
                    const left_flanking = !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar);
                    const right_flanking = !isLastWhiteSpace && (!isLastPunctChar || isNextWhiteSpace || isNextPunctChar);
                    const can_open = left_flanking && (canSplitWord || !right_flanking || isLastPunctChar);
                    const can_close = right_flanking && (canSplitWord || !left_flanking || isNextPunctChar);
                    return {
                        can_open,
                        can_close,
                        length: count
                    };
                };

                // re-export Token class to use in block rules
                StateInline.prototype.Token = Token;

                // Skip text characters for text token, place those to pending buffer
                // and increment current pos

                // Rule to skip pure text
                // '{}$%@~+=:' reserved for extentions

                // !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~

                // !!!! Don't confuse with "Markdown ASCII Punctuation" chars
                // http://spec.commonmark.org/0.15/#ascii-punctuation-character
                function isTerminatorChar(ch) {
                    switch (ch) {
                        case 0x0A /* \n */ :
                        case 0x21 /* ! */ :
                        case 0x23 /* # */ :
                        case 0x24 /* $ */ :
                        case 0x25 /* % */ :
                        case 0x26 /* & */ :
                        case 0x2A /* * */ :
                        case 0x2B /* + */ :
                        case 0x2D /* - */ :
                        case 0x3A /* : */ :
                        case 0x3C /* < */ :
                        case 0x3D /* = */ :
                        case 0x3E /* > */ :
                        case 0x40 /* @ */ :
                        case 0x5B /* [ */ :
                        case 0x5C /* \ */ :
                        case 0x5D /* ] */ :
                        case 0x5E /* ^ */ :
                        case 0x5F /* _ */ :
                        case 0x60 /* ` */ :
                        case 0x7B /* { */ :
                        case 0x7D /* } */ :
                        case 0x7E /* ~ */ :
                            return true;
                        default:
                            return false;
                    }
                }

                function text(state, silent) {
                    let pos = state.pos;
                    while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {
                        pos++;
                    }
                    if (pos === state.pos) {
                        return false;
                    }
                    if (!silent) {
                        state.pending += state.src.slice(state.pos, pos);
                    }
                    state.pos = pos;
                    return true;
                }

                // Alternative implementation, for memory.
                //
                // It costs 10% of performance, but allows extend terminators list, if place it
                // to `ParserInline` property. Probably, will switch to it sometime, such
                // flexibility required.

                /*
                var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/;

                module.exports = function text(state, silent) {
                  var pos = state.pos,
                      idx = state.src.slice(pos).search(TERMINATOR_RE);

                  // first char is terminator -> empty text
                  if (idx === 0) { return false; }

                  // no terminator -> text till end of string
                  if (idx < 0) {
                    if (!silent) { state.pending += state.src.slice(pos); }
                    state.pos = state.src.length;
                    return true;
                  }

                  if (!silent) { state.pending += state.src.slice(pos, pos + idx); }

                  state.pos += idx;

                  return true;
                }; */

                // Process links like https://example.org/

                // RFC3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
                const SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;

                function linkify(state, silent) {
                    if (!state.md.options.linkify) return false;
                    if (state.linkLevel > 0) return false;
                    const pos = state.pos;
                    const max = state.posMax;
                    if (pos + 3 > max) return false;
                    if (state.src.charCodeAt(pos) !== 0x3A /* : */ ) return false;
                    if (state.src.charCodeAt(pos + 1) !== 0x2F /* / */ ) return false;
                    if (state.src.charCodeAt(pos + 2) !== 0x2F /* / */ ) return false;
                    const match = state.pending.match(SCHEME_RE);
                    if (!match) return false;
                    const proto = match[1];
                    const link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length));
                    if (!link) return false;
                    let url = link.url;

                    // invalid link, but still detected by linkify somehow;
                    // need to check to prevent infinite loop below
                    if (url.length <= proto.length) return false;

                    // disallow '*' at the end of the link (conflicts with emphasis)
                    url = url.replace(/\*+$/, '');
                    const fullUrl = state.md.normalizeLink(url);
                    if (!state.md.validateLink(fullUrl)) return false;
                    if (!silent) {
                        state.pending = state.pending.slice(0, -proto.length);
                        const token_o = state.push('link_open', 'a', 1);
                        token_o.attrs = [
                            ['href', fullUrl]
                        ];
                        token_o.markup = 'linkify';
                        token_o.info = 'auto';
                        const token_t = state.push('text', '', 0);
                        token_t.content = state.md.normalizeLinkText(url);
                        const token_c = state.push('link_close', 'a', -1);
                        token_c.markup = 'linkify';
                        token_c.info = 'auto';
                    }
                    state.pos += url.length - proto.length;
                    return true;
                }

                // Proceess '\n'

                function newline(state, silent) {
                    let pos = state.pos;
                    if (state.src.charCodeAt(pos) !== 0x0A /* \n */ ) {
                        return false;
                    }
                    const pmax = state.pending.length - 1;
                    const max = state.posMax;

                    // '  \n' -> hardbreak
                    // Lookup in pending chars is bad practice! Don't copy to other rules!
                    // Pending string is stored in concat mode, indexed lookups will cause
                    // convertion to flat mode.
                    if (!silent) {
                        if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {
                            if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {
                                // Find whitespaces tail of pending chars.
                                let ws = pmax - 1;
                                while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--;
                                state.pending = state.pending.slice(0, ws);
                                state.push('hardbreak', 'br', 0);
                            } else {
                                state.pending = state.pending.slice(0, -1);
                                state.push('softbreak', 'br', 0);
                            }
                        } else {
                            state.push('softbreak', 'br', 0);
                        }
                    }
                    pos++;

                    // skip heading spaces for next line
                    while (pos < max && isSpace(state.src.charCodeAt(pos))) {
                        pos++;
                    }
                    state.pos = pos;
                    return true;
                }

                // Process escaped chars and hardbreaks

                const ESCAPED = [];
                for (let i = 0; i < 256; i++) {
                    ESCAPED.push(0);
                }
                '\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function(ch) {
                    ESCAPED[ch.charCodeAt(0)] = 1;
                });

                function escape(state, silent) {
                    let pos = state.pos;
                    const max = state.posMax;
                    if (state.src.charCodeAt(pos) !== 0x5C /* \ */ ) return false;
                    pos++;

                    // '\' at the end of the inline block
                    if (pos >= max) return false;
                    let ch1 = state.src.charCodeAt(pos);
                    if (ch1 === 0x0A) {
                        if (!silent) {
                            state.push('hardbreak', 'br', 0);
                        }
                        pos++;
                        // skip leading whitespaces from next line
                        while (pos < max) {
                            ch1 = state.src.charCodeAt(pos);
                            if (!isSpace(ch1)) break;
                            pos++;
                        }
                        state.pos = pos;
                        return true;
                    }
                    let escapedStr = state.src[pos];
                    if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) {
                        const ch2 = state.src.charCodeAt(pos + 1);
                        if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
                            escapedStr += state.src[pos + 1];
                            pos++;
                        }
                    }
                    const origStr = '\\' + escapedStr;
                    if (!silent) {
                        const token = state.push('text_special', '', 0);
                        if (ch1 < 256 && ESCAPED[ch1] !== 0) {
                            token.content = escapedStr;
                        } else {
                            token.content = origStr;
                        }
                        token.markup = origStr;
                        token.info = 'escape';
                    }
                    state.pos = pos + 1;
                    return true;
                }

                // Parse backticks

                function backtick(state, silent) {
                    let pos = state.pos;
                    const ch = state.src.charCodeAt(pos);
                    if (ch !== 0x60 /* ` */ ) {
                        return false;
                    }
                    const start = pos;
                    pos++;
                    const max = state.posMax;

                    // scan marker length
                    while (pos < max && state.src.charCodeAt(pos) === 0x60 /* ` */ ) {
                        pos++;
                    }
                    const marker = state.src.slice(start, pos);
                    const openerLength = marker.length;
                    if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {
                        if (!silent) state.pending += marker;
                        state.pos += openerLength;
                        return true;
                    }
                    let matchEnd = pos;
                    let matchStart;

                    // Nothing found in the cache, scan until the end of the line (or until marker is found)
                    while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {
                        matchEnd = matchStart + 1;

                        // scan marker length
                        while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60 /* ` */ ) {
                            matchEnd++;
                        }
                        const closerLength = matchEnd - matchStart;
                        if (closerLength === openerLength) {
                            // Found matching closer length.
                            if (!silent) {
                                const token = state.push('code_inline', 'code', 0);
                                token.markup = marker;
                                token.content = state.src.slice(pos, matchStart).replace(/\n/g, ' ').replace(/^ (.+) $/, '$1');
                            }
                            state.pos = matchEnd;
                            return true;
                        }

                        // Some different length found, put it in cache as upper limit of where closer can be found
                        state.backticks[closerLength] = matchStart;
                    }

                    // Scanned through the end, didn't find anything
                    state.backticksScanned = true;
                    if (!silent) state.pending += marker;
                    state.pos += openerLength;
                    return true;
                }

                // ~~strike through~~
                //

                // Insert each marker as a separate text token, and add it to delimiter list
                //
                function strikethrough_tokenize(state, silent) {
                    const start = state.pos;
                    const marker = state.src.charCodeAt(start);
                    if (silent) {
                        return false;
                    }
                    if (marker !== 0x7E /* ~ */ ) {
                        return false;
                    }
                    const scanned = state.scanDelims(state.pos, true);
                    let len = scanned.length;
                    const ch = String.fromCharCode(marker);
                    if (len < 2) {
                        return false;
                    }
                    let token;
                    if (len % 2) {
                        token = state.push('text', '', 0);
                        token.content = ch;
                        len--;
                    }
                    for (let i = 0; i < len; i += 2) {
                        token = state.push('text', '', 0);
                        token.content = ch + ch;
                        state.delimiters.push({
                            marker,
                            length: 0,
                            // disable "rule of 3" length checks meant for emphasis
                            token: state.tokens.length - 1,
                            end: -1,
                            open: scanned.can_open,
                            close: scanned.can_close
                        });
                    }
                    state.pos += scanned.length;
                    return true;
                }

                function postProcess$1(state, delimiters) {
                    let token;
                    const loneMarkers = [];
                    const max = delimiters.length;
                    for (let i = 0; i < max; i++) {
                        const startDelim = delimiters[i];
                        if (startDelim.marker !== 0x7E /* ~ */ ) {
                            continue;
                        }
                        if (startDelim.end === -1) {
                            continue;
                        }
                        const endDelim = delimiters[startDelim.end];
                        token = state.tokens[startDelim.token];
                        token.type = 's_open';
                        token.tag = 's';
                        token.nesting = 1;
                        token.markup = '~~';
                        token.content = '';
                        token = state.tokens[endDelim.token];
                        token.type = 's_close';
                        token.tag = 's';
                        token.nesting = -1;
                        token.markup = '~~';
                        token.content = '';
                        if (state.tokens[endDelim.token - 1].type === 'text' && state.tokens[endDelim.token - 1].content === '~') {
                            loneMarkers.push(endDelim.token - 1);
                        }
                    }

                    // If a marker sequence has an odd number of characters, it's splitted
                    // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
                    // start of the sequence.
                    //
                    // So, we have to move all those markers after subsequent s_close tags.
                    //
                    while (loneMarkers.length) {
                        const i = loneMarkers.pop();
                        let j = i + 1;
                        while (j < state.tokens.length && state.tokens[j].type === 's_close') {
                            j++;
                        }
                        j--;
                        if (i !== j) {
                            token = state.tokens[j];
                            state.tokens[j] = state.tokens[i];
                            state.tokens[i] = token;
                        }
                    }
                }

                // Walk through delimiter list and replace text tokens with tags
                //
                function strikethrough_postProcess(state) {
                    const tokens_meta = state.tokens_meta;
                    const max = state.tokens_meta.length;
                    postProcess$1(state, state.delimiters);
                    for (let curr = 0; curr < max; curr++) {
                        if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
                            postProcess$1(state, tokens_meta[curr].delimiters);
                        }
                    }
                }
                var r_strikethrough = {
                    tokenize: strikethrough_tokenize,
                    postProcess: strikethrough_postProcess
                };

                // Process *this* and _that_
                //

                // Insert each marker as a separate text token, and add it to delimiter list
                //
                function emphasis_tokenize(state, silent) {
                    const start = state.pos;
                    const marker = state.src.charCodeAt(start);
                    if (silent) {
                        return false;
                    }
                    if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */ ) {
                        return false;
                    }
                    const scanned = state.scanDelims(state.pos, marker === 0x2A);
                    for (let i = 0; i < scanned.length; i++) {
                        const token = state.push('text', '', 0);
                        token.content = String.fromCharCode(marker);
                        state.delimiters.push({
                            // Char code of the starting marker (number).
                            //
                            marker,
                            // Total length of these series of delimiters.
                            //
                            length: scanned.length,
                            // A position of the token this delimiter corresponds to.
                            //
                            token: state.tokens.length - 1,
                            // If this delimiter is matched as a valid opener, `end` will be
                            // equal to its position, otherwise it's `-1`.
                            //
                            end: -1,
                            // Boolean flags that determine if this delimiter could open or close
                            // an emphasis.
                            //
                            open: scanned.can_open,
                            close: scanned.can_close
                        });
                    }
                    state.pos += scanned.length;
                    return true;
                }

                function postProcess(state, delimiters) {
                    const max = delimiters.length;
                    for (let i = max - 1; i >= 0; i--) {
                        const startDelim = delimiters[i];
                        if (startDelim.marker !== 0x5F /* _ */ && startDelim.marker !== 0x2A /* * */ ) {
                            continue;
                        }

                        // Process only opening markers
                        if (startDelim.end === -1) {
                            continue;
                        }
                        const endDelim = delimiters[startDelim.end];

                        // If the previous delimiter has the same marker and is adjacent to this one,
                        // merge those into one strong delimiter.
                        //
                        // `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`
                        //
                        const isStrong = i > 0 && delimiters[i - 1].end === startDelim.end + 1 &&
                            // check that first two markers match and adjacent
                            delimiters[i - 1].marker === startDelim.marker && delimiters[i - 1].token === startDelim.token - 1 &&
                            // check that last two markers are adjacent (we can safely assume they match)
                            delimiters[startDelim.end + 1].token === endDelim.token + 1;
                        const ch = String.fromCharCode(startDelim.marker);
                        const token_o = state.tokens[startDelim.token];
                        token_o.type = isStrong ? 'strong_open' : 'em_open';
                        token_o.tag = isStrong ? 'strong' : 'em';
                        token_o.nesting = 1;
                        token_o.markup = isStrong ? ch + ch : ch;
                        token_o.content = '';
                        const token_c = state.tokens[endDelim.token];
                        token_c.type = isStrong ? 'strong_close' : 'em_close';
                        token_c.tag = isStrong ? 'strong' : 'em';
                        token_c.nesting = -1;
                        token_c.markup = isStrong ? ch + ch : ch;
                        token_c.content = '';
                        if (isStrong) {
                            state.tokens[delimiters[i - 1].token].content = '';
                            state.tokens[delimiters[startDelim.end + 1].token].content = '';
                            i--;
                        }
                    }
                }

                // Walk through delimiter list and replace text tokens with tags
                //
                function emphasis_post_process(state) {
                    const tokens_meta = state.tokens_meta;
                    const max = state.tokens_meta.length;
                    postProcess(state, state.delimiters);
                    for (let curr = 0; curr < max; curr++) {
                        if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
                            postProcess(state, tokens_meta[curr].delimiters);
                        }
                    }
                }
                var r_emphasis = {
                    tokenize: emphasis_tokenize,
                    postProcess: emphasis_post_process
                };

                // Process [link](<to> "stuff")

                function link(state, silent) {
                    let code, label, res, ref;
                    let href = '';
                    let title = '';
                    let start = state.pos;
                    let parseReference = true;
                    if (state.src.charCodeAt(state.pos) !== 0x5B /* [ */ ) {
                        return false;
                    }
                    const oldPos = state.pos;
                    const max = state.posMax;
                    const labelStart = state.pos + 1;
                    const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);

                    // parser failed to find ']', so it's not a valid link
                    if (labelEnd < 0) {
                        return false;
                    }
                    let pos = labelEnd + 1;
                    if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */ ) {
                        //
                        // Inline link
                        //

                        // might have found a valid shortcut link, disable reference parsing
                        parseReference = false;

                        // [link](  <href>  "title"  )
                        //        ^^ skipping these spaces
                        pos++;
                        for (; pos < max; pos++) {
                            code = state.src.charCodeAt(pos);
                            if (!isSpace(code) && code !== 0x0A) {
                                break;
                            }
                        }
                        if (pos >= max) {
                            return false;
                        }

                        // [link](  <href>  "title"  )
                        //          ^^^^^^ parsing link destination
                        start = pos;
                        res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
                        if (res.ok) {
                            href = state.md.normalizeLink(res.str);
                            if (state.md.validateLink(href)) {
                                pos = res.pos;
                            } else {
                                href = '';
                            }

                            // [link](  <href>  "title"  )
                            //                ^^ skipping these spaces
                            start = pos;
                            for (; pos < max; pos++) {
                                code = state.src.charCodeAt(pos);
                                if (!isSpace(code) && code !== 0x0A) {
                                    break;
                                }
                            }

                            // [link](  <href>  "title"  )
                            //                  ^^^^^^^ parsing link title
                            res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
                            if (pos < max && start !== pos && res.ok) {
                                title = res.str;
                                pos = res.pos;

                                // [link](  <href>  "title"  )
                                //                         ^^ skipping these spaces
                                for (; pos < max; pos++) {
                                    code = state.src.charCodeAt(pos);
                                    if (!isSpace(code) && code !== 0x0A) {
                                        break;
                                    }
                                }
                            }
                        }
                        if (pos >= max || state.src.charCodeAt(pos) !== 0x29 /* ) */ ) {
                            // parsing a valid shortcut link failed, fallback to reference
                            parseReference = true;
                        }
                        pos++;
                    }
                    if (parseReference) {
                        //
                        // Link reference
                        //
                        if (typeof state.env.references === 'undefined') {
                            return false;
                        }
                        if (pos < max && state.src.charCodeAt(pos) === 0x5B /* [ */ ) {
                            start = pos + 1;
                            pos = state.md.helpers.parseLinkLabel(state, pos);
                            if (pos >= 0) {
                                label = state.src.slice(start, pos++);
                            } else {
                                pos = labelEnd + 1;
                            }
                        } else {
                            pos = labelEnd + 1;
                        }

                        // covers label === '' and label === undefined
                        // (collapsed reference link and shortcut reference link respectively)
                        if (!label) {
                            label = state.src.slice(labelStart, labelEnd);
                        }
                        ref = state.env.references[normalizeReference(label)];
                        if (!ref) {
                            state.pos = oldPos;
                            return false;
                        }
                        href = ref.href;
                        title = ref.title;
                    }

                    //
                    // We found the end of the link, and know for a fact it's a valid link;
                    // so all that's left to do is to call tokenizer.
                    //
                    if (!silent) {
                        state.pos = labelStart;
                        state.posMax = labelEnd;
                        const token_o = state.push('link_open', 'a', 1);
                        const attrs = [
                            ['href', href]
                        ];
                        token_o.attrs = attrs;
                        if (title) {
                            attrs.push(['title', title]);
                        }
                        state.linkLevel++;
                        state.md.inline.tokenize(state);
                        state.linkLevel--;
                        state.push('link_close', 'a', -1);
                    }
                    state.pos = pos;
                    state.posMax = max;
                    return true;
                }

                // Process ![image](<src> "title")

                function image(state, silent) {
                    let code, content, label, pos, ref, res, title, start;
                    let href = '';
                    const oldPos = state.pos;
                    const max = state.posMax;
                    if (state.src.charCodeAt(state.pos) !== 0x21 /* ! */ ) {
                        return false;
                    }
                    if (state.src.charCodeAt(state.pos + 1) !== 0x5B /* [ */ ) {
                        return false;
                    }
                    const labelStart = state.pos + 2;
                    const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);

                    // parser failed to find ']', so it's not a valid link
                    if (labelEnd < 0) {
                        return false;
                    }
                    pos = labelEnd + 1;
                    if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */ ) {
                        //
                        // Inline link
                        //

                        // [link](  <href>  "title"  )
                        //        ^^ skipping these spaces
                        pos++;
                        for (; pos < max; pos++) {
                            code = state.src.charCodeAt(pos);
                            if (!isSpace(code) && code !== 0x0A) {
                                break;
                            }
                        }
                        if (pos >= max) {
                            return false;
                        }

                        // [link](  <href>  "title"  )
                        //          ^^^^^^ parsing link destination
                        start = pos;
                        res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
                        if (res.ok) {
                            href = state.md.normalizeLink(res.str);
                            if (state.md.validateLink(href)) {
                                pos = res.pos;
                            } else {
                                href = '';
                            }
                        }

                        // [link](  <href>  "title"  )
                        //                ^^ skipping these spaces
                        start = pos;
                        for (; pos < max; pos++) {
                            code = state.src.charCodeAt(pos);
                            if (!isSpace(code) && code !== 0x0A) {
                                break;
                            }
                        }

                        // [link](  <href>  "title"  )
                        //                  ^^^^^^^ parsing link title
                        res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
                        if (pos < max && start !== pos && res.ok) {
                            title = res.str;
                            pos = res.pos;

                            // [link](  <href>  "title"  )
                            //                         ^^ skipping these spaces
                            for (; pos < max; pos++) {
                                code = state.src.charCodeAt(pos);
                                if (!isSpace(code) && code !== 0x0A) {
                                    break;
                                }
                            }
                        } else {
                            title = '';
                        }
                        if (pos >= max || state.src.charCodeAt(pos) !== 0x29 /* ) */ ) {
                            state.pos = oldPos;
                            return false;
                        }
                        pos++;
                    } else {
                        //
                        // Link reference
                        //
                        if (typeof state.env.references === 'undefined') {
                            return false;
                        }
                        if (pos < max && state.src.charCodeAt(pos) === 0x5B /* [ */ ) {
                            start = pos + 1;
                            pos = state.md.helpers.parseLinkLabel(state, pos);
                            if (pos >= 0) {
                                label = state.src.slice(start, pos++);
                            } else {
                                pos = labelEnd + 1;
                            }
                        } else {
                            pos = labelEnd + 1;
                        }

                        // covers label === '' and label === undefined
                        // (collapsed reference link and shortcut reference link respectively)
                        if (!label) {
                            label = state.src.slice(labelStart, labelEnd);
                        }
                        ref = state.env.references[normalizeReference(label)];
                        if (!ref) {
                            state.pos = oldPos;
                            return false;
                        }
                        href = ref.href;
                        title = ref.title;
                    }

                    //
                    // We found the end of the link, and know for a fact it's a valid link;
                    // so all that's left to do is to call tokenizer.
                    //
                    if (!silent) {
                        content = state.src.slice(labelStart, labelEnd);
                        const tokens = [];
                        state.md.inline.parse(content, state.md, state.env, tokens);
                        const token = state.push('image', 'img', 0);
                        const attrs = [
                            ['src', href],
                            ['alt', '']
                        ];
                        token.attrs = attrs;
                        token.children = tokens;
                        token.content = content;
                        if (title) {
                            attrs.push(['title', title]);
                        }
                    }
                    state.pos = pos;
                    state.posMax = max;
                    return true;
                }

                // Process autolinks '<protocol:...>'

                /* eslint max-len:0 */
                const EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/;
                /* eslint-disable-next-line no-control-regex */
                const AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;

                function autolink(state, silent) {
                    let pos = state.pos;
                    if (state.src.charCodeAt(pos) !== 0x3C /* < */ ) {
                        return false;
                    }
                    const start = state.pos;
                    const max = state.posMax;
                    for (;;) {
                        if (++pos >= max) return false;
                        const ch = state.src.charCodeAt(pos);
                        if (ch === 0x3C /* < */ ) return false;
                        if (ch === 0x3E /* > */ ) break;
                    }
                    const url = state.src.slice(start + 1, pos);
                    if (AUTOLINK_RE.test(url)) {
                        const fullUrl = state.md.normalizeLink(url);
                        if (!state.md.validateLink(fullUrl)) {
                            return false;
                        }
                        if (!silent) {
                            const token_o = state.push('link_open', 'a', 1);
                            token_o.attrs = [
                                ['href', fullUrl]
                            ];
                            token_o.markup = 'autolink';
                            token_o.info = 'auto';
                            const token_t = state.push('text', '', 0);
                            token_t.content = state.md.normalizeLinkText(url);
                            const token_c = state.push('link_close', 'a', -1);
                            token_c.markup = 'autolink';
                            token_c.info = 'auto';
                        }
                        state.pos += url.length + 2;
                        return true;
                    }
                    if (EMAIL_RE.test(url)) {
                        const fullUrl = state.md.normalizeLink('mailto:' + url);
                        if (!state.md.validateLink(fullUrl)) {
                            return false;
                        }
                        if (!silent) {
                            const token_o = state.push('link_open', 'a', 1);
                            token_o.attrs = [
                                ['href', fullUrl]
                            ];
                            token_o.markup = 'autolink';
                            token_o.info = 'auto';
                            const token_t = state.push('text', '', 0);
                            token_t.content = state.md.normalizeLinkText(url);
                            const token_c = state.push('link_close', 'a', -1);
                            token_c.markup = 'autolink';
                            token_c.info = 'auto';
                        }
                        state.pos += url.length + 2;
                        return true;
                    }
                    return false;
                }

                // Process html tags

                function isLinkOpen(str) {
                    return /^<a[>\s]/i.test(str);
                }

                function isLinkClose(str) {
                    return /^<\/a\s*>/i.test(str);
                }

                function isLetter(ch) {
                    /* eslint no-bitwise:0 */
                    const lc = ch | 0x20; // to lower case
                    return lc >= 0x61 /* a */ && lc <= 0x7a /* z */ ;
                }

                function html_inline(state, silent) {
                    if (!state.md.options.html) {
                        return false;
                    }

                    // Check start
                    const max = state.posMax;
                    const pos = state.pos;
                    if (state.src.charCodeAt(pos) !== 0x3C /* < */ || pos + 2 >= max) {
                        return false;
                    }

                    // Quick fail on second char
                    const ch = state.src.charCodeAt(pos + 1);
                    if (ch !== 0x21 /* ! */ && ch !== 0x3F /* ? */ && ch !== 0x2F /* / */ && !isLetter(ch)) {
                        return false;
                    }
                    const match = state.src.slice(pos).match(HTML_TAG_RE);
                    if (!match) {
                        return false;
                    }
                    if (!silent) {
                        const token = state.push('html_inline', '', 0);
                        token.content = match[0];
                        if (isLinkOpen(token.content)) state.linkLevel++;
                        if (isLinkClose(token.content)) state.linkLevel--;
                    }
                    state.pos += match[0].length;
                    return true;
                }

                // Process html entity - &#123;, &#xAF;, &quot;, ...

                const DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;
                const NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;

                function entity(state, silent) {
                    const pos = state.pos;
                    const max = state.posMax;
                    if (state.src.charCodeAt(pos) !== 0x26 /* & */ ) return false;
                    if (pos + 1 >= max) return false;
                    const ch = state.src.charCodeAt(pos + 1);
                    if (ch === 0x23 /* # */ ) {
                        const match = state.src.slice(pos).match(DIGITAL_RE);
                        if (match) {
                            if (!silent) {
                                const code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);
                                const token = state.push('text_special', '', 0);
                                token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);
                                token.markup = match[0];
                                token.info = 'entity';
                            }
                            state.pos += match[0].length;
                            return true;
                        }
                    } else {
                        const match = state.src.slice(pos).match(NAMED_RE);
                        if (match) {
                            const decoded = entities.decodeHTML(match[0]);
                            if (decoded !== match[0]) {
                                if (!silent) {
                                    const token = state.push('text_special', '', 0);
                                    token.content = decoded;
                                    token.markup = match[0];
                                    token.info = 'entity';
                                }
                                state.pos += match[0].length;
                                return true;
                            }
                        }
                    }
                    return false;
                }

                // For each opening emphasis-like marker find a matching closing one
                //

                function processDelimiters(delimiters) {
                    const openersBottom = {};
                    const max = delimiters.length;
                    if (!max) return;

                    // headerIdx is the first delimiter of the current (where closer is) delimiter run
                    let headerIdx = 0;
                    let lastTokenIdx = -2; // needs any value lower than -1
                    const jumps = [];
                    for (let closerIdx = 0; closerIdx < max; closerIdx++) {
                        const closer = delimiters[closerIdx];
                        jumps.push(0);

                        // markers belong to same delimiter run if:
                        //  - they have adjacent tokens
                        //  - AND markers are the same
                        //
                        if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) {
                            headerIdx = closerIdx;
                        }
                        lastTokenIdx = closer.token;

                        // Length is only used for emphasis-specific "rule of 3",
                        // if it's not defined (in strikethrough or 3rd party plugins),
                        // we can default it to 0 to disable those checks.
                        //
                        closer.length = closer.length || 0;
                        if (!closer.close) continue;

                        // Previously calculated lower bounds (previous fails)
                        // for each marker, each delimiter length modulo 3,
                        // and for whether this closer can be an opener;
                        // https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460
                        /* eslint-disable-next-line no-prototype-builtins */
                        if (!openersBottom.hasOwnProperty(closer.marker)) {
                            openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1];
                        }
                        const minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + closer.length % 3];
                        let openerIdx = headerIdx - jumps[headerIdx] - 1;
                        let newMinOpenerIdx = openerIdx;
                        for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {
                            const opener = delimiters[openerIdx];
                            if (opener.marker !== closer.marker) continue;
                            if (opener.open && opener.end < 0) {
                                let isOddMatch = false;

                                // from spec:
                                //
                                // If one of the delimiters can both open and close emphasis, then the
                                // sum of the lengths of the delimiter runs containing the opening and
                                // closing delimiters must not be a multiple of 3 unless both lengths
                                // are multiples of 3.
                                //
                                if (opener.close || closer.open) {
                                    if ((opener.length + closer.length) % 3 === 0) {
                                        if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {
                                            isOddMatch = true;
                                        }
                                    }
                                }
                                if (!isOddMatch) {
                                    // If previous delimiter cannot be an opener, we can safely skip
                                    // the entire sequence in future checks. This is required to make
                                    // sure algorithm has linear complexity (see *_*_*_*_*_... case).
                                    //
                                    const lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ? jumps[openerIdx - 1] + 1 : 0;
                                    jumps[closerIdx] = closerIdx - openerIdx + lastJump;
                                    jumps[openerIdx] = lastJump;
                                    closer.open = false;
                                    opener.end = closerIdx;
                                    opener.close = false;
                                    newMinOpenerIdx = -1;
                                    // treat next token as start of run,
                                    // it optimizes skips in **<...>**a**<...>** pathological case
                                    lastTokenIdx = -2;
                                    break;
                                }
                            }
                        }
                        if (newMinOpenerIdx !== -1) {
                            // If match for this delimiter run failed, we want to set lower bound for
                            // future lookups. This is required to make sure algorithm has linear
                            // complexity.
                            //
                            // See details here:
                            // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442
                            //
                            openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length || 0) % 3] = newMinOpenerIdx;
                        }
                    }
                }

                function link_pairs(state) {
                    const tokens_meta = state.tokens_meta;
                    const max = state.tokens_meta.length;
                    processDelimiters(state.delimiters);
                    for (let curr = 0; curr < max; curr++) {
                        if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
                            processDelimiters(tokens_meta[curr].delimiters);
                        }
                    }
                }

                // Clean up tokens after emphasis and strikethrough postprocessing:
                // merge adjacent text nodes into one and re-calculate all token levels
                //
                // This is necessary because initially emphasis delimiter markers (*, _, ~)
                // are treated as their own separate text tokens. Then emphasis rule either
                // leaves them as text (needed to merge with adjacent text) or turns them
                // into opening/closing tags (which messes up levels inside).
                //

                function fragments_join(state) {
                    let curr, last;
                    let level = 0;
                    const tokens = state.tokens;
                    const max = state.tokens.length;
                    for (curr = last = 0; curr < max; curr++) {
                        // re-calculate levels after emphasis/strikethrough turns some text nodes
                        // into opening/closing tags
                        if (tokens[curr].nesting < 0) level--; // closing tag
                        tokens[curr].level = level;
                        if (tokens[curr].nesting > 0) level++; // opening tag

                        if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') {
                            // collapse two adjacent text nodes
                            tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
                        } else {
                            if (curr !== last) {
                                tokens[last] = tokens[curr];
                            }
                            last++;
                        }
                    }
                    if (curr !== last) {
                        tokens.length = last;
                    }
                }

                /** internal
                 * class ParserInline
                 *
                 * Tokenizes paragraph content.
                 **/

                // Parser rules

                const _rules = [
                    ['text', text],
                    ['linkify', linkify],
                    ['newline', newline],
                    ['escape', escape],
                    ['backticks', backtick],
                    ['strikethrough', r_strikethrough.tokenize],
                    ['emphasis', r_emphasis.tokenize],
                    ['link', link],
                    ['image', image],
                    ['autolink', autolink],
                    ['html_inline', html_inline],
                    ['entity', entity]
                ];

                // `rule2` ruleset was created specifically for emphasis/strikethrough
                // post-processing and may be changed in the future.
                //
                // Don't use this for anything except pairs (plugins working with `balance_pairs`).
                //
                const _rules2 = [
                    ['balance_pairs', link_pairs],
                    ['strikethrough', r_strikethrough.postProcess],
                    ['emphasis', r_emphasis.postProcess],
                    // rules for pairs separate '**' into its own text tokens, which may be left unused,
                    // rule below merges unused segments back with the rest of the text
                    ['fragments_join', fragments_join]
                ];

                /**
                 * new ParserInline()
                 **/
                function ParserInline() {
                    /**
                     * ParserInline#ruler -> Ruler
                     *
                     * [[Ruler]] instance. Keep configuration of inline rules.
                     **/
                    this.ruler = new Ruler();
                    for (let i = 0; i < _rules.length; i++) {
                        this.ruler.push(_rules[i][0], _rules[i][1]);
                    }

                    /**
                     * ParserInline#ruler2 -> Ruler
                     *
                     * [[Ruler]] instance. Second ruler used for post-processing
                     * (e.g. in emphasis-like rules).
                     **/
                    this.ruler2 = new Ruler();
                    for (let i = 0; i < _rules2.length; i++) {
                        this.ruler2.push(_rules2[i][0], _rules2[i][1]);
                    }
                }

                // Skip single token by running all rules in validation mode;
                // returns `true` if any rule reported success
                //
                ParserInline.prototype.skipToken = function(state) {
                    const pos = state.pos;
                    const rules = this.ruler.getRules('');
                    const len = rules.length;
                    const maxNesting = state.md.options.maxNesting;
                    const cache = state.cache;
                    if (typeof cache[pos] !== 'undefined') {
                        state.pos = cache[pos];
                        return;
                    }
                    let ok = false;
                    if (state.level < maxNesting) {
                        for (let i = 0; i < len; i++) {
                            // Increment state.level and decrement it later to limit recursion.
                            // It's harmless to do here, because no tokens are created. But ideally,
                            // we'd need a separate private state variable for this purpose.
                            //
                            state.level++;
                            ok = rules[i](state, true);
                            state.level--;
                            if (ok) {
                                if (pos >= state.pos) {
                                    throw new Error("inline rule didn't increment state.pos");
                                }
                                break;
                            }
                        }
                    } else {
                        // Too much nesting, just skip until the end of the paragraph.
                        //
                        // NOTE: this will cause links to behave incorrectly in the following case,
                        //       when an amount of `[` is exactly equal to `maxNesting + 1`:
                        //
                        //       [[[[[[[[[[[[[[[[[[[[[foo]()
                        //
                        // TODO: remove this workaround when CM standard will allow nested links
                        //       (we can replace it by preventing links from being parsed in
                        //       validation mode)
                        //
                        state.pos = state.posMax;
                    }
                    if (!ok) {
                        state.pos++;
                    }
                    cache[pos] = state.pos;
                };

                // Generate tokens for input range
                //
                ParserInline.prototype.tokenize = function(state) {
                    const rules = this.ruler.getRules('');
                    const len = rules.length;
                    const end = state.posMax;
                    const maxNesting = state.md.options.maxNesting;
                    while (state.pos < end) {
                        // Try all possible rules.
                        // On success, rule should:
                        //
                        // - update `state.pos`
                        // - update `state.tokens`
                        // - return true
                        const prevPos = state.pos;
                        let ok = false;
                        if (state.level < maxNesting) {
                            for (let i = 0; i < len; i++) {
                                ok = rules[i](state, false);
                                if (ok) {
                                    if (prevPos >= state.pos) {
                                        throw new Error("inline rule didn't increment state.pos");
                                    }
                                    break;
                                }
                            }
                        }
                        if (ok) {
                            if (state.pos >= end) {
                                break;
                            }
                            continue;
                        }
                        state.pending += state.src[state.pos++];
                    }
                    if (state.pending) {
                        state.pushPending();
                    }
                };

                /**
                 * ParserInline.parse(str, md, env, outTokens)
                 *
                 * Process input string and push inline tokens into `outTokens`
                 **/
                ParserInline.prototype.parse = function(str, md, env, outTokens) {
                    const state = new this.State(str, md, env, outTokens);
                    this.tokenize(state);
                    const rules = this.ruler2.getRules('');
                    const len = rules.length;
                    for (let i = 0; i < len; i++) {
                        rules[i](state);
                    }
                };
                ParserInline.prototype.State = StateInline;

                // markdown-it default options

                var cfg_default = {
                    options: {
                        // Enable HTML tags in source
                        html: false,
                        // Use '/' to close single tags (<br />)
                        xhtmlOut: false,
                        // Convert '\n' in paragraphs into <br>
                        breaks: false,
                        // CSS language prefix for fenced blocks
                        langPrefix: 'language-',
                        // autoconvert URL-like texts to links
                        linkify: false,
                        // Enable some language-neutral replacements + quotes beautification
                        typographer: false,
                        // Double + single quotes replacement pairs, when typographer enabled,
                        // and smartquotes on. Could be either a String or an Array.
                        //
                        // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
                        // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
                        quotes: '\u201c\u201d\u2018\u2019',
                        /* “”‘’ */

                        // Highlighter function. Should return escaped HTML,
                        // or '' if the source string is not changed and should be escaped externaly.
                        // If result starts with <pre... internal wrapper is skipped.
                        //
                        // function (/*str, lang*/) { return ''; }
                        //
                        highlight: null,
                        // Internal protection, recursion limit
                        maxNesting: 100
                    },
                    components: {
                        core: {},
                        block: {},
                        inline: {}
                    }
                };

                // "Zero" preset, with nothing enabled. Useful for manual configuring of simple
                // modes. For example, to parse bold/italic only.

                var cfg_zero = {
                    options: {
                        // Enable HTML tags in source
                        html: false,
                        // Use '/' to close single tags (<br />)
                        xhtmlOut: false,
                        // Convert '\n' in paragraphs into <br>
                        breaks: false,
                        // CSS language prefix for fenced blocks
                        langPrefix: 'language-',
                        // autoconvert URL-like texts to links
                        linkify: false,
                        // Enable some language-neutral replacements + quotes beautification
                        typographer: false,
                        // Double + single quotes replacement pairs, when typographer enabled,
                        // and smartquotes on. Could be either a String or an Array.
                        //
                        // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
                        // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
                        quotes: '\u201c\u201d\u2018\u2019',
                        /* “”‘’ */

                        // Highlighter function. Should return escaped HTML,
                        // or '' if the source string is not changed and should be escaped externaly.
                        // If result starts with <pre... internal wrapper is skipped.
                        //
                        // function (/*str, lang*/) { return ''; }
                        //
                        highlight: null,
                        // Internal protection, recursion limit
                        maxNesting: 20
                    },
                    components: {
                        core: {
                            rules: ['normalize', 'block', 'inline', 'text_join']
                        },
                        block: {
                            rules: ['paragraph']
                        },
                        inline: {
                            rules: ['text'],
                            rules2: ['balance_pairs', 'fragments_join']
                        }
                    }
                };

                // Commonmark default options

                var cfg_commonmark = {
                    options: {
                        // Enable HTML tags in source
                        html: true,
                        // Use '/' to close single tags (<br />)
                        xhtmlOut: true,
                        // Convert '\n' in paragraphs into <br>
                        breaks: false,
                        // CSS language prefix for fenced blocks
                        langPrefix: 'language-',
                        // autoconvert URL-like texts to links
                        linkify: false,
                        // Enable some language-neutral replacements + quotes beautification
                        typographer: false,
                        // Double + single quotes replacement pairs, when typographer enabled,
                        // and smartquotes on. Could be either a String or an Array.
                        //
                        // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
                        // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
                        quotes: '\u201c\u201d\u2018\u2019',
                        /* “”‘’ */

                        // Highlighter function. Should return escaped HTML,
                        // or '' if the source string is not changed and should be escaped externaly.
                        // If result starts with <pre... internal wrapper is skipped.
                        //
                        // function (/*str, lang*/) { return ''; }
                        //
                        highlight: null,
                        // Internal protection, recursion limit
                        maxNesting: 20
                    },
                    components: {
                        core: {
                            rules: ['normalize', 'block', 'inline', 'text_join']
                        },
                        block: {
                            rules: ['blockquote', 'code', 'fence', 'heading', 'hr', 'html_block', 'lheading', 'list', 'reference', 'paragraph']
                        },
                        inline: {
                            rules: ['autolink', 'backticks', 'emphasis', 'entity', 'escape', 'html_inline', 'image', 'link', 'newline', 'text'],
                            rules2: ['balance_pairs', 'emphasis', 'fragments_join']
                        }
                    }
                };

                // Main parser class

                const config = {
                    default: cfg_default,
                    zero: cfg_zero,
                    commonmark: cfg_commonmark
                };

                //
                // This validator can prohibit more than really needed to prevent XSS. It's a
                // tradeoff to keep code simple and to be secure by default.
                //
                // If you need different setup - override validator method as you wish. Or
                // replace it with dummy function and use external sanitizer.
                //

                const BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
                const GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;

                function validateLink(url) {
                    // url should be normalized at this point, and existing entities are decoded
                    const str = url.trim().toLowerCase();
                    return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) : true;
                }
                const RECODE_HOSTNAME_FOR = ['http:', 'https:', 'mailto:'];

                function normalizeLink(url) {
                    const parsed = mdurl__namespace.parse(url, true);
                    if (parsed.hostname) {
                        // Encode hostnames in urls like:
                        // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
                        //
                        // We don't encode unknown schemas, because it's likely that we encode
                        // something we shouldn't (e.g. `skype:name` treated as `skype:host`)
                        //
                        if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
                            try {
                                parsed.hostname = punycode.toASCII(parsed.hostname);
                            } catch (er) {
                                /**/ }
                        }
                    }
                    return mdurl__namespace.encode(mdurl__namespace.format(parsed));
                }

                function normalizeLinkText(url) {
                    const parsed = mdurl__namespace.parse(url, true);
                    if (parsed.hostname) {
                        // Encode hostnames in urls like:
                        // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
                        //
                        // We don't encode unknown schemas, because it's likely that we encode
                        // something we shouldn't (e.g. `skype:name` treated as `skype:host`)
                        //
                        if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
                            try {
                                parsed.hostname = punycode.toUnicode(parsed.hostname);
                            } catch (er) {
                                /**/ }
                        }
                    }

                    // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720
                    return mdurl__namespace.decode(mdurl__namespace.format(parsed), mdurl__namespace.decode.defaultChars + '%');
                }

                /**
                 * class MarkdownIt
                 *
                 * Main parser/renderer class.
                 *
                 * ##### Usage
                 *
                 * ```javascript
                 * // node.js, "classic" way:
                 * var MarkdownIt = require('markdown-it'),
                 *     md = new MarkdownIt();
                 * var result = md.render('# markdown-it rulezz!');
                 *
                 * // node.js, the same, but with sugar:
                 * var md = require('markdown-it')();
                 * var result = md.render('# markdown-it rulezz!');
                 *
                 * // browser without AMD, added to "window" on script load
                 * // Note, there are no dash.
                 * var md = window.markdownit();
                 * var result = md.render('# markdown-it rulezz!');
                 * ```
                 *
                 * Single line rendering, without paragraph wrap:
                 *
                 * ```javascript
                 * var md = require('markdown-it')();
                 * var result = md.renderInline('__markdown-it__ rulezz!');
                 * ```
                 **/

                /**
                 * new MarkdownIt([presetName, options])
                 * - presetName (String): optional, `commonmark` / `zero`
                 * - options (Object)
                 *
                 * Creates parser instanse with given config. Can be called without `new`.
                 *
                 * ##### presetName
                 *
                 * MarkdownIt provides named presets as a convenience to quickly
                 * enable/disable active syntax rules and options for common use cases.
                 *
                 * - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.mjs) -
                 *   configures parser to strict [CommonMark](http://commonmark.org/) mode.
                 * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.mjs) -
                 *   similar to GFM, used when no preset name given. Enables all available rules,
                 *   but still without html, typographer & autolinker.
                 * - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.mjs) -
                 *   all rules disabled. Useful to quickly setup your config via `.enable()`.
                 *   For example, when you need only `bold` and `italic` markup and nothing else.
                 *
                 * ##### options:
                 *
                 * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!
                 *   That's not safe! You may need external sanitizer to protect output from XSS.
                 *   It's better to extend features via plugins, instead of enabling HTML.
                 * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags
                 *   (`<br />`). This is needed only for full CommonMark compatibility. In real
                 *   world you will need HTML output.
                 * - __breaks__ - `false`. Set `true` to convert `\n` in paragraphs into `<br>`.
                 * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.
                 *   Can be useful for external highlighters.
                 * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.
                 * - __typographer__  - `false`. Set `true` to enable [some language-neutral
                 *   replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.mjs) +
                 *   quotes beautification (smartquotes).
                 * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement
                 *   pairs, when typographer enabled and smartquotes on. For example, you can
                 *   use `'«»„“'` for Russian, `'„“‚‘'` for German, and
                 *   `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp).
                 * - __highlight__ - `null`. Highlighter function for fenced code blocks.
                 *   Highlighter `function (str, lang)` should return escaped HTML. It can also
                 *   return empty string if the source was not changed and should be escaped
                 *   externaly. If result starts with <pre... internal wrapper is skipped.
                 *
                 * ##### Example
                 *
                 * ```javascript
                 * // commonmark mode
                 * var md = require('markdown-it')('commonmark');
                 *
                 * // default mode
                 * var md = require('markdown-it')();
                 *
                 * // enable everything
                 * var md = require('markdown-it')({
                 *   html: true,
                 *   linkify: true,
                 *   typographer: true
                 * });
                 * ```
                 *
                 * ##### Syntax highlighting
                 *
                 * ```js
                 * var hljs = require('highlight.js') // https://highlightjs.org/
                 *
                 * var md = require('markdown-it')({
                 *   highlight: function (str, lang) {
                 *     if (lang && hljs.getLanguage(lang)) {
                 *       try {
                 *         return hljs.highlight(str, { language: lang, ignoreIllegals: true }).value;
                 *       } catch (__) {}
                 *     }
                 *
                 *     return ''; // use external default escaping
                 *   }
                 * });
                 * ```
                 *
                 * Or with full wrapper override (if you need assign class to `<pre>` or `<code>`):
                 *
                 * ```javascript
                 * var hljs = require('highlight.js') // https://highlightjs.org/
                 *
                 * // Actual default values
                 * var md = require('markdown-it')({
                 *   highlight: function (str, lang) {
                 *     if (lang && hljs.getLanguage(lang)) {
                 *       try {
                 *         return '<pre><code class="hljs">' +
                 *                hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
                 *                '</code></pre>';
                 *       } catch (__) {}
                 *     }
                 *
                 *     return '<pre><code class="hljs">' + md.utils.escapeHtml(str) + '</code></pre>';
                 *   }
                 * });
                 * ```
                 *
                 **/
                function MarkdownIt(presetName, options) {
                    if (!(this instanceof MarkdownIt)) {
                        return new MarkdownIt(presetName, options);
                    }
                    if (!options) {
                        if (!isString(presetName)) {
                            options = presetName || {};
                            presetName = 'default';
                        }
                    }

                    /**
                     * MarkdownIt#inline -> ParserInline
                     *
                     * Instance of [[ParserInline]]. You may need it to add new rules when
                     * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
                     * [[MarkdownIt.enable]].
                     **/
                    this.inline = new ParserInline();

                    /**
                     * MarkdownIt#block -> ParserBlock
                     *
                     * Instance of [[ParserBlock]]. You may need it to add new rules when
                     * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
                     * [[MarkdownIt.enable]].
                     **/
                    this.block = new ParserBlock();

                    /**
                     * MarkdownIt#core -> Core
                     *
                     * Instance of [[Core]] chain executor. You may need it to add new rules when
                     * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
                     * [[MarkdownIt.enable]].
                     **/
                    this.core = new Core();

                    /**
                     * MarkdownIt#renderer -> Renderer
                     *
                     * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
                     * rules for new token types, generated by plugins.
                     *
                     * ##### Example
                     *
                     * ```javascript
                     * var md = require('markdown-it')();
                     *
                     * function myToken(tokens, idx, options, env, self) {
                     *   //...
                     *   return result;
                     * };
                     *
                     * md.renderer.rules['my_token'] = myToken
                     * ```
                     *
                     * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs).
                     **/
                    this.renderer = new Renderer();

                    /**
                     * MarkdownIt#linkify -> LinkifyIt
                     *
                     * [linkify-it](https://github.com/markdown-it/linkify-it) instance.
                     * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.mjs)
                     * rule.
                     **/
                    this.linkify = new LinkifyIt();

                    /**
                     * MarkdownIt#validateLink(url) -> Boolean
                     *
                     * Link validation function. CommonMark allows too much in links. By default
                     * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
                     * except some embedded image types.
                     *
                     * You can change this behaviour:
                     *
                     * ```javascript
                     * var md = require('markdown-it')();
                     * // enable everything
                     * md.validateLink = function () { return true; }
                     * ```
                     **/
                    this.validateLink = validateLink;

                    /**
                     * MarkdownIt#normalizeLink(url) -> String
                     *
                     * Function used to encode link url to a machine-readable format,
                     * which includes url-encoding, punycode, etc.
                     **/
                    this.normalizeLink = normalizeLink;

                    /**
                     * MarkdownIt#normalizeLinkText(url) -> String
                     *
                     * Function used to decode link url to a human-readable format`
                     **/
                    this.normalizeLinkText = normalizeLinkText;

                    // Expose utils & helpers for easy acces from plugins

                    /**
                     * MarkdownIt#utils -> utils
                     *
                     * Assorted utility functions, useful to write plugins. See details
                     * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.mjs).
                     **/
                    this.utils = utils;

                    /**
                     * MarkdownIt#helpers -> helpers
                     *
                     * Link components parser functions, useful to write plugins. See details
                     * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
                     **/
                    this.helpers = assign({}, helpers);
                    this.options = {};
                    this.configure(presetName);
                    if (options) {
                        this.set(options);
                    }
                }

                /** chainable
                 * MarkdownIt.set(options)
                 *
                 * Set parser options (in the same format as in constructor). Probably, you
                 * will never need it, but you can change options after constructor call.
                 *
                 * ##### Example
                 *
                 * ```javascript
                 * var md = require('markdown-it')()
                 *             .set({ html: true, breaks: true })
                 *             .set({ typographer, true });
                 * ```
                 *
                 * __Note:__ To achieve the best possible performance, don't modify a
                 * `markdown-it` instance options on the fly. If you need multiple configurations
                 * it's best to create multiple instances and initialize each with separate
                 * config.
                 **/
                MarkdownIt.prototype.set = function(options) {
                    assign(this.options, options);
                    return this;
                };

                /** chainable, internal
                 * MarkdownIt.configure(presets)
                 *
                 * Batch load of all options and compenent settings. This is internal method,
                 * and you probably will not need it. But if you will - see available presets
                 * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
                 *
                 * We strongly recommend to use presets instead of direct config loads. That
                 * will give better compatibility with next versions.
                 **/
                MarkdownIt.prototype.configure = function(presets) {
                    const self = this;
                    if (isString(presets)) {
                        const presetName = presets;
                        presets = config[presetName];
                        if (!presets) {
                            throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name');
                        }
                    }
                    if (!presets) {
                        throw new Error('Wrong `markdown-it` preset, can\'t be empty');
                    }
                    if (presets.options) {
                        self.set(presets.options);
                    }
                    if (presets.components) {
                        Object.keys(presets.components).forEach(function(name) {
                            if (presets.components[name].rules) {
                                self[name].ruler.enableOnly(presets.components[name].rules);
                            }
                            if (presets.components[name].rules2) {
                                self[name].ruler2.enableOnly(presets.components[name].rules2);
                            }
                        });
                    }
                    return this;
                };

                /** chainable
                 * MarkdownIt.enable(list, ignoreInvalid)
                 * - list (String|Array): rule name or list of rule names to enable
                 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
                 *
                 * Enable list or rules. It will automatically find appropriate components,
                 * containing rules with given names. If rule not found, and `ignoreInvalid`
                 * not set - throws exception.
                 *
                 * ##### Example
                 *
                 * ```javascript
                 * var md = require('markdown-it')()
                 *             .enable(['sub', 'sup'])
                 *             .disable('smartquotes');
                 * ```
                 **/
                MarkdownIt.prototype.enable = function(list, ignoreInvalid) {
                    let result = [];
                    if (!Array.isArray(list)) {
                        list = [list];
                    }
                    ['core', 'block', 'inline'].forEach(function(chain) {
                        result = result.concat(this[chain].ruler.enable(list, true));
                    }, this);
                    result = result.concat(this.inline.ruler2.enable(list, true));
                    const missed = list.filter(function(name) {
                        return result.indexOf(name) < 0;
                    });
                    if (missed.length && !ignoreInvalid) {
                        throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);
                    }
                    return this;
                };

                /** chainable
                 * MarkdownIt.disable(list, ignoreInvalid)
                 * - list (String|Array): rule name or list of rule names to disable.
                 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
                 *
                 * The same as [[MarkdownIt.enable]], but turn specified rules off.
                 **/
                MarkdownIt.prototype.disable = function(list, ignoreInvalid) {
                    let result = [];
                    if (!Array.isArray(list)) {
                        list = [list];
                    }
                    ['core', 'block', 'inline'].forEach(function(chain) {
                        result = result.concat(this[chain].ruler.disable(list, true));
                    }, this);
                    result = result.concat(this.inline.ruler2.disable(list, true));
                    const missed = list.filter(function(name) {
                        return result.indexOf(name) < 0;
                    });
                    if (missed.length && !ignoreInvalid) {
                        throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);
                    }
                    return this;
                };

                /** chainable
                 * MarkdownIt.use(plugin, params)
                 *
                 * Load specified plugin with given params into current parser instance.
                 * It's just a sugar to call `plugin(md, params)` with curring.
                 *
                 * ##### Example
                 *
                 * ```javascript
                 * var iterator = require('markdown-it-for-inline');
                 * var md = require('markdown-it')()
                 *             .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
                 *               tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
                 *             });
                 * ```
                 **/
                MarkdownIt.prototype.use = function(plugin /*, params, ... */ ) {
                    const args = [this].concat(Array.prototype.slice.call(arguments, 1));
                    plugin.apply(plugin, args);
                    return this;
                };

                /** internal
                 * MarkdownIt.parse(src, env) -> Array
                 * - src (String): source string
                 * - env (Object): environment sandbox
                 *
                 * Parse input string and return list of block tokens (special token type
                 * "inline" will contain list of inline tokens). You should not call this
                 * method directly, until you write custom renderer (for example, to produce
                 * AST).
                 *
                 * `env` is used to pass data between "distributed" rules and return additional
                 * metadata like reference info, needed for the renderer. It also can be used to
                 * inject data in specific cases. Usually, you will be ok to pass `{}`,
                 * and then pass updated object to renderer.
                 **/
                MarkdownIt.prototype.parse = function(src, env) {
                    if (typeof src !== 'string') {
                        throw new Error('Input data should be a String');
                    }
                    const state = new this.core.State(src, this, env);
                    this.core.process(state);
                    return state.tokens;
                };

                /**
                 * MarkdownIt.render(src [, env]) -> String
                 * - src (String): source string
                 * - env (Object): environment sandbox
                 *
                 * Render markdown string into html. It does all magic for you :).
                 *
                 * `env` can be used to inject additional metadata (`{}` by default).
                 * But you will not need it with high probability. See also comment
                 * in [[MarkdownIt.parse]].
                 **/
                MarkdownIt.prototype.render = function(src, env) {
                    env = env || {};
                    return this.renderer.render(this.parse(src, env), this.options, env);
                };

                /** internal
                 * MarkdownIt.parseInline(src, env) -> Array
                 * - src (String): source string
                 * - env (Object): environment sandbox
                 *
                 * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
                 * block tokens list with the single `inline` element, containing parsed inline
                 * tokens in `children` property. Also updates `env` object.
                 **/
                MarkdownIt.prototype.parseInline = function(src, env) {
                    const state = new this.core.State(src, this, env);
                    state.inlineMode = true;
                    this.core.process(state);
                    return state.tokens;
                };

                /**
                 * MarkdownIt.renderInline(src [, env]) -> String
                 * - src (String): source string
                 * - env (Object): environment sandbox
                 *
                 * Similar to [[MarkdownIt.render]] but for single paragraph content. Result
                 * will NOT be wrapped into `<p>` tags.
                 **/
                MarkdownIt.prototype.renderInline = function(src, env) {
                    env = env || {};
                    return this.renderer.render(this.parseInline(src, env), this.options, env);
                };
                module.exports = MarkdownIt;

                /***/
            }),

        /***/
        "../../../node_modules/mdurl/build/index.cjs.js":
            /*!******************************************************!*\
              !*** ../../../node_modules/mdurl/build/index.cjs.js ***!
              \******************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                /* eslint-disable no-bitwise */
                const decodeCache = {};

                function getDecodeCache(exclude) {
                    let cache = decodeCache[exclude];
                    if (cache) {
                        return cache;
                    }
                    cache = decodeCache[exclude] = [];
                    for (let i = 0; i < 128; i++) {
                        const ch = String.fromCharCode(i);
                        cache.push(ch);
                    }
                    for (let i = 0; i < exclude.length; i++) {
                        const ch = exclude.charCodeAt(i);
                        cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);
                    }
                    return cache;
                }

                // Decode percent-encoded string.
                //
                function decode(string, exclude) {
                    if (typeof exclude !== 'string') {
                        exclude = decode.defaultChars;
                    }
                    const cache = getDecodeCache(exclude);
                    return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {
                        let result = '';
                        for (let i = 0, l = seq.length; i < l; i += 3) {
                            const b1 = parseInt(seq.slice(i + 1, i + 3), 16);
                            if (b1 < 0x80) {
                                result += cache[b1];
                                continue;
                            }
                            if ((b1 & 0xE0) === 0xC0 && i + 3 < l) {
                                // 110xxxxx 10xxxxxx
                                const b2 = parseInt(seq.slice(i + 4, i + 6), 16);
                                if ((b2 & 0xC0) === 0x80) {
                                    const chr = b1 << 6 & 0x7C0 | b2 & 0x3F;
                                    if (chr < 0x80) {
                                        result += '\ufffd\ufffd';
                                    } else {
                                        result += String.fromCharCode(chr);
                                    }
                                    i += 3;
                                    continue;
                                }
                            }
                            if ((b1 & 0xF0) === 0xE0 && i + 6 < l) {
                                // 1110xxxx 10xxxxxx 10xxxxxx
                                const b2 = parseInt(seq.slice(i + 4, i + 6), 16);
                                const b3 = parseInt(seq.slice(i + 7, i + 9), 16);
                                if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
                                    const chr = b1 << 12 & 0xF000 | b2 << 6 & 0xFC0 | b3 & 0x3F;
                                    if (chr < 0x800 || chr >= 0xD800 && chr <= 0xDFFF) {
                                        result += '\ufffd\ufffd\ufffd';
                                    } else {
                                        result += String.fromCharCode(chr);
                                    }
                                    i += 6;
                                    continue;
                                }
                            }
                            if ((b1 & 0xF8) === 0xF0 && i + 9 < l) {
                                // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx
                                const b2 = parseInt(seq.slice(i + 4, i + 6), 16);
                                const b3 = parseInt(seq.slice(i + 7, i + 9), 16);
                                const b4 = parseInt(seq.slice(i + 10, i + 12), 16);
                                if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {
                                    let chr = b1 << 18 & 0x1C0000 | b2 << 12 & 0x3F000 | b3 << 6 & 0xFC0 | b4 & 0x3F;
                                    if (chr < 0x10000 || chr > 0x10FFFF) {
                                        result += '\ufffd\ufffd\ufffd\ufffd';
                                    } else {
                                        chr -= 0x10000;
                                        result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));
                                    }
                                    i += 9;
                                    continue;
                                }
                            }
                            result += '\ufffd';
                        }
                        return result;
                    });
                }
                decode.defaultChars = ';/?:@&=+$,#';
                decode.componentChars = '';
                const encodeCache = {};

                // Create a lookup array where anything but characters in `chars` string
                // and alphanumeric chars is percent-encoded.
                //
                function getEncodeCache(exclude) {
                    let cache = encodeCache[exclude];
                    if (cache) {
                        return cache;
                    }
                    cache = encodeCache[exclude] = [];
                    for (let i = 0; i < 128; i++) {
                        const ch = String.fromCharCode(i);
                        if (/^[0-9a-z]$/i.test(ch)) {
                            // always allow unencoded alphanumeric characters
                            cache.push(ch);
                        } else {
                            cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));
                        }
                    }
                    for (let i = 0; i < exclude.length; i++) {
                        cache[exclude.charCodeAt(i)] = exclude[i];
                    }
                    return cache;
                }

                // Encode unsafe characters with percent-encoding, skipping already
                // encoded sequences.
                //
                //  - string       - string to encode
                //  - exclude      - list of characters to ignore (in addition to a-zA-Z0-9)
                //  - keepEscaped  - don't encode '%' in a correct escape sequence (default: true)
                //
                function encode(string, exclude, keepEscaped) {
                    if (typeof exclude !== 'string') {
                        // encode(string, keepEscaped)
                        keepEscaped = exclude;
                        exclude = encode.defaultChars;
                    }
                    if (typeof keepEscaped === 'undefined') {
                        keepEscaped = true;
                    }
                    const cache = getEncodeCache(exclude);
                    let result = '';
                    for (let i = 0, l = string.length; i < l; i++) {
                        const code = string.charCodeAt(i);
                        if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {
                            if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {
                                result += string.slice(i, i + 3);
                                i += 2;
                                continue;
                            }
                        }
                        if (code < 128) {
                            result += cache[code];
                            continue;
                        }
                        if (code >= 0xD800 && code <= 0xDFFF) {
                            if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {
                                const nextCode = string.charCodeAt(i + 1);
                                if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {
                                    result += encodeURIComponent(string[i] + string[i + 1]);
                                    i++;
                                    continue;
                                }
                            }
                            result += '%EF%BF%BD';
                            continue;
                        }
                        result += encodeURIComponent(string[i]);
                    }
                    return result;
                }
                encode.defaultChars = ";/?:@&=+$,-_.!~*'()#";
                encode.componentChars = "-_.!~*'()";

                function format(url) {
                    let result = '';
                    result += url.protocol || '';
                    result += url.slashes ? '//' : '';
                    result += url.auth ? url.auth + '@' : '';
                    if (url.hostname && url.hostname.indexOf(':') !== -1) {
                        // ipv6 address
                        result += '[' + url.hostname + ']';
                    } else {
                        result += url.hostname || '';
                    }
                    result += url.port ? ':' + url.port : '';
                    result += url.pathname || '';
                    result += url.search || '';
                    result += url.hash || '';
                    return result;
                }

                // Copyright Joyent, Inc. and other Node contributors.
                //
                // Permission is hereby granted, free of charge, to any person obtaining a
                // copy of this software and associated documentation files (the
                // "Software"), to deal in the Software without restriction, including
                // without limitation the rights to use, copy, modify, merge, publish,
                // distribute, sublicense, and/or sell copies of the Software, and to permit
                // persons to whom the Software is furnished to do so, subject to the
                // following conditions:
                //
                // The above copyright notice and this permission notice shall be included
                // in all copies or substantial portions of the Software.
                //
                // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
                // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
                // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
                // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
                // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
                // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
                // USE OR OTHER DEALINGS IN THE SOFTWARE.

                //
                // Changes from joyent/node:
                //
                // 1. No leading slash in paths,
                //    e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`
                //
                // 2. Backslashes are not replaced with slashes,
                //    so `http:\\example.org\` is treated like a relative path
                //
                // 3. Trailing colon is treated like a part of the path,
                //    i.e. in `http://example.org:foo` pathname is `:foo`
                //
                // 4. Nothing is URL-encoded in the resulting object,
                //    (in joyent/node some chars in auth and paths are encoded)
                //
                // 5. `url.parse()` does not have `parseQueryString` argument
                //
                // 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,
                //    which can be constructed using other parts of the url.
                //

                function Url() {
                    this.protocol = null;
                    this.slashes = null;
                    this.auth = null;
                    this.port = null;
                    this.hostname = null;
                    this.hash = null;
                    this.search = null;
                    this.pathname = null;
                }

                // Reference: RFC 3986, RFC 1808, RFC 2396

                // define these here so at least they only have to be
                // compiled once on the first module load.
                const protocolPattern = /^([a-z0-9.+-]+:)/i;
                const portPattern = /:[0-9]*$/;

                // Special case for a simple path URL
                /* eslint-disable-next-line no-useless-escape */
                const simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/;

                // RFC 2396: characters reserved for delimiting URLs.
                // We actually just auto-escape these.
                const delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'];

                // RFC 2396: characters not allowed for various reasons.
                const unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims);

                // Allowed by RFCs, but cause of XSS attacks.  Always escape these.
                const autoEscape = ['\''].concat(unwise);
                // Characters that are never ever allowed in a hostname.
                // Note that any invalid chars are also handled, but these
                // are the ones that are *expected* to be seen, so we fast-path
                // them.
                const nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape);
                const hostEndingChars = ['/', '?', '#'];
                const hostnameMaxLen = 255;
                const hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/;
                const hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/;
                // protocols that can allow "unsafe" and "unwise" chars.
                // protocols that never have a hostname.
                const hostlessProtocol = {
                    javascript: true,
                    'javascript:': true
                };
                // protocols that always contain a // bit.
                const slashedProtocol = {
                    http: true,
                    https: true,
                    ftp: true,
                    gopher: true,
                    file: true,
                    'http:': true,
                    'https:': true,
                    'ftp:': true,
                    'gopher:': true,
                    'file:': true
                };

                function urlParse(url, slashesDenoteHost) {
                    if (url && url instanceof Url) return url;
                    const u = new Url();
                    u.parse(url, slashesDenoteHost);
                    return u;
                }
                Url.prototype.parse = function(url, slashesDenoteHost) {
                    let lowerProto, hec, slashes;
                    let rest = url;

                    // trim before proceeding.
                    // This is to support parse stuff like "  http://foo.com  \n"
                    rest = rest.trim();
                    if (!slashesDenoteHost && url.split('#').length === 1) {
                        // Try fast path regexp
                        const simplePath = simplePathPattern.exec(rest);
                        if (simplePath) {
                            this.pathname = simplePath[1];
                            if (simplePath[2]) {
                                this.search = simplePath[2];
                            }
                            return this;
                        }
                    }
                    let proto = protocolPattern.exec(rest);
                    if (proto) {
                        proto = proto[0];
                        lowerProto = proto.toLowerCase();
                        this.protocol = proto;
                        rest = rest.substr(proto.length);
                    }

                    // figure out if it's got a host
                    // user@server is *always* interpreted as a hostname, and url
                    // resolution will treat //foo/bar as host=foo,path=bar because that's
                    // how the browser resolves relative URLs.
                    /* eslint-disable-next-line no-useless-escape */
                    if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
                        slashes = rest.substr(0, 2) === '//';
                        if (slashes && !(proto && hostlessProtocol[proto])) {
                            rest = rest.substr(2);
                            this.slashes = true;
                        }
                    }
                    if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {
                        // there's a hostname.
                        // the first instance of /, ?, ;, or # ends the host.
                        //
                        // If there is an @ in the hostname, then non-host chars *are* allowed
                        // to the left of the last @ sign, unless some host-ending character
                        // comes *before* the @-sign.
                        // URLs are obnoxious.
                        //
                        // ex:
                        // http://a@b@c/ => user:a@b host:c
                        // http://a@b?@c => user:a host:c path:/?@c

                        // v0.12 TODO(isaacs): This is not quite how Chrome does things.
                        // Review our test case against browsers more comprehensively.

                        // find the first instance of any hostEndingChars
                        let hostEnd = -1;
                        for (let i = 0; i < hostEndingChars.length; i++) {
                            hec = rest.indexOf(hostEndingChars[i]);
                            if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
                                hostEnd = hec;
                            }
                        }

                        // at this point, either we have an explicit point where the
                        // auth portion cannot go past, or the last @ char is the decider.
                        let auth, atSign;
                        if (hostEnd === -1) {
                            // atSign can be anywhere.
                            atSign = rest.lastIndexOf('@');
                        } else {
                            // atSign must be in auth portion.
                            // http://a@b/c@d => host:b auth:a path:/c@d
                            atSign = rest.lastIndexOf('@', hostEnd);
                        }

                        // Now we have a portion which is definitely the auth.
                        // Pull that off.
                        if (atSign !== -1) {
                            auth = rest.slice(0, atSign);
                            rest = rest.slice(atSign + 1);
                            this.auth = auth;
                        }

                        // the host is the remaining to the left of the first non-host char
                        hostEnd = -1;
                        for (let i = 0; i < nonHostChars.length; i++) {
                            hec = rest.indexOf(nonHostChars[i]);
                            if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
                                hostEnd = hec;
                            }
                        }
                        // if we still have not hit it, then the entire thing is a host.
                        if (hostEnd === -1) {
                            hostEnd = rest.length;
                        }
                        if (rest[hostEnd - 1] === ':') {
                            hostEnd--;
                        }
                        const host = rest.slice(0, hostEnd);
                        rest = rest.slice(hostEnd);

                        // pull out port.
                        this.parseHost(host);

                        // we've indicated that there is a hostname,
                        // so even if it's empty, it has to be present.
                        this.hostname = this.hostname || '';

                        // if hostname begins with [ and ends with ]
                        // assume that it's an IPv6 address.
                        const ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';

                        // validate a little.
                        if (!ipv6Hostname) {
                            const hostparts = this.hostname.split(/\./);
                            for (let i = 0, l = hostparts.length; i < l; i++) {
                                const part = hostparts[i];
                                if (!part) {
                                    continue;
                                }
                                if (!part.match(hostnamePartPattern)) {
                                    let newpart = '';
                                    for (let j = 0, k = part.length; j < k; j++) {
                                        if (part.charCodeAt(j) > 127) {
                                            // we replace non-ASCII char with a temporary placeholder
                                            // we need this to make sure size of hostname is not
                                            // broken by replacing non-ASCII by nothing
                                            newpart += 'x';
                                        } else {
                                            newpart += part[j];
                                        }
                                    }
                                    // we test again with ASCII char only
                                    if (!newpart.match(hostnamePartPattern)) {
                                        const validParts = hostparts.slice(0, i);
                                        const notHost = hostparts.slice(i + 1);
                                        const bit = part.match(hostnamePartStart);
                                        if (bit) {
                                            validParts.push(bit[1]);
                                            notHost.unshift(bit[2]);
                                        }
                                        if (notHost.length) {
                                            rest = notHost.join('.') + rest;
                                        }
                                        this.hostname = validParts.join('.');
                                        break;
                                    }
                                }
                            }
                        }
                        if (this.hostname.length > hostnameMaxLen) {
                            this.hostname = '';
                        }

                        // strip [ and ] from the hostname
                        // the host field still retains them, though
                        if (ipv6Hostname) {
                            this.hostname = this.hostname.substr(1, this.hostname.length - 2);
                        }
                    }

                    // chop off from the tail first.
                    const hash = rest.indexOf('#');
                    if (hash !== -1) {
                        // got a fragment string.
                        this.hash = rest.substr(hash);
                        rest = rest.slice(0, hash);
                    }
                    const qm = rest.indexOf('?');
                    if (qm !== -1) {
                        this.search = rest.substr(qm);
                        rest = rest.slice(0, qm);
                    }
                    if (rest) {
                        this.pathname = rest;
                    }
                    if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {
                        this.pathname = '';
                    }
                    return this;
                };
                Url.prototype.parseHost = function(host) {
                    let port = portPattern.exec(host);
                    if (port) {
                        port = port[0];
                        if (port !== ':') {
                            this.port = port.substr(1);
                        }
                        host = host.substr(0, host.length - port.length);
                    }
                    if (host) {
                        this.hostname = host;
                    }
                };
                exports.decode = decode;
                exports.encode = encode;
                exports.format = format;
                exports.parse = urlParse;

                /***/
            }),

        /***/
        "../../../node_modules/meros/browser/index.js":
            /*!****************************************************!*\
              !*** ../../../node_modules/meros/browser/index.js ***!
              \****************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                var e = new TextDecoder();
                async function t(t, n) {
                    if (!t.ok || !t.body || t.bodyUsed) return t;
                    let i = t.headers.get("content-type");
                    if (!i || !~i.indexOf("multipart/")) return t;
                    let l = i.indexOf("boundary="),
                        r = "-";
                    if (~l) {
                        let e = l + 9,
                            t = i.indexOf(";", e);
                        r = i.slice(e, t > -1 ? t : void 0).trim().replace(/"/g, "");
                    }
                    return async function*(t, n, i) {
                        let l,
                            r,
                            d,
                            o = t.getReader(),
                            a = !i || !i.multiple,
                            f = n.length,
                            s = "",
                            c = [];
                        try {
                            let t;
                            e: for (; !(t = await o.read()).done;) {
                                let i = e.decode(t.value);
                                l = s.length, s += i;
                                let o = i.indexOf(n);
                                for (~o ? l += o : l = s.indexOf(n), c = []; ~l;) {
                                    let e = s.slice(0, l),
                                        t = s.slice(l + f);
                                    if (r) {
                                        let n = e.indexOf("\r\n\r\n") + 4,
                                            i = e.lastIndexOf("\r\n", n),
                                            l = !1,
                                            r = e.slice(n, i > -1 ? void 0 : i),
                                            o = String(e.slice(0, n)).trim().split("\r\n"),
                                            f = {},
                                            s = o.length;
                                        for (; d = o[--s]; d = d.split(": "), f[d.shift().toLowerCase()] = d.join(": "));
                                        if (d = f["content-type"], d && ~d.indexOf("application/json")) try {
                                            r = JSON.parse(r), l = !0;
                                        } catch (e) {}
                                        if (d = {
                                                headers: f,
                                                body: r,
                                                json: l
                                            }, a ? yield d: c.push(d), "--" === t.slice(0, 2)) break e;
                                    } else n = "\r\n" + n, r = f += 2;
                                    s = t, l = s.indexOf(n);
                                }
                                c.length && (yield c);
                            }
                        } finally {
                            c.length && (yield c), await o.cancel();
                        }
                    }(t.body, `--${r}`, n);
                }
                exports.meros = t;

                /***/
            }),

        /***/
        "../../../node_modules/nullthrows/nullthrows.js":
            /*!******************************************************!*\
              !*** ../../../node_modules/nullthrows/nullthrows.js ***!
              \******************************************************/
            /***/
            (function(module) {

                "use strict";


                function nullthrows(x, message) {
                    if (x != null) {
                        return x;
                    }
                    var error = new Error(message !== undefined ? message : 'Got unexpected ' + x);
                    error.framesToPop = 1; // Skip nullthrows's own stack frame.
                    throw error;
                }
                module.exports = nullthrows;
                module.exports["default"] = nullthrows;
                Object.defineProperty(module.exports, "__esModule", ({
                    value: true
                }));

                /***/
            }),

        /***/
        "../../../node_modules/popmotion/dist/popmotion.cjs.js":
            /*!*************************************************************!*\
              !*** ../../../node_modules/popmotion/dist/popmotion.cjs.js ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                var tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var heyListen = __webpack_require__( /*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js");
                var styleValueTypes = __webpack_require__( /*! style-value-types */ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js");
                var sync = __webpack_require__( /*! framesync */ "../../../node_modules/framesync/dist/framesync.cjs.js");

                function _interopDefaultLegacy(e) {
                    return e && typeof e === 'object' && 'default' in e ? e : {
                        'default': e
                    };
                }
                var sync__default = /*#__PURE__*/ _interopDefaultLegacy(sync);
                const clamp = (min, max, v) => Math.min(Math.max(v, min), max);
                const safeMin = 0.001;
                const minDuration = 0.01;
                const maxDuration = 10.0;
                const minDamping = 0.05;
                const maxDamping = 1;

                function findSpring({
                    duration = 800,
                    bounce = 0.25,
                    velocity = 0,
                    mass = 1
                }) {
                    let envelope;
                    let derivative;
                    heyListen.warning(duration <= maxDuration * 1000, "Spring duration must be 10 seconds or less");
                    let dampingRatio = 1 - bounce;
                    dampingRatio = clamp(minDamping, maxDamping, dampingRatio);
                    duration = clamp(minDuration, maxDuration, duration / 1000);
                    if (dampingRatio < 1) {
                        envelope = undampedFreq => {
                            const exponentialDecay = undampedFreq * dampingRatio;
                            const delta = exponentialDecay * duration;
                            const a = exponentialDecay - velocity;
                            const b = calcAngularFreq(undampedFreq, dampingRatio);
                            const c = Math.exp(-delta);
                            return safeMin - a / b * c;
                        };
                        derivative = undampedFreq => {
                            const exponentialDecay = undampedFreq * dampingRatio;
                            const delta = exponentialDecay * duration;
                            const d = delta * velocity + velocity;
                            const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;
                            const f = Math.exp(-delta);
                            const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);
                            const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;
                            return factor * ((d - e) * f) / g;
                        };
                    } else {
                        envelope = undampedFreq => {
                            const a = Math.exp(-undampedFreq * duration);
                            const b = (undampedFreq - velocity) * duration + 1;
                            return -safeMin + a * b;
                        };
                        derivative = undampedFreq => {
                            const a = Math.exp(-undampedFreq * duration);
                            const b = (velocity - undampedFreq) * (duration * duration);
                            return a * b;
                        };
                    }
                    const initialGuess = 5 / duration;
                    const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
                    duration = duration * 1000;
                    if (isNaN(undampedFreq)) {
                        return {
                            stiffness: 100,
                            damping: 10,
                            duration
                        };
                    } else {
                        const stiffness = Math.pow(undampedFreq, 2) * mass;
                        return {
                            stiffness,
                            damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
                            duration
                        };
                    }
                }
                const rootIterations = 12;

                function approximateRoot(envelope, derivative, initialGuess) {
                    let result = initialGuess;
                    for (let i = 1; i < rootIterations; i++) {
                        result = result - envelope(result) / derivative(result);
                    }
                    return result;
                }

                function calcAngularFreq(undampedFreq, dampingRatio) {
                    return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
                }
                const durationKeys = ["duration", "bounce"];
                const physicsKeys = ["stiffness", "damping", "mass"];

                function isSpringType(options, keys) {
                    return keys.some(key => options[key] !== undefined);
                }

                function getSpringOptions(options) {
                    let springOptions = Object.assign({
                        velocity: 0.0,
                        stiffness: 100,
                        damping: 10,
                        mass: 1.0,
                        isResolvedFromDuration: false
                    }, options);
                    if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {
                        const derived = findSpring(options);
                        springOptions = Object.assign(Object.assign(Object.assign({}, springOptions), derived), {
                            velocity: 0.0,
                            mass: 1.0
                        });
                        springOptions.isResolvedFromDuration = true;
                    }
                    return springOptions;
                }

                function spring(_a) {
                    var {
                        from = 0.0,
                            to = 1.0,
                            restSpeed = 2,
                            restDelta
                    } = _a,
                    options = tslib.__rest(_a, ["from", "to", "restSpeed", "restDelta"]);
                    const state = {
                        done: false,
                        value: from
                    };
                    let {
                        stiffness,
                        damping,
                        mass,
                        velocity,
                        duration,
                        isResolvedFromDuration
                    } = getSpringOptions(options);
                    let resolveSpring = zero;
                    let resolveVelocity = zero;

                    function createSpring() {
                        const initialVelocity = velocity ? -(velocity / 1000) : 0.0;
                        const initialDelta = to - from;
                        const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
                        const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;
                        if (restDelta === undefined) {
                            restDelta = Math.min(Math.abs(to - from) / 100, 0.4);
                        }
                        if (dampingRatio < 1) {
                            const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
                            resolveSpring = t => {
                                const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
                                return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));
                            };
                            resolveVelocity = t => {
                                const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
                                return dampingRatio * undampedAngularFreq * envelope * (Math.sin(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq + initialDelta * Math.cos(angularFreq * t)) - envelope * (Math.cos(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) - angularFreq * initialDelta * Math.sin(angularFreq * t));
                            };
                        } else if (dampingRatio === 1) {
                            resolveSpring = t => to - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t);
                        } else {
                            const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
                            resolveSpring = t => {
                                const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
                                const freqForT = Math.min(dampedAngularFreq * t, 300);
                                return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;
                            };
                        }
                    }
                    createSpring();
                    return {
                        next: t => {
                            const current = resolveSpring(t);
                            if (!isResolvedFromDuration) {
                                const currentVelocity = resolveVelocity(t) * 1000;
                                const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
                                const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta;
                                state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold;
                            } else {
                                state.done = t >= duration;
                            }
                            state.value = state.done ? to : current;
                            return state;
                        },
                        flipTarget: () => {
                            velocity = -velocity;
                            [from, to] = [to, from];
                            createSpring();
                        }
                    };
                }
                spring.needsInterpolation = (a, b) => typeof a === "string" || typeof b === "string";
                const zero = _t => 0;
                const progress = (from, to, value) => {
                    const toFromDifference = to - from;
                    return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
                };
                const mix = (from, to, progress) => -progress * from + progress * to + from;

                function hueToRgb(p, q, t) {
                    if (t < 0) t += 1;
                    if (t > 1) t -= 1;
                    if (t < 1 / 6) return p + (q - p) * 6 * t;
                    if (t < 1 / 2) return q;
                    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
                    return p;
                }

                function hslaToRgba({
                    hue,
                    saturation,
                    lightness,
                    alpha
                }) {
                    hue /= 360;
                    saturation /= 100;
                    lightness /= 100;
                    let red = 0;
                    let green = 0;
                    let blue = 0;
                    if (!saturation) {
                        red = green = blue = lightness;
                    } else {
                        const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;
                        const p = 2 * lightness - q;
                        red = hueToRgb(p, q, hue + 1 / 3);
                        green = hueToRgb(p, q, hue);
                        blue = hueToRgb(p, q, hue - 1 / 3);
                    }
                    return {
                        red: Math.round(red * 255),
                        green: Math.round(green * 255),
                        blue: Math.round(blue * 255),
                        alpha
                    };
                }
                const mixLinearColor = (from, to, v) => {
                    const fromExpo = from * from;
                    const toExpo = to * to;
                    return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));
                };
                const colorTypes = [styleValueTypes.hex, styleValueTypes.rgba, styleValueTypes.hsla];
                const getColorType = v => colorTypes.find(type => type.test(v));
                const notAnimatable = color => `'${color}' is not an animatable color. Use the equivalent color code instead.`;
                const mixColor = (from, to) => {
                    let fromColorType = getColorType(from);
                    let toColorType = getColorType(to);
                    heyListen.invariant(!!fromColorType, notAnimatable(from));
                    heyListen.invariant(!!toColorType, notAnimatable(to));
                    let fromColor = fromColorType.parse(from);
                    let toColor = toColorType.parse(to);
                    if (fromColorType === styleValueTypes.hsla) {
                        fromColor = hslaToRgba(fromColor);
                        fromColorType = styleValueTypes.rgba;
                    }
                    if (toColorType === styleValueTypes.hsla) {
                        toColor = hslaToRgba(toColor);
                        toColorType = styleValueTypes.rgba;
                    }
                    const blended = Object.assign({}, fromColor);
                    return v => {
                        for (const key in blended) {
                            if (key !== "alpha") {
                                blended[key] = mixLinearColor(fromColor[key], toColor[key], v);
                            }
                        }
                        blended.alpha = mix(fromColor.alpha, toColor.alpha, v);
                        return fromColorType.transform(blended);
                    };
                };
                const zeroPoint = {
                    x: 0,
                    y: 0,
                    z: 0
                };
                const isNum = v => typeof v === 'number';
                const combineFunctions = (a, b) => v => b(a(v));
                const pipe = (...transformers) => transformers.reduce(combineFunctions);

                function getMixer(origin, target) {
                    if (isNum(origin)) {
                        return v => mix(origin, target, v);
                    } else if (styleValueTypes.color.test(origin)) {
                        return mixColor(origin, target);
                    } else {
                        return mixComplex(origin, target);
                    }
                }
                const mixArray = (from, to) => {
                    const output = [...from];
                    const numValues = output.length;
                    const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));
                    return v => {
                        for (let i = 0; i < numValues; i++) {
                            output[i] = blendValue[i](v);
                        }
                        return output;
                    };
                };
                const mixObject = (origin, target) => {
                    const output = Object.assign(Object.assign({}, origin), target);
                    const blendValue = {};
                    for (const key in output) {
                        if (origin[key] !== undefined && target[key] !== undefined) {
                            blendValue[key] = getMixer(origin[key], target[key]);
                        }
                    }
                    return v => {
                        for (const key in blendValue) {
                            output[key] = blendValue[key](v);
                        }
                        return output;
                    };
                };

                function analyse(value) {
                    const parsed = styleValueTypes.complex.parse(value);
                    const numValues = parsed.length;
                    let numNumbers = 0;
                    let numRGB = 0;
                    let numHSL = 0;
                    for (let i = 0; i < numValues; i++) {
                        if (numNumbers || typeof parsed[i] === "number") {
                            numNumbers++;
                        } else {
                            if (parsed[i].hue !== undefined) {
                                numHSL++;
                            } else {
                                numRGB++;
                            }
                        }
                    }
                    return {
                        parsed,
                        numNumbers,
                        numRGB,
                        numHSL
                    };
                }
                const mixComplex = (origin, target) => {
                    const template = styleValueTypes.complex.createTransformer(target);
                    const originStats = analyse(origin);
                    const targetStats = analyse(target);
                    const canInterpolate = originStats.numHSL === targetStats.numHSL && originStats.numRGB === targetStats.numRGB && originStats.numNumbers >= targetStats.numNumbers;
                    if (canInterpolate) {
                        return pipe(mixArray(originStats.parsed, targetStats.parsed), template);
                    } else {
                        heyListen.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);
                        return p => `${p > 0 ? target : origin}`;
                    }
                };
                const mixNumber = (from, to) => p => mix(from, to, p);

                function detectMixerFactory(v) {
                    if (typeof v === 'number') {
                        return mixNumber;
                    } else if (typeof v === 'string') {
                        if (styleValueTypes.color.test(v)) {
                            return mixColor;
                        } else {
                            return mixComplex;
                        }
                    } else if (Array.isArray(v)) {
                        return mixArray;
                    } else if (typeof v === 'object') {
                        return mixObject;
                    }
                }

                function createMixers(output, ease, customMixer) {
                    const mixers = [];
                    const mixerFactory = customMixer || detectMixerFactory(output[0]);
                    const numMixers = output.length - 1;
                    for (let i = 0; i < numMixers; i++) {
                        let mixer = mixerFactory(output[i], output[i + 1]);
                        if (ease) {
                            const easingFunction = Array.isArray(ease) ? ease[i] : ease;
                            mixer = pipe(easingFunction, mixer);
                        }
                        mixers.push(mixer);
                    }
                    return mixers;
                }

                function fastInterpolate([from, to], [mixer]) {
                    return v => mixer(progress(from, to, v));
                }

                function slowInterpolate(input, mixers) {
                    const inputLength = input.length;
                    const lastInputIndex = inputLength - 1;
                    return v => {
                        let mixerIndex = 0;
                        let foundMixerIndex = false;
                        if (v <= input[0]) {
                            foundMixerIndex = true;
                        } else if (v >= input[lastInputIndex]) {
                            mixerIndex = lastInputIndex - 1;
                            foundMixerIndex = true;
                        }
                        if (!foundMixerIndex) {
                            let i = 1;
                            for (; i < inputLength; i++) {
                                if (input[i] > v || i === lastInputIndex) {
                                    break;
                                }
                            }
                            mixerIndex = i - 1;
                        }
                        const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v);
                        return mixers[mixerIndex](progressInRange);
                    };
                }

                function interpolate(input, output, {
                    clamp: isClamp = true,
                    ease,
                    mixer
                } = {}) {
                    const inputLength = input.length;
                    heyListen.invariant(inputLength === output.length, 'Both input and output ranges must be the same length');
                    heyListen.invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');
                    if (input[0] > input[inputLength - 1]) {
                        input = [].concat(input);
                        output = [].concat(output);
                        input.reverse();
                        output.reverse();
                    }
                    const mixers = createMixers(output, ease, mixer);
                    const interpolator = inputLength === 2 ? fastInterpolate(input, mixers) : slowInterpolate(input, mixers);
                    return isClamp ? v => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator;
                }
                const reverseEasing = easing => p => 1 - easing(1 - p);
                const mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
                const createExpoIn = power => p => Math.pow(p, power);
                const createBackIn = power => p => p * p * ((power + 1) * p - power);
                const createAnticipate = power => {
                    const backEasing = createBackIn(power);
                    return p => (p *= 2) < 1 ? 0.5 * backEasing(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
                };
                const DEFAULT_OVERSHOOT_STRENGTH = 1.525;
                const BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0;
                const BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0;
                const BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0;
                const linear = p => p;
                const easeIn = createExpoIn(2);
                const easeOut = reverseEasing(easeIn);
                const easeInOut = mirrorEasing(easeIn);
                const circIn = p => 1 - Math.sin(Math.acos(p));
                const circOut = reverseEasing(circIn);
                const circInOut = mirrorEasing(circOut);
                const backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH);
                const backOut = reverseEasing(backIn);
                const backInOut = mirrorEasing(backIn);
                const anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH);
                const ca = 4356.0 / 361.0;
                const cb = 35442.0 / 1805.0;
                const cc = 16061.0 / 1805.0;
                const bounceOut = p => {
                    if (p === 1 || p === 0) return p;
                    const p2 = p * p;
                    return p < BOUNCE_FIRST_THRESHOLD ? 7.5625 * p2 : p < BOUNCE_SECOND_THRESHOLD ? 9.075 * p2 - 9.9 * p + 3.4 : p < BOUNCE_THIRD_THRESHOLD ? ca * p2 - cb * p + cc : 10.8 * p * p - 20.52 * p + 10.72;
                };
                const bounceIn = reverseEasing(bounceOut);
                const bounceInOut = p => p < 0.5 ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0)) : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5;

                function defaultEasing(values, easing) {
                    return values.map(() => easing || easeInOut).splice(0, values.length - 1);
                }

                function defaultOffset(values) {
                    const numValues = values.length;
                    return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0);
                }

                function convertOffsetToTimes(offset, duration) {
                    return offset.map(o => o * duration);
                }

                function keyframes({
                    from = 0,
                    to = 1,
                    ease,
                    offset,
                    duration = 300
                }) {
                    const state = {
                        done: false,
                        value: from
                    };
                    const values = Array.isArray(to) ? to : [from, to];
                    const times = convertOffsetToTimes(offset && offset.length === values.length ? offset : defaultOffset(values), duration);

                    function createInterpolator() {
                        return interpolate(times, values, {
                            ease: Array.isArray(ease) ? ease : defaultEasing(values, ease)
                        });
                    }
                    let interpolator = createInterpolator();
                    return {
                        next: t => {
                            state.value = interpolator(t);
                            state.done = t >= duration;
                            return state;
                        },
                        flipTarget: () => {
                            values.reverse();
                            interpolator = createInterpolator();
                        }
                    };
                }

                function decay({
                    velocity = 0,
                    from = 0,
                    power = 0.8,
                    timeConstant = 350,
                    restDelta = 0.5,
                    modifyTarget
                }) {
                    const state = {
                        done: false,
                        value: from
                    };
                    let amplitude = power * velocity;
                    const ideal = from + amplitude;
                    const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);
                    if (target !== ideal) amplitude = target - from;
                    return {
                        next: t => {
                            const delta = -amplitude * Math.exp(-t / timeConstant);
                            state.done = !(delta > restDelta || delta < -restDelta);
                            state.value = state.done ? target : target + delta;
                            return state;
                        },
                        flipTarget: () => {}
                    };
                }
                const types = {
                    keyframes,
                    spring,
                    decay
                };

                function detectAnimationFromOptions(config) {
                    if (Array.isArray(config.to)) {
                        return keyframes;
                    } else if (types[config.type]) {
                        return types[config.type];
                    }
                    const keys = new Set(Object.keys(config));
                    if (keys.has("ease") || keys.has("duration") && !keys.has("dampingRatio")) {
                        return keyframes;
                    } else if (keys.has("dampingRatio") || keys.has("stiffness") || keys.has("mass") || keys.has("damping") || keys.has("restSpeed") || keys.has("restDelta")) {
                        return spring;
                    }
                    return keyframes;
                }

                function loopElapsed(elapsed, duration, delay = 0) {
                    return elapsed - duration - delay;
                }

                function reverseElapsed(elapsed, duration, delay = 0, isForwardPlayback = true) {
                    return isForwardPlayback ? loopElapsed(duration + -elapsed, duration, delay) : duration - (elapsed - duration) + delay;
                }

                function hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) {
                    return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay;
                }
                const framesync = update => {
                    const passTimestamp = ({
                        delta
                    }) => update(delta);
                    return {
                        start: () => sync__default["default"].update(passTimestamp, true),
                        stop: () => sync.cancelSync.update(passTimestamp)
                    };
                };

                function animate(_a) {
                    var _b, _c;
                    var {
                        from,
                        autoplay = true,
                        driver = framesync,
                        elapsed = 0,
                        repeat: repeatMax = 0,
                        repeatType = "loop",
                        repeatDelay = 0,
                        onPlay,
                        onStop,
                        onComplete,
                        onRepeat,
                        onUpdate
                    } = _a,
                    options = tslib.__rest(_a, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
                    let {
                        to
                    } = options;
                    let driverControls;
                    let repeatCount = 0;
                    let computedDuration = options.duration;
                    let latest;
                    let isComplete = false;
                    let isForwardPlayback = true;
                    let interpolateFromNumber;
                    const animator = detectAnimationFromOptions(options);
                    if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) {
                        interpolateFromNumber = interpolate([0, 100], [from, to], {
                            clamp: false
                        });
                        from = 0;
                        to = 100;
                    }
                    const animation = animator(Object.assign(Object.assign({}, options), {
                        from,
                        to
                    }));

                    function repeat() {
                        repeatCount++;
                        if (repeatType === "reverse") {
                            isForwardPlayback = repeatCount % 2 === 0;
                            elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback);
                        } else {
                            elapsed = loopElapsed(elapsed, computedDuration, repeatDelay);
                            if (repeatType === "mirror") animation.flipTarget();
                        }
                        isComplete = false;
                        onRepeat && onRepeat();
                    }

                    function complete() {
                        driverControls.stop();
                        onComplete && onComplete();
                    }

                    function update(delta) {
                        if (!isForwardPlayback) delta = -delta;
                        elapsed += delta;
                        if (!isComplete) {
                            const state = animation.next(Math.max(0, elapsed));
                            latest = state.value;
                            if (interpolateFromNumber) latest = interpolateFromNumber(latest);
                            isComplete = isForwardPlayback ? state.done : elapsed <= 0;
                        }
                        onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);
                        if (isComplete) {
                            if (repeatCount === 0) computedDuration !== null && computedDuration !== void 0 ? computedDuration : computedDuration = elapsed;
                            if (repeatCount < repeatMax) {
                                hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();
                            } else {
                                complete();
                            }
                        }
                    }

                    function play() {
                        onPlay === null || onPlay === void 0 ? void 0 : onPlay();
                        driverControls = driver(update);
                        driverControls.start();
                    }
                    autoplay && play();
                    return {
                        stop: () => {
                            onStop === null || onStop === void 0 ? void 0 : onStop();
                            driverControls.stop();
                        }
                    };
                }

                function velocityPerSecond(velocity, frameDuration) {
                    return frameDuration ? velocity * (1000 / frameDuration) : 0;
                }

                function inertia({
                    from = 0,
                    velocity = 0,
                    min,
                    max,
                    power = 0.8,
                    timeConstant = 750,
                    bounceStiffness = 500,
                    bounceDamping = 10,
                    restDelta = 1,
                    modifyTarget,
                    driver,
                    onUpdate,
                    onComplete,
                    onStop
                }) {
                    let currentAnimation;

                    function isOutOfBounds(v) {
                        return min !== undefined && v < min || max !== undefined && v > max;
                    }

                    function boundaryNearest(v) {
                        if (min === undefined) return max;
                        if (max === undefined) return min;
                        return Math.abs(min - v) < Math.abs(max - v) ? min : max;
                    }

                    function startAnimation(options) {
                        currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop();
                        currentAnimation = animate(Object.assign(Object.assign({}, options), {
                            driver,
                            onUpdate: v => {
                                var _a;
                                onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v);
                                (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v);
                            },
                            onComplete,
                            onStop
                        }));
                    }

                    function startSpring(options) {
                        startAnimation(Object.assign({
                            type: "spring",
                            stiffness: bounceStiffness,
                            damping: bounceDamping,
                            restDelta
                        }, options));
                    }
                    if (isOutOfBounds(from)) {
                        startSpring({
                            from,
                            velocity,
                            to: boundaryNearest(from)
                        });
                    } else {
                        let target = power * velocity + from;
                        if (typeof modifyTarget !== "undefined") target = modifyTarget(target);
                        const boundary = boundaryNearest(target);
                        const heading = boundary === min ? -1 : 1;
                        let prev;
                        let current;
                        const checkBoundary = v => {
                            prev = current;
                            current = v;
                            velocity = velocityPerSecond(v - prev, sync.getFrameData().delta);
                            if (heading === 1 && v > boundary || heading === -1 && v < boundary) {
                                startSpring({
                                    from: v,
                                    to: boundary,
                                    velocity
                                });
                            }
                        };
                        startAnimation({
                            type: "decay",
                            from,
                            velocity,
                            timeConstant,
                            power,
                            restDelta,
                            modifyTarget,
                            onUpdate: isOutOfBounds(target) ? checkBoundary : undefined
                        });
                    }
                    return {
                        stop: () => currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop()
                    };
                }
                const radiansToDegrees = radians => radians * 180 / Math.PI;
                const angle = (a, b = zeroPoint) => radiansToDegrees(Math.atan2(b.y - a.y, b.x - a.x));
                const applyOffset = (from, to) => {
                    let hasReceivedFrom = true;
                    if (to === undefined) {
                        to = from;
                        hasReceivedFrom = false;
                    }
                    return v => {
                        if (hasReceivedFrom) {
                            return v - from + to;
                        } else {
                            from = v;
                            hasReceivedFrom = true;
                            return to;
                        }
                    };
                };
                const identity = v => v;
                const createAttractor = (alterDisplacement = identity) => (constant, origin, v) => {
                    const displacement = origin - v;
                    const springModifiedDisplacement = -(0 - constant + 1) * (0 - alterDisplacement(Math.abs(displacement)));
                    return displacement <= 0 ? origin + springModifiedDisplacement : origin - springModifiedDisplacement;
                };
                const attract = createAttractor();
                const attractExpo = createAttractor(Math.sqrt);
                const degreesToRadians = degrees => degrees * Math.PI / 180;
                const isPoint = point => point.hasOwnProperty('x') && point.hasOwnProperty('y');
                const isPoint3D = point => isPoint(point) && point.hasOwnProperty('z');
                const distance1D = (a, b) => Math.abs(a - b);

                function distance(a, b) {
                    if (isNum(a) && isNum(b)) {
                        return distance1D(a, b);
                    } else if (isPoint(a) && isPoint(b)) {
                        const xDelta = distance1D(a.x, b.x);
                        const yDelta = distance1D(a.y, b.y);
                        const zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0;
                        return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2));
                    }
                }
                const pointFromVector = (origin, angle, distance) => {
                    angle = degreesToRadians(angle);
                    return {
                        x: distance * Math.cos(angle) + origin.x,
                        y: distance * Math.sin(angle) + origin.y
                    };
                };
                const toDecimal = (num, precision = 2) => {
                    precision = Math.pow(10, precision);
                    return Math.round(num * precision) / precision;
                };
                const smoothFrame = (prevValue, nextValue, duration, smoothing = 0) => toDecimal(prevValue + duration * (nextValue - prevValue) / Math.max(smoothing, duration));
                const smooth = (strength = 50) => {
                    let previousValue = 0;
                    let lastUpdated = 0;
                    return v => {
                        const currentFramestamp = sync.getFrameData().timestamp;
                        const timeDelta = currentFramestamp !== lastUpdated ? currentFramestamp - lastUpdated : 0;
                        const newValue = timeDelta ? smoothFrame(previousValue, v, timeDelta, strength) : previousValue;
                        lastUpdated = currentFramestamp;
                        previousValue = newValue;
                        return newValue;
                    };
                };
                const snap = points => {
                    if (typeof points === 'number') {
                        return v => Math.round(v / points) * points;
                    } else {
                        let i = 0;
                        const numPoints = points.length;
                        return v => {
                            let lastDistance = Math.abs(points[0] - v);
                            for (i = 1; i < numPoints; i++) {
                                const point = points[i];
                                const distance = Math.abs(point - v);
                                if (distance === 0) return point;
                                if (distance > lastDistance) return points[i - 1];
                                if (i === numPoints - 1) return point;
                                lastDistance = distance;
                            }
                        };
                    }
                };

                function velocityPerFrame(xps, frameDuration) {
                    return xps / (1000 / frameDuration);
                }
                const wrap = (min, max, v) => {
                    const rangeSize = max - min;
                    return ((v - min) % rangeSize + rangeSize) % rangeSize + min;
                };
                const a = (a1, a2) => 1.0 - 3.0 * a2 + 3.0 * a1;
                const b = (a1, a2) => 3.0 * a2 - 6.0 * a1;
                const c = a1 => 3.0 * a1;
                const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;
                const getSlope = (t, a1, a2) => 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1);
                const subdivisionPrecision = 0.0000001;
                const subdivisionMaxIterations = 10;

                function binarySubdivide(aX, aA, aB, mX1, mX2) {
                    let currentX;
                    let currentT;
                    let i = 0;
                    do {
                        currentT = aA + (aB - aA) / 2.0;
                        currentX = calcBezier(currentT, mX1, mX2) - aX;
                        if (currentX > 0.0) {
                            aB = currentT;
                        } else {
                            aA = currentT;
                        }
                    } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
                    return currentT;
                }
                const newtonIterations = 8;
                const newtonMinSlope = 0.001;

                function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
                    for (let i = 0; i < newtonIterations; ++i) {
                        const currentSlope = getSlope(aGuessT, mX1, mX2);
                        if (currentSlope === 0.0) {
                            return aGuessT;
                        }
                        const currentX = calcBezier(aGuessT, mX1, mX2) - aX;
                        aGuessT -= currentX / currentSlope;
                    }
                    return aGuessT;
                }
                const kSplineTableSize = 11;
                const kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);

                function cubicBezier(mX1, mY1, mX2, mY2) {
                    if (mX1 === mY1 && mX2 === mY2) return linear;
                    const sampleValues = new Float32Array(kSplineTableSize);
                    for (let i = 0; i < kSplineTableSize; ++i) {
                        sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
                    }

                    function getTForX(aX) {
                        let intervalStart = 0.0;
                        let currentSample = 1;
                        const lastSample = kSplineTableSize - 1;
                        for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {
                            intervalStart += kSampleStepSize;
                        }
                        --currentSample;
                        const dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);
                        const guessForT = intervalStart + dist * kSampleStepSize;
                        const initialSlope = getSlope(guessForT, mX1, mX2);
                        if (initialSlope >= newtonMinSlope) {
                            return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
                        } else if (initialSlope === 0.0) {
                            return guessForT;
                        } else {
                            return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
                        }
                    }
                    return t => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
                }
                const steps = (steps, direction = 'end') => progress => {
                    progress = direction === 'end' ? Math.min(progress, 0.999) : Math.max(progress, 0.001);
                    const expanded = progress * steps;
                    const rounded = direction === 'end' ? Math.floor(expanded) : Math.ceil(expanded);
                    return clamp(0, 1, rounded / steps);
                };
                exports.angle = angle;
                exports.animate = animate;
                exports.anticipate = anticipate;
                exports.applyOffset = applyOffset;
                exports.attract = attract;
                exports.attractExpo = attractExpo;
                exports.backIn = backIn;
                exports.backInOut = backInOut;
                exports.backOut = backOut;
                exports.bounceIn = bounceIn;
                exports.bounceInOut = bounceInOut;
                exports.bounceOut = bounceOut;
                exports.circIn = circIn;
                exports.circInOut = circInOut;
                exports.circOut = circOut;
                exports.clamp = clamp;
                exports.createAnticipate = createAnticipate;
                exports.createAttractor = createAttractor;
                exports.createBackIn = createBackIn;
                exports.createExpoIn = createExpoIn;
                exports.cubicBezier = cubicBezier;
                exports.decay = decay;
                exports.degreesToRadians = degreesToRadians;
                exports.distance = distance;
                exports.easeIn = easeIn;
                exports.easeInOut = easeInOut;
                exports.easeOut = easeOut;
                exports.inertia = inertia;
                exports.interpolate = interpolate;
                exports.isPoint = isPoint;
                exports.isPoint3D = isPoint3D;
                exports.keyframes = keyframes;
                exports.linear = linear;
                exports.mirrorEasing = mirrorEasing;
                exports.mix = mix;
                exports.mixColor = mixColor;
                exports.mixComplex = mixComplex;
                exports.pipe = pipe;
                exports.pointFromVector = pointFromVector;
                exports.progress = progress;
                exports.radiansToDegrees = radiansToDegrees;
                exports.reverseEasing = reverseEasing;
                exports.smooth = smooth;
                exports.smoothFrame = smoothFrame;
                exports.snap = snap;
                exports.spring = spring;
                exports.steps = steps;
                exports.toDecimal = toDecimal;
                exports.velocityPerFrame = velocityPerFrame;
                exports.velocityPerSecond = velocityPerSecond;
                exports.wrap = wrap;

                /***/
            }),

        /***/
        "../../../node_modules/punycode.js/punycode.es6.js":
            /*!*********************************************************!*\
              !*** ../../../node_modules/punycode.js/punycode.es6.js ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                /** Highest positive signed 32-bit float value */
                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.toUnicode = exports.toASCII = exports.encode = exports["default"] = exports.decode = void 0;
                exports.ucs2decode = ucs2decode;
                exports.ucs2encode = void 0;
                const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1

                /** Bootstring parameters */
                const base = 36;
                const tMin = 1;
                const tMax = 26;
                const skew = 38;
                const damp = 700;
                const initialBias = 72;
                const initialN = 128; // 0x80
                const delimiter = '-'; // '\x2D'

                /** Regular expressions */
                const regexPunycode = /^xn--/;
                const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too.
                const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators

                /** Error messages */
                const errors = {
                    'overflow': 'Overflow: input needs wider integers to process',
                    'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
                    'invalid-input': 'Invalid input'
                };

                /** Convenience shortcuts */
                const baseMinusTMin = base - tMin;
                const floor = Math.floor;
                const stringFromCharCode = String.fromCharCode;

                /*--------------------------------------------------------------------------*/

                /**
                 * A generic error utility function.
                 * @private
                 * @param {String} type The error type.
                 * @returns {Error} Throws a `RangeError` with the applicable error message.
                 */
                function error(type) {
                    throw new RangeError(errors[type]);
                }

                /**
                 * A generic `Array#map` utility function.
                 * @private
                 * @param {Array} array The array to iterate over.
                 * @param {Function} callback The function that gets called for every array
                 * item.
                 * @returns {Array} A new array of values returned by the callback function.
                 */
                function map(array, callback) {
                    const result = [];
                    let length = array.length;
                    while (length--) {
                        result[length] = callback(array[length]);
                    }
                    return result;
                }

                /**
                 * A simple `Array#map`-like wrapper to work with domain name strings or email
                 * addresses.
                 * @private
                 * @param {String} domain The domain name or email address.
                 * @param {Function} callback The function that gets called for every
                 * character.
                 * @returns {String} A new string of characters returned by the callback
                 * function.
                 */
                function mapDomain(domain, callback) {
                    const parts = domain.split('@');
                    let result = '';
                    if (parts.length > 1) {
                        // In email addresses, only the domain name should be punycoded. Leave
                        // the local part (i.e. everything up to `@`) intact.
                        result = parts[0] + '@';
                        domain = parts[1];
                    }
                    // Avoid `split(regex)` for IE8 compatibility. See #17.
                    domain = domain.replace(regexSeparators, '\x2E');
                    const labels = domain.split('.');
                    const encoded = map(labels, callback).join('.');
                    return result + encoded;
                }

                /**
                 * Creates an array containing the numeric code points of each Unicode
                 * character in the string. While JavaScript uses UCS-2 internally,
                 * this function will convert a pair of surrogate halves (each of which
                 * UCS-2 exposes as separate characters) into a single code point,
                 * matching UTF-16.
                 * @see `punycode.ucs2.encode`
                 * @see <https://mathiasbynens.be/notes/javascript-encoding>
                 * @memberOf punycode.ucs2
                 * @name decode
                 * @param {String} string The Unicode input string (UCS-2).
                 * @returns {Array} The new array of code points.
                 */
                function ucs2decode(string) {
                    const output = [];
                    let counter = 0;
                    const length = string.length;
                    while (counter < length) {
                        const value = string.charCodeAt(counter++);
                        if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
                            // It's a high surrogate, and there is a next character.
                            const extra = string.charCodeAt(counter++);
                            if ((extra & 0xFC00) == 0xDC00) {
                                // Low surrogate.
                                output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
                            } else {
                                // It's an unmatched surrogate; only append this code unit, in case the
                                // next code unit is the high surrogate of a surrogate pair.
                                output.push(value);
                                counter--;
                            }
                        } else {
                            output.push(value);
                        }
                    }
                    return output;
                }

                /**
                 * Creates a string based on an array of numeric code points.
                 * @see `punycode.ucs2.decode`
                 * @memberOf punycode.ucs2
                 * @name encode
                 * @param {Array} codePoints The array of numeric code points.
                 * @returns {String} The new Unicode string (UCS-2).
                 */
                const ucs2encode = codePoints => String.fromCodePoint(...codePoints);

                /**
                 * Converts a basic code point into a digit/integer.
                 * @see `digitToBasic()`
                 * @private
                 * @param {Number} codePoint The basic numeric code point value.
                 * @returns {Number} The numeric value of a basic code point (for use in
                 * representing integers) in the range `0` to `base - 1`, or `base` if
                 * the code point does not represent a value.
                 */
                exports.ucs2encode = ucs2encode;
                const basicToDigit = function(codePoint) {
                    if (codePoint >= 0x30 && codePoint < 0x3A) {
                        return 26 + (codePoint - 0x30);
                    }
                    if (codePoint >= 0x41 && codePoint < 0x5B) {
                        return codePoint - 0x41;
                    }
                    if (codePoint >= 0x61 && codePoint < 0x7B) {
                        return codePoint - 0x61;
                    }
                    return base;
                };

                /**
                 * Converts a digit/integer into a basic code point.
                 * @see `basicToDigit()`
                 * @private
                 * @param {Number} digit The numeric value of a basic code point.
                 * @returns {Number} The basic code point whose value (when used for
                 * representing integers) is `digit`, which needs to be in the range
                 * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
                 * used; else, the lowercase form is used. The behavior is undefined
                 * if `flag` is non-zero and `digit` has no uppercase form.
                 */
                const digitToBasic = function(digit, flag) {
                    //  0..25 map to ASCII a..z or A..Z
                    // 26..35 map to ASCII 0..9
                    return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
                };

                /**
                 * Bias adaptation function as per section 3.4 of RFC 3492.
                 * https://tools.ietf.org/html/rfc3492#section-3.4
                 * @private
                 */
                const adapt = function(delta, numPoints, firstTime) {
                    let k = 0;
                    delta = firstTime ? floor(delta / damp) : delta >> 1;
                    delta += floor(delta / numPoints);
                    for /* no initialization */ (; delta > baseMinusTMin * tMax >> 1; k += base) {
                        delta = floor(delta / baseMinusTMin);
                    }
                    return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
                };

                /**
                 * Converts a Punycode string of ASCII-only symbols to a string of Unicode
                 * symbols.
                 * @memberOf punycode
                 * @param {String} input The Punycode string of ASCII-only symbols.
                 * @returns {String} The resulting string of Unicode symbols.
                 */
                const decode = function(input) {
                    // Don't use UCS-2.
                    const output = [];
                    const inputLength = input.length;
                    let i = 0;
                    let n = initialN;
                    let bias = initialBias;

                    // Handle the basic code points: let `basic` be the number of input code
                    // points before the last delimiter, or `0` if there is none, then copy
                    // the first basic code points to the output.

                    let basic = input.lastIndexOf(delimiter);
                    if (basic < 0) {
                        basic = 0;
                    }
                    for (let j = 0; j < basic; ++j) {
                        // if it's not a basic code point
                        if (input.charCodeAt(j) >= 0x80) {
                            error('not-basic');
                        }
                        output.push(input.charCodeAt(j));
                    }

                    // Main decoding loop: start just after the last delimiter if any basic code
                    // points were copied; start at the beginning otherwise.

                    for /* no final expression */ (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) {
                        // `index` is the index of the next character to be consumed.
                        // Decode a generalized variable-length integer into `delta`,
                        // which gets added to `i`. The overflow checking is easier
                        // if we increase `i` as we go, then subtract off its starting
                        // value at the end to obtain `delta`.
                        const oldi = i;
                        for /* no condition */ (let w = 1, k = base;; k += base) {
                            if (index >= inputLength) {
                                error('invalid-input');
                            }
                            const digit = basicToDigit(input.charCodeAt(index++));
                            if (digit >= base) {
                                error('invalid-input');
                            }
                            if (digit > floor((maxInt - i) / w)) {
                                error('overflow');
                            }
                            i += digit * w;
                            const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
                            if (digit < t) {
                                break;
                            }
                            const baseMinusT = base - t;
                            if (w > floor(maxInt / baseMinusT)) {
                                error('overflow');
                            }
                            w *= baseMinusT;
                        }
                        const out = output.length + 1;
                        bias = adapt(i - oldi, out, oldi == 0);

                        // `i` was supposed to wrap around from `out` to `0`,
                        // incrementing `n` each time, so we'll fix that now:
                        if (floor(i / out) > maxInt - n) {
                            error('overflow');
                        }
                        n += floor(i / out);
                        i %= out;

                        // Insert `n` at position `i` of the output.
                        output.splice(i++, 0, n);
                    }
                    return String.fromCodePoint(...output);
                };

                /**
                 * Converts a string of Unicode symbols (e.g. a domain name label) to a
                 * Punycode string of ASCII-only symbols.
                 * @memberOf punycode
                 * @param {String} input The string of Unicode symbols.
                 * @returns {String} The resulting Punycode string of ASCII-only symbols.
                 */
                exports.decode = decode;
                const encode = function(input) {
                    const output = [];

                    // Convert the input in UCS-2 to an array of Unicode code points.
                    input = ucs2decode(input);

                    // Cache the length.
                    const inputLength = input.length;

                    // Initialize the state.
                    let n = initialN;
                    let delta = 0;
                    let bias = initialBias;

                    // Handle the basic code points.
                    for (const currentValue of input) {
                        if (currentValue < 0x80) {
                            output.push(stringFromCharCode(currentValue));
                        }
                    }
                    const basicLength = output.length;
                    let handledCPCount = basicLength;

                    // `handledCPCount` is the number of code points that have been handled;
                    // `basicLength` is the number of basic code points.

                    // Finish the basic string with a delimiter unless it's empty.
                    if (basicLength) {
                        output.push(delimiter);
                    }

                    // Main encoding loop:
                    while (handledCPCount < inputLength) {
                        // All non-basic code points < n have been handled already. Find the next
                        // larger one:
                        let m = maxInt;
                        for (const currentValue of input) {
                            if (currentValue >= n && currentValue < m) {
                                m = currentValue;
                            }
                        }

                        // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
                        // but guard against overflow.
                        const handledCPCountPlusOne = handledCPCount + 1;
                        if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
                            error('overflow');
                        }
                        delta += (m - n) * handledCPCountPlusOne;
                        n = m;
                        for (const currentValue of input) {
                            if (currentValue < n && ++delta > maxInt) {
                                error('overflow');
                            }
                            if (currentValue === n) {
                                // Represent delta as a generalized variable-length integer.
                                let q = delta;
                                for /* no condition */ (let k = base;; k += base) {
                                    const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
                                    if (q < t) {
                                        break;
                                    }
                                    const qMinusT = q - t;
                                    const baseMinusT = base - t;
                                    output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
                                    q = floor(qMinusT / baseMinusT);
                                }
                                output.push(stringFromCharCode(digitToBasic(q, 0)));
                                bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
                                delta = 0;
                                ++handledCPCount;
                            }
                        }
                        ++delta;
                        ++n;
                    }
                    return output.join('');
                };

                /**
                 * Converts a Punycode string representing a domain name or an email address
                 * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
                 * it doesn't matter if you call it on a string that has already been
                 * converted to Unicode.
                 * @memberOf punycode
                 * @param {String} input The Punycoded domain name or email address to
                 * convert to Unicode.
                 * @returns {String} The Unicode representation of the given Punycode
                 * string.
                 */
                exports.encode = encode;
                const toUnicode = function(input) {
                    return mapDomain(input, function(string) {
                        return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
                    });
                };

                /**
                 * Converts a Unicode string representing a domain name or an email address to
                 * Punycode. Only the non-ASCII parts of the domain name will be converted,
                 * i.e. it doesn't matter if you call it with a domain that's already in
                 * ASCII.
                 * @memberOf punycode
                 * @param {String} input The domain name or email address to convert, as a
                 * Unicode string.
                 * @returns {String} The Punycode representation of the given domain name or
                 * email address.
                 */
                exports.toUnicode = toUnicode;
                const toASCII = function(input) {
                    return mapDomain(input, function(string) {
                        return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
                    });
                };

                /*--------------------------------------------------------------------------*/

                /** Define the public API */
                exports.toASCII = toASCII;
                const punycode = {
                    /**
                     * A string representing the current Punycode.js version number.
                     * @memberOf punycode
                     * @type String
                     */
                    'version': '2.3.1',
                    /**
                     * An object of methods to convert from JavaScript's internal character
                     * representation (UCS-2) to Unicode code points, and back.
                     * @see <https://mathiasbynens.be/notes/javascript-encoding>
                     * @memberOf punycode
                     * @type Object
                     */
                    'ucs2': {
                        'decode': ucs2decode,
                        'encode': ucs2encode
                    },
                    'decode': decode,
                    'encode': encode,
                    'toASCII': toASCII,
                    'toUnicode': toUnicode
                };
                var _default = exports["default"] = punycode;

                /***/
            }),

        /***/
        "../../../node_modules/react-compiler-runtime/dist/index.js":
            /*!******************************************************************!*\
              !*** ../../../node_modules/react-compiler-runtime/dist/index.js ***!
              \******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                /**
                 * Copyright (c) Meta Platforms, Inc. and affiliates.
                 *
                 * This source code is licensed under the MIT license found in the
                 * LICENSE file in the root directory of this source tree.
                 *
                 * @lightSyntaxTransform
                 * @noflow
                 * @nolint
                 * @preventMunge
                 * @preserve-invariant-messages
                 */

                "use no memo";
                'use strict';

                var React = __webpack_require__( /*! react */ "react");

                function _interopNamespaceDefault(e) {
                    var n = Object.create(null);
                    if (e) {
                        Object.keys(e).forEach(function(k) {
                            if (k !== 'default') {
                                var d = Object.getOwnPropertyDescriptor(e, k);
                                Object.defineProperty(n, k, d.get ? d : {
                                    enumerable: true,
                                    get: function() {
                                        return e[k];
                                    }
                                });
                            }
                        });
                    }
                    n.default = e;
                    return Object.freeze(n);
                }
                var React__namespace = /*#__PURE__*/ _interopNamespaceDefault(React);
                var _a, _b;
                const {
                    useRef,
                    useEffect,
                    isValidElement
                } = React__namespace;
                const ReactSecretInternals = (_a = React__namespace.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) !== null && _a !== void 0 ? _a : React__namespace.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
                const $empty = Symbol.for('react.memo_cache_sentinel');
                const c = typeof((_b = React__namespace.__COMPILER_RUNTIME) === null || _b === void 0 ? void 0 : _b.c) === 'function' ? React__namespace.__COMPILER_RUNTIME.c : function c(size) {
                    return React__namespace.useMemo(() => {
                        const $ = new Array(size);
                        for (let ii = 0; ii < size; ii++) {
                            $[ii] = $empty;
                        }
                        $[$empty] = true;
                        return $;
                    }, []);
                };
                const LazyGuardDispatcher = {};
                ['readContext', 'useCallback', 'useContext', 'useEffect', 'useImperativeHandle', 'useInsertionEffect', 'useLayoutEffect', 'useMemo', 'useReducer', 'useRef', 'useState', 'useDebugValue', 'useDeferredValue', 'useTransition', 'useMutableSource', 'useSyncExternalStore', 'useId', 'unstable_isNewReconciler', 'getCacheSignal', 'getCacheForType', 'useCacheRefresh'].forEach(name => {
                    LazyGuardDispatcher[name] = () => {
                        throw new Error(`[React] Unexpected React hook call (${name}) from a React compiled function. ` + "Check that all hooks are called directly and named according to convention ('use[A-Z]') ");
                    };
                });
                let originalDispatcher = null;
                LazyGuardDispatcher['useMemoCache'] = count => {
                    if (originalDispatcher == null) {
                        throw new Error('React Compiler internal invariant violation: unexpected null dispatcher');
                    } else {
                        return originalDispatcher.useMemoCache(count);
                    }
                };
                var GuardKind;
                (function(GuardKind) {
                    GuardKind[GuardKind["PushGuardContext"] = 0] = "PushGuardContext";
                    GuardKind[GuardKind["PopGuardContext"] = 1] = "PopGuardContext";
                    GuardKind[GuardKind["PushExpectHook"] = 2] = "PushExpectHook";
                    GuardKind[GuardKind["PopExpectHook"] = 3] = "PopExpectHook";
                })(GuardKind || (GuardKind = {}));

                function setCurrent(newDispatcher) {
                    ReactSecretInternals.ReactCurrentDispatcher.current = newDispatcher;
                    return ReactSecretInternals.ReactCurrentDispatcher.current;
                }
                const guardFrames = [];

                function $dispatcherGuard(kind) {
                    const curr = ReactSecretInternals.ReactCurrentDispatcher.current;
                    if (kind === GuardKind.PushGuardContext) {
                        guardFrames.push(curr);
                        if (guardFrames.length === 1) {
                            originalDispatcher = curr;
                        }
                        if (curr === LazyGuardDispatcher) {
                            throw new Error(`[React] Unexpected call to custom hook or component from a React compiled function. ` + "Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') " + 'and (2) components are returned as JSX instead of being directly invoked.');
                        }
                        setCurrent(LazyGuardDispatcher);
                    } else if (kind === GuardKind.PopGuardContext) {
                        const lastFrame = guardFrames.pop();
                        if (lastFrame == null) {
                            throw new Error('React Compiler internal error: unexpected null in guard stack');
                        }
                        if (guardFrames.length === 0) {
                            originalDispatcher = null;
                        }
                        setCurrent(lastFrame);
                    } else if (kind === GuardKind.PushExpectHook) {
                        guardFrames.push(curr);
                        setCurrent(originalDispatcher);
                    } else if (kind === GuardKind.PopExpectHook) {
                        const lastFrame = guardFrames.pop();
                        if (lastFrame == null) {
                            throw new Error('React Compiler internal error: unexpected null in guard stack');
                        }
                        setCurrent(lastFrame);
                    } else {
                        throw new Error('React Compiler internal error: unreachable block' + kind);
                    }
                }

                function $reset($) {
                    for (let ii = 0; ii < $.length; ii++) {
                        $[ii] = $empty;
                    }
                }

                function $makeReadOnly() {
                    throw new Error('TODO: implement $makeReadOnly in react-compiler-runtime');
                }
                const renderCounterRegistry = new Map();

                function clearRenderCounterRegistry() {
                    for (const counters of renderCounterRegistry.values()) {
                        counters.forEach(counter => {
                            counter.count = 0;
                        });
                    }
                }

                function registerRenderCounter(name, val) {
                    let counters = renderCounterRegistry.get(name);
                    if (counters == null) {
                        counters = new Set();
                        renderCounterRegistry.set(name, counters);
                    }
                    counters.add(val);
                }

                function removeRenderCounter(name, val) {
                    const counters = renderCounterRegistry.get(name);
                    if (counters == null) {
                        return;
                    }
                    counters.delete(val);
                }

                function useRenderCounter(name) {
                    const val = useRef(null);
                    if (val.current != null) {
                        val.current.count += 1;
                    }
                    useEffect(() => {
                        if (val.current == null) {
                            const counter = {
                                count: 0
                            };
                            registerRenderCounter(name, counter);
                            val.current = counter;
                        }
                        return () => {
                            if (val.current !== null) {
                                removeRenderCounter(name, val.current);
                            }
                        };
                    });
                }
                const seenErrors = new Set();

                function $structuralCheck(oldValue, newValue, variableName, fnName, kind, loc) {
                    function error(l, r, path, depth) {
                        const str = `${fnName}:${loc} [${kind}] ${variableName}${path} changed from ${l} to ${r} at depth ${depth}`;
                        if (seenErrors.has(str)) {
                            return;
                        }
                        seenErrors.add(str);
                        console.error(str);
                    }
                    const depthLimit = 2;

                    function recur(oldValue, newValue, path, depth) {
                        if (depth > depthLimit) {
                            return;
                        } else if (oldValue === newValue) {
                            return;
                        } else if (typeof oldValue !== typeof newValue) {
                            error(`type ${typeof oldValue}`, `type ${typeof newValue}`, path, depth);
                        } else if (typeof oldValue === 'object') {
                            const oldArray = Array.isArray(oldValue);
                            const newArray = Array.isArray(newValue);
                            if (oldValue === null && newValue !== null) {
                                error('null', `type ${typeof newValue}`, path, depth);
                            } else if (newValue === null) {
                                error(`type ${typeof oldValue}`, 'null', path, depth);
                            } else if (oldValue instanceof Map) {
                                if (!(newValue instanceof Map)) {
                                    error(`Map instance`, `other value`, path, depth);
                                } else if (oldValue.size !== newValue.size) {
                                    error(`Map instance with size ${oldValue.size}`, `Map instance with size ${newValue.size}`, path, depth);
                                } else {
                                    for (const [k, v] of oldValue) {
                                        if (!newValue.has(k)) {
                                            error(`Map instance with key ${k}`, `Map instance without key ${k}`, path, depth);
                                        } else {
                                            recur(v, newValue.get(k), `${path}.get(${k})`, depth + 1);
                                        }
                                    }
                                }
                            } else if (newValue instanceof Map) {
                                error('other value', `Map instance`, path, depth);
                            } else if (oldValue instanceof Set) {
                                if (!(newValue instanceof Set)) {
                                    error(`Set instance`, `other value`, path, depth);
                                } else if (oldValue.size !== newValue.size) {
                                    error(`Set instance with size ${oldValue.size}`, `Set instance with size ${newValue.size}`, path, depth);
                                } else {
                                    for (const v of newValue) {
                                        if (!oldValue.has(v)) {
                                            error(`Set instance without element ${v}`, `Set instance with element ${v}`, path, depth);
                                        }
                                    }
                                }
                            } else if (newValue instanceof Set) {
                                error('other value', `Set instance`, path, depth);
                            } else if (oldArray || newArray) {
                                if (oldArray !== newArray) {
                                    error(`type ${oldArray ? 'array' : 'object'}`, `type ${newArray ? 'array' : 'object'}`, path, depth);
                                } else if (oldValue.length !== newValue.length) {
                                    error(`array with length ${oldValue.length}`, `array with length ${newValue.length}`, path, depth);
                                } else {
                                    for (let ii = 0; ii < oldValue.length; ii++) {
                                        recur(oldValue[ii], newValue[ii], `${path}[${ii}]`, depth + 1);
                                    }
                                }
                            } else if (isValidElement(oldValue) || isValidElement(newValue)) {
                                if (isValidElement(oldValue) !== isValidElement(newValue)) {
                                    error(`type ${isValidElement(oldValue) ? 'React element' : 'object'}`, `type ${isValidElement(newValue) ? 'React element' : 'object'}`, path, depth);
                                } else if (oldValue.type !== newValue.type) {
                                    error(`React element of type ${oldValue.type}`, `React element of type ${newValue.type}`, path, depth);
                                } else {
                                    recur(oldValue.props, newValue.props, `[props of ${path}]`, depth + 1);
                                }
                            } else {
                                for (const key in newValue) {
                                    if (!(key in oldValue)) {
                                        error(`object without key ${key}`, `object with key ${key}`, path, depth);
                                    }
                                }
                                for (const key in oldValue) {
                                    if (!(key in newValue)) {
                                        error(`object with key ${key}`, `object without key ${key}`, path, depth);
                                    } else {
                                        recur(oldValue[key], newValue[key], `${path}.${key}`, depth + 1);
                                    }
                                }
                            }
                        } else if (typeof oldValue === 'function') {
                            return;
                        } else if (isNaN(oldValue) || isNaN(newValue)) {
                            if (isNaN(oldValue) !== isNaN(newValue)) {
                                error(`${isNaN(oldValue) ? 'NaN' : 'non-NaN value'}`, `${isNaN(newValue) ? 'NaN' : 'non-NaN value'}`, path, depth);
                            }
                        } else if (oldValue !== newValue) {
                            error(oldValue, newValue, path, depth);
                        }
                    }
                    recur(oldValue, newValue, '', 0);
                }
                exports.$dispatcherGuard = $dispatcherGuard;
                exports.$makeReadOnly = $makeReadOnly;
                exports.$reset = $reset;
                exports.$structuralCheck = $structuralCheck;
                exports.c = c;
                exports.clearRenderCounterRegistry = clearRenderCounterRegistry;
                exports.renderCounterRegistry = renderCounterRegistry;
                exports.useRenderCounter = useRenderCounter;

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js ***!
              \******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.RemoveScrollBar = void 0;
                var React = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));
                var _reactStyleSingleton = __webpack_require__( /*! react-style-singleton */ "../../../node_modules/react-style-singleton/dist/es2015/index.js");
                var _constants = __webpack_require__( /*! ./constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js");
                var _utils = __webpack_require__( /*! ./utils */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js");

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                var Style = (0, _reactStyleSingleton.styleSingleton)();
                // important tip - once we measure scrollBar width and remove them
                // we could not repeat this operation
                // thus we are using style-singleton - only the first "yet correct" style will be applied.
                var getStyles = function(_a, allowRelative, gapMode, important) {
                    var left = _a.left,
                        top = _a.top,
                        right = _a.right,
                        gap = _a.gap;
                    if (gapMode === void 0) {
                        gapMode = 'margin';
                    }
                    return "\n  .".concat(_constants.noScrollbarsClassName, " {\n   overflow: hidden ").concat(important, ";\n   padding-right: ").concat(gap, "px ").concat(important, ";\n  }\n  body {\n    overflow: hidden ").concat(important, ";\n    overscroll-behavior: contain;\n    ").concat([allowRelative && "position: relative ".concat(important, ";"), gapMode === 'margin' && "\n    padding-left: ".concat(left, "px;\n    padding-top: ").concat(top, "px;\n    padding-right: ").concat(right, "px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(gap, "px ").concat(important, ";\n    "), gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";")].filter(Boolean).join(''), "\n  }\n  \n  .").concat(_constants.zeroRightClassName, " {\n    right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(_constants.fullWidthClassName, " {\n    margin-right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(_constants.zeroRightClassName, " .").concat(_constants.zeroRightClassName, " {\n    right: 0 ").concat(important, ";\n  }\n  \n  .").concat(_constants.fullWidthClassName, " .").concat(_constants.fullWidthClassName, " {\n    margin-right: 0 ").concat(important, ";\n  }\n  \n  body {\n    ").concat(_constants.removedBarSizeVariable, ": ").concat(gap, "px;\n  }\n");
                };
                /**
                 * Removes page scrollbar and blocks page scroll when mounted
                 */
                var RemoveScrollBar = function(props) {
                    var noRelative = props.noRelative,
                        noImportant = props.noImportant,
                        _a = props.gapMode,
                        gapMode = _a === void 0 ? 'margin' : _a;
                    var gap = React.useMemo(function() {
                        return (0, _utils.getGapWidth)(gapMode);
                    }, [gapMode]);
                    return /*#__PURE__*/ React.createElement(Style, {
                        styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '')
                    });
                };
                exports.RemoveScrollBar = RemoveScrollBar;

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js":
            /*!******************************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js ***!
              \******************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.zeroRightClassName = exports.removedBarSizeVariable = exports.noScrollbarsClassName = exports.fullWidthClassName = void 0;
                var zeroRightClassName = exports.zeroRightClassName = 'right-scroll-bar-position';
                var fullWidthClassName = exports.fullWidthClassName = 'width-before-scroll-bar';
                var noScrollbarsClassName = exports.noScrollbarsClassName = 'with-scroll-bars-hidden';
                /**
                 * Name of a CSS variable containing the amount of "hidden" scrollbar
                 * ! might be undefined ! use will fallback!
                 */
                var removedBarSizeVariable = exports.removedBarSizeVariable = '--removed-body-scroll-bar-size';

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "RemoveScrollBar", ({
                    enumerable: true,
                    get: function() {
                        return _component.RemoveScrollBar;
                    }
                }));
                Object.defineProperty(exports, "fullWidthClassName", ({
                    enumerable: true,
                    get: function() {
                        return _constants.fullWidthClassName;
                    }
                }));
                Object.defineProperty(exports, "getGapWidth", ({
                    enumerable: true,
                    get: function() {
                        return _utils.getGapWidth;
                    }
                }));
                Object.defineProperty(exports, "noScrollbarsClassName", ({
                    enumerable: true,
                    get: function() {
                        return _constants.noScrollbarsClassName;
                    }
                }));
                Object.defineProperty(exports, "removedBarSizeVariable", ({
                    enumerable: true,
                    get: function() {
                        return _constants.removedBarSizeVariable;
                    }
                }));
                Object.defineProperty(exports, "zeroRightClassName", ({
                    enumerable: true,
                    get: function() {
                        return _constants.zeroRightClassName;
                    }
                }));
                var _component = __webpack_require__( /*! ./component */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js");
                var _constants = __webpack_require__( /*! ./constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js");
                var _utils = __webpack_require__( /*! ./utils */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js");

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.zeroGap = exports.getGapWidth = void 0;
                var zeroGap = exports.zeroGap = {
                    left: 0,
                    top: 0,
                    right: 0,
                    gap: 0
                };
                var parse = function(x) {
                    return parseInt(x || '', 10) || 0;
                };
                var getOffset = function(gapMode) {
                    var cs = window.getComputedStyle(document.body);
                    if (true) {
                        if (cs.overflowY === 'hidden') {
                            console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');
                        }
                    }
                    var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
                    var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
                    var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
                    return [parse(left), parse(top), parse(right)];
                };
                var getGapWidth = function(gapMode) {
                    if (gapMode === void 0) {
                        gapMode = 'margin';
                    }
                    if (typeof window === 'undefined') {
                        return zeroGap;
                    }
                    var offsets = getOffset(gapMode);
                    var documentWidth = document.documentElement.clientWidth;
                    var windowWidth = window.innerWidth;
                    return {
                        left: offsets[0],
                        top: offsets[1],
                        right: offsets[2],
                        gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
                    };
                };
                exports.getGapWidth = getGapWidth;

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll/dist/es2015/Combination.js ***!
              \****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = void 0;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var React = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));
                var _UI = __webpack_require__( /*! ./UI */ "../../../node_modules/react-remove-scroll/dist/es2015/UI.js");
                var _sidecar = _interopRequireDefault(__webpack_require__( /*! ./sidecar */ "../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                var ReactRemoveScroll = /*#__PURE__*/ React.forwardRef(function(props, ref) {
                    return /*#__PURE__*/ React.createElement(_UI.RemoveScroll, (0, _tslib.__assign)({}, props, {
                        ref: ref,
                        sideCar: _sidecar.default
                    }));
                });
                ReactRemoveScroll.classNames = _UI.RemoveScroll.classNames;
                var _default = exports["default"] = ReactRemoveScroll;

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.RemoveScrollSideCar = RemoveScrollSideCar;
                exports.getTouchXY = exports.getDeltaXY = void 0;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var React = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));
                var _reactRemoveScrollBar = __webpack_require__( /*! react-remove-scroll-bar */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js");
                var _reactStyleSingleton = __webpack_require__( /*! react-style-singleton */ "../../../node_modules/react-style-singleton/dist/es2015/index.js");
                var _aggresiveCapture = __webpack_require__( /*! ./aggresiveCapture */ "../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js");
                var _handleScroll = __webpack_require__( /*! ./handleScroll */ "../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js");

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                var getTouchXY = function(event) {
                    return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
                };
                exports.getTouchXY = getTouchXY;
                var getDeltaXY = function(event) {
                    return [event.deltaX, event.deltaY];
                };
                exports.getDeltaXY = getDeltaXY;
                var extractRef = function(ref) {
                    return ref && 'current' in ref ? ref.current : ref;
                };
                var deltaCompare = function(x, y) {
                    return x[0] === y[0] && x[1] === y[1];
                };
                var generateStyle = function(id) {
                    return "\n  .block-interactivity-".concat(id, " {pointer-events: none;}\n  .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
                };
                var idCounter = 0;
                var lockStack = [];

                function RemoveScrollSideCar(props) {
                    var shouldPreventQueue = React.useRef([]);
                    var touchStartRef = React.useRef([0, 0]);
                    var activeAxis = React.useRef();
                    var id = React.useState(idCounter++)[0];
                    var Style = React.useState(function() {
                        return (0, _reactStyleSingleton.styleSingleton)();
                    })[0];
                    var lastProps = React.useRef(props);
                    React.useEffect(function() {
                        lastProps.current = props;
                    }, [props]);
                    React.useEffect(function() {
                        if (props.inert) {
                            document.body.classList.add("block-interactivity-".concat(id));
                            var allow_1 = (0, _tslib.__spreadArray)([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
                            allow_1.forEach(function(el) {
                                return el.classList.add("allow-interactivity-".concat(id));
                            });
                            return function() {
                                document.body.classList.remove("block-interactivity-".concat(id));
                                allow_1.forEach(function(el) {
                                    return el.classList.remove("allow-interactivity-".concat(id));
                                });
                            };
                        }
                        return;
                    }, [props.inert, props.lockRef.current, props.shards]);
                    var shouldCancelEvent = React.useCallback(function(event, parent) {
                        if ('touches' in event && event.touches.length === 2) {
                            return !lastProps.current.allowPinchZoom;
                        }
                        var touch = getTouchXY(event);
                        var touchStart = touchStartRef.current;
                        var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
                        var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
                        var currentAxis;
                        var target = event.target;
                        var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
                        // allow horizontal touch move on Range inputs. They will not cause any scroll
                        if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
                            return false;
                        }
                        var canBeScrolledInMainDirection = (0, _handleScroll.locationCouldBeScrolled)(moveDirection, target);
                        if (!canBeScrolledInMainDirection) {
                            return true;
                        }
                        if (canBeScrolledInMainDirection) {
                            currentAxis = moveDirection;
                        } else {
                            currentAxis = moveDirection === 'v' ? 'h' : 'v';
                            canBeScrolledInMainDirection = (0, _handleScroll.locationCouldBeScrolled)(moveDirection, target);
                            // other axis might be not scrollable
                        }
                        if (!canBeScrolledInMainDirection) {
                            return false;
                        }
                        if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
                            activeAxis.current = currentAxis;
                        }
                        if (!currentAxis) {
                            return true;
                        }
                        var cancelingAxis = activeAxis.current || currentAxis;
                        return (0, _handleScroll.handleScroll)(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
                    }, []);
                    var shouldPrevent = React.useCallback(function(_event) {
                        var event = _event;
                        if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
                            // not the last active
                            return;
                        }
                        var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
                        var sourceEvent = shouldPreventQueue.current.filter(function(e) {
                            return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta);
                        })[0];
                        // self event, and should be canceled
                        if (sourceEvent && sourceEvent.should) {
                            if (event.cancelable) {
                                event.preventDefault();
                            }
                            return;
                        }
                        // outside or shard event
                        if (!sourceEvent) {
                            var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
                                return node.contains(event.target);
                            });
                            var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
                            if (shouldStop) {
                                if (event.cancelable) {
                                    event.preventDefault();
                                }
                            }
                        }
                    }, []);
                    var shouldCancel = React.useCallback(function(name, delta, target, should) {
                        var event = {
                            name: name,
                            delta: delta,
                            target: target,
                            should: should
                        };
                        shouldPreventQueue.current.push(event);
                        setTimeout(function() {
                            shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
                                return e !== event;
                            });
                        }, 1);
                    }, []);
                    var scrollTouchStart = React.useCallback(function(event) {
                        touchStartRef.current = getTouchXY(event);
                        activeAxis.current = undefined;
                    }, []);
                    var scrollWheel = React.useCallback(function(event) {
                        shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
                    }, []);
                    var scrollTouchMove = React.useCallback(function(event) {
                        shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
                    }, []);
                    React.useEffect(function() {
                        lockStack.push(Style);
                        props.setCallbacks({
                            onScrollCapture: scrollWheel,
                            onWheelCapture: scrollWheel,
                            onTouchMoveCapture: scrollTouchMove
                        });
                        document.addEventListener('wheel', shouldPrevent, _aggresiveCapture.nonPassive);
                        document.addEventListener('touchmove', shouldPrevent, _aggresiveCapture.nonPassive);
                        document.addEventListener('touchstart', scrollTouchStart, _aggresiveCapture.nonPassive);
                        return function() {
                            lockStack = lockStack.filter(function(inst) {
                                return inst !== Style;
                            });
                            document.removeEventListener('wheel', shouldPrevent, _aggresiveCapture.nonPassive);
                            document.removeEventListener('touchmove', shouldPrevent, _aggresiveCapture.nonPassive);
                            document.removeEventListener('touchstart', scrollTouchStart, _aggresiveCapture.nonPassive);
                        };
                    }, []);
                    var removeScrollBar = props.removeScrollBar,
                        inert = props.inert;
                    return /*#__PURE__*/ React.createElement(React.Fragment, null, inert ? /*#__PURE__*/ React.createElement(Style, {
                        styles: generateStyle(id)
                    }) : null, removeScrollBar ? /*#__PURE__*/ React.createElement(_reactRemoveScrollBar.RemoveScrollBar, {
                        gapMode: "margin"
                    }) : null);
                }

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll/dist/es2015/UI.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll/dist/es2015/UI.js ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.RemoveScroll = void 0;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var React = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));
                var _constants = __webpack_require__( /*! react-remove-scroll-bar/constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js");
                var _useCallbackRef = __webpack_require__( /*! use-callback-ref */ "../../../node_modules/use-callback-ref/dist/es2015/index.js");
                var _medium = __webpack_require__( /*! ./medium */ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js");

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                var nothing = function() {
                    return;
                };
                /**
                 * Removes scrollbar from the page and contain the scroll within the Lock
                 */
                var RemoveScroll = exports.RemoveScroll = /*#__PURE__*/ React.forwardRef(function(props, parentRef) {
                    var ref = React.useRef(null);
                    var _a = React.useState({
                            onScrollCapture: nothing,
                            onWheelCapture: nothing,
                            onTouchMoveCapture: nothing
                        }),
                        callbacks = _a[0],
                        setCallbacks = _a[1];
                    var forwardProps = props.forwardProps,
                        children = props.children,
                        className = props.className,
                        removeScrollBar = props.removeScrollBar,
                        enabled = props.enabled,
                        shards = props.shards,
                        sideCar = props.sideCar,
                        noIsolation = props.noIsolation,
                        inert = props.inert,
                        allowPinchZoom = props.allowPinchZoom,
                        _b = props.as,
                        Container = _b === void 0 ? 'div' : _b,
                        rest = (0, _tslib.__rest)(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
                    var SideCar = sideCar;
                    var containerRef = (0, _useCallbackRef.useMergeRefs)([ref, parentRef]);
                    var containerProps = (0, _tslib.__assign)((0, _tslib.__assign)({}, rest), callbacks);
                    return /*#__PURE__*/ React.createElement(React.Fragment, null, enabled && ( /*#__PURE__*/ React.createElement(SideCar, {
                        sideCar: _medium.effectCar,
                        removeScrollBar: removeScrollBar,
                        shards: shards,
                        noIsolation: noIsolation,
                        inert: inert,
                        setCallbacks: setCallbacks,
                        allowPinchZoom: !!allowPinchZoom,
                        lockRef: ref
                    })), forwardProps ? ( /*#__PURE__*/ React.cloneElement(React.Children.only(children), (0, _tslib.__assign)((0, _tslib.__assign)({}, containerProps), {
                        ref: containerRef
                    }))) : ( /*#__PURE__*/ React.createElement(Container, (0, _tslib.__assign)({}, containerProps, {
                        className: className,
                        ref: containerRef
                    }), children)));
                });
                RemoveScroll.defaultProps = {
                    enabled: true,
                    removeScrollBar: true,
                    inert: false
                };
                RemoveScroll.classNames = {
                    fullWidth: _constants.fullWidthClassName,
                    zeroRight: _constants.zeroRightClassName
                };

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js":
            /*!*********************************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js ***!
              \*********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.nonPassive = void 0;
                var passiveSupported = false;
                if (typeof window !== 'undefined') {
                    try {
                        var options = Object.defineProperty({}, 'passive', {
                            get: function() {
                                passiveSupported = true;
                                return true;
                            }
                        });
                        // @ts-ignore
                        window.addEventListener('test', options, options);
                        // @ts-ignore
                        window.removeEventListener('test', options, options);
                    } catch (err) {
                        passiveSupported = false;
                    }
                }
                var nonPassive = exports.nonPassive = passiveSupported ? {
                    passive: false
                } : false;

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.locationCouldBeScrolled = exports.handleScroll = void 0;
                var alwaysContainsScroll = function(node) {
                    // textarea will always _contain_ scroll inside self. It only can be hidden
                    return node.tagName === 'TEXTAREA';
                };
                var elementCanBeScrolled = function(node, overflow) {
                    var styles = window.getComputedStyle(node);
                    return (
                        // not-not-scrollable
                        styles[overflow] !== 'hidden' &&
                        // contains scroll inside self
                        !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible')
                    );
                };
                var elementCouldBeVScrolled = function(node) {
                    return elementCanBeScrolled(node, 'overflowY');
                };
                var elementCouldBeHScrolled = function(node) {
                    return elementCanBeScrolled(node, 'overflowX');
                };
                var locationCouldBeScrolled = function(axis, node) {
                    var current = node;
                    do {
                        // Skip over shadow root
                        if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
                            current = current.host;
                        }
                        var isScrollable = elementCouldBeScrolled(axis, current);
                        if (isScrollable) {
                            var _a = getScrollVariables(axis, current),
                                s = _a[1],
                                d = _a[2];
                            if (s > d) {
                                return true;
                            }
                        }
                        current = current.parentNode;
                    } while (current && current !== document.body);
                    return false;
                };
                exports.locationCouldBeScrolled = locationCouldBeScrolled;
                var getVScrollVariables = function(_a) {
                    var scrollTop = _a.scrollTop,
                        scrollHeight = _a.scrollHeight,
                        clientHeight = _a.clientHeight;
                    return [scrollTop, scrollHeight, clientHeight];
                };
                var getHScrollVariables = function(_a) {
                    var scrollLeft = _a.scrollLeft,
                        scrollWidth = _a.scrollWidth,
                        clientWidth = _a.clientWidth;
                    return [scrollLeft, scrollWidth, clientWidth];
                };
                var elementCouldBeScrolled = function(axis, node) {
                    return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
                };
                var getScrollVariables = function(axis, node) {
                    return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
                };
                var getDirectionFactor = function(axis, direction) {
                    /**
                     * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
                     * and then increasingly negative as you scroll towards the end of the content.
                     * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
                     */
                    return axis === 'h' && direction === 'rtl' ? -1 : 1;
                };
                var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
                    var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
                    var delta = directionFactor * sourceDelta;
                    // find scrollable target
                    var target = event.target;
                    var targetInLock = endTarget.contains(target);
                    var shouldCancelScroll = false;
                    var isDeltaPositive = delta > 0;
                    var availableScroll = 0;
                    var availableScrollTop = 0;
                    do {
                        var _a = getScrollVariables(axis, target),
                            position = _a[0],
                            scroll_1 = _a[1],
                            capacity = _a[2];
                        var elementScroll = scroll_1 - capacity - directionFactor * position;
                        if (position || elementScroll) {
                            if (elementCouldBeScrolled(axis, target)) {
                                availableScroll += elementScroll;
                                availableScrollTop += position;
                            }
                        }
                        target = target.parentNode;
                    } while (
                        // portaled content
                        !targetInLock && target !== document.body ||
                        // self content
                        targetInLock && (endTarget.contains(target) || endTarget === target));
                    if (isDeltaPositive && (noOverscroll && availableScroll === 0 || !noOverscroll && delta > availableScroll)) {
                        shouldCancelScroll = true;
                    } else if (!isDeltaPositive && (noOverscroll && availableScrollTop === 0 || !noOverscroll && -delta > availableScrollTop)) {
                        shouldCancelScroll = true;
                    }
                    return shouldCancelScroll;
                };
                exports.handleScroll = handleScroll;

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll/dist/es2015/index.js":
            /*!**********************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll/dist/es2015/index.js ***!
              \**********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "RemoveScroll", ({
                    enumerable: true,
                    get: function() {
                        return _Combination.default;
                    }
                }));
                var _Combination = _interopRequireDefault(__webpack_require__( /*! ./Combination */ "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll/dist/es2015/medium.js":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll/dist/es2015/medium.js ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.effectCar = void 0;
                var _useSidecar = __webpack_require__( /*! use-sidecar */ "../../../node_modules/use-sidecar/dist/es2015/index.js");
                var effectCar = exports.effectCar = (0, _useSidecar.createSidecarMedium)();

                /***/
            }),

        /***/
        "../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js":
            /*!************************************************************************!*\
              !*** ../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = void 0;
                var _useSidecar = __webpack_require__( /*! use-sidecar */ "../../../node_modules/use-sidecar/dist/es2015/index.js");
                var _SideEffect = __webpack_require__( /*! ./SideEffect */ "../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js");
                var _medium = __webpack_require__( /*! ./medium */ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js");
                var _default = exports["default"] = (0, _useSidecar.exportSidecar)(_medium.effectCar, _SideEffect.RemoveScrollSideCar);

                /***/
            }),

        /***/
        "../../../node_modules/react-style-singleton/dist/es2015/component.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/react-style-singleton/dist/es2015/component.js ***!
              \****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.styleSingleton = void 0;
                var _hook = __webpack_require__( /*! ./hook */ "../../../node_modules/react-style-singleton/dist/es2015/hook.js");
                /**
                 * create a Component to add styles on demand
                 * - styles are added when first instance is mounted
                 * - styles are removed when the last instance is unmounted
                 * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
                 */
                var styleSingleton = function() {
                    var useStyle = (0, _hook.styleHookSingleton)();
                    var Sheet = function(_a) {
                        var styles = _a.styles,
                            dynamic = _a.dynamic;
                        useStyle(styles, dynamic);
                        return null;
                    };
                    return Sheet;
                };
                exports.styleSingleton = styleSingleton;

                /***/
            }),

        /***/
        "../../../node_modules/react-style-singleton/dist/es2015/hook.js":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/react-style-singleton/dist/es2015/hook.js ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.styleHookSingleton = void 0;
                var React = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));
                var _singleton = __webpack_require__( /*! ./singleton */ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js");

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                /**
                 * creates a hook to control style singleton
                 * @see {@link styleSingleton} for a safer component version
                 * @example
                 * ```tsx
                 * const useStyle = styleHookSingleton();
                 * ///
                 * useStyle('body { overflow: hidden}');
                 */
                var styleHookSingleton = function() {
                    var sheet = (0, _singleton.stylesheetSingleton)();
                    return function(styles, isDynamic) {
                        React.useEffect(function() {
                            sheet.add(styles);
                            return function() {
                                sheet.remove();
                            };
                        }, [styles && isDynamic]);
                    };
                };
                exports.styleHookSingleton = styleHookSingleton;

                /***/
            }),

        /***/
        "../../../node_modules/react-style-singleton/dist/es2015/index.js":
            /*!************************************************************************!*\
              !*** ../../../node_modules/react-style-singleton/dist/es2015/index.js ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "styleHookSingleton", ({
                    enumerable: true,
                    get: function() {
                        return _hook.styleHookSingleton;
                    }
                }));
                Object.defineProperty(exports, "styleSingleton", ({
                    enumerable: true,
                    get: function() {
                        return _component.styleSingleton;
                    }
                }));
                Object.defineProperty(exports, "stylesheetSingleton", ({
                    enumerable: true,
                    get: function() {
                        return _singleton.stylesheetSingleton;
                    }
                }));
                var _component = __webpack_require__( /*! ./component */ "../../../node_modules/react-style-singleton/dist/es2015/component.js");
                var _singleton = __webpack_require__( /*! ./singleton */ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js");
                var _hook = __webpack_require__( /*! ./hook */ "../../../node_modules/react-style-singleton/dist/es2015/hook.js");

                /***/
            }),

        /***/
        "../../../node_modules/react-style-singleton/dist/es2015/singleton.js":
            /*!****************************************************************************!*\
              !*** ../../../node_modules/react-style-singleton/dist/es2015/singleton.js ***!
              \****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.stylesheetSingleton = void 0;
                var _getNonce = __webpack_require__( /*! get-nonce */ "../../../node_modules/get-nonce/dist/es2015/index.js");

                function makeStyleTag() {
                    if (!document) return null;
                    var tag = document.createElement('style');
                    tag.type = 'text/css';
                    var nonce = (0, _getNonce.getNonce)();
                    if (nonce) {
                        tag.setAttribute('nonce', nonce);
                    }
                    return tag;
                }

                function injectStyles(tag, css) {
                    // @ts-ignore
                    if (tag.styleSheet) {
                        // @ts-ignore
                        tag.styleSheet.cssText = css;
                    } else {
                        tag.appendChild(document.createTextNode(css));
                    }
                }

                function insertStyleTag(tag) {
                    var head = document.head || document.getElementsByTagName('head')[0];
                    head.appendChild(tag);
                }
                var stylesheetSingleton = function() {
                    var counter = 0;
                    var stylesheet = null;
                    return {
                        add: function(style) {
                            if (counter == 0) {
                                if (stylesheet = makeStyleTag()) {
                                    injectStyles(stylesheet, style);
                                    insertStyleTag(stylesheet);
                                }
                            }
                            counter++;
                        },
                        remove: function() {
                            counter--;
                            if (!counter && stylesheet) {
                                stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
                                stylesheet = null;
                            }
                        }
                    };
                };
                exports.stylesheetSingleton = stylesheetSingleton;

                /***/
            }),

        /***/
        "../../../node_modules/react/cjs/react-jsx-runtime.development.js":
            /*!************************************************************************!*\
              !*** ../../../node_modules/react/cjs/react-jsx-runtime.development.js ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";
                /**
                 * @license React
                 * react-jsx-runtime.development.js
                 *
                 * Copyright (c) Facebook, Inc. and its affiliates.
                 *
                 * This source code is licensed under the MIT license found in the
                 * LICENSE file in the root directory of this source tree.
                 */



                if (true) {
                    (function() {
                        'use strict';

                        var React = __webpack_require__( /*! react */ "react");

                        // ATTENTION
                        // When adding new symbols to this file,
                        // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
                        // The Symbol used to tag the ReactElement-like types.
                        var REACT_ELEMENT_TYPE = Symbol.for('react.element');
                        var REACT_PORTAL_TYPE = Symbol.for('react.portal');
                        var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
                        var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
                        var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
                        var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
                        var REACT_CONTEXT_TYPE = Symbol.for('react.context');
                        var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
                        var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
                        var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
                        var REACT_MEMO_TYPE = Symbol.for('react.memo');
                        var REACT_LAZY_TYPE = Symbol.for('react.lazy');
                        var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
                        var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
                        var FAUX_ITERATOR_SYMBOL = '@@iterator';

                        function getIteratorFn(maybeIterable) {
                            if (maybeIterable === null || typeof maybeIterable !== 'object') {
                                return null;
                            }
                            var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
                            if (typeof maybeIterator === 'function') {
                                return maybeIterator;
                            }
                            return null;
                        }
                        var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

                        function error(format) {
                            {
                                {
                                    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
                                        args[_key2 - 1] = arguments[_key2];
                                    }
                                    printWarning('error', format, args);
                                }
                            }
                        }

                        function printWarning(level, format, args) {
                            // When changing this logic, you might want to also
                            // update consoleWithStackDev.www.js as well.
                            {
                                var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
                                var stack = ReactDebugCurrentFrame.getStackAddendum();
                                if (stack !== '') {
                                    format += '%s';
                                    args = args.concat([stack]);
                                } // eslint-disable-next-line react-internal/safe-string-coercion

                                var argsWithFormat = args.map(function(item) {
                                    return String(item);
                                }); // Careful: RN currently depends on this prefix

                                argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
                                // breaks IE9: https://github.com/facebook/react/issues/13610
                                // eslint-disable-next-line react-internal/no-production-logging

                                Function.prototype.apply.call(console[level], console, argsWithFormat);
                            }
                        }

                        // -----------------------------------------------------------------------------

                        var enableScopeAPI = false; // Experimental Create Event Handle API.
                        var enableCacheElement = false;
                        var enableTransitionTracing = false; // No known bugs, but needs performance testing

                        var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
                        // stuff. Intended to enable React core members to more easily debug scheduling
                        // issues in DEV builds.

                        var enableDebugTracing = false; // Track which Fiber(s) schedule render work.

                        var REACT_MODULE_REFERENCE;
                        {
                            REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
                        }

                        function isValidElementType(type) {
                            if (typeof type === 'string' || typeof type === 'function') {
                                return true;
                            } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).

                            if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
                                return true;
                            }
                            if (typeof type === 'object' && type !== null) {
                                if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE ||
                                    // This needs to include all possible module reference object
                                    // types supported by any Flight configuration anywhere since
                                    // we don't know which Flight build this will end up being used
                                    // with.
                                    type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
                                    return true;
                                }
                            }
                            return false;
                        }

                        function getWrappedName(outerType, innerType, wrapperName) {
                            var displayName = outerType.displayName;
                            if (displayName) {
                                return displayName;
                            }
                            var functionName = innerType.displayName || innerType.name || '';
                            return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
                        } // Keep in sync with react-reconciler/getComponentNameFromFiber

                        function getContextName(type) {
                            return type.displayName || 'Context';
                        } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.

                        function getComponentNameFromType(type) {
                            if (type == null) {
                                // Host root, text node or just invalid type.
                                return null;
                            } {
                                if (typeof type.tag === 'number') {
                                    error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
                                }
                            }
                            if (typeof type === 'function') {
                                return type.displayName || type.name || null;
                            }
                            if (typeof type === 'string') {
                                return type;
                            }
                            switch (type) {
                                case REACT_FRAGMENT_TYPE:
                                    return 'Fragment';
                                case REACT_PORTAL_TYPE:
                                    return 'Portal';
                                case REACT_PROFILER_TYPE:
                                    return 'Profiler';
                                case REACT_STRICT_MODE_TYPE:
                                    return 'StrictMode';
                                case REACT_SUSPENSE_TYPE:
                                    return 'Suspense';
                                case REACT_SUSPENSE_LIST_TYPE:
                                    return 'SuspenseList';
                            }
                            if (typeof type === 'object') {
                                switch (type.$$typeof) {
                                    case REACT_CONTEXT_TYPE:
                                        var context = type;
                                        return getContextName(context) + '.Consumer';
                                    case REACT_PROVIDER_TYPE:
                                        var provider = type;
                                        return getContextName(provider._context) + '.Provider';
                                    case REACT_FORWARD_REF_TYPE:
                                        return getWrappedName(type, type.render, 'ForwardRef');
                                    case REACT_MEMO_TYPE:
                                        var outerName = type.displayName || null;
                                        if (outerName !== null) {
                                            return outerName;
                                        }
                                        return getComponentNameFromType(type.type) || 'Memo';
                                    case REACT_LAZY_TYPE: {
                                        var lazyComponent = type;
                                        var payload = lazyComponent._payload;
                                        var init = lazyComponent._init;
                                        try {
                                            return getComponentNameFromType(init(payload));
                                        } catch (x) {
                                            return null;
                                        }
                                    }

                                    // eslint-disable-next-line no-fallthrough
                                }
                            }
                            return null;
                        }
                        var assign = Object.assign;

                        // Helpers to patch console.logs to avoid logging during side-effect free
                        // replaying on render function. This currently only patches the object
                        // lazily which won't cover if the log function was extracted eagerly.
                        // We could also eagerly patch the method.
                        var disabledDepth = 0;
                        var prevLog;
                        var prevInfo;
                        var prevWarn;
                        var prevError;
                        var prevGroup;
                        var prevGroupCollapsed;
                        var prevGroupEnd;

                        function disabledLog() {}
                        disabledLog.__reactDisabledLog = true;

                        function disableLogs() {
                            {
                                if (disabledDepth === 0) {
                                    /* eslint-disable react-internal/no-production-logging */
                                    prevLog = console.log;
                                    prevInfo = console.info;
                                    prevWarn = console.warn;
                                    prevError = console.error;
                                    prevGroup = console.group;
                                    prevGroupCollapsed = console.groupCollapsed;
                                    prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099

                                    var props = {
                                        configurable: true,
                                        enumerable: true,
                                        value: disabledLog,
                                        writable: true
                                    }; // $FlowFixMe Flow thinks console is immutable.

                                    Object.defineProperties(console, {
                                        info: props,
                                        log: props,
                                        warn: props,
                                        error: props,
                                        group: props,
                                        groupCollapsed: props,
                                        groupEnd: props
                                    });
                                    /* eslint-enable react-internal/no-production-logging */
                                }
                                disabledDepth++;
                            }
                        }

                        function reenableLogs() {
                            {
                                disabledDepth--;
                                if (disabledDepth === 0) {
                                    /* eslint-disable react-internal/no-production-logging */
                                    var props = {
                                        configurable: true,
                                        enumerable: true,
                                        writable: true
                                    }; // $FlowFixMe Flow thinks console is immutable.

                                    Object.defineProperties(console, {
                                        log: assign({}, props, {
                                            value: prevLog
                                        }),
                                        info: assign({}, props, {
                                            value: prevInfo
                                        }),
                                        warn: assign({}, props, {
                                            value: prevWarn
                                        }),
                                        error: assign({}, props, {
                                            value: prevError
                                        }),
                                        group: assign({}, props, {
                                            value: prevGroup
                                        }),
                                        groupCollapsed: assign({}, props, {
                                            value: prevGroupCollapsed
                                        }),
                                        groupEnd: assign({}, props, {
                                            value: prevGroupEnd
                                        })
                                    });
                                    /* eslint-enable react-internal/no-production-logging */
                                }
                                if (disabledDepth < 0) {
                                    error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
                                }
                            }
                        }
                        var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
                        var prefix;

                        function describeBuiltInComponentFrame(name, source, ownerFn) {
                            {
                                if (prefix === undefined) {
                                    // Extract the VM specific prefix used by each line.
                                    try {
                                        throw Error();
                                    } catch (x) {
                                        var match = x.stack.trim().match(/\n( *(at )?)/);
                                        prefix = match && match[1] || '';
                                    }
                                } // We use the prefix to ensure our stacks line up with native stack frames.

                                return '\n' + prefix + name;
                            }
                        }
                        var reentry = false;
                        var componentFrameCache;
                        {
                            var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
                            componentFrameCache = new PossiblyWeakMap();
                        }

                        function describeNativeComponentFrame(fn, construct) {
                            // If something asked for a stack inside a fake render, it should get ignored.
                            if (!fn || reentry) {
                                return '';
                            } {
                                var frame = componentFrameCache.get(fn);
                                if (frame !== undefined) {
                                    return frame;
                                }
                            }
                            var control;
                            reentry = true;
                            var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.

                            Error.prepareStackTrace = undefined;
                            var previousDispatcher;
                            {
                                previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
                                // for warnings.

                                ReactCurrentDispatcher.current = null;
                                disableLogs();
                            }
                            try {
                                // This should throw.
                                if (construct) {
                                    // Something should be setting the props in the constructor.
                                    var Fake = function() {
                                        throw Error();
                                    }; // $FlowFixMe

                                    Object.defineProperty(Fake.prototype, 'props', {
                                        set: function() {
                                            // We use a throwing setter instead of frozen or non-writable props
                                            // because that won't throw in a non-strict mode function.
                                            throw Error();
                                        }
                                    });
                                    if (typeof Reflect === 'object' && Reflect.construct) {
                                        // We construct a different control for this case to include any extra
                                        // frames added by the construct call.
                                        try {
                                            Reflect.construct(Fake, []);
                                        } catch (x) {
                                            control = x;
                                        }
                                        Reflect.construct(fn, [], Fake);
                                    } else {
                                        try {
                                            Fake.call();
                                        } catch (x) {
                                            control = x;
                                        }
                                        fn.call(Fake.prototype);
                                    }
                                } else {
                                    try {
                                        throw Error();
                                    } catch (x) {
                                        control = x;
                                    }
                                    fn();
                                }
                            } catch (sample) {
                                // This is inlined manually because closure doesn't do it for us.
                                if (sample && control && typeof sample.stack === 'string') {
                                    // This extracts the first frame from the sample that isn't also in the control.
                                    // Skipping one frame that we assume is the frame that calls the two.
                                    var sampleLines = sample.stack.split('\n');
                                    var controlLines = control.stack.split('\n');
                                    var s = sampleLines.length - 1;
                                    var c = controlLines.length - 1;
                                    while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
                                        // We expect at least one stack frame to be shared.
                                        // Typically this will be the root most one. However, stack frames may be
                                        // cut off due to maximum stack limits. In this case, one maybe cut off
                                        // earlier than the other. We assume that the sample is longer or the same
                                        // and there for cut off earlier. So we should find the root most frame in
                                        // the sample somewhere in the control.
                                        c--;
                                    }
                                    for (; s >= 1 && c >= 0; s--, c--) {
                                        // Next we find the first one that isn't the same which should be the
                                        // frame that called our sample function and the control.
                                        if (sampleLines[s] !== controlLines[c]) {
                                            // In V8, the first line is describing the message but other VMs don't.
                                            // If we're about to return the first line, and the control is also on the same
                                            // line, that's a pretty good indicator that our sample threw at same line as
                                            // the control. I.e. before we entered the sample frame. So we ignore this result.
                                            // This can happen if you passed a class to function component, or non-function.
                                            if (s !== 1 || c !== 1) {
                                                do {
                                                    s--;
                                                    c--; // We may still have similar intermediate frames from the construct call.
                                                    // The next one that isn't the same should be our match though.

                                                    if (c < 0 || sampleLines[s] !== controlLines[c]) {
                                                        // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
                                                        var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
                                                        // but we have a user-provided "displayName"
                                                        // splice it in to make the stack more readable.

                                                        if (fn.displayName && _frame.includes('<anonymous>')) {
                                                            _frame = _frame.replace('<anonymous>', fn.displayName);
                                                        } {
                                                            if (typeof fn === 'function') {
                                                                componentFrameCache.set(fn, _frame);
                                                            }
                                                        } // Return the line we found.

                                                        return _frame;
                                                    }
                                                } while (s >= 1 && c >= 0);
                                            }
                                            break;
                                        }
                                    }
                                }
                            } finally {
                                reentry = false;
                                {
                                    ReactCurrentDispatcher.current = previousDispatcher;
                                    reenableLogs();
                                }
                                Error.prepareStackTrace = previousPrepareStackTrace;
                            } // Fallback to just using the name if we couldn't make it throw.

                            var name = fn ? fn.displayName || fn.name : '';
                            var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
                            {
                                if (typeof fn === 'function') {
                                    componentFrameCache.set(fn, syntheticFrame);
                                }
                            }
                            return syntheticFrame;
                        }

                        function describeFunctionComponentFrame(fn, source, ownerFn) {
                            {
                                return describeNativeComponentFrame(fn, false);
                            }
                        }

                        function shouldConstruct(Component) {
                            var prototype = Component.prototype;
                            return !!(prototype && prototype.isReactComponent);
                        }

                        function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
                            if (type == null) {
                                return '';
                            }
                            if (typeof type === 'function') {
                                {
                                    return describeNativeComponentFrame(type, shouldConstruct(type));
                                }
                            }
                            if (typeof type === 'string') {
                                return describeBuiltInComponentFrame(type);
                            }
                            switch (type) {
                                case REACT_SUSPENSE_TYPE:
                                    return describeBuiltInComponentFrame('Suspense');
                                case REACT_SUSPENSE_LIST_TYPE:
                                    return describeBuiltInComponentFrame('SuspenseList');
                            }
                            if (typeof type === 'object') {
                                switch (type.$$typeof) {
                                    case REACT_FORWARD_REF_TYPE:
                                        return describeFunctionComponentFrame(type.render);
                                    case REACT_MEMO_TYPE:
                                        // Memo may contain any component type so we recursively resolve it.
                                        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
                                    case REACT_LAZY_TYPE: {
                                        var lazyComponent = type;
                                        var payload = lazyComponent._payload;
                                        var init = lazyComponent._init;
                                        try {
                                            // Lazy may contain any component type so we recursively resolve it.
                                            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
                                        } catch (x) {}
                                    }
                                }
                            }
                            return '';
                        }
                        var hasOwnProperty = Object.prototype.hasOwnProperty;
                        var loggedTypeFailures = {};
                        var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;

                        function setCurrentlyValidatingElement(element) {
                            {
                                if (element) {
                                    var owner = element._owner;
                                    var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
                                    ReactDebugCurrentFrame.setExtraStackFrame(stack);
                                } else {
                                    ReactDebugCurrentFrame.setExtraStackFrame(null);
                                }
                            }
                        }

                        function checkPropTypes(typeSpecs, values, location, componentName, element) {
                            {
                                // $FlowFixMe This is okay but Flow doesn't know it.
                                var has = Function.call.bind(hasOwnProperty);
                                for (var typeSpecName in typeSpecs) {
                                    if (has(typeSpecs, typeSpecName)) {
                                        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
                                        // fail the render phase where it didn't fail before. So we log it.
                                        // After these have been cleaned up, we'll let them throw.

                                        try {
                                            // This is intentionally an invariant that gets caught. It's the same
                                            // behavior as without this statement except with a better message.
                                            if (typeof typeSpecs[typeSpecName] !== 'function') {
                                                // eslint-disable-next-line react-internal/prod-error-codes
                                                var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
                                                err.name = 'Invariant Violation';
                                                throw err;
                                            }
                                            error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
                                        } catch (ex) {
                                            error$1 = ex;
                                        }
                                        if (error$1 && !(error$1 instanceof Error)) {
                                            setCurrentlyValidatingElement(element);
                                            error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
                                            setCurrentlyValidatingElement(null);
                                        }
                                        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
                                            // Only monitor this failure once because there tends to be a lot of the
                                            // same error.
                                            loggedTypeFailures[error$1.message] = true;
                                            setCurrentlyValidatingElement(element);
                                            error('Failed %s type: %s', location, error$1.message);
                                            setCurrentlyValidatingElement(null);
                                        }
                                    }
                                }
                            }
                        }
                        var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare

                        function isArray(a) {
                            return isArrayImpl(a);
                        }

                        /*
                         * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
                         * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
                         *
                         * The functions in this module will throw an easier-to-understand,
                         * easier-to-debug exception with a clear errors message message explaining the
                         * problem. (Instead of a confusing exception thrown inside the implementation
                         * of the `value` object).
                         */
                        // $FlowFixMe only called in DEV, so void return is not possible.
                        function typeName(value) {
                            {
                                // toStringTag is needed for namespaced types like Temporal.Instant
                                var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
                                var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
                                return type;
                            }
                        } // $FlowFixMe only called in DEV, so void return is not possible.

                        function willCoercionThrow(value) {
                            {
                                try {
                                    testStringCoercion(value);
                                    return false;
                                } catch (e) {
                                    return true;
                                }
                            }
                        }

                        function testStringCoercion(value) {
                            // If you ended up here by following an exception call stack, here's what's
                            // happened: you supplied an object or symbol value to React (as a prop, key,
                            // DOM attribute, CSS property, string ref, etc.) and when React tried to
                            // coerce it to a string using `'' + value`, an exception was thrown.
                            //
                            // The most common types that will cause this exception are `Symbol` instances
                            // and Temporal objects like `Temporal.Instant`. But any object that has a
                            // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
                            // exception. (Library authors do this to prevent users from using built-in
                            // numeric operators like `+` or comparison operators like `>=` because custom
                            // methods are needed to perform accurate arithmetic or comparison.)
                            //
                            // To fix the problem, coerce this object or symbol value to a string before
                            // passing it to React. The most reliable way is usually `String(value)`.
                            //
                            // To find which value is throwing, check the browser or debugger console.
                            // Before this exception was thrown, there should be `console.error` output
                            // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
                            // problem and how that type was used: key, atrribute, input value prop, etc.
                            // In most cases, this console output also shows the component and its
                            // ancestor components where the exception happened.
                            //
                            // eslint-disable-next-line react-internal/safe-string-coercion
                            return '' + value;
                        }

                        function checkKeyStringCoercion(value) {
                            {
                                if (willCoercionThrow(value)) {
                                    error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
                                    return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
                                }
                            }
                        }
                        var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
                        var RESERVED_PROPS = {
                            key: true,
                            ref: true,
                            __self: true,
                            __source: true
                        };
                        var specialPropKeyWarningShown;
                        var specialPropRefWarningShown;
                        var didWarnAboutStringRefs;
                        {
                            didWarnAboutStringRefs = {};
                        }

                        function hasValidRef(config) {
                            {
                                if (hasOwnProperty.call(config, 'ref')) {
                                    var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
                                    if (getter && getter.isReactWarning) {
                                        return false;
                                    }
                                }
                            }
                            return config.ref !== undefined;
                        }

                        function hasValidKey(config) {
                            {
                                if (hasOwnProperty.call(config, 'key')) {
                                    var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
                                    if (getter && getter.isReactWarning) {
                                        return false;
                                    }
                                }
                            }
                            return config.key !== undefined;
                        }

                        function warnIfStringRefCannotBeAutoConverted(config, self) {
                            {
                                if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
                                    var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
                                    if (!didWarnAboutStringRefs[componentName]) {
                                        error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
                                        didWarnAboutStringRefs[componentName] = true;
                                    }
                                }
                            }
                        }

                        function defineKeyPropWarningGetter(props, displayName) {
                            {
                                var warnAboutAccessingKey = function() {
                                    if (!specialPropKeyWarningShown) {
                                        specialPropKeyWarningShown = true;
                                        error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
                                    }
                                };
                                warnAboutAccessingKey.isReactWarning = true;
                                Object.defineProperty(props, 'key', {
                                    get: warnAboutAccessingKey,
                                    configurable: true
                                });
                            }
                        }

                        function defineRefPropWarningGetter(props, displayName) {
                            {
                                var warnAboutAccessingRef = function() {
                                    if (!specialPropRefWarningShown) {
                                        specialPropRefWarningShown = true;
                                        error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
                                    }
                                };
                                warnAboutAccessingRef.isReactWarning = true;
                                Object.defineProperty(props, 'ref', {
                                    get: warnAboutAccessingRef,
                                    configurable: true
                                });
                            }
                        }
                        /**
                         * Factory method to create a new React element. This no longer adheres to
                         * the class pattern, so do not use new to call it. Also, instanceof check
                         * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
                         * if something is a React Element.
                         *
                         * @param {*} type
                         * @param {*} props
                         * @param {*} key
                         * @param {string|object} ref
                         * @param {*} owner
                         * @param {*} self A *temporary* helper to detect places where `this` is
                         * different from the `owner` when React.createElement is called, so that we
                         * can warn. We want to get rid of owner and replace string `ref`s with arrow
                         * functions, and as long as `this` and owner are the same, there will be no
                         * change in behavior.
                         * @param {*} source An annotation object (added by a transpiler or otherwise)
                         * indicating filename, line number, and/or other information.
                         * @internal
                         */

                        var ReactElement = function(type, key, ref, self, source, owner, props) {
                            var element = {
                                // This tag allows us to uniquely identify this as a React Element
                                $$typeof: REACT_ELEMENT_TYPE,
                                // Built-in properties that belong on the element
                                type: type,
                                key: key,
                                ref: ref,
                                props: props,
                                // Record the component responsible for creating this element.
                                _owner: owner
                            };
                            {
                                // The validation flag is currently mutative. We put it on
                                // an external backing store so that we can freeze the whole object.
                                // This can be replaced with a WeakMap once they are implemented in
                                // commonly used development environments.
                                element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
                                // the validation flag non-enumerable (where possible, which should
                                // include every environment we run tests in), so the test framework
                                // ignores it.

                                Object.defineProperty(element._store, 'validated', {
                                    configurable: false,
                                    enumerable: false,
                                    writable: true,
                                    value: false
                                }); // self and source are DEV only properties.

                                Object.defineProperty(element, '_self', {
                                    configurable: false,
                                    enumerable: false,
                                    writable: false,
                                    value: self
                                }); // Two elements created in two different places should be considered
                                // equal for testing purposes and therefore we hide it from enumeration.

                                Object.defineProperty(element, '_source', {
                                    configurable: false,
                                    enumerable: false,
                                    writable: false,
                                    value: source
                                });
                                if (Object.freeze) {
                                    Object.freeze(element.props);
                                    Object.freeze(element);
                                }
                            }
                            return element;
                        };
                        /**
                         * https://github.com/reactjs/rfcs/pull/107
                         * @param {*} type
                         * @param {object} props
                         * @param {string} key
                         */

                        function jsxDEV(type, config, maybeKey, source, self) {
                            {
                                var propName; // Reserved names are extracted

                                var props = {};
                                var key = null;
                                var ref = null; // Currently, key can be spread in as a prop. This causes a potential
                                // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
                                // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
                                // but as an intermediary step, we will use jsxDEV for everything except
                                // <div {...props} key="Hi" />, because we aren't currently able to tell if
                                // key is explicitly declared to be undefined or not.

                                if (maybeKey !== undefined) {
                                    {
                                        checkKeyStringCoercion(maybeKey);
                                    }
                                    key = '' + maybeKey;
                                }
                                if (hasValidKey(config)) {
                                    {
                                        checkKeyStringCoercion(config.key);
                                    }
                                    key = '' + config.key;
                                }
                                if (hasValidRef(config)) {
                                    ref = config.ref;
                                    warnIfStringRefCannotBeAutoConverted(config, self);
                                } // Remaining properties are added to a new props object

                                for (propName in config) {
                                    if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
                                        props[propName] = config[propName];
                                    }
                                } // Resolve default props

                                if (type && type.defaultProps) {
                                    var defaultProps = type.defaultProps;
                                    for (propName in defaultProps) {
                                        if (props[propName] === undefined) {
                                            props[propName] = defaultProps[propName];
                                        }
                                    }
                                }
                                if (key || ref) {
                                    var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
                                    if (key) {
                                        defineKeyPropWarningGetter(props, displayName);
                                    }
                                    if (ref) {
                                        defineRefPropWarningGetter(props, displayName);
                                    }
                                }
                                return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
                            }
                        }
                        var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
                        var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;

                        function setCurrentlyValidatingElement$1(element) {
                            {
                                if (element) {
                                    var owner = element._owner;
                                    var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
                                    ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
                                } else {
                                    ReactDebugCurrentFrame$1.setExtraStackFrame(null);
                                }
                            }
                        }
                        var propTypesMisspellWarningShown;
                        {
                            propTypesMisspellWarningShown = false;
                        }
                        /**
                         * Verifies the object is a ReactElement.
                         * See https://reactjs.org/docs/react-api.html#isvalidelement
                         * @param {?object} object
                         * @return {boolean} True if `object` is a ReactElement.
                         * @final
                         */

                        function isValidElement(object) {
                            {
                                return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
                            }
                        }

                        function getDeclarationErrorAddendum() {
                            {
                                if (ReactCurrentOwner$1.current) {
                                    var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
                                    if (name) {
                                        return '\n\nCheck the render method of `' + name + '`.';
                                    }
                                }
                                return '';
                            }
                        }

                        function getSourceInfoErrorAddendum(source) {
                            {
                                if (source !== undefined) {
                                    var fileName = source.fileName.replace(/^.*[\\\/]/, '');
                                    var lineNumber = source.lineNumber;
                                    return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
                                }
                                return '';
                            }
                        }
                        /**
                         * Warn if there's no key explicitly set on dynamic arrays of children or
                         * object keys are not valid. This allows us to keep track of children between
                         * updates.
                         */

                        var ownerHasKeyUseWarning = {};

                        function getCurrentComponentErrorInfo(parentType) {
                            {
                                var info = getDeclarationErrorAddendum();
                                if (!info) {
                                    var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
                                    if (parentName) {
                                        info = "\n\nCheck the top-level render call using <" + parentName + ">.";
                                    }
                                }
                                return info;
                            }
                        }
                        /**
                         * Warn if the element doesn't have an explicit key assigned to it.
                         * This element is in an array. The array could grow and shrink or be
                         * reordered. All children that haven't already been validated are required to
                         * have a "key" property assigned to it. Error statuses are cached so a warning
                         * will only be shown once.
                         *
                         * @internal
                         * @param {ReactElement} element Element that requires a key.
                         * @param {*} parentType element's parent's type.
                         */

                        function validateExplicitKey(element, parentType) {
                            {
                                if (!element._store || element._store.validated || element.key != null) {
                                    return;
                                }
                                element._store.validated = true;
                                var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
                                if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
                                    return;
                                }
                                ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
                                // property, it may be the creator of the child that's responsible for
                                // assigning it a key.

                                var childOwner = '';
                                if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
                                    // Give the component that originally created this child.
                                    childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
                                }
                                setCurrentlyValidatingElement$1(element);
                                error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
                                setCurrentlyValidatingElement$1(null);
                            }
                        }
                        /**
                         * Ensure that every element either is passed in a static location, in an
                         * array with an explicit keys property defined, or in an object literal
                         * with valid key property.
                         *
                         * @internal
                         * @param {ReactNode} node Statically passed child of any type.
                         * @param {*} parentType node's parent's type.
                         */

                        function validateChildKeys(node, parentType) {
                            {
                                if (typeof node !== 'object') {
                                    return;
                                }
                                if (isArray(node)) {
                                    for (var i = 0; i < node.length; i++) {
                                        var child = node[i];
                                        if (isValidElement(child)) {
                                            validateExplicitKey(child, parentType);
                                        }
                                    }
                                } else if (isValidElement(node)) {
                                    // This element was passed in a valid location.
                                    if (node._store) {
                                        node._store.validated = true;
                                    }
                                } else if (node) {
                                    var iteratorFn = getIteratorFn(node);
                                    if (typeof iteratorFn === 'function') {
                                        // Entry iterators used to provide implicit keys,
                                        // but now we print a separate warning for them later.
                                        if (iteratorFn !== node.entries) {
                                            var iterator = iteratorFn.call(node);
                                            var step;
                                            while (!(step = iterator.next()).done) {
                                                if (isValidElement(step.value)) {
                                                    validateExplicitKey(step.value, parentType);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        /**
                         * Given an element, validate that its props follow the propTypes definition,
                         * provided by the type.
                         *
                         * @param {ReactElement} element
                         */

                        function validatePropTypes(element) {
                            {
                                var type = element.type;
                                if (type === null || type === undefined || typeof type === 'string') {
                                    return;
                                }
                                var propTypes;
                                if (typeof type === 'function') {
                                    propTypes = type.propTypes;
                                } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
                                        // Note: Memo only checks outer props here.
                                        // Inner props are checked in the reconciler.
                                        type.$$typeof === REACT_MEMO_TYPE)) {
                                    propTypes = type.propTypes;
                                } else {
                                    return;
                                }
                                if (propTypes) {
                                    // Intentionally inside to avoid triggering lazy initializers:
                                    var name = getComponentNameFromType(type);
                                    checkPropTypes(propTypes, element.props, 'prop', name, element);
                                } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
                                    propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:

                                    var _name = getComponentNameFromType(type);
                                    error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
                                }
                                if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
                                    error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
                                }
                            }
                        }
                        /**
                         * Given a fragment, validate that it can only be provided with fragment props
                         * @param {ReactElement} fragment
                         */

                        function validateFragmentProps(fragment) {
                            {
                                var keys = Object.keys(fragment.props);
                                for (var i = 0; i < keys.length; i++) {
                                    var key = keys[i];
                                    if (key !== 'children' && key !== 'key') {
                                        setCurrentlyValidatingElement$1(fragment);
                                        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
                                        setCurrentlyValidatingElement$1(null);
                                        break;
                                    }
                                }
                                if (fragment.ref !== null) {
                                    setCurrentlyValidatingElement$1(fragment);
                                    error('Invalid attribute `ref` supplied to `React.Fragment`.');
                                    setCurrentlyValidatingElement$1(null);
                                }
                            }
                        }

                        function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
                            {
                                var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
                                // succeed and there will likely be errors in render.

                                if (!validType) {
                                    var info = '';
                                    if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
                                        info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
                                    }
                                    var sourceInfo = getSourceInfoErrorAddendum(source);
                                    if (sourceInfo) {
                                        info += sourceInfo;
                                    } else {
                                        info += getDeclarationErrorAddendum();
                                    }
                                    var typeString;
                                    if (type === null) {
                                        typeString = 'null';
                                    } else if (isArray(type)) {
                                        typeString = 'array';
                                    } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
                                        typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
                                        info = ' Did you accidentally export a JSX literal instead of a component?';
                                    } else {
                                        typeString = typeof type;
                                    }
                                    error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
                                }
                                var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
                                // TODO: Drop this when these are no longer allowed as the type argument.

                                if (element == null) {
                                    return element;
                                } // Skip key warning if the type isn't valid since our key validation logic
                                // doesn't expect a non-string/function type and can throw confusing errors.
                                // We don't want exception behavior to differ between dev and prod.
                                // (Rendering will throw with a helpful message and as soon as the type is
                                // fixed, the key warnings will appear.)

                                if (validType) {
                                    var children = props.children;
                                    if (children !== undefined) {
                                        if (isStaticChildren) {
                                            if (isArray(children)) {
                                                for (var i = 0; i < children.length; i++) {
                                                    validateChildKeys(children[i], type);
                                                }
                                                if (Object.freeze) {
                                                    Object.freeze(children);
                                                }
                                            } else {
                                                error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
                                            }
                                        } else {
                                            validateChildKeys(children, type);
                                        }
                                    }
                                }
                                if (type === REACT_FRAGMENT_TYPE) {
                                    validateFragmentProps(element);
                                } else {
                                    validatePropTypes(element);
                                }
                                return element;
                            }
                        } // These two functions exist to still get child warnings in dev
                        // even with the prod transform. This means that jsxDEV is purely
                        // opt-in behavior for better messages but that we won't stop
                        // giving you warnings if you use production apis.

                        function jsxWithValidationStatic(type, props, key) {
                            {
                                return jsxWithValidation(type, props, key, true);
                            }
                        }

                        function jsxWithValidationDynamic(type, props, key) {
                            {
                                return jsxWithValidation(type, props, key, false);
                            }
                        }
                        var jsx = jsxWithValidationDynamic; // we may want to special case jsxs internally to take advantage of static children.
                        // for now we can ship identical prod functions

                        var jsxs = jsxWithValidationStatic;
                        exports.Fragment = REACT_FRAGMENT_TYPE;
                        exports.jsx = jsx;
                        exports.jsxs = jsxs;
                    })();
                }

                /***/
            }),

        /***/
        "../../../node_modules/react/jsx-runtime.js":
            /*!**************************************************!*\
              !*** ../../../node_modules/react/jsx-runtime.js ***!
              \**************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                if (false) {} else {
                    module.exports = __webpack_require__( /*! ./cjs/react-jsx-runtime.development.js */ "../../../node_modules/react/cjs/react-jsx-runtime.development.js");
                }

                /***/
            }),

        /***/
        "../../../node_modules/set-value/index.js":
            /*!************************************************!*\
              !*** ../../../node_modules/set-value/index.js ***!
              \************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";
                /*!
                 * set-value <https://github.com/jonschlinkert/set-value>
                 *
                 * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
                 * Released under the MIT License.
                 */



                const {
                    deleteProperty
                } = Reflect;
                const isPrimitive = __webpack_require__( /*! is-primitive */ "../../../node_modules/is-primitive/index.js");
                const isPlainObject = __webpack_require__( /*! is-plain-object */ "../../../node_modules/is-plain-object/index.js");
                const isObject = value => {
                    return typeof value === 'object' && value !== null || typeof value === 'function';
                };
                const isUnsafeKey = key => {
                    return key === '__proto__' || key === 'constructor' || key === 'prototype';
                };
                const validateKey = key => {
                    if (!isPrimitive(key)) {
                        throw new TypeError('Object keys must be strings or symbols');
                    }
                    if (isUnsafeKey(key)) {
                        throw new Error(`Cannot set unsafe key: "${key}"`);
                    }
                };
                const toStringKey = input => {
                    return Array.isArray(input) ? input.flat().map(String).join(',') : input;
                };
                const createMemoKey = (input, options) => {
                    if (typeof input !== 'string' || !options) return input;
                    let key = input + ';';
                    if (options.arrays !== undefined) key += `arrays=${options.arrays};`;
                    if (options.separator !== undefined) key += `separator=${options.separator};`;
                    if (options.split !== undefined) key += `split=${options.split};`;
                    if (options.merge !== undefined) key += `merge=${options.merge};`;
                    if (options.preservePaths !== undefined) key += `preservePaths=${options.preservePaths};`;
                    return key;
                };
                const memoize = (input, options, fn) => {
                    const key = toStringKey(options ? createMemoKey(input, options) : input);
                    validateKey(key);
                    const value = setValue.cache.get(key) || fn();
                    setValue.cache.set(key, value);
                    return value;
                };
                const splitString = (input, options = {}) => {
                    const sep = options.separator || '.';
                    const preserve = sep === '/' ? false : options.preservePaths;
                    if (typeof input === 'string' && preserve !== false && /\//.test(input)) {
                        return [input];
                    }
                    const parts = [];
                    let part = '';
                    const push = part => {
                        let number;
                        if (part.trim() !== '' && Number.isInteger(number = Number(part))) {
                            parts.push(number);
                        } else {
                            parts.push(part);
                        }
                    };
                    for (let i = 0; i < input.length; i++) {
                        const value = input[i];
                        if (value === '\\') {
                            part += input[++i];
                            continue;
                        }
                        if (value === sep) {
                            push(part);
                            part = '';
                            continue;
                        }
                        part += value;
                    }
                    if (part) {
                        push(part);
                    }
                    return parts;
                };
                const split = (input, options) => {
                    if (options && typeof options.split === 'function') return options.split(input);
                    if (typeof input === 'symbol') return [input];
                    if (Array.isArray(input)) return input;
                    return memoize(input, options, () => splitString(input, options));
                };
                const assignProp = (obj, prop, value, options) => {
                    validateKey(prop);

                    // Delete property when "value" is undefined
                    if (value === undefined) {
                        deleteProperty(obj, prop);
                    } else if (options && options.merge) {
                        const merge = options.merge === 'function' ? options.merge : Object.assign;

                        // Only merge plain objects
                        if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) {
                            obj[prop] = merge(obj[prop], value);
                        } else {
                            obj[prop] = value;
                        }
                    } else {
                        obj[prop] = value;
                    }
                    return obj;
                };
                const setValue = (target, path, value, options) => {
                    if (!path || !isObject(target)) return target;
                    const keys = split(path, options);
                    let obj = target;
                    for (let i = 0; i < keys.length; i++) {
                        const key = keys[i];
                        const next = keys[i + 1];
                        validateKey(key);
                        if (next === undefined) {
                            assignProp(obj, key, value, options);
                            break;
                        }
                        if (typeof next === 'number' && !Array.isArray(obj[key])) {
                            obj = obj[key] = [];
                            continue;
                        }
                        if (!isObject(obj[key])) {
                            obj[key] = {};
                        }
                        obj = obj[key];
                    }
                    return target;
                };
                setValue.split = split;
                setValue.cache = new Map();
                setValue.clear = () => {
                    setValue.cache = new Map();
                };
                module.exports = setValue;

                /***/
            }),

        /***/
        "../../../node_modules/style-value-types/dist/valueTypes.cjs.js":
            /*!**********************************************************************!*\
              !*** ../../../node_modules/style-value-types/dist/valueTypes.cjs.js ***!
              \**********************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                const clamp = (min, max) => v => Math.max(Math.min(v, max), min);
                const sanitize = v => v % 1 ? Number(v.toFixed(5)) : v;
                const floatRegex = /(-)?([\d]*\.?[\d])+/g;
                const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi;
                const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;

                function isString(v) {
                    return typeof v === 'string';
                }
                const number = {
                    test: v => typeof v === 'number',
                    parse: parseFloat,
                    transform: v => v
                };
                const alpha = Object.assign(Object.assign({}, number), {
                    transform: clamp(0, 1)
                });
                const scale = Object.assign(Object.assign({}, number), {
                    default: 1
                });
                const createUnitType = unit => ({
                    test: v => isString(v) && v.endsWith(unit) && v.split(' ').length === 1,
                    parse: parseFloat,
                    transform: v => `${v}${unit}`
                });
                const degrees = createUnitType('deg');
                const percent = createUnitType('%');
                const px = createUnitType('px');
                const vh = createUnitType('vh');
                const vw = createUnitType('vw');
                const progressPercentage = Object.assign(Object.assign({}, percent), {
                    parse: v => percent.parse(v) / 100,
                    transform: v => percent.transform(v * 100)
                });
                const isColorString = (type, testProp) => v => {
                    return Boolean(isString(v) && singleColorRegex.test(v) && v.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v, testProp));
                };
                const splitColor = (aName, bName, cName) => v => {
                    if (!isString(v)) return v;
                    const [a, b, c, alpha] = v.match(floatRegex);
                    return {
                        [aName]: parseFloat(a),
                        [bName]: parseFloat(b),
                        [cName]: parseFloat(c),
                        alpha: alpha !== undefined ? parseFloat(alpha) : 1
                    };
                };
                const hsla = {
                    test: isColorString('hsl', 'hue'),
                    parse: splitColor('hue', 'saturation', 'lightness'),
                    transform: ({
                        hue,
                        saturation,
                        lightness,
                        alpha: alpha$1 = 1
                    }) => {
                        return 'hsla(' + Math.round(hue) + ', ' + percent.transform(sanitize(saturation)) + ', ' + percent.transform(sanitize(lightness)) + ', ' + sanitize(alpha.transform(alpha$1)) + ')';
                    }
                };
                const clampRgbUnit = clamp(0, 255);
                const rgbUnit = Object.assign(Object.assign({}, number), {
                    transform: v => Math.round(clampRgbUnit(v))
                });
                const rgba = {
                    test: isColorString('rgb', 'red'),
                    parse: splitColor('red', 'green', 'blue'),
                    transform: ({
                        red,
                        green,
                        blue,
                        alpha: alpha$1 = 1
                    }) => 'rgba(' + rgbUnit.transform(red) + ', ' + rgbUnit.transform(green) + ', ' + rgbUnit.transform(blue) + ', ' + sanitize(alpha.transform(alpha$1)) + ')'
                };

                function parseHex(v) {
                    let r = '';
                    let g = '';
                    let b = '';
                    let a = '';
                    if (v.length > 5) {
                        r = v.substr(1, 2);
                        g = v.substr(3, 2);
                        b = v.substr(5, 2);
                        a = v.substr(7, 2);
                    } else {
                        r = v.substr(1, 1);
                        g = v.substr(2, 1);
                        b = v.substr(3, 1);
                        a = v.substr(4, 1);
                        r += r;
                        g += g;
                        b += b;
                        a += a;
                    }
                    return {
                        red: parseInt(r, 16),
                        green: parseInt(g, 16),
                        blue: parseInt(b, 16),
                        alpha: a ? parseInt(a, 16) / 255 : 1
                    };
                }
                const hex = {
                    test: isColorString('#'),
                    parse: parseHex,
                    transform: rgba.transform
                };
                const color = {
                    test: v => rgba.test(v) || hex.test(v) || hsla.test(v),
                    parse: v => {
                        if (rgba.test(v)) {
                            return rgba.parse(v);
                        } else if (hsla.test(v)) {
                            return hsla.parse(v);
                        } else {
                            return hex.parse(v);
                        }
                    },
                    transform: v => {
                        return isString(v) ? v : v.hasOwnProperty('red') ? rgba.transform(v) : hsla.transform(v);
                    }
                };
                const colorToken = '${c}';
                const numberToken = '${n}';

                function test(v) {
                    var _a, _b, _c, _d;
                    return isNaN(v) && isString(v) && ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0;
                }

                function analyse(v) {
                    if (typeof v === 'number') v = `${v}`;
                    const values = [];
                    let numColors = 0;
                    const colors = v.match(colorRegex);
                    if (colors) {
                        numColors = colors.length;
                        v = v.replace(colorRegex, colorToken);
                        values.push(...colors.map(color.parse));
                    }
                    const numbers = v.match(floatRegex);
                    if (numbers) {
                        v = v.replace(floatRegex, numberToken);
                        values.push(...numbers.map(number.parse));
                    }
                    return {
                        values,
                        numColors,
                        tokenised: v
                    };
                }

                function parse(v) {
                    return analyse(v).values;
                }

                function createTransformer(v) {
                    const {
                        values,
                        numColors,
                        tokenised
                    } = analyse(v);
                    const numValues = values.length;
                    return v => {
                        let output = tokenised;
                        for (let i = 0; i < numValues; i++) {
                            output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i]));
                        }
                        return output;
                    };
                }
                const convertNumbersToZero = v => typeof v === 'number' ? 0 : v;

                function getAnimatableNone(v) {
                    const parsed = parse(v);
                    const transformer = createTransformer(v);
                    return transformer(parsed.map(convertNumbersToZero));
                }
                const complex = {
                    test,
                    parse,
                    createTransformer,
                    getAnimatableNone
                };
                const maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']);

                function applyDefaultFilter(v) {
                    let [name, value] = v.slice(0, -1).split('(');
                    if (name === 'drop-shadow') return v;
                    const [number] = value.match(floatRegex) || [];
                    if (!number) return v;
                    const unit = value.replace(number, '');
                    let defaultValue = maxDefaults.has(name) ? 1 : 0;
                    if (number !== value) defaultValue *= 100;
                    return name + '(' + defaultValue + unit + ')';
                }
                const functionRegex = /([a-z-]*)\(.*?\)/g;
                const filter = Object.assign(Object.assign({}, complex), {
                    getAnimatableNone: v => {
                        const functions = v.match(functionRegex);
                        return functions ? functions.map(applyDefaultFilter).join(' ') : v;
                    }
                });
                exports.alpha = alpha;
                exports.color = color;
                exports.complex = complex;
                exports.degrees = degrees;
                exports.filter = filter;
                exports.hex = hex;
                exports.hsla = hsla;
                exports.number = number;
                exports.percent = percent;
                exports.progressPercentage = progressPercentage;
                exports.px = px;
                exports.rgbUnit = rgbUnit;
                exports.rgba = rgba;
                exports.scale = scale;
                exports.vh = vh;
                exports.vw = vw;

                /***/
            }),

        /***/
        "../../../node_modules/toggle-selection/index.js":
            /*!*******************************************************!*\
              !*** ../../../node_modules/toggle-selection/index.js ***!
              \*******************************************************/
            /***/
            (function(module) {

                "use strict";


                module.exports = function() {
                    var selection = document.getSelection();
                    if (!selection.rangeCount) {
                        return function() {};
                    }
                    var active = document.activeElement;
                    var ranges = [];
                    for (var i = 0; i < selection.rangeCount; i++) {
                        ranges.push(selection.getRangeAt(i));
                    }
                    switch (active.tagName.toUpperCase()) {
                        // .toUpperCase handles XHTML
                        case 'INPUT':
                        case 'TEXTAREA':
                            active.blur();
                            break;
                        default:
                            active = null;
                            break;
                    }
                    selection.removeAllRanges();
                    return function() {
                        selection.type === 'Caret' && selection.removeAllRanges();
                        if (!selection.rangeCount) {
                            ranges.forEach(function(range) {
                                selection.addRange(range);
                            });
                        }
                        active && active.focus();
                    };
                };

                /***/
            }),

        /***/
        "../../../node_modules/tslib/tslib.es6.mjs":
            /*!*************************************************!*\
              !*** ../../../node_modules/tslib/tslib.es6.mjs ***!
              \*************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.__addDisposableResource = __addDisposableResource;
                exports.__assign = void 0;
                exports.__asyncDelegator = __asyncDelegator;
                exports.__asyncGenerator = __asyncGenerator;
                exports.__asyncValues = __asyncValues;
                exports.__await = __await;
                exports.__awaiter = __awaiter;
                exports.__classPrivateFieldGet = __classPrivateFieldGet;
                exports.__classPrivateFieldIn = __classPrivateFieldIn;
                exports.__classPrivateFieldSet = __classPrivateFieldSet;
                exports.__createBinding = void 0;
                exports.__decorate = __decorate;
                exports.__disposeResources = __disposeResources;
                exports.__esDecorate = __esDecorate;
                exports.__exportStar = __exportStar;
                exports.__extends = __extends;
                exports.__generator = __generator;
                exports.__importDefault = __importDefault;
                exports.__importStar = __importStar;
                exports.__makeTemplateObject = __makeTemplateObject;
                exports.__metadata = __metadata;
                exports.__param = __param;
                exports.__propKey = __propKey;
                exports.__read = __read;
                exports.__rest = __rest;
                exports.__runInitializers = __runInitializers;
                exports.__setFunctionName = __setFunctionName;
                exports.__spread = __spread;
                exports.__spreadArray = __spreadArray;
                exports.__spreadArrays = __spreadArrays;
                exports.__values = __values;
                exports["default"] = void 0;
                /******************************************************************************
                Copyright (c) Microsoft Corporation.

                Permission to use, copy, modify, and/or distribute this software for any
                purpose with or without fee is hereby granted.

                THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
                REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
                AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
                INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
                LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
                OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
                PERFORMANCE OF THIS SOFTWARE.
                ***************************************************************************** */
                /* global Reflect, Promise, SuppressedError, Symbol */

                var extendStatics = function(d, b) {
                    extendStatics = Object.setPrototypeOf || {
                        __proto__: []
                    }
                    instanceof Array && function(d, b) {
                        d.__proto__ = b;
                    } || function(d, b) {
                        for (var p in b)
                            if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
                    };
                    return extendStatics(d, b);
                };

                function __extends(d, b) {
                    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
                    extendStatics(d, b);

                    function __() {
                        this.constructor = d;
                    }
                    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
                }
                var __assign = function() {
                    exports.__assign = __assign = Object.assign || function __assign(t) {
                        for (var s, i = 1, n = arguments.length; i < n; i++) {
                            s = arguments[i];
                            for (var p in s)
                                if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
                        }
                        return t;
                    };
                    return __assign.apply(this, arguments);
                };
                exports.__assign = __assign;

                function __rest(s, e) {
                    var t = {};
                    for (var p in s)
                        if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
                    if (s != null && typeof Object.getOwnPropertySymbols === "function")
                        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
                            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
                        }
                    return t;
                }

                function __decorate(decorators, target, key, desc) {
                    var c = arguments.length,
                        r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
                        d;
                    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
                    else
                        for (var i = decorators.length - 1; i >= 0; i--)
                            if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
                    return c > 3 && r && Object.defineProperty(target, key, r), r;
                }

                function __param(paramIndex, decorator) {
                    return function(target, key) {
                        decorator(target, key, paramIndex);
                    };
                }

                function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
                    function accept(f) {
                        if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
                        return f;
                    }
                    var kind = contextIn.kind,
                        key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
                    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
                    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
                    var _,
                        done = false;
                    for (var i = decorators.length - 1; i >= 0; i--) {
                        var context = {};
                        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
                        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
                        context.addInitializer = function(f) {
                            if (done) throw new TypeError("Cannot add initializers after decoration has completed");
                            extraInitializers.push(accept(f || null));
                        };
                        var result = (0, decorators[i])(kind === "accessor" ? {
                            get: descriptor.get,
                            set: descriptor.set
                        } : descriptor[key], context);
                        if (kind === "accessor") {
                            if (result === void 0) continue;
                            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
                            if (_ = accept(result.get)) descriptor.get = _;
                            if (_ = accept(result.set)) descriptor.set = _;
                            if (_ = accept(result.init)) initializers.unshift(_);
                        } else if (_ = accept(result)) {
                            if (kind === "field") initializers.unshift(_);
                            else descriptor[key] = _;
                        }
                    }
                    if (target) Object.defineProperty(target, contextIn.name, descriptor);
                    done = true;
                };

                function __runInitializers(thisArg, initializers, value) {
                    var useValue = arguments.length > 2;
                    for (var i = 0; i < initializers.length; i++) {
                        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
                    }
                    return useValue ? value : void 0;
                };

                function __propKey(x) {
                    return typeof x === "symbol" ? x : "".concat(x);
                };

                function __setFunctionName(f, name, prefix) {
                    if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
                    return Object.defineProperty(f, "name", {
                        configurable: true,
                        value: prefix ? "".concat(prefix, " ", name) : name
                    });
                };

                function __metadata(metadataKey, metadataValue) {
                    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
                }

                function __awaiter(thisArg, _arguments, P, generator) {
                    function adopt(value) {
                        return value instanceof P ? value : new P(function(resolve) {
                            resolve(value);
                        });
                    }
                    return new(P || (P = Promise))(function(resolve, reject) {
                        function fulfilled(value) {
                            try {
                                step(generator.next(value));
                            } catch (e) {
                                reject(e);
                            }
                        }

                        function rejected(value) {
                            try {
                                step(generator["throw"](value));
                            } catch (e) {
                                reject(e);
                            }
                        }

                        function step(result) {
                            result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
                        }
                        step((generator = generator.apply(thisArg, _arguments || [])).next());
                    });
                }

                function __generator(thisArg, body) {
                    var _ = {
                            label: 0,
                            sent: function() {
                                if (t[0] & 1) throw t[1];
                                return t[1];
                            },
                            trys: [],
                            ops: []
                        },
                        f,
                        y,
                        t,
                        g;
                    return g = {
                        next: verb(0),
                        "throw": verb(1),
                        "return": verb(2)
                    }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
                        return this;
                    }), g;

                    function verb(n) {
                        return function(v) {
                            return step([n, v]);
                        };
                    }

                    function step(op) {
                        if (f) throw new TypeError("Generator is already executing.");
                        while (g && (g = 0, op[0] && (_ = 0)), _) try {
                            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
                            if (y = 0, t) op = [op[0] & 2, t.value];
                            switch (op[0]) {
                                case 0:
                                case 1:
                                    t = op;
                                    break;
                                case 4:
                                    _.label++;
                                    return {
                                        value: op[1],
                                            done: false
                                    };
                                case 5:
                                    _.label++;
                                    y = op[1];
                                    op = [0];
                                    continue;
                                case 7:
                                    op = _.ops.pop();
                                    _.trys.pop();
                                    continue;
                                default:
                                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                                        _ = 0;
                                        continue;
                                    }
                                    if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                                        _.label = op[1];
                                        break;
                                    }
                                    if (op[0] === 6 && _.label < t[1]) {
                                        _.label = t[1];
                                        t = op;
                                        break;
                                    }
                                    if (t && _.label < t[2]) {
                                        _.label = t[2];
                                        _.ops.push(op);
                                        break;
                                    }
                                    if (t[2]) _.ops.pop();
                                    _.trys.pop();
                                    continue;
                            }
                            op = body.call(thisArg, _);
                        } catch (e) {
                            op = [6, e];
                            y = 0;
                        } finally {
                            f = t = 0;
                        }
                        if (op[0] & 5) throw op[1];
                        return {
                            value: op[0] ? op[1] : void 0,
                            done: true
                        };
                    }
                }
                var __createBinding = exports.__createBinding = Object.create ? function(o, m, k, k2) {
                    if (k2 === undefined) k2 = k;
                    var desc = Object.getOwnPropertyDescriptor(m, k);
                    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                        desc = {
                            enumerable: true,
                            get: function() {
                                return m[k];
                            }
                        };
                    }
                    Object.defineProperty(o, k2, desc);
                } : function(o, m, k, k2) {
                    if (k2 === undefined) k2 = k;
                    o[k2] = m[k];
                };

                function __exportStar(m, o) {
                    for (var p in m)
                        if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
                }

                function __values(o) {
                    var s = typeof Symbol === "function" && Symbol.iterator,
                        m = s && o[s],
                        i = 0;
                    if (m) return m.call(o);
                    if (o && typeof o.length === "number") return {
                        next: function() {
                            if (o && i >= o.length) o = void 0;
                            return {
                                value: o && o[i++],
                                done: !o
                            };
                        }
                    };
                    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
                }

                function __read(o, n) {
                    var m = typeof Symbol === "function" && o[Symbol.iterator];
                    if (!m) return o;
                    var i = m.call(o),
                        r,
                        ar = [],
                        e;
                    try {
                        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
                    } catch (error) {
                        e = {
                            error: error
                        };
                    } finally {
                        try {
                            if (r && !r.done && (m = i["return"])) m.call(i);
                        } finally {
                            if (e) throw e.error;
                        }
                    }
                    return ar;
                }

                /** @deprecated */
                function __spread() {
                    for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
                    return ar;
                }

                /** @deprecated */
                function __spreadArrays() {
                    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
                    for (var r = Array(s), k = 0, i = 0; i < il; i++)
                        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
                    return r;
                }

                function __spreadArray(to, from, pack) {
                    if (pack || arguments.length === 2)
                        for (var i = 0, l = from.length, ar; i < l; i++) {
                            if (ar || !(i in from)) {
                                if (!ar) ar = Array.prototype.slice.call(from, 0, i);
                                ar[i] = from[i];
                            }
                        }
                    return to.concat(ar || Array.prototype.slice.call(from));
                }

                function __await(v) {
                    return this instanceof __await ? (this.v = v, this) : new __await(v);
                }

                function __asyncGenerator(thisArg, _arguments, generator) {
                    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
                    var g = generator.apply(thisArg, _arguments || []),
                        i,
                        q = [];
                    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
                        return this;
                    }, i;

                    function verb(n) {
                        if (g[n]) i[n] = function(v) {
                            return new Promise(function(a, b) {
                                q.push([n, v, a, b]) > 1 || resume(n, v);
                            });
                        };
                    }

                    function resume(n, v) {
                        try {
                            step(g[n](v));
                        } catch (e) {
                            settle(q[0][3], e);
                        }
                    }

                    function step(r) {
                        r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
                    }

                    function fulfill(value) {
                        resume("next", value);
                    }

                    function reject(value) {
                        resume("throw", value);
                    }

                    function settle(f, v) {
                        if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
                    }
                }

                function __asyncDelegator(o) {
                    var i, p;
                    return i = {}, verb("next"), verb("throw", function(e) {
                        throw e;
                    }), verb("return"), i[Symbol.iterator] = function() {
                        return this;
                    }, i;

                    function verb(n, f) {
                        i[n] = o[n] ? function(v) {
                            return (p = !p) ? {
                                value: __await(o[n](v)),
                                done: false
                            } : f ? f(v) : v;
                        } : f;
                    }
                }

                function __asyncValues(o) {
                    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
                    var m = o[Symbol.asyncIterator],
                        i;
                    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
                        return this;
                    }, i);

                    function verb(n) {
                        i[n] = o[n] && function(v) {
                            return new Promise(function(resolve, reject) {
                                v = o[n](v), settle(resolve, reject, v.done, v.value);
                            });
                        };
                    }

                    function settle(resolve, reject, d, v) {
                        Promise.resolve(v).then(function(v) {
                            resolve({
                                value: v,
                                done: d
                            });
                        }, reject);
                    }
                }

                function __makeTemplateObject(cooked, raw) {
                    if (Object.defineProperty) {
                        Object.defineProperty(cooked, "raw", {
                            value: raw
                        });
                    } else {
                        cooked.raw = raw;
                    }
                    return cooked;
                };
                var __setModuleDefault = Object.create ? function(o, v) {
                    Object.defineProperty(o, "default", {
                        enumerable: true,
                        value: v
                    });
                } : function(o, v) {
                    o["default"] = v;
                };

                function __importStar(mod) {
                    if (mod && mod.__esModule) return mod;
                    var result = {};
                    if (mod != null)
                        for (var k in mod)
                            if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
                    __setModuleDefault(result, mod);
                    return result;
                }

                function __importDefault(mod) {
                    return mod && mod.__esModule ? mod : {
                        default: mod
                    };
                }

                function __classPrivateFieldGet(receiver, state, kind, f) {
                    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
                    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
                    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
                }

                function __classPrivateFieldSet(receiver, state, value, kind, f) {
                    if (kind === "m") throw new TypeError("Private method is not writable");
                    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
                    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
                    return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
                }

                function __classPrivateFieldIn(state, receiver) {
                    if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
                    return typeof state === "function" ? receiver === state : state.has(receiver);
                }

                function __addDisposableResource(env, value, async) {
                    if (value !== null && value !== void 0) {
                        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
                        var dispose;
                        if (async) {
                            if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
                            dispose = value[Symbol.asyncDispose];
                        }
                        if (dispose === void 0) {
                            if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
                            dispose = value[Symbol.dispose];
                        }
                        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
                        env.stack.push({
                            value: value,
                            dispose: dispose,
                            async: async
                        });
                    } else if (async) {
                        env.stack.push({
                            async: true
                        });
                    }
                    return value;
                }
                var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
                    var e = new Error(message);
                    return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
                };

                function __disposeResources(env) {
                    function fail(e) {
                        env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
                        env.hasError = true;
                    }

                    function next() {
                        while (env.stack.length) {
                            var rec = env.stack.pop();
                            try {
                                var result = rec.dispose && rec.dispose.call(rec.value);
                                if (rec.async) return Promise.resolve(result).then(next, function(e) {
                                    fail(e);
                                    return next();
                                });
                            } catch (e) {
                                fail(e);
                            }
                        }
                        if (env.hasError) throw env.error;
                    }
                    return next();
                }
                var _default = exports["default"] = {
                    __extends,
                    __assign,
                    __rest,
                    __decorate,
                    __param,
                    __metadata,
                    __awaiter,
                    __generator,
                    __createBinding,
                    __exportStar,
                    __values,
                    __read,
                    __spread,
                    __spreadArrays,
                    __spreadArray,
                    __await,
                    __asyncGenerator,
                    __asyncDelegator,
                    __asyncValues,
                    __makeTemplateObject,
                    __importStar,
                    __importDefault,
                    __classPrivateFieldGet,
                    __classPrivateFieldSet,
                    __classPrivateFieldIn,
                    __addDisposableResource,
                    __disposeResources
                };

                /***/
            }),

        /***/
        "../../../node_modules/uc.micro/build/index.cjs.js":
            /*!*********************************************************!*\
              !*** ../../../node_modules/uc.micro/build/index.cjs.js ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                var regex$5 = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
                var regex$4 = /[\0-\x1F\x7F-\x9F]/;
                var regex$3 = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;
                var regex$2 = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;
                var regex$1 = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;
                var regex = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
                exports.Any = regex$5;
                exports.Cc = regex$4;
                exports.Cf = regex$3;
                exports.P = regex$2;
                exports.S = regex$1;
                exports.Z = regex;

                /***/
            }),

        /***/
        "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/use-callback-ref/dist/es2015/assignRef.js ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.assignRef = assignRef;
                /**
                 * Assigns a value for a given ref, no matter of the ref format
                 * @param {RefObject} ref - a callback function or ref object
                 * @param value - a new value
                 *
                 * @see https://github.com/theKashey/use-callback-ref#assignref
                 * @example
                 * const refObject = useRef();
                 * const refFn = (ref) => {....}
                 *
                 * assignRef(refObject, "refValue");
                 * assignRef(refFn, "refValue");
                 */
                function assignRef(ref, value) {
                    if (typeof ref === 'function') {
                        ref(value);
                    } else if (ref) {
                        ref.current = value;
                    }
                    return ref;
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-callback-ref/dist/es2015/createRef.js":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/use-callback-ref/dist/es2015/createRef.js ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createCallbackRef = createCallbackRef;
                /**
                 * creates a Ref object with on change callback
                 * @param callback
                 * @returns {RefObject}
                 *
                 * @see {@link useCallbackRef}
                 * @see https://reactjs.org/docs/refs-and-the-dom.html#creating-refs
                 */
                function createCallbackRef(callback) {
                    var current = null;
                    return {
                        get current() {
                            return current;
                        },
                        set current(value) {
                            var last = current;
                            if (last !== value) {
                                current = value;
                                callback(value, last);
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-callback-ref/dist/es2015/index.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/use-callback-ref/dist/es2015/index.js ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "assignRef", ({
                    enumerable: true,
                    get: function() {
                        return _assignRef.assignRef;
                    }
                }));
                Object.defineProperty(exports, "createCallbackRef", ({
                    enumerable: true,
                    get: function() {
                        return _createRef.createCallbackRef;
                    }
                }));
                Object.defineProperty(exports, "mergeRefs", ({
                    enumerable: true,
                    get: function() {
                        return _mergeRef.mergeRefs;
                    }
                }));
                Object.defineProperty(exports, "refToCallback", ({
                    enumerable: true,
                    get: function() {
                        return _refToCallback.refToCallback;
                    }
                }));
                Object.defineProperty(exports, "transformRef", ({
                    enumerable: true,
                    get: function() {
                        return _transformRef.transformRef;
                    }
                }));
                Object.defineProperty(exports, "useCallbackRef", ({
                    enumerable: true,
                    get: function() {
                        return _useRef.useCallbackRef;
                    }
                }));
                Object.defineProperty(exports, "useMergeRefs", ({
                    enumerable: true,
                    get: function() {
                        return _useMergeRef.useMergeRefs;
                    }
                }));
                Object.defineProperty(exports, "useRefToCallback", ({
                    enumerable: true,
                    get: function() {
                        return _refToCallback.useRefToCallback;
                    }
                }));
                Object.defineProperty(exports, "useTransformRef", ({
                    enumerable: true,
                    get: function() {
                        return _useTransformRef.useTransformRef;
                    }
                }));
                var _assignRef = __webpack_require__( /*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
                var _useRef = __webpack_require__( /*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js");
                var _createRef = __webpack_require__( /*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js");
                var _mergeRef = __webpack_require__( /*! ./mergeRef */ "../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js");
                var _useMergeRef = __webpack_require__( /*! ./useMergeRef */ "../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js");
                var _useTransformRef = __webpack_require__( /*! ./useTransformRef */ "../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js");
                var _transformRef = __webpack_require__( /*! ./transformRef */ "../../../node_modules/use-callback-ref/dist/es2015/transformRef.js");
                var _refToCallback = __webpack_require__( /*! ./refToCallback */ "../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js");

                /***/
            }),

        /***/
        "../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js":
            /*!**********************************************************************!*\
              !*** ../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js ***!
              \**********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.mergeRefs = mergeRefs;
                var _assignRef = __webpack_require__( /*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
                var _createRef = __webpack_require__( /*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js");
                /**
                 * Merges two or more refs together providing a single interface to set their value
                 * @param {RefObject|Ref} refs
                 * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
                 *
                 * @see {@link useMergeRefs} to be used in ReactComponents
                 * @example
                 * const Component = React.forwardRef((props, ref) => {
                 *   const ownRef = useRef();
                 *   const domRef = mergeRefs([ref, ownRef]); // 👈 merge together
                 *   return <div ref={domRef}>...</div>
                 * }
                 */
                function mergeRefs(refs) {
                    return (0, _createRef.createCallbackRef)(function(newValue) {
                        return refs.forEach(function(ref) {
                            return (0, _assignRef.assignRef)(ref, newValue);
                        });
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js":
            /*!***************************************************************************!*\
              !*** ../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.refToCallback = refToCallback;
                exports.useRefToCallback = useRefToCallback;
                /**
                 * Unmemoized version of {@link useRefToCallback}
                 * @see {@link useRefToCallback}
                 * @param ref
                 */
                function refToCallback(ref) {
                    return function(newValue) {
                        if (typeof ref === 'function') {
                            ref(newValue);
                        } else if (ref) {
                            ref.current = newValue;
                        }
                    };
                }
                var nullCallback = function() {
                    return null;
                };
                // lets maintain a weak ref to, well, ref :)
                // not using `kashe` to keep this package small
                var weakMem = new WeakMap();
                var weakMemoize = function(ref) {
                    var usedRef = ref || nullCallback;
                    var storedRef = weakMem.get(usedRef);
                    if (storedRef) {
                        return storedRef;
                    }
                    var cb = refToCallback(usedRef);
                    weakMem.set(usedRef, cb);
                    return cb;
                };
                /**
                 * Transforms a given `ref` into `callback`.
                 *
                 * To transform `callback` into ref use {@link useCallbackRef|useCallbackRef(undefined, callback)}
                 *
                 * @param {ReactRef} ref
                 * @returns {Function}
                 *
                 * @see https://github.com/theKashey/use-callback-ref#reftocallback
                 *
                 * @example
                 * const ref = useRef(0);
                 * const setRef = useRefToCallback(ref);
                 * 👉 setRef(10);
                 * ✅ ref.current === 10
                 */
                function useRefToCallback(ref) {
                    return weakMemoize(ref);
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-callback-ref/dist/es2015/transformRef.js":
            /*!**************************************************************************!*\
              !*** ../../../node_modules/use-callback-ref/dist/es2015/transformRef.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.transformRef = transformRef;
                var _assignRef = __webpack_require__( /*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
                var _createRef = __webpack_require__( /*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js");
                /**
                 * Transforms one ref to another
                 * @example
                 * ```tsx
                 * const ResizableWithRef = forwardRef((props, ref) =>
                 *   <Resizable {...props} ref={transformRef(ref, i => i ? i.resizable : null)}/>
                 * );
                 * ```
                 */
                function transformRef(ref, transformer) {
                    return (0, _createRef.createCallbackRef)(function(value) {
                        return (0, _assignRef.assignRef)(ref, transformer(value));
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js":
            /*!*************************************************************************!*\
              !*** ../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js ***!
              \*************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.useMergeRefs = useMergeRefs;
                var _assignRef = __webpack_require__( /*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
                var _useRef = __webpack_require__( /*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js");
                /**
                 * Merges two or more refs together providing a single interface to set their value
                 * @param {RefObject|Ref} refs
                 * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
                 *
                 * @see {@link mergeRefs} a version without buit-in memoization
                 * @see https://github.com/theKashey/use-callback-ref#usemergerefs
                 * @example
                 * const Component = React.forwardRef((props, ref) => {
                 *   const ownRef = useRef();
                 *   const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
                 *   return <div ref={domRef}>...</div>
                 * }
                 */
                function useMergeRefs(refs, defaultValue) {
                    return (0, _useRef.useCallbackRef)(defaultValue || null, function(newValue) {
                        return refs.forEach(function(ref) {
                            return (0, _assignRef.assignRef)(ref, newValue);
                        });
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-callback-ref/dist/es2015/useRef.js":
            /*!********************************************************************!*\
              !*** ../../../node_modules/use-callback-ref/dist/es2015/useRef.js ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.useCallbackRef = useCallbackRef;
                var _react = __webpack_require__( /*! react */ "react");
                /**
                 * creates a MutableRef with ref change callback
                 * @param initialValue - initial ref value
                 * @param {Function} callback - a callback to run when value changes
                 *
                 * @example
                 * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
                 * ref.current = 1;
                 * // prints 0 -> 1
                 *
                 * @see https://reactjs.org/docs/hooks-reference.html#useref
                 * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
                 * @returns {MutableRefObject}
                 */
                function useCallbackRef(initialValue, callback) {
                    var ref = (0, _react.useState)(function() {
                        return {
                            // value
                            value: initialValue,
                            // last callback
                            callback: callback,
                            // "memoized" public interface
                            facade: {
                                get current() {
                                    return ref.value;
                                },
                                set current(value) {
                                    var last = ref.value;
                                    if (last !== value) {
                                        ref.value = value;
                                        ref.callback(value, last);
                                    }
                                }
                            }
                        };
                    })[0];
                    // update callback
                    ref.callback = callback;
                    return ref.facade;
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js":
            /*!*****************************************************************************!*\
              !*** ../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js ***!
              \*****************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.useTransformRef = useTransformRef;
                var _assignRef = __webpack_require__( /*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
                var _useRef = __webpack_require__( /*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js");
                /**
                 * Create a _lense_ on Ref, making it possible to transform ref value
                 * @param {ReactRef} ref
                 * @param {Function} transformer. 👉 Ref would be __NOT updated__ on `transformer` update.
                 * @returns {RefObject}
                 *
                 * @see https://github.com/theKashey/use-callback-ref#usetransformref-to-replace-reactuseimperativehandle
                 * @example
                 *
                 * const ResizableWithRef = forwardRef((props, ref) =>
                 *  <Resizable {...props} ref={useTransformRef(ref, i => i ? i.resizable : null)}/>
                 * );
                 */
                function useTransformRef(ref, transformer) {
                    return (0, _useRef.useCallbackRef)(null, function(value) {
                        return (0, _assignRef.assignRef)(ref, transformer(value));
                    });
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-sidecar/dist/es2015/config.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/use-sidecar/dist/es2015/config.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.setConfig = exports.config = void 0;
                var config = exports.config = {
                    onError: function(e) {
                        return console.error(e);
                    }
                };
                var setConfig = function(conf) {
                    Object.assign(config, conf);
                };
                exports.setConfig = setConfig;

                /***/
            }),

        /***/
        "../../../node_modules/use-sidecar/dist/es2015/env.js":
            /*!************************************************************!*\
              !*** ../../../node_modules/use-sidecar/dist/es2015/env.js ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.env = void 0;
                var _detectNodeEs = __webpack_require__( /*! detect-node-es */ "../../../node_modules/detect-node-es/esm/browser.js");
                var env = exports.env = {
                    isNode: _detectNodeEs.isNode,
                    forceCache: false
                };

                /***/
            }),

        /***/
        "../../../node_modules/use-sidecar/dist/es2015/exports.js":
            /*!****************************************************************!*\
              !*** ../../../node_modules/use-sidecar/dist/es2015/exports.js ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.exportSidecar = exportSidecar;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var React = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                var SideCar = function(_a) {
                    var sideCar = _a.sideCar,
                        rest = (0, _tslib.__rest)(_a, ["sideCar"]);
                    if (!sideCar) {
                        throw new Error('Sidecar: please provide `sideCar` property to import the right car');
                    }
                    var Target = sideCar.read();
                    if (!Target) {
                        throw new Error('Sidecar medium not found');
                    }
                    return /*#__PURE__*/ React.createElement(Target, (0, _tslib.__assign)({}, rest));
                };
                SideCar.isSideCarExport = true;

                function exportSidecar(medium, exported) {
                    medium.useMedium(exported);
                    return SideCar;
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-sidecar/dist/es2015/hoc.js":
            /*!************************************************************!*\
              !*** ../../../node_modules/use-sidecar/dist/es2015/hoc.js ***!
              \************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.sidecar = sidecar;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var React = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));
                var _hook = __webpack_require__( /*! ./hook */ "../../../node_modules/use-sidecar/dist/es2015/hook.js");

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                // eslint-disable-next-line @typescript-eslint/ban-types
                function sidecar(importer, errorComponent) {
                    var ErrorCase = function() {
                        return errorComponent;
                    };
                    return function Sidecar(props) {
                        var _a = (0, _hook.useSidecar)(importer, props.sideCar),
                            Car = _a[0],
                            error = _a[1];
                        if (error && errorComponent) {
                            return ErrorCase;
                        }
                        // @ts-expect-error type shenanigans
                        return Car ? /*#__PURE__*/ React.createElement(Car, (0, _tslib.__assign)({}, props)) : null;
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-sidecar/dist/es2015/hook.js":
            /*!*************************************************************!*\
              !*** ../../../node_modules/use-sidecar/dist/es2015/hook.js ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.useSidecar = useSidecar;
                var _react = __webpack_require__( /*! react */ "react");
                var _env = __webpack_require__( /*! ./env */ "../../../node_modules/use-sidecar/dist/es2015/env.js");
                var cache = new WeakMap();
                var NO_OPTIONS = {};

                function useSidecar(importer, effect) {
                    var options = effect && effect.options || NO_OPTIONS;
                    if (_env.env.isNode && !options.ssr) {
                        return [null, null];
                    }
                    // eslint-disable-next-line react-hooks/rules-of-hooks
                    return useRealSidecar(importer, effect);
                }

                function useRealSidecar(importer, effect) {
                    var options = effect && effect.options || NO_OPTIONS;
                    var couldUseCache = _env.env.forceCache || _env.env.isNode && !!options.ssr || !options.async;
                    var _a = (0, _react.useState)(couldUseCache ? function() {
                            return cache.get(importer);
                        } : undefined),
                        Car = _a[0],
                        setCar = _a[1];
                    var _b = (0, _react.useState)(null),
                        error = _b[0],
                        setError = _b[1];
                    (0, _react.useEffect)(function() {
                        if (!Car) {
                            importer().then(function(car) {
                                var resolved = effect ? effect.read() : car.default || car;
                                if (!resolved) {
                                    console.error('Sidecar error: with importer', importer);
                                    var error_1;
                                    if (effect) {
                                        console.error('Sidecar error: with medium', effect);
                                        error_1 = new Error('Sidecar medium was not found');
                                    } else {
                                        error_1 = new Error('Sidecar was not found in exports');
                                    }
                                    setError(function() {
                                        return error_1;
                                    });
                                    throw error_1;
                                }
                                cache.set(importer, resolved);
                                setCar(function() {
                                    return resolved;
                                });
                            }, function(e) {
                                return setError(function() {
                                    return e;
                                });
                            });
                        }
                    }, []);
                    return [Car, error];
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-sidecar/dist/es2015/index.js":
            /*!**************************************************************!*\
              !*** ../../../node_modules/use-sidecar/dist/es2015/index.js ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "createMedium", ({
                    enumerable: true,
                    get: function() {
                        return _medium.createMedium;
                    }
                }));
                Object.defineProperty(exports, "createSidecarMedium", ({
                    enumerable: true,
                    get: function() {
                        return _medium.createSidecarMedium;
                    }
                }));
                Object.defineProperty(exports, "exportSidecar", ({
                    enumerable: true,
                    get: function() {
                        return _exports.exportSidecar;
                    }
                }));
                Object.defineProperty(exports, "renderCar", ({
                    enumerable: true,
                    get: function() {
                        return _renderProp.renderCar;
                    }
                }));
                Object.defineProperty(exports, "setConfig", ({
                    enumerable: true,
                    get: function() {
                        return _config.setConfig;
                    }
                }));
                Object.defineProperty(exports, "sidecar", ({
                    enumerable: true,
                    get: function() {
                        return _hoc.sidecar;
                    }
                }));
                Object.defineProperty(exports, "useSidecar", ({
                    enumerable: true,
                    get: function() {
                        return _hook.useSidecar;
                    }
                }));
                var _hoc = __webpack_require__( /*! ./hoc */ "../../../node_modules/use-sidecar/dist/es2015/hoc.js");
                var _hook = __webpack_require__( /*! ./hook */ "../../../node_modules/use-sidecar/dist/es2015/hook.js");
                var _config = __webpack_require__( /*! ./config */ "../../../node_modules/use-sidecar/dist/es2015/config.js");
                var _medium = __webpack_require__( /*! ./medium */ "../../../node_modules/use-sidecar/dist/es2015/medium.js");
                var _renderProp = __webpack_require__( /*! ./renderProp */ "../../../node_modules/use-sidecar/dist/es2015/renderProp.js");
                var _exports = __webpack_require__( /*! ./exports */ "../../../node_modules/use-sidecar/dist/es2015/exports.js");

                /***/
            }),

        /***/
        "../../../node_modules/use-sidecar/dist/es2015/medium.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/use-sidecar/dist/es2015/medium.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createMedium = createMedium;
                exports.createSidecarMedium = createSidecarMedium;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");

                function ItoI(a) {
                    return a;
                }

                function innerCreateMedium(defaults, middleware) {
                    if (middleware === void 0) {
                        middleware = ItoI;
                    }
                    var buffer = [];
                    var assigned = false;
                    var medium = {
                        read: function() {
                            if (assigned) {
                                throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
                            }
                            if (buffer.length) {
                                return buffer[buffer.length - 1];
                            }
                            return defaults;
                        },
                        useMedium: function(data) {
                            var item = middleware(data, assigned);
                            buffer.push(item);
                            return function() {
                                buffer = buffer.filter(function(x) {
                                    return x !== item;
                                });
                            };
                        },
                        assignSyncMedium: function(cb) {
                            assigned = true;
                            while (buffer.length) {
                                var cbs = buffer;
                                buffer = [];
                                cbs.forEach(cb);
                            }
                            buffer = {
                                push: function(x) {
                                    return cb(x);
                                },
                                filter: function() {
                                    return buffer;
                                }
                            };
                        },
                        assignMedium: function(cb) {
                            assigned = true;
                            var pendingQueue = [];
                            if (buffer.length) {
                                var cbs = buffer;
                                buffer = [];
                                cbs.forEach(cb);
                                pendingQueue = buffer;
                            }
                            var executeQueue = function() {
                                var cbs = pendingQueue;
                                pendingQueue = [];
                                cbs.forEach(cb);
                            };
                            var cycle = function() {
                                return Promise.resolve().then(executeQueue);
                            };
                            cycle();
                            buffer = {
                                push: function(x) {
                                    pendingQueue.push(x);
                                    cycle();
                                },
                                filter: function(filter) {
                                    pendingQueue = pendingQueue.filter(filter);
                                    return buffer;
                                }
                            };
                        }
                    };
                    return medium;
                }

                function createMedium(defaults, middleware) {
                    if (middleware === void 0) {
                        middleware = ItoI;
                    }
                    return innerCreateMedium(defaults, middleware);
                }
                // eslint-disable-next-line @typescript-eslint/ban-types
                function createSidecarMedium(options) {
                    if (options === void 0) {
                        options = {};
                    }
                    var medium = innerCreateMedium(null);
                    medium.options = (0, _tslib.__assign)({
                        async: true,
                        ssr: false
                    }, options);
                    return medium;
                }

                /***/
            }),

        /***/
        "../../../node_modules/use-sidecar/dist/es2015/renderProp.js":
            /*!*******************************************************************!*\
              !*** ../../../node_modules/use-sidecar/dist/es2015/renderProp.js ***!
              \*******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.renderCar = renderCar;
                var _tslib = __webpack_require__( /*! tslib */ "../../../node_modules/tslib/tslib.es6.mjs");
                var _react = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));
                var React = _react;

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }

                function renderCar(WrappedComponent, defaults) {
                    function State(_a) {
                        var stateRef = _a.stateRef,
                            props = _a.props;
                        var renderTarget = (0, _react.useCallback)(function SideTarget() {
                            var args = [];
                            for (var _i = 0; _i < arguments.length; _i++) {
                                args[_i] = arguments[_i];
                            }
                            (0, _react.useLayoutEffect)(function() {
                                stateRef.current(args);
                            });
                            return null;
                        }, []);
                        // @ts-ignore
                        return /*#__PURE__*/ React.createElement(WrappedComponent, (0, _tslib.__assign)({}, props, {
                            children: renderTarget
                        }));
                    }
                    var Children = /*#__PURE__*/ React.memo(function(_a) {
                        var stateRef = _a.stateRef,
                            defaultState = _a.defaultState,
                            children = _a.children;
                        var _b = (0, _react.useState)(defaultState.current),
                            state = _b[0],
                            setState = _b[1];
                        (0, _react.useEffect)(function() {
                            stateRef.current = setState;
                        }, []);
                        return children.apply(void 0, state);
                    }, function() {
                        return true;
                    });
                    return function Combiner(props) {
                        var defaultState = React.useRef(defaults(props));
                        var ref = React.useRef(function(state) {
                            return defaultState.current = state;
                        });
                        return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(State, {
                            stateRef: ref,
                            props: props
                        }), /*#__PURE__*/ React.createElement(Children, {
                            stateRef: ref,
                            defaultState: defaultState,
                            children: props.children
                        }));
                    };
                }

                /***/
            }),

        /***/
        "../../../node_modules/vscode-languageserver-types/lib/esm/main.js":
            /*!*************************************************************************!*\
              !*** ../../../node_modules/vscode-languageserver-types/lib/esm/main.js ***!
              \*************************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";
                /* --------------------------------------------------------------------------------------------
                 * Copyright (c) Microsoft Corporation. All rights reserved.
                 * Licensed under the MIT License. See License.txt in the project root for license information.
                 * ------------------------------------------------------------------------------------------ */


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.uinteger = exports.integer = exports.WorkspaceSymbol = exports.WorkspaceFolder = exports.WorkspaceEdit = exports.WorkspaceChange = exports.VersionedTextDocumentIdentifier = exports.URI = exports.TextEdit = exports.TextDocumentItem = exports.TextDocumentIdentifier = exports.TextDocumentEdit = exports.TextDocument = exports.SymbolTag = exports.SymbolKind = exports.SymbolInformation = exports.SignatureInformation = exports.SemanticTokens = exports.SemanticTokenTypes = exports.SemanticTokenModifiers = exports.SelectionRange = exports.RenameFile = exports.Range = exports.Position = exports.ParameterInformation = exports.OptionalVersionedTextDocumentIdentifier = exports.MarkupKind = exports.MarkupContent = exports.MarkedString = exports.LocationLink = exports.Location = exports.InsertTextMode = exports.InsertTextFormat = exports.InsertReplaceEdit = exports.InlineValueVariableLookup = exports.InlineValueText = exports.InlineValueEvaluatableExpression = exports.InlineValueContext = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlayHint = exports.Hover = exports.FormattingOptions = exports.FoldingRangeKind = exports.FoldingRange = exports.EOL = exports.DocumentUri = exports.DocumentSymbol = exports.DocumentLink = exports.DocumentHighlightKind = exports.DocumentHighlight = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.Diagnostic = exports.DeleteFile = exports.CreateFile = exports.CompletionList = exports.CompletionItemTag = exports.CompletionItemLabelDetails = exports.CompletionItemKind = exports.CompletionItem = exports.Command = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.CodeLens = exports.CodeDescription = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.CodeActionContext = exports.CodeAction = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.AnnotatedTextEdit = void 0;
                var DocumentUri;
                (function(DocumentUri) {
                    function is(value) {
                        return typeof value === 'string';
                    }
                    DocumentUri.is = is;
                })(DocumentUri || (exports.DocumentUri = DocumentUri = {}));
                var URI;
                (function(URI) {
                    function is(value) {
                        return typeof value === 'string';
                    }
                    URI.is = is;
                })(URI || (exports.URI = URI = {}));
                var integer;
                (function(integer) {
                    integer.MIN_VALUE = -2147483648;
                    integer.MAX_VALUE = 2147483647;

                    function is(value) {
                        return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
                    }
                    integer.is = is;
                })(integer || (exports.integer = integer = {}));
                var uinteger;
                (function(uinteger) {
                    uinteger.MIN_VALUE = 0;
                    uinteger.MAX_VALUE = 2147483647;

                    function is(value) {
                        return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
                    }
                    uinteger.is = is;
                })(uinteger || (exports.uinteger = uinteger = {}));
                /**
                 * The Position namespace provides helper functions to work with
                 * {@link Position} literals.
                 */
                var Position;
                (function(Position) {
                    /**
                     * Creates a new Position literal from the given line and character.
                     * @param line The position's line.
                     * @param character The position's character.
                     */
                    function create(line, character) {
                        if (line === Number.MAX_VALUE) {
                            line = uinteger.MAX_VALUE;
                        }
                        if (character === Number.MAX_VALUE) {
                            character = uinteger.MAX_VALUE;
                        }
                        return {
                            line: line,
                            character: character
                        };
                    }
                    Position.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link Position} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
                    }
                    Position.is = is;
                })(Position || (exports.Position = Position = {}));
                /**
                 * The Range namespace provides helper functions to work with
                 * {@link Range} literals.
                 */
                var Range;
                (function(Range) {
                    function create(one, two, three, four) {
                        if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
                            return {
                                start: Position.create(one, two),
                                end: Position.create(three, four)
                            };
                        } else if (Position.is(one) && Position.is(two)) {
                            return {
                                start: one,
                                end: two
                            };
                        } else {
                            throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]"));
                        }
                    }
                    Range.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link Range} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
                    }
                    Range.is = is;
                })(Range || (exports.Range = Range = {}));
                /**
                 * The Location namespace provides helper functions to work with
                 * {@link Location} literals.
                 */
                var Location;
                (function(Location) {
                    /**
                     * Creates a Location literal.
                     * @param uri The location's uri.
                     * @param range The location's range.
                     */
                    function create(uri, range) {
                        return {
                            uri: uri,
                            range: range
                        };
                    }
                    Location.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link Location} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
                    }
                    Location.is = is;
                })(Location || (exports.Location = Location = {}));
                /**
                 * The LocationLink namespace provides helper functions to work with
                 * {@link LocationLink} literals.
                 */
                var LocationLink;
                (function(LocationLink) {
                    /**
                     * Creates a LocationLink literal.
                     * @param targetUri The definition's uri.
                     * @param targetRange The full range of the definition.
                     * @param targetSelectionRange The span of the symbol definition at the target.
                     * @param originSelectionRange The span of the symbol being defined in the originating source file.
                     */
                    function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
                        return {
                            targetUri: targetUri,
                            targetRange: targetRange,
                            targetSelectionRange: targetSelectionRange,
                            originSelectionRange: originSelectionRange
                        };
                    }
                    LocationLink.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link LocationLink} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) && Range.is(candidate.targetSelectionRange) && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
                    }
                    LocationLink.is = is;
                })(LocationLink || (exports.LocationLink = LocationLink = {}));
                /**
                 * The Color namespace provides helper functions to work with
                 * {@link Color} literals.
                 */
                var Color;
                (function(Color) {
                    /**
                     * Creates a new Color literal.
                     */
                    function create(red, green, blue, alpha) {
                        return {
                            red: red,
                            green: green,
                            blue: blue,
                            alpha: alpha
                        };
                    }
                    Color.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link Color} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) && Is.numberRange(candidate.green, 0, 1) && Is.numberRange(candidate.blue, 0, 1) && Is.numberRange(candidate.alpha, 0, 1);
                    }
                    Color.is = is;
                })(Color || (exports.Color = Color = {}));
                /**
                 * The ColorInformation namespace provides helper functions to work with
                 * {@link ColorInformation} literals.
                 */
                var ColorInformation;
                (function(ColorInformation) {
                    /**
                     * Creates a new ColorInformation literal.
                     */
                    function create(range, color) {
                        return {
                            range: range,
                            color: color
                        };
                    }
                    ColorInformation.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link ColorInformation} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);
                    }
                    ColorInformation.is = is;
                })(ColorInformation || (exports.ColorInformation = ColorInformation = {}));
                /**
                 * The Color namespace provides helper functions to work with
                 * {@link ColorPresentation} literals.
                 */
                var ColorPresentation;
                (function(ColorPresentation) {
                    /**
                     * Creates a new ColorInformation literal.
                     */
                    function create(label, textEdit, additionalTextEdits) {
                        return {
                            label: label,
                            textEdit: textEdit,
                            additionalTextEdits: additionalTextEdits
                        };
                    }
                    ColorPresentation.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link ColorInformation} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
                    }
                    ColorPresentation.is = is;
                })(ColorPresentation || (exports.ColorPresentation = ColorPresentation = {}));
                /**
                 * A set of predefined range kinds.
                 */
                var FoldingRangeKind;
                (function(FoldingRangeKind) {
                    /**
                     * Folding range for a comment
                     */
                    FoldingRangeKind.Comment = 'comment';
                    /**
                     * Folding range for an import or include
                     */
                    FoldingRangeKind.Imports = 'imports';
                    /**
                     * Folding range for a region (e.g. `#region`)
                     */
                    FoldingRangeKind.Region = 'region';
                })(FoldingRangeKind || (exports.FoldingRangeKind = FoldingRangeKind = {}));
                /**
                 * The folding range namespace provides helper functions to work with
                 * {@link FoldingRange} literals.
                 */
                var FoldingRange;
                (function(FoldingRange) {
                    /**
                     * Creates a new FoldingRange literal.
                     */
                    function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
                        var result = {
                            startLine: startLine,
                            endLine: endLine
                        };
                        if (Is.defined(startCharacter)) {
                            result.startCharacter = startCharacter;
                        }
                        if (Is.defined(endCharacter)) {
                            result.endCharacter = endCharacter;
                        }
                        if (Is.defined(kind)) {
                            result.kind = kind;
                        }
                        if (Is.defined(collapsedText)) {
                            result.collapsedText = collapsedText;
                        }
                        return result;
                    }
                    FoldingRange.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link FoldingRange} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
                    }
                    FoldingRange.is = is;
                })(FoldingRange || (exports.FoldingRange = FoldingRange = {}));
                /**
                 * The DiagnosticRelatedInformation namespace provides helper functions to work with
                 * {@link DiagnosticRelatedInformation} literals.
                 */
                var DiagnosticRelatedInformation;
                (function(DiagnosticRelatedInformation) {
                    /**
                     * Creates a new DiagnosticRelatedInformation literal.
                     */
                    function create(location, message) {
                        return {
                            location: location,
                            message: message
                        };
                    }
                    DiagnosticRelatedInformation.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
                    }
                    DiagnosticRelatedInformation.is = is;
                })(DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {}));
                /**
                 * The diagnostic's severity.
                 */
                var DiagnosticSeverity;
                (function(DiagnosticSeverity) {
                    /**
                     * Reports an error.
                     */
                    DiagnosticSeverity.Error = 1;
                    /**
                     * Reports a warning.
                     */
                    DiagnosticSeverity.Warning = 2;
                    /**
                     * Reports an information.
                     */
                    DiagnosticSeverity.Information = 3;
                    /**
                     * Reports a hint.
                     */
                    DiagnosticSeverity.Hint = 4;
                })(DiagnosticSeverity || (exports.DiagnosticSeverity = DiagnosticSeverity = {}));
                /**
                 * The diagnostic tags.
                 *
                 * @since 3.15.0
                 */
                var DiagnosticTag;
                (function(DiagnosticTag) {
                    /**
                     * Unused or unnecessary code.
                     *
                     * Clients are allowed to render diagnostics with this tag faded out instead of having
                     * an error squiggle.
                     */
                    DiagnosticTag.Unnecessary = 1;
                    /**
                     * Deprecated or obsolete code.
                     *
                     * Clients are allowed to rendered diagnostics with this tag strike through.
                     */
                    DiagnosticTag.Deprecated = 2;
                })(DiagnosticTag || (exports.DiagnosticTag = DiagnosticTag = {}));
                /**
                 * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
                 *
                 * @since 3.16.0
                 */
                var CodeDescription;
                (function(CodeDescription) {
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Is.string(candidate.href);
                    }
                    CodeDescription.is = is;
                })(CodeDescription || (exports.CodeDescription = CodeDescription = {}));
                /**
                 * The Diagnostic namespace provides helper functions to work with
                 * {@link Diagnostic} literals.
                 */
                var Diagnostic;
                (function(Diagnostic) {
                    /**
                     * Creates a new Diagnostic literal.
                     */
                    function create(range, message, severity, code, source, relatedInformation) {
                        var result = {
                            range: range,
                            message: message
                        };
                        if (Is.defined(severity)) {
                            result.severity = severity;
                        }
                        if (Is.defined(code)) {
                            result.code = code;
                        }
                        if (Is.defined(source)) {
                            result.source = source;
                        }
                        if (Is.defined(relatedInformation)) {
                            result.relatedInformation = relatedInformation;
                        }
                        return result;
                    }
                    Diagnostic.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link Diagnostic} interface.
                     */
                    function is(value) {
                        var _a;
                        var candidate = value;
                        return Is.defined(candidate) && Range.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
                    }
                    Diagnostic.is = is;
                })(Diagnostic || (exports.Diagnostic = Diagnostic = {}));
                /**
                 * The Command namespace provides helper functions to work with
                 * {@link Command} literals.
                 */
                var Command;
                (function(Command) {
                    /**
                     * Creates a new Command literal.
                     */
                    function create(title, command) {
                        var args = [];
                        for (var _i = 2; _i < arguments.length; _i++) {
                            args[_i - 2] = arguments[_i];
                        }
                        var result = {
                            title: title,
                            command: command
                        };
                        if (Is.defined(args) && args.length > 0) {
                            result.arguments = args;
                        }
                        return result;
                    }
                    Command.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link Command} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
                    }
                    Command.is = is;
                })(Command || (exports.Command = Command = {}));
                /**
                 * The TextEdit namespace provides helper function to create replace,
                 * insert and delete edits more easily.
                 */
                var TextEdit;
                (function(TextEdit) {
                    /**
                     * Creates a replace text edit.
                     * @param range The range of text to be replaced.
                     * @param newText The new text.
                     */
                    function replace(range, newText) {
                        return {
                            range: range,
                            newText: newText
                        };
                    }
                    TextEdit.replace = replace;
                    /**
                     * Creates an insert text edit.
                     * @param position The position to insert the text at.
                     * @param newText The text to be inserted.
                     */
                    function insert(position, newText) {
                        return {
                            range: {
                                start: position,
                                end: position
                            },
                            newText: newText
                        };
                    }
                    TextEdit.insert = insert;
                    /**
                     * Creates a delete text edit.
                     * @param range The range of text to be deleted.
                     */
                    function del(range) {
                        return {
                            range: range,
                            newText: ''
                        };
                    }
                    TextEdit.del = del;

                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Is.string(candidate.newText) && Range.is(candidate.range);
                    }
                    TextEdit.is = is;
                })(TextEdit || (exports.TextEdit = TextEdit = {}));
                var ChangeAnnotation;
                (function(ChangeAnnotation) {
                    function create(label, needsConfirmation, description) {
                        var result = {
                            label: label
                        };
                        if (needsConfirmation !== undefined) {
                            result.needsConfirmation = needsConfirmation;
                        }
                        if (description !== undefined) {
                            result.description = description;
                        }
                        return result;
                    }
                    ChangeAnnotation.create = create;

                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && (Is.string(candidate.description) || candidate.description === undefined);
                    }
                    ChangeAnnotation.is = is;
                })(ChangeAnnotation || (exports.ChangeAnnotation = ChangeAnnotation = {}));
                var ChangeAnnotationIdentifier;
                (function(ChangeAnnotationIdentifier) {
                    function is(value) {
                        var candidate = value;
                        return Is.string(candidate);
                    }
                    ChangeAnnotationIdentifier.is = is;
                })(ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {}));
                var AnnotatedTextEdit;
                (function(AnnotatedTextEdit) {
                    /**
                     * Creates an annotated replace text edit.
                     *
                     * @param range The range of text to be replaced.
                     * @param newText The new text.
                     * @param annotation The annotation.
                     */
                    function replace(range, newText, annotation) {
                        return {
                            range: range,
                            newText: newText,
                            annotationId: annotation
                        };
                    }
                    AnnotatedTextEdit.replace = replace;
                    /**
                     * Creates an annotated insert text edit.
                     *
                     * @param position The position to insert the text at.
                     * @param newText The text to be inserted.
                     * @param annotation The annotation.
                     */
                    function insert(position, newText, annotation) {
                        return {
                            range: {
                                start: position,
                                end: position
                            },
                            newText: newText,
                            annotationId: annotation
                        };
                    }
                    AnnotatedTextEdit.insert = insert;
                    /**
                     * Creates an annotated delete text edit.
                     *
                     * @param range The range of text to be deleted.
                     * @param annotation The annotation.
                     */
                    function del(range, annotation) {
                        return {
                            range: range,
                            newText: '',
                            annotationId: annotation
                        };
                    }
                    AnnotatedTextEdit.del = del;

                    function is(value) {
                        var candidate = value;
                        return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
                    }
                    AnnotatedTextEdit.is = is;
                })(AnnotatedTextEdit || (exports.AnnotatedTextEdit = AnnotatedTextEdit = {}));
                /**
                 * The TextDocumentEdit namespace provides helper function to create
                 * an edit that manipulates a text document.
                 */
                var TextDocumentEdit;
                (function(TextDocumentEdit) {
                    /**
                     * Creates a new `TextDocumentEdit`
                     */
                    function create(textDocument, edits) {
                        return {
                            textDocument: textDocument,
                            edits: edits
                        };
                    }
                    TextDocumentEdit.create = create;

                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits);
                    }
                    TextDocumentEdit.is = is;
                })(TextDocumentEdit || (exports.TextDocumentEdit = TextDocumentEdit = {}));
                var CreateFile;
                (function(CreateFile) {
                    function create(uri, options, annotation) {
                        var result = {
                            kind: 'create',
                            uri: uri
                        };
                        if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
                            result.options = options;
                        }
                        if (annotation !== undefined) {
                            result.annotationId = annotation;
                        }
                        return result;
                    }
                    CreateFile.create = create;

                    function is(value) {
                        var candidate = value;
                        return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
                    }
                    CreateFile.is = is;
                })(CreateFile || (exports.CreateFile = CreateFile = {}));
                var RenameFile;
                (function(RenameFile) {
                    function create(oldUri, newUri, options, annotation) {
                        var result = {
                            kind: 'rename',
                            oldUri: oldUri,
                            newUri: newUri
                        };
                        if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
                            result.options = options;
                        }
                        if (annotation !== undefined) {
                            result.annotationId = annotation;
                        }
                        return result;
                    }
                    RenameFile.create = create;

                    function is(value) {
                        var candidate = value;
                        return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
                    }
                    RenameFile.is = is;
                })(RenameFile || (exports.RenameFile = RenameFile = {}));
                var DeleteFile;
                (function(DeleteFile) {
                    function create(uri, options, annotation) {
                        var result = {
                            kind: 'delete',
                            uri: uri
                        };
                        if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
                            result.options = options;
                        }
                        if (annotation !== undefined) {
                            result.annotationId = annotation;
                        }
                        return result;
                    }
                    DeleteFile.create = create;

                    function is(value) {
                        var candidate = value;
                        return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || (candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
                    }
                    DeleteFile.is = is;
                })(DeleteFile || (exports.DeleteFile = DeleteFile = {}));
                var WorkspaceEdit;
                (function(WorkspaceEdit) {
                    function is(value) {
                        var candidate = value;
                        return candidate && (candidate.changes !== undefined || candidate.documentChanges !== undefined) && (candidate.documentChanges === undefined || candidate.documentChanges.every(function(change) {
                            if (Is.string(change.kind)) {
                                return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
                            } else {
                                return TextDocumentEdit.is(change);
                            }
                        }));
                    }
                    WorkspaceEdit.is = is;
                })(WorkspaceEdit || (exports.WorkspaceEdit = WorkspaceEdit = {}));
                var TextEditChangeImpl = /** @class */ function() {
                    function TextEditChangeImpl(edits, changeAnnotations) {
                        this.edits = edits;
                        this.changeAnnotations = changeAnnotations;
                    }
                    TextEditChangeImpl.prototype.insert = function(position, newText, annotation) {
                        var edit;
                        var id;
                        if (annotation === undefined) {
                            edit = TextEdit.insert(position, newText);
                        } else if (ChangeAnnotationIdentifier.is(annotation)) {
                            id = annotation;
                            edit = AnnotatedTextEdit.insert(position, newText, annotation);
                        } else {
                            this.assertChangeAnnotations(this.changeAnnotations);
                            id = this.changeAnnotations.manage(annotation);
                            edit = AnnotatedTextEdit.insert(position, newText, id);
                        }
                        this.edits.push(edit);
                        if (id !== undefined) {
                            return id;
                        }
                    };
                    TextEditChangeImpl.prototype.replace = function(range, newText, annotation) {
                        var edit;
                        var id;
                        if (annotation === undefined) {
                            edit = TextEdit.replace(range, newText);
                        } else if (ChangeAnnotationIdentifier.is(annotation)) {
                            id = annotation;
                            edit = AnnotatedTextEdit.replace(range, newText, annotation);
                        } else {
                            this.assertChangeAnnotations(this.changeAnnotations);
                            id = this.changeAnnotations.manage(annotation);
                            edit = AnnotatedTextEdit.replace(range, newText, id);
                        }
                        this.edits.push(edit);
                        if (id !== undefined) {
                            return id;
                        }
                    };
                    TextEditChangeImpl.prototype.delete = function(range, annotation) {
                        var edit;
                        var id;
                        if (annotation === undefined) {
                            edit = TextEdit.del(range);
                        } else if (ChangeAnnotationIdentifier.is(annotation)) {
                            id = annotation;
                            edit = AnnotatedTextEdit.del(range, annotation);
                        } else {
                            this.assertChangeAnnotations(this.changeAnnotations);
                            id = this.changeAnnotations.manage(annotation);
                            edit = AnnotatedTextEdit.del(range, id);
                        }
                        this.edits.push(edit);
                        if (id !== undefined) {
                            return id;
                        }
                    };
                    TextEditChangeImpl.prototype.add = function(edit) {
                        this.edits.push(edit);
                    };
                    TextEditChangeImpl.prototype.all = function() {
                        return this.edits;
                    };
                    TextEditChangeImpl.prototype.clear = function() {
                        this.edits.splice(0, this.edits.length);
                    };
                    TextEditChangeImpl.prototype.assertChangeAnnotations = function(value) {
                        if (value === undefined) {
                            throw new Error("Text edit change is not configured to manage change annotations.");
                        }
                    };
                    return TextEditChangeImpl;
                }();
                /**
                 * A helper class
                 */
                var ChangeAnnotations = /** @class */ function() {
                    function ChangeAnnotations(annotations) {
                        this._annotations = annotations === undefined ? Object.create(null) : annotations;
                        this._counter = 0;
                        this._size = 0;
                    }
                    ChangeAnnotations.prototype.all = function() {
                        return this._annotations;
                    };
                    Object.defineProperty(ChangeAnnotations.prototype, "size", {
                        get: function() {
                            return this._size;
                        },
                        enumerable: false,
                        configurable: true
                    });
                    ChangeAnnotations.prototype.manage = function(idOrAnnotation, annotation) {
                        var id;
                        if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
                            id = idOrAnnotation;
                        } else {
                            id = this.nextId();
                            annotation = idOrAnnotation;
                        }
                        if (this._annotations[id] !== undefined) {
                            throw new Error("Id ".concat(id, " is already in use."));
                        }
                        if (annotation === undefined) {
                            throw new Error("No annotation provided for id ".concat(id));
                        }
                        this._annotations[id] = annotation;
                        this._size++;
                        return id;
                    };
                    ChangeAnnotations.prototype.nextId = function() {
                        this._counter++;
                        return this._counter.toString();
                    };
                    return ChangeAnnotations;
                }();
                /**
                 * A workspace change helps constructing changes to a workspace.
                 */
                var WorkspaceChange = exports.WorkspaceChange = /** @class */ function() {
                    function WorkspaceChange(workspaceEdit) {
                        var _this = this;
                        this._textEditChanges = Object.create(null);
                        if (workspaceEdit !== undefined) {
                            this._workspaceEdit = workspaceEdit;
                            if (workspaceEdit.documentChanges) {
                                this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
                                workspaceEdit.changeAnnotations = this._changeAnnotations.all();
                                workspaceEdit.documentChanges.forEach(function(change) {
                                    if (TextDocumentEdit.is(change)) {
                                        var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
                                        _this._textEditChanges[change.textDocument.uri] = textEditChange;
                                    }
                                });
                            } else if (workspaceEdit.changes) {
                                Object.keys(workspaceEdit.changes).forEach(function(key) {
                                    var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
                                    _this._textEditChanges[key] = textEditChange;
                                });
                            }
                        } else {
                            this._workspaceEdit = {};
                        }
                    }
                    Object.defineProperty(WorkspaceChange.prototype, "edit", {
                        /**
                         * Returns the underlying {@link WorkspaceEdit} literal
                         * use to be returned from a workspace edit operation like rename.
                         */
                        get: function() {
                            this.initDocumentChanges();
                            if (this._changeAnnotations !== undefined) {
                                if (this._changeAnnotations.size === 0) {
                                    this._workspaceEdit.changeAnnotations = undefined;
                                } else {
                                    this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
                                }
                            }
                            return this._workspaceEdit;
                        },
                        enumerable: false,
                        configurable: true
                    });
                    WorkspaceChange.prototype.getTextEditChange = function(key) {
                        if (OptionalVersionedTextDocumentIdentifier.is(key)) {
                            this.initDocumentChanges();
                            if (this._workspaceEdit.documentChanges === undefined) {
                                throw new Error('Workspace edit is not configured for document changes.');
                            }
                            var textDocument = {
                                uri: key.uri,
                                version: key.version
                            };
                            var result = this._textEditChanges[textDocument.uri];
                            if (!result) {
                                var edits = [];
                                var textDocumentEdit = {
                                    textDocument: textDocument,
                                    edits: edits
                                };
                                this._workspaceEdit.documentChanges.push(textDocumentEdit);
                                result = new TextEditChangeImpl(edits, this._changeAnnotations);
                                this._textEditChanges[textDocument.uri] = result;
                            }
                            return result;
                        } else {
                            this.initChanges();
                            if (this._workspaceEdit.changes === undefined) {
                                throw new Error('Workspace edit is not configured for normal text edit changes.');
                            }
                            var result = this._textEditChanges[key];
                            if (!result) {
                                var edits = [];
                                this._workspaceEdit.changes[key] = edits;
                                result = new TextEditChangeImpl(edits);
                                this._textEditChanges[key] = result;
                            }
                            return result;
                        }
                    };
                    WorkspaceChange.prototype.initDocumentChanges = function() {
                        if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
                            this._changeAnnotations = new ChangeAnnotations();
                            this._workspaceEdit.documentChanges = [];
                            this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
                        }
                    };
                    WorkspaceChange.prototype.initChanges = function() {
                        if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
                            this._workspaceEdit.changes = Object.create(null);
                        }
                    };
                    WorkspaceChange.prototype.createFile = function(uri, optionsOrAnnotation, options) {
                        this.initDocumentChanges();
                        if (this._workspaceEdit.documentChanges === undefined) {
                            throw new Error('Workspace edit is not configured for document changes.');
                        }
                        var annotation;
                        if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
                            annotation = optionsOrAnnotation;
                        } else {
                            options = optionsOrAnnotation;
                        }
                        var operation;
                        var id;
                        if (annotation === undefined) {
                            operation = CreateFile.create(uri, options);
                        } else {
                            id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
                            operation = CreateFile.create(uri, options, id);
                        }
                        this._workspaceEdit.documentChanges.push(operation);
                        if (id !== undefined) {
                            return id;
                        }
                    };
                    WorkspaceChange.prototype.renameFile = function(oldUri, newUri, optionsOrAnnotation, options) {
                        this.initDocumentChanges();
                        if (this._workspaceEdit.documentChanges === undefined) {
                            throw new Error('Workspace edit is not configured for document changes.');
                        }
                        var annotation;
                        if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
                            annotation = optionsOrAnnotation;
                        } else {
                            options = optionsOrAnnotation;
                        }
                        var operation;
                        var id;
                        if (annotation === undefined) {
                            operation = RenameFile.create(oldUri, newUri, options);
                        } else {
                            id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
                            operation = RenameFile.create(oldUri, newUri, options, id);
                        }
                        this._workspaceEdit.documentChanges.push(operation);
                        if (id !== undefined) {
                            return id;
                        }
                    };
                    WorkspaceChange.prototype.deleteFile = function(uri, optionsOrAnnotation, options) {
                        this.initDocumentChanges();
                        if (this._workspaceEdit.documentChanges === undefined) {
                            throw new Error('Workspace edit is not configured for document changes.');
                        }
                        var annotation;
                        if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
                            annotation = optionsOrAnnotation;
                        } else {
                            options = optionsOrAnnotation;
                        }
                        var operation;
                        var id;
                        if (annotation === undefined) {
                            operation = DeleteFile.create(uri, options);
                        } else {
                            id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
                            operation = DeleteFile.create(uri, options, id);
                        }
                        this._workspaceEdit.documentChanges.push(operation);
                        if (id !== undefined) {
                            return id;
                        }
                    };
                    return WorkspaceChange;
                }();
                /**
                 * The TextDocumentIdentifier namespace provides helper functions to work with
                 * {@link TextDocumentIdentifier} literals.
                 */
                var TextDocumentIdentifier;
                (function(TextDocumentIdentifier) {
                    /**
                     * Creates a new TextDocumentIdentifier literal.
                     * @param uri The document's uri.
                     */
                    function create(uri) {
                        return {
                            uri: uri
                        };
                    }
                    TextDocumentIdentifier.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Is.string(candidate.uri);
                    }
                    TextDocumentIdentifier.is = is;
                })(TextDocumentIdentifier || (exports.TextDocumentIdentifier = TextDocumentIdentifier = {}));
                /**
                 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
                 * {@link VersionedTextDocumentIdentifier} literals.
                 */
                var VersionedTextDocumentIdentifier;
                (function(VersionedTextDocumentIdentifier) {
                    /**
                     * Creates a new VersionedTextDocumentIdentifier literal.
                     * @param uri The document's uri.
                     * @param version The document's version.
                     */
                    function create(uri, version) {
                        return {
                            uri: uri,
                            version: version
                        };
                    }
                    VersionedTextDocumentIdentifier.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
                    }
                    VersionedTextDocumentIdentifier.is = is;
                })(VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {}));
                /**
                 * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
                 * {@link OptionalVersionedTextDocumentIdentifier} literals.
                 */
                var OptionalVersionedTextDocumentIdentifier;
                (function(OptionalVersionedTextDocumentIdentifier) {
                    /**
                     * Creates a new OptionalVersionedTextDocumentIdentifier literal.
                     * @param uri The document's uri.
                     * @param version The document's version.
                     */
                    function create(uri, version) {
                        return {
                            uri: uri,
                            version: version
                        };
                    }
                    OptionalVersionedTextDocumentIdentifier.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
                    }
                    OptionalVersionedTextDocumentIdentifier.is = is;
                })(OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {}));
                /**
                 * The TextDocumentItem namespace provides helper functions to work with
                 * {@link TextDocumentItem} literals.
                 */
                var TextDocumentItem;
                (function(TextDocumentItem) {
                    /**
                     * Creates a new TextDocumentItem literal.
                     * @param uri The document's uri.
                     * @param languageId The document's language identifier.
                     * @param version The document's version number.
                     * @param text The document's text.
                     */
                    function create(uri, languageId, version, text) {
                        return {
                            uri: uri,
                            languageId: languageId,
                            version: version,
                            text: text
                        };
                    }
                    TextDocumentItem.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link TextDocumentItem} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
                    }
                    TextDocumentItem.is = is;
                })(TextDocumentItem || (exports.TextDocumentItem = TextDocumentItem = {}));
                /**
                 * Describes the content type that a client supports in various
                 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
                 *
                 * Please note that `MarkupKinds` must not start with a `$`. This kinds
                 * are reserved for internal usage.
                 */
                var MarkupKind;
                (function(MarkupKind) {
                    /**
                     * Plain text is supported as a content format
                     */
                    MarkupKind.PlainText = 'plaintext';
                    /**
                     * Markdown is supported as a content format
                     */
                    MarkupKind.Markdown = 'markdown';
                    /**
                     * Checks whether the given value is a value of the {@link MarkupKind} type.
                     */
                    function is(value) {
                        var candidate = value;
                        return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
                    }
                    MarkupKind.is = is;
                })(MarkupKind || (exports.MarkupKind = MarkupKind = {}));
                var MarkupContent;
                (function(MarkupContent) {
                    /**
                     * Checks whether the given value conforms to the {@link MarkupContent} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
                    }
                    MarkupContent.is = is;
                })(MarkupContent || (exports.MarkupContent = MarkupContent = {}));
                /**
                 * The kind of a completion entry.
                 */
                var CompletionItemKind;
                (function(CompletionItemKind) {
                    CompletionItemKind.Text = 1;
                    CompletionItemKind.Method = 2;
                    CompletionItemKind.Function = 3;
                    CompletionItemKind.Constructor = 4;
                    CompletionItemKind.Field = 5;
                    CompletionItemKind.Variable = 6;
                    CompletionItemKind.Class = 7;
                    CompletionItemKind.Interface = 8;
                    CompletionItemKind.Module = 9;
                    CompletionItemKind.Property = 10;
                    CompletionItemKind.Unit = 11;
                    CompletionItemKind.Value = 12;
                    CompletionItemKind.Enum = 13;
                    CompletionItemKind.Keyword = 14;
                    CompletionItemKind.Snippet = 15;
                    CompletionItemKind.Color = 16;
                    CompletionItemKind.File = 17;
                    CompletionItemKind.Reference = 18;
                    CompletionItemKind.Folder = 19;
                    CompletionItemKind.EnumMember = 20;
                    CompletionItemKind.Constant = 21;
                    CompletionItemKind.Struct = 22;
                    CompletionItemKind.Event = 23;
                    CompletionItemKind.Operator = 24;
                    CompletionItemKind.TypeParameter = 25;
                })(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {}));
                /**
                 * Defines whether the insert text in a completion item should be interpreted as
                 * plain text or a snippet.
                 */
                var InsertTextFormat;
                (function(InsertTextFormat) {
                    /**
                     * The primary text to be inserted is treated as a plain string.
                     */
                    InsertTextFormat.PlainText = 1;
                    /**
                     * The primary text to be inserted is treated as a snippet.
                     *
                     * A snippet can define tab stops and placeholders with `$1`, `$2`
                     * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
                     * the end of the snippet. Placeholders with equal identifiers are linked,
                     * that is typing in one will update others too.
                     *
                     * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
                     */
                    InsertTextFormat.Snippet = 2;
                })(InsertTextFormat || (exports.InsertTextFormat = InsertTextFormat = {}));
                /**
                 * Completion item tags are extra annotations that tweak the rendering of a completion
                 * item.
                 *
                 * @since 3.15.0
                 */
                var CompletionItemTag;
                (function(CompletionItemTag) {
                    /**
                     * Render a completion as obsolete, usually using a strike-out.
                     */
                    CompletionItemTag.Deprecated = 1;
                })(CompletionItemTag || (exports.CompletionItemTag = CompletionItemTag = {}));
                /**
                 * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
                 *
                 * @since 3.16.0
                 */
                var InsertReplaceEdit;
                (function(InsertReplaceEdit) {
                    /**
                     * Creates a new insert / replace edit
                     */
                    function create(newText, insert, replace) {
                        return {
                            newText: newText,
                            insert: insert,
                            replace: replace
                        };
                    }
                    InsertReplaceEdit.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
                    }
                    InsertReplaceEdit.is = is;
                })(InsertReplaceEdit || (exports.InsertReplaceEdit = InsertReplaceEdit = {}));
                /**
                 * How whitespace and indentation is handled during completion
                 * item insertion.
                 *
                 * @since 3.16.0
                 */
                var InsertTextMode;
                (function(InsertTextMode) {
                    /**
                     * The insertion or replace strings is taken as it is. If the
                     * value is multi line the lines below the cursor will be
                     * inserted using the indentation defined in the string value.
                     * The client will not apply any kind of adjustments to the
                     * string.
                     */
                    InsertTextMode.asIs = 1;
                    /**
                     * The editor adjusts leading whitespace of new lines so that
                     * they match the indentation up to the cursor of the line for
                     * which the item is accepted.
                     *
                     * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
                     * multi line completion item is indented using 2 tabs and all
                     * following lines inserted will be indented using 2 tabs as well.
                     */
                    InsertTextMode.adjustIndentation = 2;
                })(InsertTextMode || (exports.InsertTextMode = InsertTextMode = {}));
                var CompletionItemLabelDetails;
                (function(CompletionItemLabelDetails) {
                    function is(value) {
                        var candidate = value;
                        return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) && (Is.string(candidate.description) || candidate.description === undefined);
                    }
                    CompletionItemLabelDetails.is = is;
                })(CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = CompletionItemLabelDetails = {}));
                /**
                 * The CompletionItem namespace provides functions to deal with
                 * completion items.
                 */
                var CompletionItem;
                (function(CompletionItem) {
                    /**
                     * Create a completion item and seed it with a label.
                     * @param label The completion item's label
                     */
                    function create(label) {
                        return {
                            label: label
                        };
                    }
                    CompletionItem.create = create;
                })(CompletionItem || (exports.CompletionItem = CompletionItem = {}));
                /**
                 * The CompletionList namespace provides functions to deal with
                 * completion lists.
                 */
                var CompletionList;
                (function(CompletionList) {
                    /**
                     * Creates a new completion list.
                     *
                     * @param items The completion items.
                     * @param isIncomplete The list is not complete.
                     */
                    function create(items, isIncomplete) {
                        return {
                            items: items ? items : [],
                            isIncomplete: !!isIncomplete
                        };
                    }
                    CompletionList.create = create;
                })(CompletionList || (exports.CompletionList = CompletionList = {}));
                var MarkedString;
                (function(MarkedString) {
                    /**
                     * Creates a marked string from plain text.
                     *
                     * @param plainText The plain text.
                     */
                    function fromPlainText(plainText) {
                        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
                    }
                    MarkedString.fromPlainText = fromPlainText;
                    /**
                     * Checks whether the given value conforms to the {@link MarkedString} type.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.string(candidate) || Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value);
                    }
                    MarkedString.is = is;
                })(MarkedString || (exports.MarkedString = MarkedString = {}));
                var Hover;
                (function(Hover) {
                    /**
                     * Checks whether the given value conforms to the {@link Hover} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
                    }
                    Hover.is = is;
                })(Hover || (exports.Hover = Hover = {}));
                /**
                 * The ParameterInformation namespace provides helper functions to work with
                 * {@link ParameterInformation} literals.
                 */
                var ParameterInformation;
                (function(ParameterInformation) {
                    /**
                     * Creates a new parameter information literal.
                     *
                     * @param label A label string.
                     * @param documentation A doc string.
                     */
                    function create(label, documentation) {
                        return documentation ? {
                            label: label,
                            documentation: documentation
                        } : {
                            label: label
                        };
                    }
                    ParameterInformation.create = create;
                })(ParameterInformation || (exports.ParameterInformation = ParameterInformation = {}));
                /**
                 * The SignatureInformation namespace provides helper functions to work with
                 * {@link SignatureInformation} literals.
                 */
                var SignatureInformation;
                (function(SignatureInformation) {
                    function create(label, documentation) {
                        var parameters = [];
                        for (var _i = 2; _i < arguments.length; _i++) {
                            parameters[_i - 2] = arguments[_i];
                        }
                        var result = {
                            label: label
                        };
                        if (Is.defined(documentation)) {
                            result.documentation = documentation;
                        }
                        if (Is.defined(parameters)) {
                            result.parameters = parameters;
                        } else {
                            result.parameters = [];
                        }
                        return result;
                    }
                    SignatureInformation.create = create;
                })(SignatureInformation || (exports.SignatureInformation = SignatureInformation = {}));
                /**
                 * A document highlight kind.
                 */
                var DocumentHighlightKind;
                (function(DocumentHighlightKind) {
                    /**
                     * A textual occurrence.
                     */
                    DocumentHighlightKind.Text = 1;
                    /**
                     * Read-access of a symbol, like reading a variable.
                     */
                    DocumentHighlightKind.Read = 2;
                    /**
                     * Write-access of a symbol, like writing to a variable.
                     */
                    DocumentHighlightKind.Write = 3;
                })(DocumentHighlightKind || (exports.DocumentHighlightKind = DocumentHighlightKind = {}));
                /**
                 * DocumentHighlight namespace to provide helper functions to work with
                 * {@link DocumentHighlight} literals.
                 */
                var DocumentHighlight;
                (function(DocumentHighlight) {
                    /**
                     * Create a DocumentHighlight object.
                     * @param range The range the highlight applies to.
                     * @param kind The highlight kind
                     */
                    function create(range, kind) {
                        var result = {
                            range: range
                        };
                        if (Is.number(kind)) {
                            result.kind = kind;
                        }
                        return result;
                    }
                    DocumentHighlight.create = create;
                })(DocumentHighlight || (exports.DocumentHighlight = DocumentHighlight = {}));
                /**
                 * A symbol kind.
                 */
                var SymbolKind;
                (function(SymbolKind) {
                    SymbolKind.File = 1;
                    SymbolKind.Module = 2;
                    SymbolKind.Namespace = 3;
                    SymbolKind.Package = 4;
                    SymbolKind.Class = 5;
                    SymbolKind.Method = 6;
                    SymbolKind.Property = 7;
                    SymbolKind.Field = 8;
                    SymbolKind.Constructor = 9;
                    SymbolKind.Enum = 10;
                    SymbolKind.Interface = 11;
                    SymbolKind.Function = 12;
                    SymbolKind.Variable = 13;
                    SymbolKind.Constant = 14;
                    SymbolKind.String = 15;
                    SymbolKind.Number = 16;
                    SymbolKind.Boolean = 17;
                    SymbolKind.Array = 18;
                    SymbolKind.Object = 19;
                    SymbolKind.Key = 20;
                    SymbolKind.Null = 21;
                    SymbolKind.EnumMember = 22;
                    SymbolKind.Struct = 23;
                    SymbolKind.Event = 24;
                    SymbolKind.Operator = 25;
                    SymbolKind.TypeParameter = 26;
                })(SymbolKind || (exports.SymbolKind = SymbolKind = {}));
                /**
                 * Symbol tags are extra annotations that tweak the rendering of a symbol.
                 *
                 * @since 3.16
                 */
                var SymbolTag;
                (function(SymbolTag) {
                    /**
                     * Render a symbol as obsolete, usually using a strike-out.
                     */
                    SymbolTag.Deprecated = 1;
                })(SymbolTag || (exports.SymbolTag = SymbolTag = {}));
                var SymbolInformation;
                (function(SymbolInformation) {
                    /**
                     * Creates a new symbol information literal.
                     *
                     * @param name The name of the symbol.
                     * @param kind The kind of the symbol.
                     * @param range The range of the location of the symbol.
                     * @param uri The resource of the location of symbol.
                     * @param containerName The name of the symbol containing the symbol.
                     */
                    function create(name, kind, range, uri, containerName) {
                        var result = {
                            name: name,
                            kind: kind,
                            location: {
                                uri: uri,
                                range: range
                            }
                        };
                        if (containerName) {
                            result.containerName = containerName;
                        }
                        return result;
                    }
                    SymbolInformation.create = create;
                })(SymbolInformation || (exports.SymbolInformation = SymbolInformation = {}));
                var WorkspaceSymbol;
                (function(WorkspaceSymbol) {
                    /**
                     * Create a new workspace symbol.
                     *
                     * @param name The name of the symbol.
                     * @param kind The kind of the symbol.
                     * @param uri The resource of the location of the symbol.
                     * @param range An options range of the location.
                     * @returns A WorkspaceSymbol.
                     */
                    function create(name, kind, uri, range) {
                        return range !== undefined ? {
                            name: name,
                            kind: kind,
                            location: {
                                uri: uri,
                                range: range
                            }
                        } : {
                            name: name,
                            kind: kind,
                            location: {
                                uri: uri
                            }
                        };
                    }
                    WorkspaceSymbol.create = create;
                })(WorkspaceSymbol || (exports.WorkspaceSymbol = WorkspaceSymbol = {}));
                var DocumentSymbol;
                (function(DocumentSymbol) {
                    /**
                     * Creates a new symbol information literal.
                     *
                     * @param name The name of the symbol.
                     * @param detail The detail of the symbol.
                     * @param kind The kind of the symbol.
                     * @param range The range of the symbol.
                     * @param selectionRange The selectionRange of the symbol.
                     * @param children Children of the symbol.
                     */
                    function create(name, detail, kind, range, selectionRange, children) {
                        var result = {
                            name: name,
                            detail: detail,
                            kind: kind,
                            range: range,
                            selectionRange: selectionRange
                        };
                        if (children !== undefined) {
                            result.children = children;
                        }
                        return result;
                    }
                    DocumentSymbol.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link DocumentSymbol} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return candidate && Is.string(candidate.name) && Is.number(candidate.kind) && Range.is(candidate.range) && Range.is(candidate.selectionRange) && (candidate.detail === undefined || Is.string(candidate.detail)) && (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && (candidate.children === undefined || Array.isArray(candidate.children)) && (candidate.tags === undefined || Array.isArray(candidate.tags));
                    }
                    DocumentSymbol.is = is;
                })(DocumentSymbol || (exports.DocumentSymbol = DocumentSymbol = {}));
                /**
                 * A set of predefined code action kinds
                 */
                var CodeActionKind;
                (function(CodeActionKind) {
                    /**
                     * Empty kind.
                     */
                    CodeActionKind.Empty = '';
                    /**
                     * Base kind for quickfix actions: 'quickfix'
                     */
                    CodeActionKind.QuickFix = 'quickfix';
                    /**
                     * Base kind for refactoring actions: 'refactor'
                     */
                    CodeActionKind.Refactor = 'refactor';
                    /**
                     * Base kind for refactoring extraction actions: 'refactor.extract'
                     *
                     * Example extract actions:
                     *
                     * - Extract method
                     * - Extract function
                     * - Extract variable
                     * - Extract interface from class
                     * - ...
                     */
                    CodeActionKind.RefactorExtract = 'refactor.extract';
                    /**
                     * Base kind for refactoring inline actions: 'refactor.inline'
                     *
                     * Example inline actions:
                     *
                     * - Inline function
                     * - Inline variable
                     * - Inline constant
                     * - ...
                     */
                    CodeActionKind.RefactorInline = 'refactor.inline';
                    /**
                     * Base kind for refactoring rewrite actions: 'refactor.rewrite'
                     *
                     * Example rewrite actions:
                     *
                     * - Convert JavaScript function to class
                     * - Add or remove parameter
                     * - Encapsulate field
                     * - Make method static
                     * - Move method to base class
                     * - ...
                     */
                    CodeActionKind.RefactorRewrite = 'refactor.rewrite';
                    /**
                     * Base kind for source actions: `source`
                     *
                     * Source code actions apply to the entire file.
                     */
                    CodeActionKind.Source = 'source';
                    /**
                     * Base kind for an organize imports source action: `source.organizeImports`
                     */
                    CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
                    /**
                     * Base kind for auto-fix source actions: `source.fixAll`.
                     *
                     * Fix all actions automatically fix errors that have a clear fix that do not require user input.
                     * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
                     *
                     * @since 3.15.0
                     */
                    CodeActionKind.SourceFixAll = 'source.fixAll';
                })(CodeActionKind || (exports.CodeActionKind = CodeActionKind = {}));
                /**
                 * The reason why code actions were requested.
                 *
                 * @since 3.17.0
                 */
                var CodeActionTriggerKind;
                (function(CodeActionTriggerKind) {
                    /**
                     * Code actions were explicitly requested by the user or by an extension.
                     */
                    CodeActionTriggerKind.Invoked = 1;
                    /**
                     * Code actions were requested automatically.
                     *
                     * This typically happens when current selection in a file changes, but can
                     * also be triggered when file content changes.
                     */
                    CodeActionTriggerKind.Automatic = 2;
                })(CodeActionTriggerKind || (exports.CodeActionTriggerKind = CodeActionTriggerKind = {}));
                /**
                 * The CodeActionContext namespace provides helper functions to work with
                 * {@link CodeActionContext} literals.
                 */
                var CodeActionContext;
                (function(CodeActionContext) {
                    /**
                     * Creates a new CodeActionContext literal.
                     */
                    function create(diagnostics, only, triggerKind) {
                        var result = {
                            diagnostics: diagnostics
                        };
                        if (only !== undefined && only !== null) {
                            result.only = only;
                        }
                        if (triggerKind !== undefined && triggerKind !== null) {
                            result.triggerKind = triggerKind;
                        }
                        return result;
                    }
                    CodeActionContext.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link CodeActionContext} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)) && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
                    }
                    CodeActionContext.is = is;
                })(CodeActionContext || (exports.CodeActionContext = CodeActionContext = {}));
                var CodeAction;
                (function(CodeAction) {
                    function create(title, kindOrCommandOrEdit, kind) {
                        var result = {
                            title: title
                        };
                        var checkKind = true;
                        if (typeof kindOrCommandOrEdit === 'string') {
                            checkKind = false;
                            result.kind = kindOrCommandOrEdit;
                        } else if (Command.is(kindOrCommandOrEdit)) {
                            result.command = kindOrCommandOrEdit;
                        } else {
                            result.edit = kindOrCommandOrEdit;
                        }
                        if (checkKind && kind !== undefined) {
                            result.kind = kind;
                        }
                        return result;
                    }
                    CodeAction.create = create;

                    function is(value) {
                        var candidate = value;
                        return candidate && Is.string(candidate.title) && (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && (candidate.kind === undefined || Is.string(candidate.kind)) && (candidate.edit !== undefined || candidate.command !== undefined) && (candidate.command === undefined || Command.is(candidate.command)) && (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
                    }
                    CodeAction.is = is;
                })(CodeAction || (exports.CodeAction = CodeAction = {}));
                /**
                 * The CodeLens namespace provides helper functions to work with
                 * {@link CodeLens} literals.
                 */
                var CodeLens;
                (function(CodeLens) {
                    /**
                     * Creates a new CodeLens literal.
                     */
                    function create(range, data) {
                        var result = {
                            range: range
                        };
                        if (Is.defined(data)) {
                            result.data = data;
                        }
                        return result;
                    }
                    CodeLens.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link CodeLens} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
                    }
                    CodeLens.is = is;
                })(CodeLens || (exports.CodeLens = CodeLens = {}));
                /**
                 * The FormattingOptions namespace provides helper functions to work with
                 * {@link FormattingOptions} literals.
                 */
                var FormattingOptions;
                (function(FormattingOptions) {
                    /**
                     * Creates a new FormattingOptions literal.
                     */
                    function create(tabSize, insertSpaces) {
                        return {
                            tabSize: tabSize,
                            insertSpaces: insertSpaces
                        };
                    }
                    FormattingOptions.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link FormattingOptions} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
                    }
                    FormattingOptions.is = is;
                })(FormattingOptions || (exports.FormattingOptions = FormattingOptions = {}));
                /**
                 * The DocumentLink namespace provides helper functions to work with
                 * {@link DocumentLink} literals.
                 */
                var DocumentLink;
                (function(DocumentLink) {
                    /**
                     * Creates a new DocumentLink literal.
                     */
                    function create(range, target, data) {
                        return {
                            range: range,
                            target: target,
                            data: data
                        };
                    }
                    DocumentLink.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link DocumentLink} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
                    }
                    DocumentLink.is = is;
                })(DocumentLink || (exports.DocumentLink = DocumentLink = {}));
                /**
                 * The SelectionRange namespace provides helper function to work with
                 * SelectionRange literals.
                 */
                var SelectionRange;
                (function(SelectionRange) {
                    /**
                     * Creates a new SelectionRange
                     * @param range the range.
                     * @param parent an optional parent.
                     */
                    function create(range, parent) {
                        return {
                            range: range,
                            parent: parent
                        };
                    }
                    SelectionRange.create = create;

                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
                    }
                    SelectionRange.is = is;
                })(SelectionRange || (exports.SelectionRange = SelectionRange = {}));
                /**
                 * A set of predefined token types. This set is not fixed
                 * an clients can specify additional token types via the
                 * corresponding client capabilities.
                 *
                 * @since 3.16.0
                 */
                var SemanticTokenTypes;
                (function(SemanticTokenTypes) {
                    SemanticTokenTypes["namespace"] = "namespace";
                    /**
                     * Represents a generic type. Acts as a fallback for types which can't be mapped to
                     * a specific type like class or enum.
                     */
                    SemanticTokenTypes["type"] = "type";
                    SemanticTokenTypes["class"] = "class";
                    SemanticTokenTypes["enum"] = "enum";
                    SemanticTokenTypes["interface"] = "interface";
                    SemanticTokenTypes["struct"] = "struct";
                    SemanticTokenTypes["typeParameter"] = "typeParameter";
                    SemanticTokenTypes["parameter"] = "parameter";
                    SemanticTokenTypes["variable"] = "variable";
                    SemanticTokenTypes["property"] = "property";
                    SemanticTokenTypes["enumMember"] = "enumMember";
                    SemanticTokenTypes["event"] = "event";
                    SemanticTokenTypes["function"] = "function";
                    SemanticTokenTypes["method"] = "method";
                    SemanticTokenTypes["macro"] = "macro";
                    SemanticTokenTypes["keyword"] = "keyword";
                    SemanticTokenTypes["modifier"] = "modifier";
                    SemanticTokenTypes["comment"] = "comment";
                    SemanticTokenTypes["string"] = "string";
                    SemanticTokenTypes["number"] = "number";
                    SemanticTokenTypes["regexp"] = "regexp";
                    SemanticTokenTypes["operator"] = "operator";
                    /**
                     * @since 3.17.0
                     */
                    SemanticTokenTypes["decorator"] = "decorator";
                })(SemanticTokenTypes || (exports.SemanticTokenTypes = SemanticTokenTypes = {}));
                /**
                 * A set of predefined token modifiers. This set is not fixed
                 * an clients can specify additional token types via the
                 * corresponding client capabilities.
                 *
                 * @since 3.16.0
                 */
                var SemanticTokenModifiers;
                (function(SemanticTokenModifiers) {
                    SemanticTokenModifiers["declaration"] = "declaration";
                    SemanticTokenModifiers["definition"] = "definition";
                    SemanticTokenModifiers["readonly"] = "readonly";
                    SemanticTokenModifiers["static"] = "static";
                    SemanticTokenModifiers["deprecated"] = "deprecated";
                    SemanticTokenModifiers["abstract"] = "abstract";
                    SemanticTokenModifiers["async"] = "async";
                    SemanticTokenModifiers["modification"] = "modification";
                    SemanticTokenModifiers["documentation"] = "documentation";
                    SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
                })(SemanticTokenModifiers || (exports.SemanticTokenModifiers = SemanticTokenModifiers = {}));
                /**
                 * @since 3.16.0
                 */
                var SemanticTokens;
                (function(SemanticTokens) {
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') && Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
                    }
                    SemanticTokens.is = is;
                })(SemanticTokens || (exports.SemanticTokens = SemanticTokens = {}));
                /**
                 * The InlineValueText namespace provides functions to deal with InlineValueTexts.
                 *
                 * @since 3.17.0
                 */
                var InlineValueText;
                (function(InlineValueText) {
                    /**
                     * Creates a new InlineValueText literal.
                     */
                    function create(range, text) {
                        return {
                            range: range,
                            text: text
                        };
                    }
                    InlineValueText.create = create;

                    function is(value) {
                        var candidate = value;
                        return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
                    }
                    InlineValueText.is = is;
                })(InlineValueText || (exports.InlineValueText = InlineValueText = {}));
                /**
                 * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.
                 *
                 * @since 3.17.0
                 */
                var InlineValueVariableLookup;
                (function(InlineValueVariableLookup) {
                    /**
                     * Creates a new InlineValueText literal.
                     */
                    function create(range, variableName, caseSensitiveLookup) {
                        return {
                            range: range,
                            variableName: variableName,
                            caseSensitiveLookup: caseSensitiveLookup
                        };
                    }
                    InlineValueVariableLookup.create = create;

                    function is(value) {
                        var candidate = value;
                        return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) && (Is.string(candidate.variableName) || candidate.variableName === undefined);
                    }
                    InlineValueVariableLookup.is = is;
                })(InlineValueVariableLookup || (exports.InlineValueVariableLookup = InlineValueVariableLookup = {}));
                /**
                 * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.
                 *
                 * @since 3.17.0
                 */
                var InlineValueEvaluatableExpression;
                (function(InlineValueEvaluatableExpression) {
                    /**
                     * Creates a new InlineValueEvaluatableExpression literal.
                     */
                    function create(range, expression) {
                        return {
                            range: range,
                            expression: expression
                        };
                    }
                    InlineValueEvaluatableExpression.create = create;

                    function is(value) {
                        var candidate = value;
                        return candidate !== undefined && candidate !== null && Range.is(candidate.range) && (Is.string(candidate.expression) || candidate.expression === undefined);
                    }
                    InlineValueEvaluatableExpression.is = is;
                })(InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {}));
                /**
                 * The InlineValueContext namespace provides helper functions to work with
                 * {@link InlineValueContext} literals.
                 *
                 * @since 3.17.0
                 */
                var InlineValueContext;
                (function(InlineValueContext) {
                    /**
                     * Creates a new InlineValueContext literal.
                     */
                    function create(frameId, stoppedLocation) {
                        return {
                            frameId: frameId,
                            stoppedLocation: stoppedLocation
                        };
                    }
                    InlineValueContext.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link InlineValueContext} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Range.is(value.stoppedLocation);
                    }
                    InlineValueContext.is = is;
                })(InlineValueContext || (exports.InlineValueContext = InlineValueContext = {}));
                /**
                 * Inlay hint kinds.
                 *
                 * @since 3.17.0
                 */
                var InlayHintKind;
                (function(InlayHintKind) {
                    /**
                     * An inlay hint that for a type annotation.
                     */
                    InlayHintKind.Type = 1;
                    /**
                     * An inlay hint that is for a parameter.
                     */
                    InlayHintKind.Parameter = 2;

                    function is(value) {
                        return value === 1 || value === 2;
                    }
                    InlayHintKind.is = is;
                })(InlayHintKind || (exports.InlayHintKind = InlayHintKind = {}));
                var InlayHintLabelPart;
                (function(InlayHintLabelPart) {
                    function create(value) {
                        return {
                            value: value
                        };
                    }
                    InlayHintLabelPart.create = create;

                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.location === undefined || Location.is(candidate.location)) && (candidate.command === undefined || Command.is(candidate.command));
                    }
                    InlayHintLabelPart.is = is;
                })(InlayHintLabelPart || (exports.InlayHintLabelPart = InlayHintLabelPart = {}));
                var InlayHint;
                (function(InlayHint) {
                    function create(position, label, kind) {
                        var result = {
                            position: position,
                            label: label
                        };
                        if (kind !== undefined) {
                            result.kind = kind;
                        }
                        return result;
                    }
                    InlayHint.create = create;

                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && Position.is(candidate.position) && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) && (candidate.kind === undefined || InlayHintKind.is(candidate.kind)) && candidate.textEdits === undefined || Is.typedArray(candidate.textEdits, TextEdit.is) && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft)) && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));
                    }
                    InlayHint.is = is;
                })(InlayHint || (exports.InlayHint = InlayHint = {}));
                var WorkspaceFolder;
                (function(WorkspaceFolder) {
                    function is(value) {
                        var candidate = value;
                        return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);
                    }
                    WorkspaceFolder.is = is;
                })(WorkspaceFolder || (exports.WorkspaceFolder = WorkspaceFolder = {}));
                var EOL = exports.EOL = ['\n', '\r\n', '\r'];
                /**
                 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
                 */
                var TextDocument;
                (function(TextDocument) {
                    /**
                     * Creates a new ITextDocument literal from the given uri and content.
                     * @param uri The document's uri.
                     * @param languageId The document's language Id.
                     * @param version The document's version.
                     * @param content The document's content.
                     */
                    function create(uri, languageId, version, content) {
                        return new FullTextDocument(uri, languageId, version, content);
                    }
                    TextDocument.create = create;
                    /**
                     * Checks whether the given literal conforms to the {@link ITextDocument} interface.
                     */
                    function is(value) {
                        var candidate = value;
                        return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
                    }
                    TextDocument.is = is;

                    function applyEdits(document, edits) {
                        var text = document.getText();
                        var sortedEdits = mergeSort(edits, function(a, b) {
                            var diff = a.range.start.line - b.range.start.line;
                            if (diff === 0) {
                                return a.range.start.character - b.range.start.character;
                            }
                            return diff;
                        });
                        var lastModifiedOffset = text.length;
                        for (var i = sortedEdits.length - 1; i >= 0; i--) {
                            var e = sortedEdits[i];
                            var startOffset = document.offsetAt(e.range.start);
                            var endOffset = document.offsetAt(e.range.end);
                            if (endOffset <= lastModifiedOffset) {
                                text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
                            } else {
                                throw new Error('Overlapping edit');
                            }
                            lastModifiedOffset = startOffset;
                        }
                        return text;
                    }
                    TextDocument.applyEdits = applyEdits;

                    function mergeSort(data, compare) {
                        if (data.length <= 1) {
                            // sorted
                            return data;
                        }
                        var p = data.length / 2 | 0;
                        var left = data.slice(0, p);
                        var right = data.slice(p);
                        mergeSort(left, compare);
                        mergeSort(right, compare);
                        var leftIdx = 0;
                        var rightIdx = 0;
                        var i = 0;
                        while (leftIdx < left.length && rightIdx < right.length) {
                            var ret = compare(left[leftIdx], right[rightIdx]);
                            if (ret <= 0) {
                                // smaller_equal -> take left to preserve order
                                data[i++] = left[leftIdx++];
                            } else {
                                // greater -> take right
                                data[i++] = right[rightIdx++];
                            }
                        }
                        while (leftIdx < left.length) {
                            data[i++] = left[leftIdx++];
                        }
                        while (rightIdx < right.length) {
                            data[i++] = right[rightIdx++];
                        }
                        return data;
                    }
                })(TextDocument || (exports.TextDocument = TextDocument = {}));
                /**
                 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
                 */
                var FullTextDocument = /** @class */ function() {
                    function FullTextDocument(uri, languageId, version, content) {
                        this._uri = uri;
                        this._languageId = languageId;
                        this._version = version;
                        this._content = content;
                        this._lineOffsets = undefined;
                    }
                    Object.defineProperty(FullTextDocument.prototype, "uri", {
                        get: function() {
                            return this._uri;
                        },
                        enumerable: false,
                        configurable: true
                    });
                    Object.defineProperty(FullTextDocument.prototype, "languageId", {
                        get: function() {
                            return this._languageId;
                        },
                        enumerable: false,
                        configurable: true
                    });
                    Object.defineProperty(FullTextDocument.prototype, "version", {
                        get: function() {
                            return this._version;
                        },
                        enumerable: false,
                        configurable: true
                    });
                    FullTextDocument.prototype.getText = function(range) {
                        if (range) {
                            var start = this.offsetAt(range.start);
                            var end = this.offsetAt(range.end);
                            return this._content.substring(start, end);
                        }
                        return this._content;
                    };
                    FullTextDocument.prototype.update = function(event, version) {
                        this._content = event.text;
                        this._version = version;
                        this._lineOffsets = undefined;
                    };
                    FullTextDocument.prototype.getLineOffsets = function() {
                        if (this._lineOffsets === undefined) {
                            var lineOffsets = [];
                            var text = this._content;
                            var isLineStart = true;
                            for (var i = 0; i < text.length; i++) {
                                if (isLineStart) {
                                    lineOffsets.push(i);
                                    isLineStart = false;
                                }
                                var ch = text.charAt(i);
                                isLineStart = ch === '\r' || ch === '\n';
                                if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
                                    i++;
                                }
                            }
                            if (isLineStart && text.length > 0) {
                                lineOffsets.push(text.length);
                            }
                            this._lineOffsets = lineOffsets;
                        }
                        return this._lineOffsets;
                    };
                    FullTextDocument.prototype.positionAt = function(offset) {
                        offset = Math.max(Math.min(offset, this._content.length), 0);
                        var lineOffsets = this.getLineOffsets();
                        var low = 0,
                            high = lineOffsets.length;
                        if (high === 0) {
                            return Position.create(0, offset);
                        }
                        while (low < high) {
                            var mid = Math.floor((low + high) / 2);
                            if (lineOffsets[mid] > offset) {
                                high = mid;
                            } else {
                                low = mid + 1;
                            }
                        }
                        // low is the least x for which the line offset is larger than the current offset
                        // or array.length if no line offset is larger than the current offset
                        var line = low - 1;
                        return Position.create(line, offset - lineOffsets[line]);
                    };
                    FullTextDocument.prototype.offsetAt = function(position) {
                        var lineOffsets = this.getLineOffsets();
                        if (position.line >= lineOffsets.length) {
                            return this._content.length;
                        } else if (position.line < 0) {
                            return 0;
                        }
                        var lineOffset = lineOffsets[position.line];
                        var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length;
                        return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
                    };
                    Object.defineProperty(FullTextDocument.prototype, "lineCount", {
                        get: function() {
                            return this.getLineOffsets().length;
                        },
                        enumerable: false,
                        configurable: true
                    });
                    return FullTextDocument;
                }();
                var Is;
                (function(Is) {
                    var toString = Object.prototype.toString;

                    function defined(value) {
                        return typeof value !== 'undefined';
                    }
                    Is.defined = defined;

                    function undefined(value) {
                        return typeof value === 'undefined';
                    }
                    Is.undefined = undefined;

                    function boolean(value) {
                        return value === true || value === false;
                    }
                    Is.boolean = boolean;

                    function string(value) {
                        return toString.call(value) === '[object String]';
                    }
                    Is.string = string;

                    function number(value) {
                        return toString.call(value) === '[object Number]';
                    }
                    Is.number = number;

                    function numberRange(value, min, max) {
                        return toString.call(value) === '[object Number]' && min <= value && value <= max;
                    }
                    Is.numberRange = numberRange;

                    function integer(value) {
                        return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
                    }
                    Is.integer = integer;

                    function uinteger(value) {
                        return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
                    }
                    Is.uinteger = uinteger;

                    function func(value) {
                        return toString.call(value) === '[object Function]';
                    }
                    Is.func = func;

                    function objectLiteral(value) {
                        // Strictly speaking class instances pass this check as well. Since the LSP
                        // doesn't use classes we ignore this for now. If we do we need to add something
                        // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
                        return value !== null && typeof value === 'object';
                    }
                    Is.objectLiteral = objectLiteral;

                    function typedArray(value, check) {
                        return Array.isArray(value) && value.every(check);
                    }
                    Is.typedArray = typedArray;
                })(Is || (Is = {}));

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/hint.js":
            /*!********************************************!*\
              !*** ../../codemirror-graphql/esm/hint.js ***!
              \********************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                __webpack_require__( /*! codemirror/addon/hint/show-hint.js */ "../../../node_modules/codemirror/addon/hint/show-hint.js");
                var _graphqlLanguageService = __webpack_require__( /*! graphql-language-service */ "../../graphql-language-service/esm/index.js");

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.registerHelper('hint', 'graphql', (editor, options) => {
                    const {
                        schema,
                        externalFragments,
                        autocompleteOptions
                    } = options;
                    if (!schema) {
                        return;
                    }
                    const cur = editor.getCursor();
                    const token = editor.getTokenAt(cur);
                    const tokenStart = token.type !== null && /"|\w/.test(token.string[0]) ? token.start : token.end;
                    const position = new _graphqlLanguageService.Position(cur.line, tokenStart);
                    const rawResults = (0, _graphqlLanguageService.getAutocompleteSuggestions)(schema, editor.getValue(), position, token, externalFragments, autocompleteOptions);
                    const results = {
                        list: rawResults.map(item => {
                            var _a;
                            return {
                                text: (_a = item === null || item === void 0 ? void 0 : item.rawInsert) !== null && _a !== void 0 ? _a : item.label,
                                type: item.type,
                                description: item.documentation,
                                isDeprecated: item.isDeprecated,
                                deprecationReason: item.deprecationReason
                            };
                        }),
                        from: {
                            line: cur.line,
                            ch: tokenStart
                        },
                        to: {
                            line: cur.line,
                            ch: token.end
                        }
                    };
                    if ((results === null || results === void 0 ? void 0 : results.list) && results.list.length > 0) {
                        results.from = _codemirror.default.Pos(results.from.line, results.from.ch);
                        results.to = _codemirror.default.Pos(results.to.line, results.to.ch);
                        _codemirror.default.signal(editor, 'hasCompletion', editor, results, token);
                    }
                    return results;
                });

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/info.js":
            /*!********************************************!*\
              !*** ../../codemirror-graphql/esm/info.js ***!
              \********************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                var _getTypeInfo = _interopRequireDefault(__webpack_require__( /*! ./utils/getTypeInfo */ "../../codemirror-graphql/esm/utils/getTypeInfo.js"));
                var _SchemaReference = __webpack_require__( /*! ./utils/SchemaReference */ "../../codemirror-graphql/esm/utils/SchemaReference.js");
                __webpack_require__( /*! ./utils/info-addon */ "../../codemirror-graphql/esm/utils/info-addon.js");

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.registerHelper('info', 'graphql', (token, options) => {
                    var _a;
                    if (!options.schema || !token.state) {
                        return;
                    }
                    const {
                        kind,
                        step
                    } = token.state;
                    const typeInfo = (0, _getTypeInfo.default)(options.schema, token.state);
                    if (kind === 'Field' && step === 0 && typeInfo.fieldDef || kind === 'AliasedField' && step === 2 && typeInfo.fieldDef || kind === 'ObjectField' && step === 0 && typeInfo.fieldDef) {
                        const header = document.createElement('div');
                        header.className = 'CodeMirror-info-header';
                        renderField(header, typeInfo, options);
                        const into = document.createElement('div');
                        into.append(header);
                        renderDescription(into, options, typeInfo.fieldDef);
                        return into;
                    }
                    if (kind === 'Directive' && step === 1 && typeInfo.directiveDef) {
                        const header = document.createElement('div');
                        header.className = 'CodeMirror-info-header';
                        renderDirective(header, typeInfo, options);
                        const into = document.createElement('div');
                        into.append(header);
                        renderDescription(into, options, typeInfo.directiveDef);
                        return into;
                    }
                    if (kind === 'Argument' && step === 0 && typeInfo.argDef) {
                        const header = document.createElement('div');
                        header.className = 'CodeMirror-info-header';
                        renderArg(header, typeInfo, options);
                        const into = document.createElement('div');
                        into.append(header);
                        renderDescription(into, options, typeInfo.argDef);
                        return into;
                    }
                    if (kind === 'EnumValue' && ((_a = typeInfo.enumValue) === null || _a === void 0 ? void 0 : _a.description)) {
                        const header = document.createElement('div');
                        header.className = 'CodeMirror-info-header';
                        renderEnumValue(header, typeInfo, options);
                        const into = document.createElement('div');
                        into.append(header);
                        renderDescription(into, options, typeInfo.enumValue);
                        return into;
                    }
                    if (kind === 'NamedType' && typeInfo.type && typeInfo.type.description) {
                        const header = document.createElement('div');
                        header.className = 'CodeMirror-info-header';
                        renderType(header, typeInfo, options, typeInfo.type);
                        const into = document.createElement('div');
                        into.append(header);
                        renderDescription(into, options, typeInfo.type);
                        return into;
                    }
                });

                function renderField(into, typeInfo, options) {
                    renderQualifiedField(into, typeInfo, options);
                    renderTypeAnnotation(into, typeInfo, options, typeInfo.type);
                }

                function renderQualifiedField(into, typeInfo, options) {
                    var _a;
                    const fieldName = ((_a = typeInfo.fieldDef) === null || _a === void 0 ? void 0 : _a.name) || '';
                    text(into, fieldName, 'field-name', options, (0, _SchemaReference.getFieldReference)(typeInfo));
                }

                function renderDirective(into, typeInfo, options) {
                    var _a;
                    const name = '@' + (((_a = typeInfo.directiveDef) === null || _a === void 0 ? void 0 : _a.name) || '');
                    text(into, name, 'directive-name', options, (0, _SchemaReference.getDirectiveReference)(typeInfo));
                }

                function renderArg(into, typeInfo, options) {
                    var _a;
                    const name = ((_a = typeInfo.argDef) === null || _a === void 0 ? void 0 : _a.name) || '';
                    text(into, name, 'arg-name', options, (0, _SchemaReference.getArgumentReference)(typeInfo));
                    renderTypeAnnotation(into, typeInfo, options, typeInfo.inputType);
                }

                function renderEnumValue(into, typeInfo, options) {
                    var _a;
                    const name = ((_a = typeInfo.enumValue) === null || _a === void 0 ? void 0 : _a.name) || '';
                    renderType(into, typeInfo, options, typeInfo.inputType);
                    text(into, '.');
                    text(into, name, 'enum-value', options, (0, _SchemaReference.getEnumValueReference)(typeInfo));
                }

                function renderTypeAnnotation(into, typeInfo, options, t) {
                    const typeSpan = document.createElement('span');
                    typeSpan.className = 'type-name-pill';
                    if (t instanceof _graphql.GraphQLNonNull) {
                        renderType(typeSpan, typeInfo, options, t.ofType);
                        text(typeSpan, '!');
                    } else if (t instanceof _graphql.GraphQLList) {
                        text(typeSpan, '[');
                        renderType(typeSpan, typeInfo, options, t.ofType);
                        text(typeSpan, ']');
                    } else {
                        text(typeSpan, (t === null || t === void 0 ? void 0 : t.name) || '', 'type-name', options, (0, _SchemaReference.getTypeReference)(typeInfo, t));
                    }
                    into.append(typeSpan);
                }

                function renderType(into, typeInfo, options, t) {
                    if (t instanceof _graphql.GraphQLNonNull) {
                        renderType(into, typeInfo, options, t.ofType);
                        text(into, '!');
                    } else if (t instanceof _graphql.GraphQLList) {
                        text(into, '[');
                        renderType(into, typeInfo, options, t.ofType);
                        text(into, ']');
                    } else {
                        text(into, (t === null || t === void 0 ? void 0 : t.name) || '', 'type-name', options, (0, _SchemaReference.getTypeReference)(typeInfo, t));
                    }
                }

                function renderDescription(into, options, def) {
                    const {
                        description
                    } = def;
                    if (description) {
                        const descriptionDiv = document.createElement('div');
                        descriptionDiv.className = 'info-description';
                        if (options.renderDescription) {
                            descriptionDiv.innerHTML = options.renderDescription(description);
                        } else {
                            descriptionDiv.append(document.createTextNode(description));
                        }
                        into.append(descriptionDiv);
                    }
                    renderDeprecation(into, options, def);
                }

                function renderDeprecation(into, options, def) {
                    const reason = def.deprecationReason;
                    if (reason) {
                        const deprecationDiv = document.createElement('div');
                        deprecationDiv.className = 'info-deprecation';
                        into.append(deprecationDiv);
                        const label = document.createElement('span');
                        label.className = 'info-deprecation-label';
                        label.append(document.createTextNode('Deprecated'));
                        deprecationDiv.append(label);
                        const reasonDiv = document.createElement('div');
                        reasonDiv.className = 'info-deprecation-reason';
                        if (options.renderDescription) {
                            reasonDiv.innerHTML = options.renderDescription(reason);
                        } else {
                            reasonDiv.append(document.createTextNode(reason));
                        }
                        deprecationDiv.append(reasonDiv);
                    }
                }

                function text(into, content, className = '', options = {
                    onClick: null
                }, ref = null) {
                    if (className) {
                        const {
                            onClick
                        } = options;
                        let node;
                        if (onClick) {
                            node = document.createElement('a');
                            node.href = 'javascript:void 0';
                            node.addEventListener('click', e => {
                                e.preventDefault();
                                onClick(ref, e);
                            });
                        } else {
                            node = document.createElement('span');
                        }
                        node.className = className;
                        node.append(document.createTextNode(content));
                        into.append(node);
                    } else {
                        into.append(document.createTextNode(content));
                    }
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/jump.js":
            /*!********************************************!*\
              !*** ../../codemirror-graphql/esm/jump.js ***!
              \********************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                var _getTypeInfo = _interopRequireDefault(__webpack_require__( /*! ./utils/getTypeInfo */ "../../codemirror-graphql/esm/utils/getTypeInfo.js"));
                var _SchemaReference = __webpack_require__( /*! ./utils/SchemaReference */ "../../codemirror-graphql/esm/utils/SchemaReference.js");
                __webpack_require__( /*! ./utils/jump-addon */ "../../codemirror-graphql/esm/utils/jump-addon.js");

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.registerHelper('jump', 'graphql', (token, options) => {
                    if (!options.schema || !options.onClick || !token.state) {
                        return;
                    }
                    const {
                        state
                    } = token;
                    const {
                        kind,
                        step
                    } = state;
                    const typeInfo = (0, _getTypeInfo.default)(options.schema, state);
                    if (kind === 'Field' && step === 0 && typeInfo.fieldDef || kind === 'AliasedField' && step === 2 && typeInfo.fieldDef) {
                        return (0, _SchemaReference.getFieldReference)(typeInfo);
                    }
                    if (kind === 'Directive' && step === 1 && typeInfo.directiveDef) {
                        return (0, _SchemaReference.getDirectiveReference)(typeInfo);
                    }
                    if (kind === 'Argument' && step === 0 && typeInfo.argDef) {
                        return (0, _SchemaReference.getArgumentReference)(typeInfo);
                    }
                    if (kind === 'EnumValue' && typeInfo.enumValue) {
                        return (0, _SchemaReference.getEnumValueReference)(typeInfo);
                    }
                    if (kind === 'NamedType' && typeInfo.type) {
                        return (0, _SchemaReference.getTypeReference)(typeInfo);
                    }
                });

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/lint.js":
            /*!********************************************!*\
              !*** ../../codemirror-graphql/esm/lint.js ***!
              \********************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                var _graphqlLanguageService = __webpack_require__( /*! graphql-language-service */ "../../graphql-language-service/esm/index.js");

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                const SEVERITY = ['error', 'warning', 'information', 'hint'];
                const TYPE = {
                    'GraphQL: Validation': 'validation',
                    'GraphQL: Deprecation': 'deprecation',
                    'GraphQL: Syntax': 'syntax'
                };
                _codemirror.default.registerHelper('lint', 'graphql', (text, options) => {
                    const {
                        schema,
                        validationRules,
                        externalFragments
                    } = options;
                    const rawResults = (0, _graphqlLanguageService.getDiagnostics)(text, schema, validationRules, undefined, externalFragments);
                    const results = rawResults.map(error => ({
                        message: error.message,
                        severity: error.severity ? SEVERITY[error.severity - 1] : SEVERITY[0],
                        type: error.source ? TYPE[error.source] : undefined,
                        from: _codemirror.default.Pos(error.range.start.line, error.range.start.character),
                        to: _codemirror.default.Pos(error.range.end.line, error.range.end.character)
                    }));
                    return results;
                });

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/mode.js":
            /*!********************************************!*\
              !*** ../../codemirror-graphql/esm/mode.js ***!
              \********************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                var _modeFactory = _interopRequireDefault(__webpack_require__( /*! ./utils/mode-factory */ "../../codemirror-graphql/esm/utils/mode-factory.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.defineMode('graphql', _modeFactory.default);

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/results/mode.js":
            /*!****************************************************!*\
              !*** ../../codemirror-graphql/esm/results/mode.js ***!
              \****************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                var _graphqlLanguageService = __webpack_require__( /*! graphql-language-service */ "../../graphql-language-service/esm/index.js");
                var _modeIndent = _interopRequireDefault(__webpack_require__( /*! ../utils/mode-indent */ "../../codemirror-graphql/esm/utils/mode-indent.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.defineMode('graphql-results', config => {
                    const parser = (0, _graphqlLanguageService.onlineParser)({
                        eatWhitespace: stream => stream.eatSpace(),
                        lexRules: LexRules,
                        parseRules: ParseRules,
                        editorConfig: {
                            tabSize: config.tabSize
                        }
                    });
                    return {
                        config,
                        startState: parser.startState,
                        token: parser.token,
                        indent: _modeIndent.default,
                        electricInput: /^\s*[}\]]/,
                        fold: 'brace',
                        closeBrackets: {
                            pairs: '[]{}""',
                            explode: '[]{}'
                        }
                    };
                });
                const LexRules = {
                    Punctuation: /^\[|]|\{|\}|:|,/,
                    Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
                    String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,
                    Keyword: /^true|false|null/
                };
                const ParseRules = {
                    Document: [(0, _graphqlLanguageService.p)('{'), (0, _graphqlLanguageService.list)('Entry', (0, _graphqlLanguageService.p)(',')), (0, _graphqlLanguageService.p)('}')],
                    Entry: [(0, _graphqlLanguageService.t)('String', 'def'), (0, _graphqlLanguageService.p)(':'), 'Value'],
                    Value(token) {
                        switch (token.kind) {
                            case 'Number':
                                return 'NumberValue';
                            case 'String':
                                return 'StringValue';
                            case 'Punctuation':
                                switch (token.value) {
                                    case '[':
                                        return 'ListValue';
                                    case '{':
                                        return 'ObjectValue';
                                }
                                return null;
                            case 'Keyword':
                                switch (token.value) {
                                    case 'true':
                                    case 'false':
                                        return 'BooleanValue';
                                    case 'null':
                                        return 'NullValue';
                                }
                                return null;
                        }
                    },
                    NumberValue: [(0, _graphqlLanguageService.t)('Number', 'number')],
                    StringValue: [(0, _graphqlLanguageService.t)('String', 'string')],
                    BooleanValue: [(0, _graphqlLanguageService.t)('Keyword', 'builtin')],
                    NullValue: [(0, _graphqlLanguageService.t)('Keyword', 'keyword')],
                    ListValue: [(0, _graphqlLanguageService.p)('['), (0, _graphqlLanguageService.list)('Value', (0, _graphqlLanguageService.p)(',')), (0, _graphqlLanguageService.p)(']')],
                    ObjectValue: [(0, _graphqlLanguageService.p)('{'), (0, _graphqlLanguageService.list)('ObjectField', (0, _graphqlLanguageService.p)(',')), (0, _graphqlLanguageService.p)('}')],
                    ObjectField: [(0, _graphqlLanguageService.t)('String', 'property'), (0, _graphqlLanguageService.p)(':'), 'Value']
                };

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/utils/SchemaReference.js":
            /*!*************************************************************!*\
              !*** ../../codemirror-graphql/esm/utils/SchemaReference.js ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getArgumentReference = getArgumentReference;
                exports.getDirectiveReference = getDirectiveReference;
                exports.getEnumValueReference = getEnumValueReference;
                exports.getFieldReference = getFieldReference;
                exports.getTypeReference = getTypeReference;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");

                function getFieldReference(typeInfo) {
                    return {
                        kind: 'Field',
                        schema: typeInfo.schema,
                        field: typeInfo.fieldDef,
                        type: isMetaField(typeInfo.fieldDef) ? null : typeInfo.parentType
                    };
                }

                function getDirectiveReference(typeInfo) {
                    return {
                        kind: 'Directive',
                        schema: typeInfo.schema,
                        directive: typeInfo.directiveDef
                    };
                }

                function getArgumentReference(typeInfo) {
                    return typeInfo.directiveDef ? {
                        kind: 'Argument',
                        schema: typeInfo.schema,
                        argument: typeInfo.argDef,
                        directive: typeInfo.directiveDef
                    } : {
                        kind: 'Argument',
                        schema: typeInfo.schema,
                        argument: typeInfo.argDef,
                        field: typeInfo.fieldDef,
                        type: isMetaField(typeInfo.fieldDef) ? null : typeInfo.parentType
                    };
                }

                function getEnumValueReference(typeInfo) {
                    return {
                        kind: 'EnumValue',
                        value: typeInfo.enumValue || undefined,
                        type: typeInfo.inputType ? (0, _graphql.getNamedType)(typeInfo.inputType) : undefined
                    };
                }

                function getTypeReference(typeInfo, type) {
                    return {
                        kind: 'Type',
                        schema: typeInfo.schema,
                        type: type || typeInfo.type
                    };
                }

                function isMetaField(fieldDef) {
                    return fieldDef.name.slice(0, 2) === '__';
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/utils/forEachState.js":
            /*!**********************************************************!*\
              !*** ../../codemirror-graphql/esm/utils/forEachState.js ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = forEachState;

                function forEachState(stack, fn) {
                    const reverseStateStack = [];
                    let state = stack;
                    while (state === null || state === void 0 ? void 0 : state.kind) {
                        reverseStateStack.push(state);
                        state = state.prevState;
                    }
                    for (let i = reverseStateStack.length - 1; i >= 0; i--) {
                        fn(reverseStateStack[i]);
                    }
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/utils/getTypeInfo.js":
            /*!*********************************************************!*\
              !*** ../../codemirror-graphql/esm/utils/getTypeInfo.js ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = getTypeInfo;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _forEachState = _interopRequireDefault(__webpack_require__( /*! ./forEachState */ "../../codemirror-graphql/esm/utils/forEachState.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }

                function getTypeInfo(schema, tokenState) {
                    const info = {
                        schema,
                        type: null,
                        parentType: null,
                        inputType: null,
                        directiveDef: null,
                        fieldDef: null,
                        argDef: null,
                        argDefs: null,
                        objectFieldDefs: null
                    };
                    (0, _forEachState.default)(tokenState, state => {
                        var _a, _b;
                        switch (state.kind) {
                            case 'Query':
                            case 'ShortQuery':
                                info.type = schema.getQueryType();
                                break;
                            case 'Mutation':
                                info.type = schema.getMutationType();
                                break;
                            case 'Subscription':
                                info.type = schema.getSubscriptionType();
                                break;
                            case 'InlineFragment':
                            case 'FragmentDefinition':
                                if (state.type) {
                                    info.type = schema.getType(state.type);
                                }
                                break;
                            case 'Field':
                            case 'AliasedField':
                                info.fieldDef = info.type && state.name ? getFieldDef(schema, info.parentType, state.name) : null;
                                info.type = (_a = info.fieldDef) === null || _a === void 0 ? void 0 : _a.type;
                                break;
                            case 'SelectionSet':
                                info.parentType = info.type ? (0, _graphql.getNamedType)(info.type) : null;
                                break;
                            case 'Directive':
                                info.directiveDef = state.name ? schema.getDirective(state.name) : null;
                                break;
                            case 'Arguments':
                                const parentDef = state.prevState ? state.prevState.kind === 'Field' ? info.fieldDef : state.prevState.kind === 'Directive' ? info.directiveDef : state.prevState.kind === 'AliasedField' ? state.prevState.name && getFieldDef(schema, info.parentType, state.prevState.name) : null : null;
                                info.argDefs = parentDef ? parentDef.args : null;
                                break;
                            case 'Argument':
                                info.argDef = null;
                                if (info.argDefs) {
                                    for (let i = 0; i < info.argDefs.length; i++) {
                                        if (info.argDefs[i].name === state.name) {
                                            info.argDef = info.argDefs[i];
                                            break;
                                        }
                                    }
                                }
                                info.inputType = (_b = info.argDef) === null || _b === void 0 ? void 0 : _b.type;
                                break;
                            case 'EnumValue':
                                const enumType = info.inputType ? (0, _graphql.getNamedType)(info.inputType) : null;
                                info.enumValue = enumType instanceof _graphql.GraphQLEnumType ? find(enumType.getValues(), val => val.value === state.name) : null;
                                break;
                            case 'ListValue':
                                const nullableType = info.inputType ? (0, _graphql.getNullableType)(info.inputType) : null;
                                info.inputType = nullableType instanceof _graphql.GraphQLList ? nullableType.ofType : null;
                                break;
                            case 'ObjectValue':
                                const objectType = info.inputType ? (0, _graphql.getNamedType)(info.inputType) : null;
                                info.objectFieldDefs = objectType instanceof _graphql.GraphQLInputObjectType ? objectType.getFields() : null;
                                break;
                            case 'ObjectField':
                                const objectField = state.name && info.objectFieldDefs ? info.objectFieldDefs[state.name] : null;
                                info.inputType = objectField === null || objectField === void 0 ? void 0 : objectField.type;
                                info.fieldDef = objectField;
                                break;
                            case 'NamedType':
                                info.type = state.name ? schema.getType(state.name) : null;
                                break;
                        }
                    });
                    return info;
                }

                function getFieldDef(schema, type, fieldName) {
                    if (fieldName === _graphql.SchemaMetaFieldDef.name && schema.getQueryType() === type) {
                        return _graphql.SchemaMetaFieldDef;
                    }
                    if (fieldName === _graphql.TypeMetaFieldDef.name && schema.getQueryType() === type) {
                        return _graphql.TypeMetaFieldDef;
                    }
                    if (fieldName === _graphql.TypeNameMetaFieldDef.name && (0, _graphql.isCompositeType)(type)) {
                        return _graphql.TypeNameMetaFieldDef;
                    }
                    if (type && type.getFields) {
                        return type.getFields()[fieldName];
                    }
                }

                function find(array, predicate) {
                    for (let i = 0; i < array.length; i++) {
                        if (predicate(array[i])) {
                            return array[i];
                        }
                    }
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/utils/hintList.js":
            /*!******************************************************!*\
              !*** ../../codemirror-graphql/esm/utils/hintList.js ***!
              \******************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = hintList;

                function hintList(cursor, token, list) {
                    const hints = filterAndSortList(list, normalizeText(token.string));
                    if (!hints) {
                        return;
                    }
                    const tokenStart = token.type !== null && /"|\w/.test(token.string[0]) ? token.start : token.end;
                    return {
                        list: hints,
                        from: {
                            line: cursor.line,
                            ch: tokenStart
                        },
                        to: {
                            line: cursor.line,
                            ch: token.end
                        }
                    };
                }

                function filterAndSortList(list, text) {
                    if (!text) {
                        return filterNonEmpty(list, entry => !entry.isDeprecated);
                    }
                    const byProximity = list.map(entry => ({
                        proximity: getProximity(normalizeText(entry.text), text),
                        entry
                    }));
                    const conciseMatches = filterNonEmpty(filterNonEmpty(byProximity, pair => pair.proximity <= 2), pair => !pair.entry.isDeprecated);
                    const sortedMatches = conciseMatches.sort((a, b) => (a.entry.isDeprecated ? 1 : 0) - (b.entry.isDeprecated ? 1 : 0) || a.proximity - b.proximity || a.entry.text.length - b.entry.text.length);
                    return sortedMatches.map(pair => pair.entry);
                }

                function filterNonEmpty(array, predicate) {
                    const filtered = array.filter(predicate);
                    return filtered.length === 0 ? array : filtered;
                }

                function normalizeText(text) {
                    return text.toLowerCase().replaceAll(/\W/g, '');
                }

                function getProximity(suggestion, text) {
                    let proximity = lexicalDistance(text, suggestion);
                    if (suggestion.length > text.length) {
                        proximity -= suggestion.length - text.length - 1;
                        proximity += suggestion.indexOf(text) === 0 ? 0 : 0.5;
                    }
                    return proximity;
                }

                function lexicalDistance(a, b) {
                    let i;
                    let j;
                    const d = [];
                    const aLength = a.length;
                    const bLength = b.length;
                    for (i = 0; i <= aLength; i++) {
                        d[i] = [i];
                    }
                    for (j = 1; j <= bLength; j++) {
                        d[0][j] = j;
                    }
                    for (i = 1; i <= aLength; i++) {
                        for (j = 1; j <= bLength; j++) {
                            const cost = a[i - 1] === b[j - 1] ? 0 : 1;
                            d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost);
                            if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
                                d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost);
                            }
                        }
                    }
                    return d[aLength][bLength];
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/utils/info-addon.js":
            /*!********************************************************!*\
              !*** ../../codemirror-graphql/esm/utils/info-addon.js ***!
              \********************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.defineOption('info', false, (cm, options, old) => {
                    if (old && old !== _codemirror.default.Init) {
                        const oldOnMouseOver = cm.state.info.onMouseOver;
                        _codemirror.default.off(cm.getWrapperElement(), 'mouseover', oldOnMouseOver);
                        clearTimeout(cm.state.info.hoverTimeout);
                        delete cm.state.info;
                    }
                    if (options) {
                        const state = cm.state.info = createState(options);
                        state.onMouseOver = onMouseOver.bind(null, cm);
                        _codemirror.default.on(cm.getWrapperElement(), 'mouseover', state.onMouseOver);
                    }
                });

                function createState(options) {
                    return {
                        options: options instanceof Function ? {
                            render: options
                        } : options === true ? {} : options
                    };
                }

                function getHoverTime(cm) {
                    const {
                        options
                    } = cm.state.info;
                    return (options === null || options === void 0 ? void 0 : options.hoverTime) || 500;
                }

                function onMouseOver(cm, e) {
                    const state = cm.state.info;
                    const target = e.target || e.srcElement;
                    if (!(target instanceof HTMLElement)) {
                        return;
                    }
                    if (target.nodeName !== 'SPAN' || state.hoverTimeout !== undefined) {
                        return;
                    }
                    const box = target.getBoundingClientRect();
                    const onMouseMove = function() {
                        clearTimeout(state.hoverTimeout);
                        state.hoverTimeout = setTimeout(onHover, hoverTime);
                    };
                    const onMouseOut = function() {
                        _codemirror.default.off(document, 'mousemove', onMouseMove);
                        _codemirror.default.off(cm.getWrapperElement(), 'mouseout', onMouseOut);
                        clearTimeout(state.hoverTimeout);
                        state.hoverTimeout = undefined;
                    };
                    const onHover = function() {
                        _codemirror.default.off(document, 'mousemove', onMouseMove);
                        _codemirror.default.off(cm.getWrapperElement(), 'mouseout', onMouseOut);
                        state.hoverTimeout = undefined;
                        onMouseHover(cm, box);
                    };
                    const hoverTime = getHoverTime(cm);
                    state.hoverTimeout = setTimeout(onHover, hoverTime);
                    _codemirror.default.on(document, 'mousemove', onMouseMove);
                    _codemirror.default.on(cm.getWrapperElement(), 'mouseout', onMouseOut);
                }

                function onMouseHover(cm, box) {
                    const pos = cm.coordsChar({
                        left: (box.left + box.right) / 2,
                        top: (box.top + box.bottom) / 2
                    }, 'window');
                    const state = cm.state.info;
                    const {
                        options
                    } = state;
                    const render = options.render || cm.getHelper(pos, 'info');
                    if (render) {
                        const token = cm.getTokenAt(pos, true);
                        if (token) {
                            const info = render(token, options, cm, pos);
                            if (info) {
                                showPopup(cm, box, info);
                            }
                        }
                    }
                }

                function showPopup(cm, box, info) {
                    const popup = document.createElement('div');
                    popup.className = 'CodeMirror-info';
                    popup.append(info);
                    document.body.append(popup);
                    const popupBox = popup.getBoundingClientRect();
                    const popupStyle = window.getComputedStyle(popup);
                    const popupWidth = popupBox.right - popupBox.left + parseFloat(popupStyle.marginLeft) + parseFloat(popupStyle.marginRight);
                    const popupHeight = popupBox.bottom - popupBox.top + parseFloat(popupStyle.marginTop) + parseFloat(popupStyle.marginBottom);
                    let topPos = box.bottom;
                    if (popupHeight > window.innerHeight - box.bottom - 15 && box.top > window.innerHeight - box.bottom) {
                        topPos = box.top - popupHeight;
                    }
                    if (topPos < 0) {
                        topPos = box.bottom;
                    }
                    let leftPos = Math.max(0, window.innerWidth - popupWidth - 15);
                    if (leftPos > box.left) {
                        leftPos = box.left;
                    }
                    popup.style.opacity = '1';
                    popup.style.top = topPos + 'px';
                    popup.style.left = leftPos + 'px';
                    let popupTimeout;
                    const onMouseOverPopup = function() {
                        clearTimeout(popupTimeout);
                    };
                    const onMouseOut = function() {
                        clearTimeout(popupTimeout);
                        popupTimeout = setTimeout(hidePopup, 200);
                    };
                    const hidePopup = function() {
                        _codemirror.default.off(popup, 'mouseover', onMouseOverPopup);
                        _codemirror.default.off(popup, 'mouseout', onMouseOut);
                        _codemirror.default.off(cm.getWrapperElement(), 'mouseout', onMouseOut);
                        if (popup.style.opacity) {
                            popup.style.opacity = '0';
                            setTimeout(() => {
                                if (popup.parentNode) {
                                    popup.remove();
                                }
                            }, 600);
                        } else if (popup.parentNode) {
                            popup.remove();
                        }
                    };
                    _codemirror.default.on(popup, 'mouseover', onMouseOverPopup);
                    _codemirror.default.on(popup, 'mouseout', onMouseOut);
                    _codemirror.default.on(cm.getWrapperElement(), 'mouseout', onMouseOut);
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/utils/jsonParse.js":
            /*!*******************************************************!*\
              !*** ../../codemirror-graphql/esm/utils/jsonParse.js ***!
              \*******************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.JSONSyntaxError = void 0;
                exports["default"] = jsonParse;

                function jsonParse(str) {
                    string = str;
                    strLen = str.length;
                    start = end = lastEnd = -1;
                    ch();
                    lex();
                    const ast = parseObj();
                    expect('EOF');
                    return ast;
                }
                let string;
                let strLen;
                let start;
                let end;
                let lastEnd;
                let code;
                let kind;

                function parseObj() {
                    const nodeStart = start;
                    const members = [];
                    expect('{');
                    if (!skip('}')) {
                        do {
                            members.push(parseMember());
                        } while (skip(','));
                        expect('}');
                    }
                    return {
                        kind: 'Object',
                        start: nodeStart,
                        end: lastEnd,
                        members
                    };
                }

                function parseMember() {
                    const nodeStart = start;
                    const key = kind === 'String' ? curToken() : null;
                    expect('String');
                    expect(':');
                    const value = parseVal();
                    return {
                        kind: 'Member',
                        start: nodeStart,
                        end: lastEnd,
                        key,
                        value
                    };
                }

                function parseArr() {
                    const nodeStart = start;
                    const values = [];
                    expect('[');
                    if (!skip(']')) {
                        do {
                            values.push(parseVal());
                        } while (skip(','));
                        expect(']');
                    }
                    return {
                        kind: 'Array',
                        start: nodeStart,
                        end: lastEnd,
                        values
                    };
                }

                function parseVal() {
                    switch (kind) {
                        case '[':
                            return parseArr();
                        case '{':
                            return parseObj();
                        case 'String':
                        case 'Number':
                        case 'Boolean':
                        case 'Null':
                            const token = curToken();
                            lex();
                            return token;
                    }
                    expect('Value');
                }

                function curToken() {
                    return {
                        kind,
                        start,
                        end,
                        value: JSON.parse(string.slice(start, end))
                    };
                }

                function expect(str) {
                    if (kind === str) {
                        lex();
                        return;
                    }
                    let found;
                    if (kind === 'EOF') {
                        found = '[end of file]';
                    } else if (end - start > 1) {
                        found = '`' + string.slice(start, end) + '`';
                    } else {
                        const match = string.slice(start).match(/^.+?\b/);
                        found = '`' + (match ? match[0] : string[start]) + '`';
                    }
                    throw syntaxError(`Expected ${str} but found ${found}.`);
                }
                class JSONSyntaxError extends Error {
                    constructor(message, position) {
                        super(message);
                        this.position = position;
                    }
                }
                exports.JSONSyntaxError = JSONSyntaxError;

                function syntaxError(message) {
                    return new JSONSyntaxError(message, {
                        start,
                        end
                    });
                }

                function skip(k) {
                    if (kind === k) {
                        lex();
                        return true;
                    }
                }

                function ch() {
                    if (end < strLen) {
                        end++;
                        code = end === strLen ? 0 : string.charCodeAt(end);
                    }
                    return code;
                }

                function lex() {
                    lastEnd = end;
                    while (code === 9 || code === 10 || code === 13 || code === 32) {
                        ch();
                    }
                    if (code === 0) {
                        kind = 'EOF';
                        return;
                    }
                    start = end;
                    switch (code) {
                        case 34:
                            kind = 'String';
                            return readString();
                        case 45:
                        case 48:
                        case 49:
                        case 50:
                        case 51:
                        case 52:
                        case 53:
                        case 54:
                        case 55:
                        case 56:
                        case 57:
                            kind = 'Number';
                            return readNumber();
                        case 102:
                            if (string.slice(start, start + 5) !== 'false') {
                                break;
                            }
                            end += 4;
                            ch();
                            kind = 'Boolean';
                            return;
                        case 110:
                            if (string.slice(start, start + 4) !== 'null') {
                                break;
                            }
                            end += 3;
                            ch();
                            kind = 'Null';
                            return;
                        case 116:
                            if (string.slice(start, start + 4) !== 'true') {
                                break;
                            }
                            end += 3;
                            ch();
                            kind = 'Boolean';
                            return;
                    }
                    kind = string[start];
                    ch();
                }

                function readString() {
                    ch();
                    while (code !== 34 && code > 31) {
                        if (code === 92) {
                            code = ch();
                            switch (code) {
                                case 34:
                                case 47:
                                case 92:
                                case 98:
                                case 102:
                                case 110:
                                case 114:
                                case 116:
                                    ch();
                                    break;
                                case 117:
                                    ch();
                                    readHex();
                                    readHex();
                                    readHex();
                                    readHex();
                                    break;
                                default:
                                    throw syntaxError('Bad character escape sequence.');
                            }
                        } else if (end === strLen) {
                            throw syntaxError('Unterminated string.');
                        } else {
                            ch();
                        }
                    }
                    if (code === 34) {
                        ch();
                        return;
                    }
                    throw syntaxError('Unterminated string.');
                }

                function readHex() {
                    if (code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102) {
                        return ch();
                    }
                    throw syntaxError('Expected hexadecimal digit.');
                }

                function readNumber() {
                    if (code === 45) {
                        ch();
                    }
                    if (code === 48) {
                        ch();
                    } else {
                        readDigits();
                    }
                    if (code === 46) {
                        ch();
                        readDigits();
                    }
                    if (code === 69 || code === 101) {
                        code = ch();
                        if (code === 43 || code === 45) {
                            ch();
                        }
                        readDigits();
                    }
                }

                function readDigits() {
                    if (code < 48 || code > 57) {
                        throw syntaxError('Expected decimal digit.');
                    }
                    do {
                        ch();
                    } while (code >= 48 && code <= 57);
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/utils/jump-addon.js":
            /*!********************************************************!*\
              !*** ../../codemirror-graphql/esm/utils/jump-addon.js ***!
              \********************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.defineOption('jump', false, (cm, options, old) => {
                    if (old && old !== _codemirror.default.Init) {
                        const oldOnMouseOver = cm.state.jump.onMouseOver;
                        _codemirror.default.off(cm.getWrapperElement(), 'mouseover', oldOnMouseOver);
                        const oldOnMouseOut = cm.state.jump.onMouseOut;
                        _codemirror.default.off(cm.getWrapperElement(), 'mouseout', oldOnMouseOut);
                        _codemirror.default.off(document, 'keydown', cm.state.jump.onKeyDown);
                        delete cm.state.jump;
                    }
                    if (options) {
                        const state = cm.state.jump = {
                            options,
                            onMouseOver: onMouseOver.bind(null, cm),
                            onMouseOut: onMouseOut.bind(null, cm),
                            onKeyDown: onKeyDown.bind(null, cm)
                        };
                        _codemirror.default.on(cm.getWrapperElement(), 'mouseover', state.onMouseOver);
                        _codemirror.default.on(cm.getWrapperElement(), 'mouseout', state.onMouseOut);
                        _codemirror.default.on(document, 'keydown', state.onKeyDown);
                    }
                });

                function onMouseOver(cm, event) {
                    const target = event.target || event.srcElement;
                    if (!(target instanceof HTMLElement)) {
                        return;
                    }
                    if ((target === null || target === void 0 ? void 0 : target.nodeName) !== 'SPAN') {
                        return;
                    }
                    const box = target.getBoundingClientRect();
                    const cursor = {
                        left: (box.left + box.right) / 2,
                        top: (box.top + box.bottom) / 2
                    };
                    cm.state.jump.cursor = cursor;
                    if (cm.state.jump.isHoldingModifier) {
                        enableJumpMode(cm);
                    }
                }

                function onMouseOut(cm) {
                    if (!cm.state.jump.isHoldingModifier && cm.state.jump.cursor) {
                        cm.state.jump.cursor = null;
                        return;
                    }
                    if (cm.state.jump.isHoldingModifier && cm.state.jump.marker) {
                        disableJumpMode(cm);
                    }
                }

                function onKeyDown(cm, event) {
                    if (cm.state.jump.isHoldingModifier || !isJumpModifier(event.key)) {
                        return;
                    }
                    cm.state.jump.isHoldingModifier = true;
                    if (cm.state.jump.cursor) {
                        enableJumpMode(cm);
                    }
                    const onKeyUp = upEvent => {
                        if (upEvent.code !== event.code) {
                            return;
                        }
                        cm.state.jump.isHoldingModifier = false;
                        if (cm.state.jump.marker) {
                            disableJumpMode(cm);
                        }
                        _codemirror.default.off(document, 'keyup', onKeyUp);
                        _codemirror.default.off(document, 'click', onClick);
                        cm.off('mousedown', onMouseDown);
                    };
                    const onClick = clickEvent => {
                        const {
                            destination,
                            options
                        } = cm.state.jump;
                        if (destination) {
                            options.onClick(destination, clickEvent);
                        }
                    };
                    const onMouseDown = (_, downEvent) => {
                        if (cm.state.jump.destination) {
                            downEvent.codemirrorIgnore = true;
                        }
                    };
                    _codemirror.default.on(document, 'keyup', onKeyUp);
                    _codemirror.default.on(document, 'click', onClick);
                    cm.on('mousedown', onMouseDown);
                }
                const isMac = typeof navigator !== 'undefined' && navigator.userAgent.includes('Mac');

                function isJumpModifier(key) {
                    return key === (isMac ? 'Meta' : 'Control');
                }

                function enableJumpMode(cm) {
                    if (cm.state.jump.marker) {
                        return;
                    }
                    const {
                        cursor,
                        options
                    } = cm.state.jump;
                    const pos = cm.coordsChar(cursor);
                    const token = cm.getTokenAt(pos, true);
                    const getDestination = options.getDestination || cm.getHelper(pos, 'jump');
                    if (getDestination) {
                        const destination = getDestination(token, options, cm);
                        if (destination) {
                            const marker = cm.markText({
                                line: pos.line,
                                ch: token.start
                            }, {
                                line: pos.line,
                                ch: token.end
                            }, {
                                className: 'CodeMirror-jump-token'
                            });
                            cm.state.jump.marker = marker;
                            cm.state.jump.destination = destination;
                        }
                    }
                }

                function disableJumpMode(cm) {
                    const {
                        marker
                    } = cm.state.jump;
                    cm.state.jump.marker = null;
                    cm.state.jump.destination = null;
                    marker.clear();
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/utils/mode-factory.js":
            /*!**********************************************************!*\
              !*** ../../codemirror-graphql/esm/utils/mode-factory.js ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = void 0;
                var _graphqlLanguageService = __webpack_require__( /*! graphql-language-service */ "../../graphql-language-service/esm/index.js");
                var _modeIndent = _interopRequireDefault(__webpack_require__( /*! ./mode-indent */ "../../codemirror-graphql/esm/utils/mode-indent.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                const graphqlModeFactory = config => {
                    const parser = (0, _graphqlLanguageService.onlineParser)({
                        eatWhitespace: stream => stream.eatWhile(_graphqlLanguageService.isIgnored),
                        lexRules: _graphqlLanguageService.LexRules,
                        parseRules: _graphqlLanguageService.ParseRules,
                        editorConfig: {
                            tabSize: config.tabSize
                        }
                    });
                    return {
                        config,
                        startState: parser.startState,
                        token: parser.token,
                        indent: _modeIndent.default,
                        electricInput: /^\s*[})\]]/,
                        fold: 'brace',
                        lineComment: '#',
                        closeBrackets: {
                            pairs: '()[]{}""',
                            explode: '()[]{}'
                        }
                    };
                };
                var _default = exports["default"] = graphqlModeFactory;

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/utils/mode-indent.js":
            /*!*********************************************************!*\
              !*** ../../codemirror-graphql/esm/utils/mode-indent.js ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = indent;

                function indent(state, textAfter) {
                    var _a, _b;
                    const {
                        levels,
                        indentLevel
                    } = state;
                    const level = !levels || levels.length === 0 ? indentLevel : levels.at(-1) - (((_a = this.electricInput) === null || _a === void 0 ? void 0 : _a.test(textAfter)) ? 1 : 0);
                    return (level || 0) * (((_b = this.config) === null || _b === void 0 ? void 0 : _b.indentUnit) || 0);
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/variables/hint.js":
            /*!******************************************************!*\
              !*** ../../codemirror-graphql/esm/variables/hint.js ***!
              \******************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _forEachState = _interopRequireDefault(__webpack_require__( /*! ../utils/forEachState */ "../../codemirror-graphql/esm/utils/forEachState.js"));
                var _hintList = _interopRequireDefault(__webpack_require__( /*! ../utils/hintList */ "../../codemirror-graphql/esm/utils/hintList.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.registerHelper('hint', 'graphql-variables', (editor, options) => {
                    const cur = editor.getCursor();
                    const token = editor.getTokenAt(cur);
                    const results = getVariablesHint(cur, token, options);
                    if ((results === null || results === void 0 ? void 0 : results.list) && results.list.length > 0) {
                        results.from = _codemirror.default.Pos(results.from.line, results.from.ch);
                        results.to = _codemirror.default.Pos(results.to.line, results.to.ch);
                        _codemirror.default.signal(editor, 'hasCompletion', editor, results, token);
                    }
                    return results;
                });

                function getVariablesHint(cur, token, options) {
                    const state = token.state.kind === 'Invalid' ? token.state.prevState : token.state;
                    const {
                        kind,
                        step
                    } = state;
                    if (kind === 'Document' && step === 0) {
                        return (0, _hintList.default)(cur, token, [{
                            text: '{'
                        }]);
                    }
                    const {
                        variableToType
                    } = options;
                    if (!variableToType) {
                        return;
                    }
                    const typeInfo = getTypeInfo(variableToType, token.state);
                    if (kind === 'Document' || kind === 'Variable' && step === 0) {
                        const variableNames = Object.keys(variableToType);
                        return (0, _hintList.default)(cur, token, variableNames.map(name => ({
                            text: `"${name}": `,
                            type: variableToType[name]
                        })));
                    }
                    if ((kind === 'ObjectValue' || kind === 'ObjectField' && step === 0) && typeInfo.fields) {
                        const inputFields = Object.keys(typeInfo.fields).map(fieldName => typeInfo.fields[fieldName]);
                        return (0, _hintList.default)(cur, token, inputFields.map(field => ({
                            text: `"${field.name}": `,
                            type: field.type,
                            description: field.description
                        })));
                    }
                    if (kind === 'StringValue' || kind === 'NumberValue' || kind === 'BooleanValue' || kind === 'NullValue' || kind === 'ListValue' && step === 1 || kind === 'ObjectField' && step === 2 || kind === 'Variable' && step === 2) {
                        const namedInputType = typeInfo.type ? (0, _graphql.getNamedType)(typeInfo.type) : undefined;
                        if (namedInputType instanceof _graphql.GraphQLInputObjectType) {
                            return (0, _hintList.default)(cur, token, [{
                                text: '{'
                            }]);
                        }
                        if (namedInputType instanceof _graphql.GraphQLEnumType) {
                            const values = namedInputType.getValues();
                            return (0, _hintList.default)(cur, token, values.map(value => ({
                                text: `"${value.name}"`,
                                type: namedInputType,
                                description: value.description
                            })));
                        }
                        if (namedInputType === _graphql.GraphQLBoolean) {
                            return (0, _hintList.default)(cur, token, [{
                                text: 'true',
                                type: _graphql.GraphQLBoolean,
                                description: 'Not false.'
                            }, {
                                text: 'false',
                                type: _graphql.GraphQLBoolean,
                                description: 'Not true.'
                            }]);
                        }
                    }
                }

                function getTypeInfo(variableToType, tokenState) {
                    const info = {
                        type: null,
                        fields: null
                    };
                    (0, _forEachState.default)(tokenState, state => {
                        switch (state.kind) {
                            case 'Variable': {
                                info.type = variableToType[state.name];
                                break;
                            }
                            case 'ListValue': {
                                const nullableType = info.type ? (0, _graphql.getNullableType)(info.type) : undefined;
                                info.type = nullableType instanceof _graphql.GraphQLList ? nullableType.ofType : null;
                                break;
                            }
                            case 'ObjectValue': {
                                const objectType = info.type ? (0, _graphql.getNamedType)(info.type) : undefined;
                                info.fields = objectType instanceof _graphql.GraphQLInputObjectType ? objectType.getFields() : null;
                                break;
                            }
                            case 'ObjectField': {
                                const objectField = state.name && info.fields ? info.fields[state.name] : null;
                                info.type = objectField === null || objectField === void 0 ? void 0 : objectField.type;
                                break;
                            }
                        }
                    });
                    return info;
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/variables/lint.js":
            /*!******************************************************!*\
              !*** ../../codemirror-graphql/esm/variables/lint.js ***!
              \******************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _jsonParse = _interopRequireWildcard(__webpack_require__( /*! ../utils/jsonParse */ "../../codemirror-graphql/esm/utils/jsonParse.js"));

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.registerHelper('lint', 'graphql-variables', (text, options, editor) => {
                    if (!text) {
                        return [];
                    }
                    let ast;
                    try {
                        ast = (0, _jsonParse.default)(text);
                    } catch (error) {
                        if (error instanceof _jsonParse.JSONSyntaxError) {
                            return [lintError(editor, error.position, error.message)];
                        }
                        throw error;
                    }
                    const {
                        variableToType
                    } = options;
                    if (!variableToType) {
                        return [];
                    }
                    return validateVariables(editor, variableToType, ast);
                });

                function validateVariables(editor, variableToType, variablesAST) {
                    var _a;
                    const errors = [];
                    for (const member of variablesAST.members) {
                        if (member) {
                            const variableName = (_a = member.key) === null || _a === void 0 ? void 0 : _a.value;
                            const type = variableToType[variableName];
                            if (type) {
                                for (const [node, message] of validateValue(type, member.value)) {
                                    errors.push(lintError(editor, node, message));
                                }
                            } else {
                                errors.push(lintError(editor, member.key, `Variable "$${variableName}" does not appear in any GraphQL query.`));
                            }
                        }
                    }
                    return errors;
                }

                function validateValue(type, valueAST) {
                    if (!type || !valueAST) {
                        return [];
                    }
                    if (type instanceof _graphql.GraphQLNonNull) {
                        if (valueAST.kind === 'Null') {
                            return [
                                [valueAST, `Type "${type}" is non-nullable and cannot be null.`]
                            ];
                        }
                        return validateValue(type.ofType, valueAST);
                    }
                    if (valueAST.kind === 'Null') {
                        return [];
                    }
                    if (type instanceof _graphql.GraphQLList) {
                        const itemType = type.ofType;
                        if (valueAST.kind === 'Array') {
                            const values = valueAST.values || [];
                            return mapCat(values, item => validateValue(itemType, item));
                        }
                        return validateValue(itemType, valueAST);
                    }
                    if (type instanceof _graphql.GraphQLInputObjectType) {
                        if (valueAST.kind !== 'Object') {
                            return [
                                [valueAST, `Type "${type}" must be an Object.`]
                            ];
                        }
                        const providedFields = Object.create(null);
                        const fieldErrors = mapCat(valueAST.members, member => {
                            var _a;
                            const fieldName = (_a = member === null || member === void 0 ? void 0 : member.key) === null || _a === void 0 ? void 0 : _a.value;
                            providedFields[fieldName] = true;
                            const inputField = type.getFields()[fieldName];
                            if (!inputField) {
                                return [
                                    [member.key, `Type "${type}" does not have a field "${fieldName}".`]
                                ];
                            }
                            const fieldType = inputField ? inputField.type : undefined;
                            return validateValue(fieldType, member.value);
                        });
                        for (const fieldName of Object.keys(type.getFields())) {
                            const field = type.getFields()[fieldName];
                            if (!providedFields[fieldName] && field.type instanceof _graphql.GraphQLNonNull && !field.defaultValue) {
                                fieldErrors.push([valueAST, `Object of type "${type}" is missing required field "${fieldName}".`]);
                            }
                        }
                        return fieldErrors;
                    }
                    if (type.name === 'Boolean' && valueAST.kind !== 'Boolean' || type.name === 'String' && valueAST.kind !== 'String' || type.name === 'ID' && valueAST.kind !== 'Number' && valueAST.kind !== 'String' || type.name === 'Float' && valueAST.kind !== 'Number' || type.name === 'Int' && (valueAST.kind !== 'Number' || (valueAST.value | 0) !== valueAST.value)) {
                        return [
                            [valueAST, `Expected value of type "${type}".`]
                        ];
                    }
                    if ((type instanceof _graphql.GraphQLEnumType || type instanceof _graphql.GraphQLScalarType) && (valueAST.kind !== 'String' && valueAST.kind !== 'Number' && valueAST.kind !== 'Boolean' && valueAST.kind !== 'Null' || isNullish(type.parseValue(valueAST.value)))) {
                        return [
                            [valueAST, `Expected value of type "${type}".`]
                        ];
                    }
                    return [];
                }

                function lintError(editor, node, message) {
                    return {
                        message,
                        severity: 'error',
                        type: 'validation',
                        from: editor.posFromIndex(node.start),
                        to: editor.posFromIndex(node.end)
                    };
                }

                function isNullish(value) {
                    return value === null || value === undefined || value !== value;
                }

                function mapCat(array, mapper) {
                    return Array.prototype.concat.apply([], array.map(mapper));
                }

                /***/
            }),

        /***/
        "../../codemirror-graphql/esm/variables/mode.js":
            /*!******************************************************!*\
              !*** ../../codemirror-graphql/esm/variables/mode.js ***!
              \******************************************************/
            /***/
            (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                var _codemirror = _interopRequireDefault(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"));
                var _graphqlLanguageService = __webpack_require__( /*! graphql-language-service */ "../../graphql-language-service/esm/index.js");
                var _modeIndent = _interopRequireDefault(__webpack_require__( /*! ../utils/mode-indent */ "../../codemirror-graphql/esm/utils/mode-indent.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                _codemirror.default.defineMode('graphql-variables', config => {
                    const parser = (0, _graphqlLanguageService.onlineParser)({
                        eatWhitespace: stream => stream.eatSpace(),
                        lexRules: LexRules,
                        parseRules: ParseRules,
                        editorConfig: {
                            tabSize: config.tabSize
                        }
                    });
                    return {
                        config,
                        startState: parser.startState,
                        token: parser.token,
                        indent: _modeIndent.default,
                        electricInput: /^\s*[}\]]/,
                        fold: 'brace',
                        closeBrackets: {
                            pairs: '[]{}""',
                            explode: '[]{}'
                        }
                    };
                });
                const LexRules = {
                    Punctuation: /^\[|]|\{|\}|:|,/,
                    Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
                    String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,
                    Keyword: /^true|false|null/
                };
                const ParseRules = {
                    Document: [(0, _graphqlLanguageService.p)('{'), (0, _graphqlLanguageService.list)('Variable', (0, _graphqlLanguageService.opt)((0, _graphqlLanguageService.p)(','))), (0, _graphqlLanguageService.p)('}')],
                    Variable: [namedKey('variable'), (0, _graphqlLanguageService.p)(':'), 'Value'],
                    Value(token) {
                        switch (token.kind) {
                            case 'Number':
                                return 'NumberValue';
                            case 'String':
                                return 'StringValue';
                            case 'Punctuation':
                                switch (token.value) {
                                    case '[':
                                        return 'ListValue';
                                    case '{':
                                        return 'ObjectValue';
                                }
                                return null;
                            case 'Keyword':
                                switch (token.value) {
                                    case 'true':
                                    case 'false':
                                        return 'BooleanValue';
                                    case 'null':
                                        return 'NullValue';
                                }
                                return null;
                        }
                    },
                    NumberValue: [(0, _graphqlLanguageService.t)('Number', 'number')],
                    StringValue: [(0, _graphqlLanguageService.t)('String', 'string')],
                    BooleanValue: [(0, _graphqlLanguageService.t)('Keyword', 'builtin')],
                    NullValue: [(0, _graphqlLanguageService.t)('Keyword', 'keyword')],
                    ListValue: [(0, _graphqlLanguageService.p)('['), (0, _graphqlLanguageService.list)('Value', (0, _graphqlLanguageService.opt)((0, _graphqlLanguageService.p)(','))), (0, _graphqlLanguageService.p)(']')],
                    ObjectValue: [(0, _graphqlLanguageService.p)('{'), (0, _graphqlLanguageService.list)('ObjectField', (0, _graphqlLanguageService.opt)((0, _graphqlLanguageService.p)(','))), (0, _graphqlLanguageService.p)('}')],
                    ObjectField: [namedKey('attribute'), (0, _graphqlLanguageService.p)(':'), 'Value']
                };

                function namedKey(style) {
                    return {
                        style,
                        match: token => token.kind === 'String',
                        update(state, token) {
                            state.name = token.value.slice(1, -1);
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../graphiql-react/dist/index.js":
            /*!******************************************!*\
              !*** ../../graphiql-react/dist/index.js ***!
              \******************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                var __create = Object.create;
                var __defProp = Object.defineProperty;
                var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
                var __getOwnPropNames = Object.getOwnPropertyNames;
                var __getProtoOf = Object.getPrototypeOf;
                var __hasOwnProp = Object.prototype.hasOwnProperty;
                var __copyProps = (to, from, except, desc) => {
                    if (from && typeof from === "object" || typeof from === "function") {
                        for (let key of __getOwnPropNames(from))
                            if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
                                get: () => from[key],
                                enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
                            });
                    }
                    return to;
                };
                var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
                    // If the importer is in node compatibility mode or this is not an ESM
                    // file that has been converted to a CommonJS file using a Babel-
                    // compatible transform (i.e. "__esModule" has not been set), then set
                    // "default" to the CommonJS "module.exports" for node compatibility.
                    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
                        value: mod,
                        enumerable: true
                    }) : target, mod));
                Object.defineProperty(exports, Symbol.toStringTag, {
                    value: "Module"
                });
                const jsxRuntime = __webpack_require__( /*! react/jsx-runtime */ "../../../node_modules/react/jsx-runtime.js");
                const reactCompilerRuntime = __webpack_require__( /*! react-compiler-runtime */ "../../../node_modules/react-compiler-runtime/dist/index.js");
                const React = __webpack_require__( /*! react */ "react");
                const clsx = __webpack_require__( /*! clsx */ "../../../node_modules/clsx/dist/clsx.m.js");
                const graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                const toolkit = __webpack_require__( /*! @graphiql/toolkit */ "../../graphiql-toolkit/dist/esm/index.js");
                const graphqlLanguageService = __webpack_require__( /*! graphql-language-service */ "../../graphql-language-service/esm/index.js");
                const setValue = __webpack_require__( /*! set-value */ "../../../node_modules/set-value/index.js");
                const getValue = __webpack_require__( /*! get-value */ "../../../node_modules/get-value/index.js");
                const copyToClipboard = __webpack_require__( /*! copy-to-clipboard */ "../../../node_modules/copy-to-clipboard/index.js");
                const D = __webpack_require__( /*! @radix-ui/react-dialog */ "../../../node_modules/@radix-ui/react-dialog/dist/index.js");
                const reactVisuallyHidden = __webpack_require__( /*! @radix-ui/react-visually-hidden */ "../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js");
                const reactDropdownMenu = __webpack_require__( /*! @radix-ui/react-dropdown-menu */ "../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js");
                const MarkdownIt = __webpack_require__( /*! markdown-it */ "../../../node_modules/markdown-it/dist/index.cjs.js");
                const framerMotion = __webpack_require__( /*! framer-motion */ "../../../node_modules/framer-motion/dist/cjs/index.js");
                const T = __webpack_require__( /*! @radix-ui/react-tooltip */ "../../../node_modules/@radix-ui/react-tooltip/dist/index.js");
                const react = __webpack_require__( /*! @headlessui/react */ "../../../node_modules/@headlessui/react/dist/index.cjs");
                const ReactDOM = __webpack_require__( /*! react-dom */ "react-dom");

                function _interopNamespaceDefault(e) {
                    const n = Object.create(null, {
                        [Symbol.toStringTag]: {
                            value: "Module"
                        }
                    });
                    if (e) {
                        for (const k in e) {
                            if (k !== "default") {
                                const d = Object.getOwnPropertyDescriptor(e, k);
                                Object.defineProperty(n, k, d.get ? d : {
                                    enumerable: true,
                                    get: () => e[k]
                                });
                            }
                        }
                    }
                    n.default = e;
                    return Object.freeze(n);
                }
                const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
                const D__namespace = /* @__PURE__ */ _interopNamespaceDefault(D);
                const T__namespace = /* @__PURE__ */ _interopNamespaceDefault(T);

                function createNullableContext(name) {
                    const context = React.createContext(null);
                    context.displayName = name;
                    return context;
                }

                function createContextHook(context) {
                    function useGivenContext(options) {
                        var _a;
                        const value = React.useContext(context);
                        if (value === null && (options == null ? void 0 : options.nonNull)) {
                            throw new Error(`Tried to use \`${((_a = options.caller) == null ? void 0 : _a.name) || "a component"}\` without the necessary context. Make sure to render the \`${context.displayName}Provider\` component higher up the tree.`);
                        }
                        return value;
                    }
                    Object.defineProperty(useGivenContext, "name", {
                        value: `use${context.displayName}`
                    });
                    return useGivenContext;
                }
                const StorageContext = createNullableContext("StorageContext");

                function StorageContextProvider(props) {
                    const $ = reactCompilerRuntime.c(8);
                    const isInitialRender = React.useRef(true);
                    let t0;
                    if ($[0] !== props.storage) {
                        t0 = () => new toolkit.StorageAPI(props.storage);
                        $[0] = props.storage;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    const [storage, setStorage] = React.useState(t0);
                    let t1;
                    let t2;
                    if ($[2] !== props.storage) {
                        t1 = () => {
                            if (isInitialRender.current) {
                                isInitialRender.current = false;
                            } else {
                                setStorage(new toolkit.StorageAPI(props.storage));
                            }
                        };
                        t2 = [props.storage];
                        $[2] = props.storage;
                        $[3] = t1;
                        $[4] = t2;
                    } else {
                        t1 = $[3];
                        t2 = $[4];
                    }
                    React.useEffect(t1, t2);
                    let t3;
                    if ($[5] !== props.children || $[6] !== storage) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsx(StorageContext.Provider, {
                            value: storage,
                            children: props.children
                        });
                        $[5] = props.children;
                        $[6] = storage;
                        $[7] = t3;
                    } else {
                        t3 = $[7];
                    }
                    return t3;
                }
                const useStorageContext = createContextHook(StorageContext);
                const SvgArgument = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 14 14",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 6,
                    y: 6,
                    width: 2,
                    height: 2,
                    rx: 1,
                    fill: "currentColor"
                }));
                const SvgChevronDown = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 14 9",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M1 1L7 7L13 1",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }));
                const SvgChevronLeft = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 7 10",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M6 1.04819L2 5.04819L6 9.04819",
                    stroke: "currentColor",
                    strokeWidth: 1.75
                }));
                const SvgChevronUp = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 14 9",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M13 8L7 2L1 8",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }));
                const SvgClose = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 14 14",
                    stroke: "currentColor",
                    strokeWidth: 3,
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M1 1L12.9998 12.9997"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M13 1L1.00079 13.0003"
                }));
                const SvgCopy = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "-2 -2 22 22",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }), /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 6.75,
                    y: 0.75,
                    width: 10.5,
                    height: 10.5,
                    rx: 2.2069,
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }));
                const SvgDeprecatedArgument = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 14 14",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M5 9L9 5",
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M5 5L9 9",
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }));
                const SvgDeprecatedEnumValue = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 12 12",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M4 8L8 4",
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M4 4L8 8",
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    fillRule: "evenodd",
                    clipRule: "evenodd",
                    d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",
                    fill: "currentColor"
                }));
                const SvgDeprecatedField = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 12 12",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 0.6,
                    y: 0.6,
                    width: 10.8,
                    height: 10.8,
                    rx: 3.4,
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M4 8L8 4",
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M4 4L8 8",
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }));
                const SvgDirective = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0.5 12 12",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 7,
                    y: 5.5,
                    width: 2,
                    height: 2,
                    rx: 1,
                    transform: "rotate(90 7 5.5)",
                    fill: "currentColor"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    fillRule: "evenodd",
                    clipRule: "evenodd",
                    d: "M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",
                    fill: "currentColor"
                }));
                const SvgDocsFilled = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 20 24",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    fillRule: "evenodd",
                    clipRule: "evenodd",
                    d: "M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",
                    fill: "currentColor"
                }));
                const SvgDocs = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 20 24",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }), /* @__PURE__ */ React__namespace.createElement("line", {
                    x1: 13,
                    y1: 11.75,
                    x2: 6,
                    y2: 11.75,
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }));
                const SvgEnumValue = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 12 12",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 5,
                    y: 5,
                    width: 2,
                    height: 2,
                    rx: 1,
                    fill: "currentColor"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    fillRule: "evenodd",
                    clipRule: "evenodd",
                    d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",
                    fill: "currentColor"
                }));
                const SvgField = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 12 13",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 0.6,
                    y: 1.1,
                    width: 10.8,
                    height: 10.8,
                    rx: 2.4,
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 5,
                    y: 5.5,
                    width: 2,
                    height: 2,
                    rx: 1,
                    fill: "currentColor"
                }));
                const SvgHistory = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 24 20",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",
                    stroke: "currentColor",
                    strokeWidth: 1.5,
                    strokeLinecap: "square"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M13.75 5.25V10.75H18.75",
                    stroke: "currentColor",
                    strokeWidth: 1.5,
                    strokeLinecap: "square"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }));
                const SvgImplements = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 12 12",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("circle", {
                    cx: 6,
                    cy: 6,
                    r: 5.4,
                    stroke: "currentColor",
                    strokeWidth: 1.2,
                    strokeDasharray: "4.241025 4.241025",
                    transform: "rotate(22.5)",
                    "transform-origin": "center"
                }), /* @__PURE__ */ React__namespace.createElement("circle", {
                    cx: 6,
                    cy: 6,
                    r: 1,
                    fill: "currentColor"
                }));
                const SvgKeyboardShortcut = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 19 18",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",
                    stroke: "currentColor",
                    strokeWidth: 1.125,
                    strokeLinecap: "round",
                    strokeLinejoin: "round"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",
                    stroke: "currentColor",
                    strokeWidth: 1.125,
                    strokeLinecap: "round",
                    strokeLinejoin: "round"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",
                    stroke: "currentColor",
                    strokeWidth: 1.125,
                    strokeLinecap: "round",
                    strokeLinejoin: "round"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",
                    stroke: "currentColor",
                    strokeWidth: 1.125,
                    strokeLinecap: "round",
                    strokeLinejoin: "round"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",
                    stroke: "currentColor",
                    strokeWidth: 1.125,
                    strokeLinecap: "round",
                    strokeLinejoin: "round"
                }));
                const SvgMagnifyingGlass = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 13 13",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("circle", {
                    cx: 5,
                    cy: 5,
                    r: 4.35,
                    stroke: "currentColor",
                    strokeWidth: 1.3
                }), /* @__PURE__ */ React__namespace.createElement("line", {
                    x1: 8.45962,
                    y1: 8.54038,
                    x2: 11.7525,
                    y2: 11.8333,
                    stroke: "currentColor",
                    strokeWidth: 1.3
                }));
                const SvgMerge = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "-2 -2 22 22",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M6 4.5L9 7.5L12 4.5",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M12 13.5L9 10.5L6 13.5",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }));
                const SvgPen = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 14 14",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",
                    fill: "currentColor"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M11.5 4.5L9.5 2.5",
                    stroke: "currentColor",
                    strokeWidth: 1.4026,
                    strokeLinecap: "round",
                    strokeLinejoin: "round"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M5.5 10.5L3.5 8.5",
                    stroke: "currentColor",
                    strokeWidth: 1.4026,
                    strokeLinecap: "round",
                    strokeLinejoin: "round"
                }));
                const SvgPlay = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 16 18",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",
                    fill: "currentColor"
                }));
                const SvgPlus = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 10 16",
                    fill: "currentColor",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    fillRule: "evenodd",
                    clipRule: "evenodd",
                    d: "M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z"
                }));
                const SvgPrettify = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    width: 25,
                    height: 25,
                    viewBox: "0 0 25 25",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M10.2852 24.0745L13.7139 18.0742",
                    stroke: "currentColor",
                    strokeWidth: 1.5625
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M14.5742 24.0749L17.1457 19.7891",
                    stroke: "currentColor",
                    strokeWidth: 1.5625
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",
                    stroke: "currentColor",
                    strokeWidth: 1.5625
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",
                    stroke: "currentColor",
                    strokeWidth: 1.5625,
                    strokeLinejoin: "round"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",
                    stroke: "currentColor",
                    strokeWidth: 1.5625,
                    strokeLinejoin: "round"
                }));
                const SvgReload = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 16 16",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M4.75 9.25H1.25V12.75",
                    stroke: "currentColor",
                    strokeWidth: 1,
                    strokeLinecap: "square"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M11.25 6.75H14.75V3.25",
                    stroke: "currentColor",
                    strokeWidth: 1,
                    strokeLinecap: "square"
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",
                    stroke: "currentColor",
                    strokeWidth: 1
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",
                    stroke: "currentColor",
                    strokeWidth: 1
                }));
                const SvgRootType = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 13 13",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 0.6,
                    y: 0.6,
                    width: 11.8,
                    height: 11.8,
                    rx: 5.9,
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }));
                const SvgSettings = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 21 20",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    fillRule: "evenodd",
                    clipRule: "evenodd",
                    d: "M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",
                    fill: "currentColor"
                }));
                const SvgStarFilled = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 14 14",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",
                    fill: "currentColor",
                    stroke: "currentColor"
                }));
                const SvgStar = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 14 14",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",
                    stroke: "currentColor",
                    strokeWidth: 1.5
                }));
                const SvgStop = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 16 16",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("rect", {
                    width: 16,
                    height: 16,
                    rx: 2,
                    fill: "currentColor"
                }));
                const SvgTrash = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    width: "1em",
                    height: "5em",
                    xmlns: "http://www.w3.org/2000/svg",
                    fillRule: "evenodd",
                    "aria-hidden": "true",
                    viewBox: "0 0 23 23",
                    style: {
                        height: "1.5em"
                    },
                    clipRule: "evenodd",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("path", {
                    d: "M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",
                    fill: "currentColor",
                    strokeWidth: 0.25,
                    stroke: "currentColor"
                }));
                const SvgType = ({
                    title,
                    titleId,
                    ...props
                }) => /* @__PURE__ */ React__namespace.createElement("svg", {
                    height: "1em",
                    viewBox: "0 0 13 13",
                    fill: "none",
                    xmlns: "http://www.w3.org/2000/svg",
                    "aria-labelledby": titleId,
                    ...props
                }, title ? /* @__PURE__ */ React__namespace.createElement("title", {
                    id: titleId
                }, title) : null, /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 0.6,
                    y: 0.6,
                    width: 11.8,
                    height: 11.8,
                    rx: 5.9,
                    stroke: "currentColor",
                    strokeWidth: 1.2
                }), /* @__PURE__ */ React__namespace.createElement("rect", {
                    x: 5.5,
                    y: 5.5,
                    width: 2,
                    height: 2,
                    rx: 1,
                    fill: "currentColor"
                }));
                const ArgumentIcon = generateIcon(SvgArgument);
                const ChevronDownIcon = generateIcon(SvgChevronDown);
                const ChevronLeftIcon = generateIcon(SvgChevronLeft);
                const ChevronUpIcon = generateIcon(SvgChevronUp);
                const CloseIcon = generateIcon(SvgClose);
                const CopyIcon = generateIcon(SvgCopy);
                const DeprecatedArgumentIcon = generateIcon(SvgDeprecatedArgument);
                const DeprecatedEnumValueIcon = generateIcon(SvgDeprecatedEnumValue);
                const DeprecatedFieldIcon = generateIcon(SvgDeprecatedField);
                const DirectiveIcon = generateIcon(SvgDirective);
                const DocsFilledIcon = generateIcon(SvgDocsFilled);
                const DocsIcon = generateIcon(SvgDocs);
                const EnumValueIcon = generateIcon(SvgEnumValue);
                const FieldIcon = generateIcon(SvgField);
                const HistoryIcon = generateIcon(SvgHistory);
                const ImplementsIcon = generateIcon(SvgImplements);
                const KeyboardShortcutIcon = generateIcon(SvgKeyboardShortcut);
                const MagnifyingGlassIcon = generateIcon(SvgMagnifyingGlass);
                const MergeIcon = generateIcon(SvgMerge);
                const PenIcon = generateIcon(SvgPen);
                const PlayIcon = generateIcon(SvgPlay);
                const PlusIcon = generateIcon(SvgPlus);
                const PrettifyIcon = generateIcon(SvgPrettify);
                const ReloadIcon = generateIcon(SvgReload);
                const RootTypeIcon = generateIcon(SvgRootType);
                const SettingsIcon = generateIcon(SvgSettings);
                const StarFilledIcon = generateIcon(SvgStarFilled);
                const StarIcon = generateIcon(SvgStar);
                const StopIcon = generateIcon(SvgStop);
                const TrashIcon = generateIcon(SvgTrash);
                const TypeIcon = generateIcon(SvgType);

                function generateIcon(RawComponent) {
                    const title = RawComponent.name.replace("Svg", "").replaceAll(/([A-Z])/g, " $1").trimStart().toLowerCase() + " icon";

                    function IconComponent(props) {
                        const $ = reactCompilerRuntime.c(2);
                        let t0;
                        if ($[0] !== props) {
                            t0 = /* @__PURE__ */ jsxRuntime.jsx(RawComponent, {
                                title,
                                ...props
                            });
                            $[0] = props;
                            $[1] = t0;
                        } else {
                            t0 = $[1];
                        }
                        return t0;
                    }
                    IconComponent.displayName = RawComponent.name;
                    return IconComponent;
                }
                const UnStyledButton = React.forwardRef((props, ref) => {
                    const $ = reactCompilerRuntime.c(6);
                    let t0;
                    if ($[0] !== props.className) {
                        t0 = clsx.clsx("graphiql-un-styled", props.className);
                        $[0] = props.className;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    if ($[2] !== props || $[3] !== ref || $[4] !== t0) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx("button", {
                            ...props,
                            ref,
                            className: t0
                        });
                        $[2] = props;
                        $[3] = ref;
                        $[4] = t0;
                        $[5] = t1;
                    } else {
                        t1 = $[5];
                    }
                    return t1;
                });
                UnStyledButton.displayName = "UnStyledButton";
                const Button$1 = React.forwardRef((props, ref) => {
                    const $ = reactCompilerRuntime.c(7);
                    let t0;
                    if ($[0] !== props.className || $[1] !== props.state) {
                        t0 = clsx.clsx("graphiql-button", {
                            success: "graphiql-button-success",
                            error: "graphiql-button-error"
                        } [props.state], props.className);
                        $[0] = props.className;
                        $[1] = props.state;
                        $[2] = t0;
                    } else {
                        t0 = $[2];
                    }
                    let t1;
                    if ($[3] !== props || $[4] !== ref || $[5] !== t0) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx("button", {
                            ...props,
                            ref,
                            className: t0
                        });
                        $[3] = props;
                        $[4] = ref;
                        $[5] = t0;
                        $[6] = t1;
                    } else {
                        t1 = $[6];
                    }
                    return t1;
                });
                Button$1.displayName = "Button";
                const ButtonGroup = React.forwardRef((props, ref) => {
                    const $ = reactCompilerRuntime.c(6);
                    let t0;
                    if ($[0] !== props.className) {
                        t0 = clsx.clsx("graphiql-button-group", props.className);
                        $[0] = props.className;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    if ($[2] !== props || $[3] !== ref || $[4] !== t0) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            ...props,
                            ref,
                            className: t0
                        });
                        $[2] = props;
                        $[3] = ref;
                        $[4] = t0;
                        $[5] = t1;
                    } else {
                        t1 = $[5];
                    }
                    return t1;
                });
                ButtonGroup.displayName = "ButtonGroup";
                const createComponentGroup = (root, children) => Object.entries(children).reduce((r, [key, value]) => {
                    r[key] = value;
                    return r;
                }, root);
                const DialogClose = React.forwardRef((props, ref) => {
                    const $ = reactCompilerRuntime.c(8);
                    let t0;
                    if ($[0] !== props.className) {
                        t0 = clsx.clsx("graphiql-dialog-close", props.className);
                        $[0] = props.className;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    let t2;
                    if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx(reactVisuallyHidden.Root, {
                            children: "Close dialog"
                        });
                        t2 = /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {});
                        $[2] = t1;
                        $[3] = t2;
                    } else {
                        t1 = $[2];
                        t2 = $[3];
                    }
                    let t3;
                    if ($[4] !== props || $[5] !== ref || $[6] !== t0) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsx(D__namespace.Close, {
                            asChild: true,
                            children: /* @__PURE__ */ jsxRuntime.jsxs(UnStyledButton, {
                                ...props,
                                ref,
                                type: "button",
                                className: t0,
                                children: [t1, t2]
                            })
                        });
                        $[4] = props;
                        $[5] = ref;
                        $[6] = t0;
                        $[7] = t3;
                    } else {
                        t3 = $[7];
                    }
                    return t3;
                });
                DialogClose.displayName = "Dialog.Close";

                function DialogRoot(t0) {
                    const $ = reactCompilerRuntime.c(9);
                    let children;
                    let props;
                    if ($[0] !== t0) {
                        ({
                            children,
                            ...props
                        } = t0);
                        $[0] = t0;
                        $[1] = children;
                        $[2] = props;
                    } else {
                        children = $[1];
                        props = $[2];
                    }
                    let t1;
                    if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx(D__namespace.Overlay, {
                            className: "graphiql-dialog-overlay"
                        });
                        $[3] = t1;
                    } else {
                        t1 = $[3];
                    }
                    let t2;
                    if ($[4] !== children) {
                        t2 = /* @__PURE__ */ jsxRuntime.jsxs(D__namespace.Portal, {
                            children: [t1, /* @__PURE__ */ jsxRuntime.jsx(D__namespace.Content, {
                                className: "graphiql-dialog",
                                children
                            })]
                        });
                        $[4] = children;
                        $[5] = t2;
                    } else {
                        t2 = $[5];
                    }
                    let t3;
                    if ($[6] !== props || $[7] !== t2) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsx(D__namespace.Root, {
                            ...props,
                            children: t2
                        });
                        $[6] = props;
                        $[7] = t2;
                        $[8] = t3;
                    } else {
                        t3 = $[8];
                    }
                    return t3;
                }
                const Dialog = createComponentGroup(DialogRoot, {
                    Close: DialogClose,
                    Title: D__namespace.Title,
                    Trigger: D__namespace.Trigger,
                    Description: D__namespace.Description
                });
                const Button = React.forwardRef((props, ref) => {
                    const $ = reactCompilerRuntime.c(6);
                    let t0;
                    if ($[0] !== props.className) {
                        t0 = clsx.clsx("graphiql-un-styled", props.className);
                        $[0] = props.className;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    if ($[2] !== props || $[3] !== ref || $[4] !== t0) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx(reactDropdownMenu.Trigger, {
                            asChild: true,
                            children: /* @__PURE__ */ jsxRuntime.jsx("button", {
                                ...props,
                                ref,
                                className: t0
                            })
                        });
                        $[2] = props;
                        $[3] = ref;
                        $[4] = t0;
                        $[5] = t1;
                    } else {
                        t1 = $[5];
                    }
                    return t1;
                });
                Button.displayName = "DropdownMenuButton";

                function Content(t0) {
                    const $ = reactCompilerRuntime.c(14);
                    let children;
                    let className;
                    let props;
                    let t1;
                    let t2;
                    if ($[0] !== t0) {
                        ({
                            children,
                            align: t1,
                            sideOffset: t2,
                            className,
                            ...props
                        } = t0);
                        $[0] = t0;
                        $[1] = children;
                        $[2] = className;
                        $[3] = props;
                        $[4] = t1;
                        $[5] = t2;
                    } else {
                        children = $[1];
                        className = $[2];
                        props = $[3];
                        t1 = $[4];
                        t2 = $[5];
                    }
                    const align = t1 === void 0 ? "start" : t1;
                    const sideOffset = t2 === void 0 ? 5 : t2;
                    let t3;
                    if ($[6] !== className) {
                        t3 = clsx.clsx("graphiql-dropdown-content", className);
                        $[6] = className;
                        $[7] = t3;
                    } else {
                        t3 = $[7];
                    }
                    let t4;
                    if ($[8] !== align || $[9] !== children || $[10] !== props || $[11] !== sideOffset || $[12] !== t3) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsx(reactDropdownMenu.Portal, {
                            children: /* @__PURE__ */ jsxRuntime.jsx(reactDropdownMenu.Content, {
                                align,
                                sideOffset,
                                className: t3,
                                ...props,
                                children
                            })
                        });
                        $[8] = align;
                        $[9] = children;
                        $[10] = props;
                        $[11] = sideOffset;
                        $[12] = t3;
                        $[13] = t4;
                    } else {
                        t4 = $[13];
                    }
                    return t4;
                }
                const Item = ({
                    className,
                    children,
                    ...props
                }) => /* @__PURE__ */ jsxRuntime.jsx(reactDropdownMenu.Item, {
                    className: clsx.clsx("graphiql-dropdown-item", className),
                    ...props,
                    children
                });
                const DropdownMenu = createComponentGroup(reactDropdownMenu.Root, {
                    Button,
                    Item,
                    Content
                });
                const markdown = new MarkdownIt({
                    breaks: true,
                    linkify: true
                });
                const MarkdownContent = React.forwardRef((t0, ref) => {
                    const $ = reactCompilerRuntime.c(18);
                    let children;
                    let onlyShowFirstChild;
                    let props;
                    let type;
                    if ($[0] !== t0) {
                        ({
                            children,
                            onlyShowFirstChild,
                            type,
                            ...props
                        } = t0);
                        $[0] = t0;
                        $[1] = children;
                        $[2] = onlyShowFirstChild;
                        $[3] = props;
                        $[4] = type;
                    } else {
                        children = $[1];
                        onlyShowFirstChild = $[2];
                        props = $[3];
                        type = $[4];
                    }
                    const t1 = `graphiql-markdown-${type}`;
                    const t2 = onlyShowFirstChild && "graphiql-markdown-preview";
                    let t3;
                    if ($[5] !== props.className || $[6] !== t1 || $[7] !== t2) {
                        t3 = clsx.clsx(t1, t2, props.className);
                        $[5] = props.className;
                        $[6] = t1;
                        $[7] = t2;
                        $[8] = t3;
                    } else {
                        t3 = $[8];
                    }
                    let t4;
                    if ($[9] !== children) {
                        t4 = markdown.render(children);
                        $[9] = children;
                        $[10] = t4;
                    } else {
                        t4 = $[10];
                    }
                    let t5;
                    if ($[11] !== t4) {
                        t5 = {
                            __html: t4
                        };
                        $[11] = t4;
                        $[12] = t5;
                    } else {
                        t5 = $[12];
                    }
                    let t6;
                    if ($[13] !== props || $[14] !== ref || $[15] !== t3 || $[16] !== t5) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            ...props,
                            ref,
                            className: t3,
                            dangerouslySetInnerHTML: t5
                        });
                        $[13] = props;
                        $[14] = ref;
                        $[15] = t3;
                        $[16] = t5;
                        $[17] = t6;
                    } else {
                        t6 = $[17];
                    }
                    return t6;
                });
                MarkdownContent.displayName = "MarkdownContent";
                const Spinner = React.forwardRef((props, ref) => {
                    const $ = reactCompilerRuntime.c(6);
                    let t0;
                    if ($[0] !== props.className) {
                        t0 = clsx.clsx("graphiql-spinner", props.className);
                        $[0] = props.className;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    if ($[2] !== props || $[3] !== ref || $[4] !== t0) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            ...props,
                            ref,
                            className: t0
                        });
                        $[2] = props;
                        $[3] = ref;
                        $[4] = t0;
                        $[5] = t1;
                    } else {
                        t1 = $[5];
                    }
                    return t1;
                });
                Spinner.displayName = "Spinner";

                function TooltipRoot(t0) {
                    const $ = reactCompilerRuntime.c(10);
                    const {
                        children,
                        align: t1,
                        side: t2,
                        sideOffset: t3,
                        label
                    } = t0;
                    const align = t1 === void 0 ? "start" : t1;
                    const side = t2 === void 0 ? "bottom" : t2;
                    const sideOffset = t3 === void 0 ? 5 : t3;
                    let t4;
                    if ($[0] !== children) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsx(T__namespace.Trigger, {
                            asChild: true,
                            children
                        });
                        $[0] = children;
                        $[1] = t4;
                    } else {
                        t4 = $[1];
                    }
                    let t5;
                    if ($[2] !== align || $[3] !== label || $[4] !== side || $[5] !== sideOffset) {
                        t5 = /* @__PURE__ */ jsxRuntime.jsx(T__namespace.Portal, {
                            children: /* @__PURE__ */ jsxRuntime.jsx(T__namespace.Content, {
                                className: "graphiql-tooltip",
                                align,
                                side,
                                sideOffset,
                                children: label
                            })
                        });
                        $[2] = align;
                        $[3] = label;
                        $[4] = side;
                        $[5] = sideOffset;
                        $[6] = t5;
                    } else {
                        t5 = $[6];
                    }
                    let t6;
                    if ($[7] !== t4 || $[8] !== t5) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsxs(T__namespace.Root, {
                            children: [t4, t5]
                        });
                        $[7] = t4;
                        $[8] = t5;
                        $[9] = t6;
                    } else {
                        t6 = $[9];
                    }
                    return t6;
                }
                const Tooltip = createComponentGroup(TooltipRoot, {
                    Provider: T__namespace.Provider
                });
                const TabRoot = React.forwardRef((t0, ref) => {
                    const $ = reactCompilerRuntime.c(16);
                    let children;
                    let className;
                    let isActive;
                    let props;
                    let value;
                    if ($[0] !== t0) {
                        ({
                            isActive,
                            value,
                            children,
                            className,
                            ...props
                        } = t0);
                        $[0] = t0;
                        $[1] = children;
                        $[2] = className;
                        $[3] = isActive;
                        $[4] = props;
                        $[5] = value;
                    } else {
                        children = $[1];
                        className = $[2];
                        isActive = $[3];
                        props = $[4];
                        value = $[5];
                    }
                    const t1 = isActive ? "true" : void 0;
                    const t2 = isActive && "graphiql-tab-active";
                    let t3;
                    if ($[6] !== className || $[7] !== t2) {
                        t3 = clsx.clsx("graphiql-tab", t2, className);
                        $[6] = className;
                        $[7] = t2;
                        $[8] = t3;
                    } else {
                        t3 = $[8];
                    }
                    let t4;
                    if ($[9] !== children || $[10] !== props || $[11] !== ref || $[12] !== t1 || $[13] !== t3 || $[14] !== value) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsx(framerMotion.Reorder.Item, {
                            ...props,
                            ref,
                            value,
                            "aria-selected": t1,
                            role: "tab",
                            className: t3,
                            children
                        });
                        $[9] = children;
                        $[10] = props;
                        $[11] = ref;
                        $[12] = t1;
                        $[13] = t3;
                        $[14] = value;
                        $[15] = t4;
                    } else {
                        t4 = $[15];
                    }
                    return t4;
                });
                TabRoot.displayName = "Tab";
                const TabButton = React.forwardRef((props, ref) => {
                    const $ = reactCompilerRuntime.c(6);
                    let t0;
                    if ($[0] !== props.className) {
                        t0 = clsx.clsx("graphiql-tab-button", props.className);
                        $[0] = props.className;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    if ($[2] !== props || $[3] !== ref || $[4] !== t0) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx(UnStyledButton, {
                            ...props,
                            ref,
                            type: "button",
                            className: t0,
                            children: props.children
                        });
                        $[2] = props;
                        $[3] = ref;
                        $[4] = t0;
                        $[5] = t1;
                    } else {
                        t1 = $[5];
                    }
                    return t1;
                });
                TabButton.displayName = "Tab.Button";
                const TabClose = React.forwardRef((props, ref) => {
                    const $ = reactCompilerRuntime.c(7);
                    let t0;
                    if ($[0] !== props.className) {
                        t0 = clsx.clsx("graphiql-tab-close", props.className);
                        $[0] = props.className;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {});
                        $[2] = t1;
                    } else {
                        t1 = $[2];
                    }
                    let t2;
                    if ($[3] !== props || $[4] !== ref || $[5] !== t0) {
                        t2 = /* @__PURE__ */ jsxRuntime.jsx(Tooltip, {
                            label: "Close Tab",
                            children: /* @__PURE__ */ jsxRuntime.jsx(UnStyledButton, {
                                "aria-label": "Close Tab",
                                ...props,
                                ref,
                                type: "button",
                                className: t0,
                                children: t1
                            })
                        });
                        $[3] = props;
                        $[4] = ref;
                        $[5] = t0;
                        $[6] = t2;
                    } else {
                        t2 = $[6];
                    }
                    return t2;
                });
                TabClose.displayName = "Tab.Close";
                const Tab = createComponentGroup(TabRoot, {
                    Button: TabButton,
                    Close: TabClose
                });
                const Tabs = React.forwardRef((t0, ref) => {
                    const $ = reactCompilerRuntime.c(15);
                    let children;
                    let className;
                    let onReorder;
                    let props;
                    let values;
                    if ($[0] !== t0) {
                        ({
                            values,
                            onReorder,
                            children,
                            className,
                            ...props
                        } = t0);
                        $[0] = t0;
                        $[1] = children;
                        $[2] = className;
                        $[3] = onReorder;
                        $[4] = props;
                        $[5] = values;
                    } else {
                        children = $[1];
                        className = $[2];
                        onReorder = $[3];
                        props = $[4];
                        values = $[5];
                    }
                    let t1;
                    if ($[6] !== className) {
                        t1 = clsx.clsx("graphiql-tabs", className);
                        $[6] = className;
                        $[7] = t1;
                    } else {
                        t1 = $[7];
                    }
                    let t2;
                    if ($[8] !== children || $[9] !== onReorder || $[10] !== props || $[11] !== ref || $[12] !== t1 || $[13] !== values) {
                        t2 = /* @__PURE__ */ jsxRuntime.jsx(framerMotion.Reorder.Group, {
                            ...props,
                            ref,
                            values,
                            onReorder,
                            axis: "x",
                            role: "tablist",
                            className: t1,
                            children
                        });
                        $[8] = children;
                        $[9] = onReorder;
                        $[10] = props;
                        $[11] = ref;
                        $[12] = t1;
                        $[13] = values;
                        $[14] = t2;
                    } else {
                        t2 = $[14];
                    }
                    return t2;
                });
                Tabs.displayName = "Tabs";
                const HistoryContext = createNullableContext("HistoryContext");

                function HistoryContextProvider(t0) {
                    const $ = reactCompilerRuntime.c(11);
                    const {
                        maxHistoryLength: t1,
                        children
                    } = t0;
                    const maxHistoryLength = t1 === void 0 ? DEFAULT_HISTORY_LENGTH : t1;
                    const storage = useStorageContext();
                    let t2;
                    if ($[0] !== maxHistoryLength || $[1] !== storage) {
                        t2 = () => new toolkit.HistoryStore(storage || new toolkit.StorageAPI(null), maxHistoryLength);
                        $[0] = maxHistoryLength;
                        $[1] = storage;
                        $[2] = t2;
                    } else {
                        t2 = $[2];
                    }
                    const [historyStore] = React.useState(t2);
                    let t3;
                    if ($[3] !== historyStore.queries) {
                        t3 = () => historyStore.queries || [];
                        $[3] = historyStore.queries;
                        $[4] = t3;
                    } else {
                        t3 = $[4];
                    }
                    const [items, setItems] = React.useState(t3);
                    let t4;
                    if ($[5] !== historyStore || $[6] !== items) {
                        t4 = {
                            addToHistory(operation) {
                                historyStore.updateHistory(operation);
                                setItems(historyStore.queries);
                            },
                            editLabel(operation_0, index) {
                                historyStore.editLabel(operation_0, index);
                                setItems(historyStore.queries);
                            },
                            items,
                            toggleFavorite(operation_1) {
                                historyStore.toggleFavorite(operation_1);
                                setItems(historyStore.queries);
                            },
                            setActive: _temp$8,
                            deleteFromHistory(item_0, clearFavorites) {
                                historyStore.deleteHistory(item_0, clearFavorites);
                                setItems(historyStore.queries);
                            }
                        };
                        $[5] = historyStore;
                        $[6] = items;
                        $[7] = t4;
                    } else {
                        t4 = $[7];
                    }
                    const value = t4;
                    let t5;
                    if ($[8] !== children || $[9] !== value) {
                        t5 = /* @__PURE__ */ jsxRuntime.jsx(HistoryContext.Provider, {
                            value,
                            children
                        });
                        $[8] = children;
                        $[9] = value;
                        $[10] = t5;
                    } else {
                        t5 = $[10];
                    }
                    return t5;
                }

                function _temp$8(item) {
                    return item;
                }
                const useHistoryContext = createContextHook(HistoryContext);
                const DEFAULT_HISTORY_LENGTH = 20;

                function History() {
                    const {
                        items: all,
                        deleteFromHistory
                    } = useHistoryContext({
                        nonNull: true
                    });
                    let items = all.slice().map((item, i) => ({
                        ...item,
                        index: i
                    })).reverse();
                    const favorites = items.filter(item_0 => item_0.favorite);
                    if (favorites.length) {
                        items = items.filter(item_1 => !item_1.favorite);
                    }
                    const [clearStatus, setClearStatus] = React.useState(null);
                    React.useEffect(() => {
                        if (clearStatus) {
                            setTimeout(() => {
                                setClearStatus(null);
                            }, 2e3);
                        }
                    }, [clearStatus]);
                    const handleClearStatus = () => {
                        try {
                            for (const item_2 of items) {
                                deleteFromHistory(item_2, true);
                            }
                            setClearStatus("success");
                        } catch {
                            setClearStatus("error");
                        }
                    };
                    return /* @__PURE__ */ jsxRuntime.jsxs("section", {
                        "aria-label": "History",
                        className: "graphiql-history",
                        children: [ /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: "graphiql-history-header",
                            children: ["History", (clearStatus || items.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(Button$1, {
                                type: "button",
                                state: clearStatus || void 0,
                                disabled: !items.length,
                                onClick: handleClearStatus,
                                children: {
                                    success: "Cleared",
                                    error: "Failed to Clear"
                                } [clearStatus] || "Clear"
                            })]
                        }), Boolean(favorites.length) && /* @__PURE__ */ jsxRuntime.jsx("ul", {
                            className: "graphiql-history-items",
                            children: favorites.map(item_3 => /* @__PURE__ */ jsxRuntime.jsx(HistoryItem, {
                                item: item_3
                            }, item_3.index))
                        }), Boolean(favorites.length) && Boolean(items.length) && /* @__PURE__ */ jsxRuntime.jsx("div", {
                            className: "graphiql-history-item-spacer"
                        }), Boolean(items.length) && /* @__PURE__ */ jsxRuntime.jsx("ul", {
                            className: "graphiql-history-items",
                            children: items.map(item_4 => /* @__PURE__ */ jsxRuntime.jsx(HistoryItem, {
                                item: item_4
                            }, item_4.index))
                        })]
                    });
                }

                function HistoryItem(props) {
                    const $ = reactCompilerRuntime.c(40);
                    let t0;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t0 = {
                            nonNull: true,
                            caller: HistoryItem
                        };
                        $[0] = t0;
                    } else {
                        t0 = $[0];
                    }
                    const {
                        editLabel,
                        toggleFavorite,
                        deleteFromHistory,
                        setActive
                    } = useHistoryContext(t0);
                    let t1;
                    if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = {
                            nonNull: true,
                            caller: HistoryItem
                        };
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        headerEditor,
                        queryEditor,
                        variableEditor
                    } = useEditorContext(t1);
                    const inputRef = React.useRef(null);
                    const buttonRef = React.useRef(null);
                    const [isEditable, setIsEditable] = React.useState(false);
                    let t2;
                    let t3;
                    if ($[2] !== isEditable) {
                        t2 = () => {
                            var _a;
                            if (isEditable) {
                                (_a = inputRef.current) == null ? void 0 : _a.focus();
                            }
                        };
                        t3 = [isEditable];
                        $[2] = isEditable;
                        $[3] = t2;
                        $[4] = t3;
                    } else {
                        t2 = $[3];
                        t3 = $[4];
                    }
                    React.useEffect(t2, t3);
                    let t4;
                    if ($[5] !== props.item.label || $[6] !== props.item.operationName || $[7] !== props.item.query) {
                        t4 = props.item.label || props.item.operationName || formatQuery(props.item.query);
                        $[5] = props.item.label;
                        $[6] = props.item.operationName;
                        $[7] = props.item.query;
                        $[8] = t4;
                    } else {
                        t4 = $[8];
                    }
                    const displayName = t4;
                    let t5;
                    if ($[9] !== editLabel || $[10] !== props.item) {
                        t5 = () => {
                            var _a;
                            setIsEditable(false);
                            const {
                                index,
                                ...item
                            } = props.item;
                            editLabel({
                                ...item,
                                label: (_a = inputRef.current) == null ? void 0 : _a.value
                            }, index);
                        };
                        $[9] = editLabel;
                        $[10] = props.item;
                        $[11] = t5;
                    } else {
                        t5 = $[11];
                    }
                    const handleSave = t5;
                    let t6;
                    if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
                        t6 = () => {
                            setIsEditable(false);
                        };
                        $[12] = t6;
                    } else {
                        t6 = $[12];
                    }
                    const handleClose = t6;
                    let t7;
                    if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
                        t7 = e => {
                            e.stopPropagation();
                            setIsEditable(true);
                        };
                        $[13] = t7;
                    } else {
                        t7 = $[13];
                    }
                    const handleEditLabel = t7;
                    let t8;
                    if ($[14] !== headerEditor || $[15] !== props.item || $[16] !== queryEditor || $[17] !== setActive || $[18] !== variableEditor) {
                        t8 = () => {
                            const {
                                query,
                                variables,
                                headers
                            } = props.item;
                            queryEditor == null ? void 0 : queryEditor.setValue(query !== null && query !== void 0 ? query : "");
                            variableEditor == null ? void 0 : variableEditor.setValue(variables !== null && variables !== void 0 ? variables : "");
                            headerEditor == null ? void 0 : headerEditor.setValue(headers !== null && headers !== void 0 ? headers : "");
                            setActive(props.item);
                        };
                        $[14] = headerEditor;
                        $[15] = props.item;
                        $[16] = queryEditor;
                        $[17] = setActive;
                        $[18] = variableEditor;
                        $[19] = t8;
                    } else {
                        t8 = $[19];
                    }
                    const handleHistoryItemClick = t8;
                    let t9;
                    if ($[20] !== deleteFromHistory || $[21] !== props.item) {
                        t9 = e_0 => {
                            e_0.stopPropagation();
                            deleteFromHistory(props.item);
                        };
                        $[20] = deleteFromHistory;
                        $[21] = props.item;
                        $[22] = t9;
                    } else {
                        t9 = $[22];
                    }
                    const handleDeleteItemFromHistory = t9;
                    let t10;
                    if ($[23] !== props.item || $[24] !== toggleFavorite) {
                        t10 = e_1 => {
                            e_1.stopPropagation();
                            toggleFavorite(props.item);
                        };
                        $[23] = props.item;
                        $[24] = toggleFavorite;
                        $[25] = t10;
                    } else {
                        t10 = $[25];
                    }
                    const handleToggleFavorite = t10;
                    const t11 = isEditable && "editable";
                    let t12;
                    if ($[26] !== t11) {
                        t12 = clsx.clsx("graphiql-history-item", t11);
                        $[26] = t11;
                        $[27] = t12;
                    } else {
                        t12 = $[27];
                    }
                    let t13;
                    if ($[28] !== displayName || $[29] !== editLabel || $[30] !== handleDeleteItemFromHistory || $[31] !== handleHistoryItemClick || $[32] !== handleSave || $[33] !== handleToggleFavorite || $[34] !== isEditable || $[35] !== props.item) {
                        t13 = isEditable ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [ /* @__PURE__ */ jsxRuntime.jsx("input", {
                                type: "text",
                                defaultValue: props.item.label,
                                ref: inputRef,
                                onKeyDown: e_2 => {
                                    if (e_2.key === "Esc") {
                                        setIsEditable(false);
                                    } else {
                                        if (e_2.key === "Enter") {
                                            setIsEditable(false);
                                            editLabel({
                                                ...props.item,
                                                label: e_2.currentTarget.value
                                            });
                                        }
                                    }
                                },
                                placeholder: "Type a label"
                            }), /* @__PURE__ */ jsxRuntime.jsx(UnStyledButton, {
                                type: "button",
                                ref: buttonRef,
                                onClick: handleSave,
                                children: "Save"
                            }), /* @__PURE__ */ jsxRuntime.jsx(UnStyledButton, {
                                type: "button",
                                ref: buttonRef,
                                onClick: handleClose,
                                children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {})
                            })]
                        }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [ /* @__PURE__ */ jsxRuntime.jsx(Tooltip, {
                                label: "Set active",
                                children: /* @__PURE__ */ jsxRuntime.jsx(UnStyledButton, {
                                    type: "button",
                                    className: "graphiql-history-item-label",
                                    onClick: handleHistoryItemClick,
                                    "aria-label": "Set active",
                                    children: displayName
                                })
                            }), /* @__PURE__ */ jsxRuntime.jsx(Tooltip, {
                                label: "Edit label",
                                children: /* @__PURE__ */ jsxRuntime.jsx(UnStyledButton, {
                                    type: "button",
                                    className: "graphiql-history-item-action",
                                    onClick: handleEditLabel,
                                    "aria-label": "Edit label",
                                    children: /* @__PURE__ */ jsxRuntime.jsx(PenIcon, {
                                        "aria-hidden": "true"
                                    })
                                })
                            }), /* @__PURE__ */ jsxRuntime.jsx(Tooltip, {
                                label: props.item.favorite ? "Remove favorite" : "Add favorite",
                                children: /* @__PURE__ */ jsxRuntime.jsx(UnStyledButton, {
                                    type: "button",
                                    className: "graphiql-history-item-action",
                                    onClick: handleToggleFavorite,
                                    "aria-label": props.item.favorite ? "Remove favorite" : "Add favorite",
                                    children: props.item.favorite ? /* @__PURE__ */ jsxRuntime.jsx(StarFilledIcon, {
                                        "aria-hidden": "true"
                                    }) : /* @__PURE__ */ jsxRuntime.jsx(StarIcon, {
                                        "aria-hidden": "true"
                                    })
                                })
                            }), /* @__PURE__ */ jsxRuntime.jsx(Tooltip, {
                                label: "Delete from history",
                                children: /* @__PURE__ */ jsxRuntime.jsx(UnStyledButton, {
                                    type: "button",
                                    className: "graphiql-history-item-action",
                                    onClick: handleDeleteItemFromHistory,
                                    "aria-label": "Delete from history",
                                    children: /* @__PURE__ */ jsxRuntime.jsx(TrashIcon, {
                                        "aria-hidden": "true"
                                    })
                                })
                            })]
                        });
                        $[28] = displayName;
                        $[29] = editLabel;
                        $[30] = handleDeleteItemFromHistory;
                        $[31] = handleHistoryItemClick;
                        $[32] = handleSave;
                        $[33] = handleToggleFavorite;
                        $[34] = isEditable;
                        $[35] = props.item;
                        $[36] = t13;
                    } else {
                        t13 = $[36];
                    }
                    let t14;
                    if ($[37] !== t12 || $[38] !== t13) {
                        t14 = /* @__PURE__ */ jsxRuntime.jsx("li", {
                            className: t12,
                            children: t13
                        });
                        $[37] = t12;
                        $[38] = t13;
                        $[39] = t14;
                    } else {
                        t14 = $[39];
                    }
                    return t14;
                }

                function formatQuery(query) {
                    return query == null ? void 0 : query.split("\n").map(line => line.replace(/#(.*)/, "")).join(" ").replaceAll("{", " { ").replaceAll("}", " } ").replaceAll(/[\s]{2,}/g, " ");
                }
                const ExecutionContext = createNullableContext("ExecutionContext");

                function ExecutionContextProvider(t0) {
                    const $ = reactCompilerRuntime.c(27);
                    const {
                        fetcher,
                        getDefaultFieldNames,
                        children,
                        operationName
                    } = t0;
                    if (!fetcher) {
                        throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");
                    }
                    let t1;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = {
                            nonNull: true,
                            caller: ExecutionContextProvider
                        };
                        $[0] = t1;
                    } else {
                        t1 = $[0];
                    }
                    const {
                        externalFragments,
                        headerEditor,
                        queryEditor,
                        responseEditor,
                        variableEditor,
                        updateActiveTabValues
                    } = useEditorContext(t1);
                    const history = useHistoryContext();
                    let t2;
                    if ($[1] !== getDefaultFieldNames) {
                        t2 = {
                            getDefaultFieldNames,
                            caller: ExecutionContextProvider
                        };
                        $[1] = getDefaultFieldNames;
                        $[2] = t2;
                    } else {
                        t2 = $[2];
                    }
                    const autoCompleteLeafs = useAutoCompleteLeafs(t2);
                    const [isFetching, setIsFetching] = React.useState(false);
                    const [subscription, setSubscription] = React.useState(null);
                    const queryIdRef = React.useRef(0);
                    let t3;
                    if ($[3] !== subscription) {
                        t3 = () => {
                            subscription == null ? void 0 : subscription.unsubscribe();
                            setIsFetching(false);
                            setSubscription(null);
                        };
                        $[3] = subscription;
                        $[4] = t3;
                    } else {
                        t3 = $[4];
                    }
                    const stop = t3;
                    let t4;
                    if ($[5] !== autoCompleteLeafs || $[6] !== externalFragments || $[7] !== fetcher || $[8] !== headerEditor || $[9] !== history || $[10] !== operationName || $[11] !== queryEditor || $[12] !== responseEditor || $[13] !== stop || $[14] !== subscription || $[15] !== updateActiveTabValues || $[16] !== variableEditor) {
                        t4 = async () => {
                            var _ref, _headers2, _queryEditor$document;
                            if (!queryEditor || !responseEditor) {
                                return;
                            }
                            if (subscription) {
                                stop();
                                return;
                            }
                            const setResponse = value => {
                                responseEditor.setValue(value);
                                updateActiveTabValues({
                                    response: value
                                });
                            };
                            queryIdRef.current = queryIdRef.current + 1;
                            const queryId = queryIdRef.current;
                            let query = autoCompleteLeafs() || queryEditor.getValue();
                            const variablesString = variableEditor == null ? void 0 : variableEditor.getValue();
                            let variables;
                            try {
                                variables = tryParseJsonObject({
                                    json: variablesString,
                                    errorMessageParse: "Variables are invalid JSON",
                                    errorMessageType: "Variables are not a JSON object."
                                });
                            } catch (t52) {
                                const error = t52;
                                setResponse(error instanceof Error ? error.message : `${error}`);
                                return;
                            }
                            const headersString = headerEditor == null ? void 0 : headerEditor.getValue();
                            let headers;
                            try {
                                headers = tryParseJsonObject({
                                    json: headersString,
                                    errorMessageParse: "Headers are invalid JSON",
                                    errorMessageType: "Headers are not a JSON object."
                                });
                            } catch (t62) {
                                const error_0 = t62;
                                setResponse(error_0 instanceof Error ? error_0.message : `${error_0}`);
                                return;
                            }
                            if (externalFragments) {
                                const fragmentDependencies = queryEditor.documentAST ? graphqlLanguageService.getFragmentDependenciesForAST(queryEditor.documentAST, externalFragments) : [];
                                if (fragmentDependencies.length > 0) {
                                    query = query + ("\n" + fragmentDependencies.map(_temp$7).join("\n"));
                                }
                            }
                            setResponse("");
                            setIsFetching(true);
                            const opName = (_ref = operationName !== null && operationName !== void 0 ? operationName : queryEditor.operationName) !== null && _ref !== void 0 ? _ref : void 0;
                            history == null ? void 0 : history.addToHistory({
                                query,
                                variables: variablesString,
                                headers: headersString,
                                operationName: opName
                            });
                            const _headers = (_headers2 = headers) !== null && _headers2 !== void 0 ? _headers2 : void 0;
                            const documentAST = (_queryEditor$document = queryEditor.documentAST) !== null && _queryEditor$document !== void 0 ? _queryEditor$document : void 0;
                            try {
                                const fullResponse = {};
                                const handleResponse = result => {
                                    if (queryId !== queryIdRef.current) {
                                        return;
                                    }
                                    let maybeMultipart = Array.isArray(result) ? result : false;
                                    if (!maybeMultipart && typeof result === "object" && result !== null && "hasNext" in result) {
                                        maybeMultipart = [result];
                                    }
                                    if (maybeMultipart) {
                                        for (const part of maybeMultipart) {
                                            mergeIncrementalResult(fullResponse, part);
                                        }
                                        setIsFetching(false);
                                        setResponse(toolkit.formatResult(fullResponse));
                                    } else {
                                        const response = toolkit.formatResult(result);
                                        setIsFetching(false);
                                        setResponse(response);
                                    }
                                };
                                const fetch2 = fetcher({
                                    query,
                                    variables,
                                    operationName: opName
                                }, {
                                    headers: _headers,
                                    documentAST
                                });
                                const value_0 = await Promise.resolve(fetch2);
                                if (toolkit.isObservable(value_0)) {
                                    setSubscription(value_0.subscribe({
                                        next(result_0) {
                                            handleResponse(result_0);
                                        },
                                        error(error_2) {
                                            setIsFetching(false);
                                            if (error_2) {
                                                setResponse(toolkit.formatError(error_2));
                                            }
                                            setSubscription(null);
                                        },
                                        complete() {
                                            setIsFetching(false);
                                            setSubscription(null);
                                        }
                                    }));
                                } else {
                                    if (toolkit.isAsyncIterable(value_0)) {
                                        setSubscription({
                                            unsubscribe: () => {
                                                var _a, _b;
                                                return (_b = (_a = value_0[Symbol.asyncIterator]()).return) == null ? void 0 : _b.call(_a);
                                            }
                                        });
                                        await handleAsyncResults(handleResponse, value_0);
                                        setIsFetching(false);
                                        setSubscription(null);
                                    } else {
                                        handleResponse(value_0);
                                    }
                                }
                            } catch (t72) {
                                const error_1 = t72;
                                setIsFetching(false);
                                setResponse(toolkit.formatError(error_1));
                                setSubscription(null);
                            }
                        };
                        $[5] = autoCompleteLeafs;
                        $[6] = externalFragments;
                        $[7] = fetcher;
                        $[8] = headerEditor;
                        $[9] = history;
                        $[10] = operationName;
                        $[11] = queryEditor;
                        $[12] = responseEditor;
                        $[13] = stop;
                        $[14] = subscription;
                        $[15] = updateActiveTabValues;
                        $[16] = variableEditor;
                        $[17] = t4;
                    } else {
                        t4 = $[17];
                    }
                    const run = t4;
                    const isSubscribed = Boolean(subscription);
                    const t5 = operationName !== null && operationName !== void 0 ? operationName : null;
                    let t6;
                    if ($[18] !== isFetching || $[19] !== isSubscribed || $[20] !== run || $[21] !== stop || $[22] !== t5) {
                        t6 = {
                            isFetching,
                            isSubscribed,
                            operationName: t5,
                            run,
                            stop
                        };
                        $[18] = isFetching;
                        $[19] = isSubscribed;
                        $[20] = run;
                        $[21] = stop;
                        $[22] = t5;
                        $[23] = t6;
                    } else {
                        t6 = $[23];
                    }
                    const value_1 = t6;
                    let t7;
                    if ($[24] !== children || $[25] !== value_1) {
                        t7 = /* @__PURE__ */ jsxRuntime.jsx(ExecutionContext.Provider, {
                            value: value_1,
                            children
                        });
                        $[24] = children;
                        $[25] = value_1;
                        $[26] = t7;
                    } else {
                        t7 = $[26];
                    }
                    return t7;
                }

                function _temp$7(node) {
                    return graphql.print(node);
                }
                async function handleAsyncResults(onResponse, value) {
                    for await (const result of value) {
                        onResponse(result);
                    }
                }
                const useExecutionContext = createContextHook(ExecutionContext);

                function tryParseJsonObject({
                    json,
                    errorMessageParse,
                    errorMessageType
                }) {
                    let parsed;
                    try {
                        parsed = json && json.trim() !== "" ? JSON.parse(json) : void 0;
                    } catch (error) {
                        throw new Error(`${errorMessageParse}: ${error instanceof Error ? error.message : error}.`);
                    }
                    const isObject = typeof parsed === "object" && parsed !== null && !Array.isArray(parsed);
                    if (parsed !== void 0 && !isObject) {
                        throw new Error(errorMessageType);
                    }
                    return parsed;
                }
                const pathsMap = /* @__PURE__ */ new WeakMap();

                function mergeIncrementalResult(executionResult, incrementalResult) {
                    var _incrementalResult$pa;
                    var _a, _b, _c;
                    let path = ["data", ...((_incrementalResult$pa = incrementalResult.path) !== null && _incrementalResult$pa !== void 0 ? _incrementalResult$pa : [])];
                    for (const result of [executionResult, incrementalResult]) {
                        if (result.pending) {
                            let paths = pathsMap.get(executionResult);
                            if (paths === void 0) {
                                paths = /* @__PURE__ */ new Map();
                                pathsMap.set(executionResult, paths);
                            }
                            for (const {
                                    id,
                                    path: pendingPath
                                }
                                of result.pending) {
                                paths.set(id, ["data", ...pendingPath]);
                            }
                        }
                    }
                    const {
                        items
                    } = incrementalResult;
                    if (items) {
                        const {
                            id
                        } = incrementalResult;
                        if (id) {
                            path = (_a = pathsMap.get(executionResult)) == null ? void 0 : _a.get(id);
                            if (path === void 0) {
                                throw new Error("Invalid incremental delivery format.");
                            }
                            const list = getValue(executionResult, path.join("."));
                            list.push(...items);
                        } else {
                            var _incrementalResult$pa2;
                            path = ["data", ...((_incrementalResult$pa2 = incrementalResult.path) !== null && _incrementalResult$pa2 !== void 0 ? _incrementalResult$pa2 : [])];
                            for (const item of items) {
                                setValue(executionResult, path.join("."), item);
                                path[path.length - 1]++;
                            }
                        }
                    }
                    const {
                        data
                    } = incrementalResult;
                    if (data) {
                        const {
                            id
                        } = incrementalResult;
                        if (id) {
                            path = (_b = pathsMap.get(executionResult)) == null ? void 0 : _b.get(id);
                            if (path === void 0) {
                                throw new Error("Invalid incremental delivery format.");
                            }
                            const {
                                subPath
                            } = incrementalResult;
                            if (subPath !== void 0) {
                                path = [...path, ...subPath];
                            }
                        }
                        setValue(executionResult, path.join("."), data, {
                            merge: true
                        });
                    }
                    if (incrementalResult.errors) {
                        executionResult.errors || (executionResult.errors = []);
                        executionResult.errors.push(...incrementalResult.errors);
                    }
                    if (incrementalResult.extensions) {
                        setValue(executionResult, "extensions", incrementalResult.extensions, {
                            merge: true
                        });
                    }
                    if (incrementalResult.incremental) {
                        for (const incrementalSubResult of incrementalResult.incremental) {
                            mergeIncrementalResult(executionResult, incrementalSubResult);
                        }
                    }
                    if (incrementalResult.completed) {
                        for (const {
                                id,
                                errors
                            }
                            of incrementalResult.completed) {
                            (_c = pathsMap.get(executionResult)) == null ? void 0 : _c.delete(id);
                            if (errors) {
                                executionResult.errors || (executionResult.errors = []);
                                executionResult.errors.push(...errors);
                            }
                        }
                    }
                }
                const isMacOs = typeof navigator !== "undefined" && navigator.userAgent.includes("Mac");
                const DEFAULT_EDITOR_THEME = "graphiql";
                const DEFAULT_KEY_MAP = "sublime";
                const commonKeys = {
                    // Persistent search box in Query Editor
                    [isMacOs ? "Cmd-F" : "Ctrl-F"]: "findPersistent",
                    "Cmd-G": "findPersistent",
                    "Ctrl-G": "findPersistent",
                    // Editor improvements
                    "Ctrl-Left": "goSubwordLeft",
                    "Ctrl-Right": "goSubwordRight",
                    "Alt-Left": "goGroupLeft",
                    "Alt-Right": "goGroupRight"
                };
                async function importCodeMirror(addons, options) {
                    const CodeMirror = await Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror */ "../../../node_modules/codemirror/lib/codemirror.js"))).then(c =>
                        // Depending on bundler and settings the dynamic import either returns a
                        // function (e.g. parcel) or an object containing a `default` property
                        typeof c === "function" ? c : c.default);
                    await Promise.all((options == null ? void 0 : options.useCommonAddons) === false ? addons : [Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/hint/show-hint.js */ "../../../node_modules/codemirror/addon/hint/show-hint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/edit/matchbrackets.js */ "../../../node_modules/codemirror/addon/edit/matchbrackets.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/edit/closebrackets.js */ "../../../node_modules/codemirror/addon/edit/closebrackets.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/fold/brace-fold.js */ "../../../node_modules/codemirror/addon/fold/brace-fold.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/fold/foldgutter.js */ "../../../node_modules/codemirror/addon/fold/foldgutter.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/lint/lint.js */ "../../../node_modules/codemirror/addon/lint/lint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/search/searchcursor.js */ "../../../node_modules/codemirror/addon/search/searchcursor.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/search/jump-to-line.js */ "../../../node_modules/codemirror/addon/search/jump-to-line.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/dialog/dialog.js */ "../../../node_modules/codemirror/addon/dialog/dialog.js"))), // @ts-expect-error
                        Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/keymap/sublime.js */ "../../../node_modules/codemirror/keymap/sublime.js"))), ...addons
                    ]);
                    return CodeMirror;
                }
                const printDefault = ast => {
                    if (!ast) {
                        return "";
                    }
                    return graphql.print(ast);
                };

                function DefaultValue(t0) {
                    const $ = reactCompilerRuntime.c(12);
                    const {
                        field
                    } = t0;
                    if (!("defaultValue" in field) || field.defaultValue === void 0) {
                        return null;
                    }
                    const t1 = field.defaultValue;
                    const t2 = field.type;
                    let t3;
                    let t4;
                    let t5;
                    let t6;
                    if ($[0] !== field.defaultValue || $[1] !== field.type) {
                        t6 = Symbol.for("react.early_return_sentinel");
                        bb0: {
                            const ast = graphql.astFromValue(t1, t2);
                            if (!ast) {
                                t6 = null;
                                break bb0;
                            }
                            t5 = " = ";
                            t3 = "graphiql-doc-explorer-default-value";
                            t4 = printDefault(ast);
                        }
                        $[0] = field.defaultValue;
                        $[1] = field.type;
                        $[2] = t3;
                        $[3] = t4;
                        $[4] = t5;
                        $[5] = t6;
                    } else {
                        t3 = $[2];
                        t4 = $[3];
                        t5 = $[4];
                        t6 = $[5];
                    }
                    if (t6 !== Symbol.for("react.early_return_sentinel")) {
                        return t6;
                    }
                    let t7;
                    if ($[6] !== t3 || $[7] !== t4) {
                        t7 = /* @__PURE__ */ jsxRuntime.jsx("span", {
                            className: t3,
                            children: t4
                        });
                        $[6] = t3;
                        $[7] = t4;
                        $[8] = t7;
                    } else {
                        t7 = $[8];
                    }
                    let t8;
                    if ($[9] !== t5 || $[10] !== t7) {
                        t8 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [t5, t7]
                        });
                        $[9] = t5;
                        $[10] = t7;
                        $[11] = t8;
                    } else {
                        t8 = $[11];
                    }
                    return t8;
                }
                const SchemaContext = createNullableContext("SchemaContext");

                function SchemaContextProvider(t0) {
                    const $ = reactCompilerRuntime.c(38);
                    let fetcher;
                    let onSchemaChange;
                    let props;
                    if ($[0] !== t0) {
                        ({
                            fetcher,
                            onSchemaChange,
                            ...props
                        } = t0);
                        $[0] = t0;
                        $[1] = fetcher;
                        $[2] = onSchemaChange;
                        $[3] = props;
                    } else {
                        fetcher = $[1];
                        onSchemaChange = $[2];
                        props = $[3];
                    }
                    if (!fetcher) {
                        throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");
                    }
                    let t1;
                    if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = {
                            nonNull: true,
                            caller: SchemaContextProvider
                        };
                        $[4] = t1;
                    } else {
                        t1 = $[4];
                    }
                    const {
                        initialHeaders,
                        headerEditor
                    } = useEditorContext(t1);
                    const [schema, setSchema] = React.useState();
                    const [isFetching, setIsFetching] = React.useState(false);
                    const [fetchError, setFetchError] = React.useState(null);
                    const counterRef = React.useRef(0);
                    let t2;
                    let t3;
                    if ($[5] !== props.schema) {
                        t2 = () => {
                            setSchema(graphql.isSchema(props.schema) || props.schema == null ? props.schema : void 0);
                            counterRef.current = counterRef.current + 1;
                        };
                        t3 = [props.schema];
                        $[5] = props.schema;
                        $[6] = t2;
                        $[7] = t3;
                    } else {
                        t2 = $[6];
                        t3 = $[7];
                    }
                    React.useEffect(t2, t3);
                    const headersRef = React.useRef(initialHeaders);
                    let t4;
                    if ($[8] !== headerEditor) {
                        t4 = () => {
                            if (headerEditor) {
                                headersRef.current = headerEditor.getValue();
                            }
                        };
                        $[8] = headerEditor;
                        $[9] = t4;
                    } else {
                        t4 = $[9];
                    }
                    React.useEffect(t4);
                    let t5;
                    if ($[10] !== props.inputValueDeprecation || $[11] !== props.introspectionQueryName || $[12] !== props.schemaDescription) {
                        t5 = {
                            inputValueDeprecation: props.inputValueDeprecation,
                            introspectionQueryName: props.introspectionQueryName,
                            schemaDescription: props.schemaDescription
                        };
                        $[10] = props.inputValueDeprecation;
                        $[11] = props.introspectionQueryName;
                        $[12] = props.schemaDescription;
                        $[13] = t5;
                    } else {
                        t5 = $[13];
                    }
                    const {
                        introspectionQuery,
                        introspectionQueryName,
                        introspectionQuerySansSubscriptions
                    } = useIntrospectionQuery(t5);
                    let t6;
                    if ($[14] !== fetcher || $[15] !== introspectionQuery || $[16] !== introspectionQueryName || $[17] !== introspectionQuerySansSubscriptions || $[18] !== onSchemaChange || $[19] !== props.schema) {
                        t6 = () => {
                            if (graphql.isSchema(props.schema) || props.schema === null) {
                                return;
                            }
                            const counter = counterRef.current = counterRef.current + 1;
                            const maybeIntrospectionData = props.schema;
                            const fetchIntrospectionData = async function fetchIntrospectionData2() {
                                if (maybeIntrospectionData) {
                                    return maybeIntrospectionData;
                                }
                                const parsedHeaders = parseHeaderString(headersRef.current);
                                if (!parsedHeaders.isValidJSON) {
                                    setFetchError("Introspection failed as headers are invalid.");
                                    return;
                                }
                                const fetcherOpts = parsedHeaders.headers ? {
                                    headers: parsedHeaders.headers
                                } : {};
                                const fetch2 = toolkit.fetcherReturnToPromise(fetcher({
                                    query: introspectionQuery,
                                    operationName: introspectionQueryName
                                }, fetcherOpts));
                                if (!toolkit.isPromise(fetch2)) {
                                    setFetchError("Fetcher did not return a Promise for introspection.");
                                    return;
                                }
                                setIsFetching(true);
                                setFetchError(null);
                                let result = await fetch2;
                                if (typeof result !== "object" || result === null || !("data" in result)) {
                                    const fetch22 = toolkit.fetcherReturnToPromise(fetcher({
                                        query: introspectionQuerySansSubscriptions,
                                        operationName: introspectionQueryName
                                    }, fetcherOpts));
                                    if (!toolkit.isPromise(fetch22)) {
                                        throw new Error("Fetcher did not return a Promise for introspection.");
                                    }
                                    result = await fetch22;
                                }
                                setIsFetching(false);
                                if ((result == null ? void 0 : result.data) && "__schema" in result.data) {
                                    return result.data;
                                }
                                const responseString = typeof result === "string" ? result : toolkit.formatResult(result);
                                setFetchError(responseString);
                            };
                            fetchIntrospectionData().then(introspectionData => {
                                if (counter !== counterRef.current || !introspectionData) {
                                    return;
                                }
                                try {
                                    const newSchema = graphql.buildClientSchema(introspectionData);
                                    setSchema(newSchema);
                                    if (onSchemaChange) {
                                        onSchemaChange(newSchema);
                                    }
                                } catch (t72) {
                                    const error = t72;
                                    setFetchError(toolkit.formatError(error));
                                }
                            }).catch(error_0 => {
                                if (counter !== counterRef.current) {
                                    return;
                                }
                                setFetchError(toolkit.formatError(error_0));
                                setIsFetching(false);
                            });
                        };
                        $[14] = fetcher;
                        $[15] = introspectionQuery;
                        $[16] = introspectionQueryName;
                        $[17] = introspectionQuerySansSubscriptions;
                        $[18] = onSchemaChange;
                        $[19] = props.schema;
                        $[20] = t6;
                    } else {
                        t6 = $[20];
                    }
                    const introspect = t6;
                    let t7;
                    let t8;
                    if ($[21] !== introspect) {
                        t7 = () => {
                            introspect();
                        };
                        t8 = [introspect];
                        $[21] = introspect;
                        $[22] = t7;
                        $[23] = t8;
                    } else {
                        t7 = $[22];
                        t8 = $[23];
                    }
                    React.useEffect(t7, t8);
                    let t9;
                    if ($[24] !== introspect) {
                        t9 = () => {
                            const triggerIntrospection = function triggerIntrospection2(event) {
                                if (event.ctrlKey && event.key === "R") {
                                    introspect();
                                }
                            };
                            window.addEventListener("keydown", triggerIntrospection);
                            return () => {
                                window.removeEventListener("keydown", triggerIntrospection);
                            };
                        };
                        $[24] = introspect;
                        $[25] = t9;
                    } else {
                        t9 = $[25];
                    }
                    React.useEffect(t9);
                    let t10;
                    if ($[26] !== props.dangerouslyAssumeSchemaIsValid || $[27] !== schema) {
                        t10 = !schema || props.dangerouslyAssumeSchemaIsValid ? [] : graphql.validateSchema(schema);
                        $[26] = props.dangerouslyAssumeSchemaIsValid;
                        $[27] = schema;
                        $[28] = t10;
                    } else {
                        t10 = $[28];
                    }
                    const validationErrors = t10;
                    let t11;
                    if ($[29] !== fetchError || $[30] !== introspect || $[31] !== isFetching || $[32] !== schema || $[33] !== validationErrors) {
                        t11 = {
                            fetchError,
                            introspect,
                            isFetching,
                            schema,
                            validationErrors
                        };
                        $[29] = fetchError;
                        $[30] = introspect;
                        $[31] = isFetching;
                        $[32] = schema;
                        $[33] = validationErrors;
                        $[34] = t11;
                    } else {
                        t11 = $[34];
                    }
                    const value = t11;
                    let t12;
                    if ($[35] !== props.children || $[36] !== value) {
                        t12 = /* @__PURE__ */ jsxRuntime.jsx(SchemaContext.Provider, {
                            value,
                            children: props.children
                        });
                        $[35] = props.children;
                        $[36] = value;
                        $[37] = t12;
                    } else {
                        t12 = $[37];
                    }
                    return t12;
                }
                const useSchemaContext = createContextHook(SchemaContext);

                function useIntrospectionQuery({
                    inputValueDeprecation,
                    introspectionQueryName,
                    schemaDescription
                }) {
                    const queryName = introspectionQueryName || "IntrospectionQuery";
                    let query = graphql.getIntrospectionQuery({
                        inputValueDeprecation,
                        schemaDescription
                    });
                    if (introspectionQueryName) {
                        query = query.replace("query IntrospectionQuery", `query ${queryName}`);
                    }
                    const querySansSubscriptions = query.replace("subscriptionType { name }", "");
                    return {
                        introspectionQueryName: queryName,
                        introspectionQuery: query,
                        introspectionQuerySansSubscriptions: querySansSubscriptions
                    };
                }

                function parseHeaderString(headersString) {
                    let headers = null;
                    let isValidJSON = true;
                    try {
                        if (headersString) {
                            headers = JSON.parse(headersString);
                        }
                    } catch {
                        isValidJSON = false;
                    }
                    return {
                        headers,
                        isValidJSON
                    };
                }
                const initialNavStackItem = {
                    name: "Docs"
                };
                const ExplorerContext = createNullableContext("ExplorerContext");

                function ExplorerContextProvider(props) {
                    const $ = reactCompilerRuntime.c(14);
                    let t0;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t0 = {
                            nonNull: true,
                            caller: ExplorerContextProvider
                        };
                        $[0] = t0;
                    } else {
                        t0 = $[0];
                    }
                    const {
                        schema,
                        validationErrors
                    } = useSchemaContext(t0);
                    let t1;
                    if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = [initialNavStackItem];
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const [navStack, setNavStack] = React.useState(t1);
                    let t2;
                    if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
                        t2 = item => {
                            setNavStack(currentState => {
                                const lastItem = currentState.at(-1);
                                return lastItem.def === item.def ? currentState : [...currentState, item];
                            });
                        };
                        $[2] = t2;
                    } else {
                        t2 = $[2];
                    }
                    const push = t2;
                    let t3;
                    if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
                        t3 = () => {
                            setNavStack(_temp$6);
                        };
                        $[3] = t3;
                    } else {
                        t3 = $[3];
                    }
                    const pop = t3;
                    let t4;
                    if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
                        t4 = () => {
                            setNavStack(_temp2$3);
                        };
                        $[4] = t4;
                    } else {
                        t4 = $[4];
                    }
                    const reset = t4;
                    let t5;
                    let t6;
                    if ($[5] !== schema || $[6] !== validationErrors) {
                        t5 = () => {
                            if (schema == null || validationErrors.length > 0) {
                                reset();
                            } else {
                                setNavStack(oldNavStack => {
                                    if (oldNavStack.length === 1) {
                                        return oldNavStack;
                                    }
                                    const newNavStack = [initialNavStackItem];
                                    let lastEntity = null;
                                    for (const item_0 of oldNavStack) {
                                        if (item_0 === initialNavStackItem) {
                                            continue;
                                        }
                                        if (item_0.def) {
                                            if (graphql.isNamedType(item_0.def)) {
                                                const newType = schema.getType(item_0.def.name);
                                                if (newType) {
                                                    newNavStack.push({
                                                        name: item_0.name,
                                                        def: newType
                                                    });
                                                    lastEntity = newType;
                                                } else {
                                                    break;
                                                }
                                            } else {
                                                if (lastEntity === null) {
                                                    break;
                                                } else {
                                                    if (graphql.isObjectType(lastEntity) || graphql.isInputObjectType(lastEntity)) {
                                                        const field = lastEntity.getFields()[item_0.name];
                                                        if (field) {
                                                            newNavStack.push({
                                                                name: item_0.name,
                                                                def: field
                                                            });
                                                        } else {
                                                            break;
                                                        }
                                                    } else {
                                                        if (graphql.isScalarType(lastEntity) || graphql.isEnumType(lastEntity) || graphql.isInterfaceType(lastEntity) || graphql.isUnionType(lastEntity)) {
                                                            break;
                                                        } else {
                                                            const field_0 = lastEntity;
                                                            const arg = field_0.args.find(a => a.name === item_0.name);
                                                            if (arg) {
                                                                newNavStack.push({
                                                                    name: item_0.name,
                                                                    def: field_0
                                                                });
                                                            } else {
                                                                break;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        } else {
                                            lastEntity = null;
                                            newNavStack.push(item_0);
                                        }
                                    }
                                    return newNavStack;
                                });
                            }
                        };
                        t6 = [schema, validationErrors];
                        $[5] = schema;
                        $[6] = validationErrors;
                        $[7] = t5;
                        $[8] = t6;
                    } else {
                        t5 = $[7];
                        t6 = $[8];
                    }
                    React.useEffect(t5, t6);
                    let t7;
                    if ($[9] !== navStack) {
                        t7 = {
                            explorerNavStack: navStack,
                            push,
                            pop,
                            reset
                        };
                        $[9] = navStack;
                        $[10] = t7;
                    } else {
                        t7 = $[10];
                    }
                    const value = t7;
                    let t8;
                    if ($[11] !== props.children || $[12] !== value) {
                        t8 = /* @__PURE__ */ jsxRuntime.jsx(ExplorerContext.Provider, {
                            value,
                            children: props.children
                        });
                        $[11] = props.children;
                        $[12] = value;
                        $[13] = t8;
                    } else {
                        t8 = $[13];
                    }
                    return t8;
                }

                function _temp2$3(currentState_1) {
                    return currentState_1.length === 1 ? currentState_1 : [initialNavStackItem];
                }

                function _temp$6(currentState_0) {
                    return currentState_0.length > 1 ? currentState_0.slice(0, -1) : currentState_0;
                }
                const useExplorerContext = createContextHook(ExplorerContext);

                function renderType(type, renderNamedType) {
                    if (graphql.isNonNullType(type)) {
                        return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [renderType(type.ofType, renderNamedType), "!"]
                        });
                    }
                    if (graphql.isListType(type)) {
                        return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: ["[", renderType(type.ofType, renderNamedType), "]"]
                        });
                    }
                    return renderNamedType(type);
                }

                function TypeLink(props) {
                    const $ = reactCompilerRuntime.c(6);
                    let t0;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t0 = {
                            nonNull: true,
                            caller: TypeLink
                        };
                        $[0] = t0;
                    } else {
                        t0 = $[0];
                    }
                    const {
                        push
                    } = useExplorerContext(t0);
                    if (!props.type) {
                        return null;
                    }
                    let t1;
                    if ($[1] !== push) {
                        t1 = namedType => /* @__PURE__ */ jsxRuntime.jsx("a", {
                            className: "graphiql-doc-explorer-type-name",
                            onClick: event => {
                                event.preventDefault();
                                push({
                                    name: namedType.name,
                                    def: namedType
                                });
                            },
                            href: "#",
                            children: namedType.name
                        });
                        $[1] = push;
                        $[2] = t1;
                    } else {
                        t1 = $[2];
                    }
                    let t2;
                    if ($[3] !== props.type || $[4] !== t1) {
                        t2 = renderType(props.type, t1);
                        $[3] = props.type;
                        $[4] = t1;
                        $[5] = t2;
                    } else {
                        t2 = $[5];
                    }
                    return t2;
                }

                function Argument(t0) {
                    const $ = reactCompilerRuntime.c(19);
                    const {
                        arg,
                        showDefaultValue,
                        inline
                    } = t0;
                    let t1;
                    if ($[0] !== arg.name) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx("span", {
                            className: "graphiql-doc-explorer-argument-name",
                            children: arg.name
                        });
                        $[0] = arg.name;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    let t2;
                    if ($[2] !== arg.type) {
                        t2 = /* @__PURE__ */ jsxRuntime.jsx(TypeLink, {
                            type: arg.type
                        });
                        $[2] = arg.type;
                        $[3] = t2;
                    } else {
                        t2 = $[3];
                    }
                    let t3;
                    if ($[4] !== arg || $[5] !== showDefaultValue) {
                        t3 = showDefaultValue !== false && /* @__PURE__ */ jsxRuntime.jsx(DefaultValue, {
                            field: arg
                        });
                        $[4] = arg;
                        $[5] = showDefaultValue;
                        $[6] = t3;
                    } else {
                        t3 = $[6];
                    }
                    let t4;
                    if ($[7] !== t1 || $[8] !== t2 || $[9] !== t3) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsxs("span", {
                            children: [t1, ": ", t2, t3]
                        });
                        $[7] = t1;
                        $[8] = t2;
                        $[9] = t3;
                        $[10] = t4;
                    } else {
                        t4 = $[10];
                    }
                    const definition = t4;
                    if (inline) {
                        return definition;
                    }
                    let t5;
                    if ($[11] !== arg.description) {
                        t5 = arg.description ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, {
                            type: "description",
                            children: arg.description
                        }) : null;
                        $[11] = arg.description;
                        $[12] = t5;
                    } else {
                        t5 = $[12];
                    }
                    let t6;
                    if ($[13] !== arg.deprecationReason) {
                        t6 = arg.deprecationReason ? /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: "graphiql-doc-explorer-argument-deprecation",
                            children: [ /* @__PURE__ */ jsxRuntime.jsx("div", {
                                className: "graphiql-doc-explorer-argument-deprecation-label",
                                children: "Deprecated"
                            }), /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, {
                                type: "deprecation",
                                children: arg.deprecationReason
                            })]
                        }) : null;
                        $[13] = arg.deprecationReason;
                        $[14] = t6;
                    } else {
                        t6 = $[14];
                    }
                    let t7;
                    if ($[15] !== definition || $[16] !== t5 || $[17] !== t6) {
                        t7 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: "graphiql-doc-explorer-argument",
                            children: [definition, t5, t6]
                        });
                        $[15] = definition;
                        $[16] = t5;
                        $[17] = t6;
                        $[18] = t7;
                    } else {
                        t7 = $[18];
                    }
                    return t7;
                }

                function DeprecationReason(props) {
                    const $ = reactCompilerRuntime.c(3);
                    let t0;
                    if ($[0] !== props.children || $[1] !== props.preview) {
                        var _props$preview;
                        t0 = props.children ? /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: "graphiql-doc-explorer-deprecation",
                            children: [ /* @__PURE__ */ jsxRuntime.jsx("div", {
                                className: "graphiql-doc-explorer-deprecation-label",
                                children: "Deprecated"
                            }), /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, {
                                type: "deprecation",
                                onlyShowFirstChild: (_props$preview = props.preview) !== null && _props$preview !== void 0 ? _props$preview : true,
                                children: props.children
                            })]
                        }) : null;
                        $[0] = props.children;
                        $[1] = props.preview;
                        $[2] = t0;
                    } else {
                        t0 = $[2];
                    }
                    return t0;
                }

                function Directive(t0) {
                    const $ = reactCompilerRuntime.c(2);
                    const {
                        directive
                    } = t0;
                    let t1;
                    if ($[0] !== directive.name.value) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsxs("span", {
                            className: "graphiql-doc-explorer-directive",
                            children: ["@", directive.name.value]
                        });
                        $[0] = directive.name.value;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    return t1;
                }

                function ExplorerSection(props) {
                    const $ = reactCompilerRuntime.c(10);
                    const Icon2 = TYPE_TO_ICON[props.title];
                    let t0;
                    if ($[0] !== Icon2) {
                        t0 = /* @__PURE__ */ jsxRuntime.jsx(Icon2, {});
                        $[0] = Icon2;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    if ($[2] !== props.title || $[3] !== t0) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: "graphiql-doc-explorer-section-title",
                            children: [t0, props.title]
                        });
                        $[2] = props.title;
                        $[3] = t0;
                        $[4] = t1;
                    } else {
                        t1 = $[4];
                    }
                    let t2;
                    if ($[5] !== props.children) {
                        t2 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            className: "graphiql-doc-explorer-section-content",
                            children: props.children
                        });
                        $[5] = props.children;
                        $[6] = t2;
                    } else {
                        t2 = $[6];
                    }
                    let t3;
                    if ($[7] !== t1 || $[8] !== t2) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            children: [t1, t2]
                        });
                        $[7] = t1;
                        $[8] = t2;
                        $[9] = t3;
                    } else {
                        t3 = $[9];
                    }
                    return t3;
                }
                const TYPE_TO_ICON = {
                    Arguments: ArgumentIcon,
                    "Deprecated Arguments": DeprecatedArgumentIcon,
                    "Deprecated Enum Values": DeprecatedEnumValueIcon,
                    "Deprecated Fields": DeprecatedFieldIcon,
                    Directives: DirectiveIcon,
                    "Enum Values": EnumValueIcon,
                    Fields: FieldIcon,
                    Implements: ImplementsIcon,
                    Implementations: TypeIcon,
                    "Possible Types": TypeIcon,
                    "Root Types": RootTypeIcon,
                    Type: TypeIcon,
                    "All Schema Types": TypeIcon
                };

                function FieldDocumentation(props) {
                    const $ = reactCompilerRuntime.c(15);
                    let t0;
                    if ($[0] !== props.field.description) {
                        t0 = props.field.description ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, {
                            type: "description",
                            children: props.field.description
                        }) : null;
                        $[0] = props.field.description;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    if ($[2] !== props.field.deprecationReason) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx(DeprecationReason, {
                            preview: false,
                            children: props.field.deprecationReason
                        });
                        $[2] = props.field.deprecationReason;
                        $[3] = t1;
                    } else {
                        t1 = $[3];
                    }
                    let t2;
                    if ($[4] !== props.field.type) {
                        t2 = /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: "Type",
                            children: /* @__PURE__ */ jsxRuntime.jsx(TypeLink, {
                                type: props.field.type
                            })
                        });
                        $[4] = props.field.type;
                        $[5] = t2;
                    } else {
                        t2 = $[5];
                    }
                    let t3;
                    let t4;
                    if ($[6] !== props.field) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsx(Arguments, {
                            field: props.field
                        });
                        t4 = /* @__PURE__ */ jsxRuntime.jsx(Directives, {
                            field: props.field
                        });
                        $[6] = props.field;
                        $[7] = t3;
                        $[8] = t4;
                    } else {
                        t3 = $[7];
                        t4 = $[8];
                    }
                    let t5;
                    if ($[9] !== t0 || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 || $[13] !== t4) {
                        t5 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [t0, t1, t2, t3, t4]
                        });
                        $[9] = t0;
                        $[10] = t1;
                        $[11] = t2;
                        $[12] = t3;
                        $[13] = t4;
                        $[14] = t5;
                    } else {
                        t5 = $[14];
                    }
                    return t5;
                }

                function Arguments(t0) {
                    const $ = reactCompilerRuntime.c(12);
                    const {
                        field
                    } = t0;
                    const [showDeprecated, setShowDeprecated] = React.useState(false);
                    let t1;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = () => {
                            setShowDeprecated(true);
                        };
                        $[0] = t1;
                    } else {
                        t1 = $[0];
                    }
                    const handleShowDeprecated = t1;
                    if (!("args" in field)) {
                        return null;
                    }
                    let args;
                    let deprecatedArgs;
                    let t2;
                    if ($[1] !== field.args) {
                        args = [];
                        deprecatedArgs = [];
                        for (const argument of field.args) {
                            if (argument.deprecationReason) {
                                deprecatedArgs.push(argument);
                            } else {
                                args.push(argument);
                            }
                        }
                        t2 = args.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: "Arguments",
                            children: args.map(_temp$5)
                        }) : null;
                        $[1] = field.args;
                        $[2] = args;
                        $[3] = deprecatedArgs;
                        $[4] = t2;
                    } else {
                        args = $[2];
                        deprecatedArgs = $[3];
                        t2 = $[4];
                    }
                    let t3;
                    if ($[5] !== args.length || $[6] !== deprecatedArgs || $[7] !== showDeprecated) {
                        t3 = deprecatedArgs.length > 0 ? showDeprecated || args.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: "Deprecated Arguments",
                            children: deprecatedArgs.map(_temp2$2)
                        }) : /* @__PURE__ */ jsxRuntime.jsx(Button$1, {
                            type: "button",
                            onClick: handleShowDeprecated,
                            children: "Show Deprecated Arguments"
                        }) : null;
                        $[5] = args.length;
                        $[6] = deprecatedArgs;
                        $[7] = showDeprecated;
                        $[8] = t3;
                    } else {
                        t3 = $[8];
                    }
                    let t4;
                    if ($[9] !== t2 || $[10] !== t3) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [t2, t3]
                        });
                        $[9] = t2;
                        $[10] = t3;
                        $[11] = t4;
                    } else {
                        t4 = $[11];
                    }
                    return t4;
                }

                function _temp2$2(arg_0) {
                    return /* @__PURE__ */ jsxRuntime.jsx(Argument, {
                        arg: arg_0
                    }, arg_0.name);
                }

                function _temp$5(arg) {
                    return /* @__PURE__ */ jsxRuntime.jsx(Argument, {
                        arg
                    }, arg.name);
                }

                function Directives(t0) {
                    var _a, _b, _c;
                    const $ = reactCompilerRuntime.c(6);
                    const {
                        field
                    } = t0;
                    let t1;
                    if ($[0] !== ((_a = field.astNode) == null ? void 0 : _a.directives)) {
                        t1 = ((_b = field.astNode) == null ? void 0 : _b.directives) || [];
                        $[0] = (_c = field.astNode) == null ? void 0 : _c.directives;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const directives = t1;
                    if (!directives || directives.length === 0) {
                        return null;
                    }
                    let t2;
                    if ($[2] !== directives) {
                        t2 = directives.map(_temp3$2);
                        $[2] = directives;
                        $[3] = t2;
                    } else {
                        t2 = $[3];
                    }
                    let t3;
                    if ($[4] !== t2) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: "Directives",
                            children: t2
                        });
                        $[4] = t2;
                        $[5] = t3;
                    } else {
                        t3 = $[5];
                    }
                    return t3;
                }

                function _temp3$2(directive) {
                    return /* @__PURE__ */ jsxRuntime.jsx("div", {
                        children: /* @__PURE__ */ jsxRuntime.jsx(Directive, {
                            directive
                        })
                    }, directive.name.value);
                }

                function SchemaDocumentation(props) {
                    var _a, _b, _c, _d;
                    const $ = reactCompilerRuntime.c(39);
                    let t0;
                    if ($[0] !== props.schema) {
                        t0 = props.schema.getQueryType();
                        $[0] = props.schema;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    const queryType = t0;
                    let t1;
                    if ($[2] !== props.schema) {
                        t1 = (_b = (_a = props.schema).getMutationType) == null ? void 0 : _b.call(_a);
                        $[2] = props.schema;
                        $[3] = t1;
                    } else {
                        t1 = $[3];
                    }
                    const mutationType = t1;
                    let t2;
                    if ($[4] !== props.schema) {
                        t2 = (_d = (_c = props.schema).getSubscriptionType) == null ? void 0 : _d.call(_c);
                        $[4] = props.schema;
                        $[5] = t2;
                    } else {
                        t2 = $[5];
                    }
                    const subscriptionType = t2;
                    let T0;
                    let t3;
                    let t4;
                    let t5;
                    let t6;
                    if ($[6] !== mutationType || $[7] !== props.schema || $[8] !== queryType || $[9] !== subscriptionType) {
                        const typeMap = props.schema.getTypeMap();
                        const t72 = queryType == null ? void 0 : queryType.name;
                        const t82 = mutationType == null ? void 0 : mutationType.name;
                        const t9 = subscriptionType == null ? void 0 : subscriptionType.name;
                        let t10;
                        if ($[15] !== t72 || $[16] !== t82 || $[17] !== t9) {
                            t10 = [t72, t82, t9];
                            $[15] = t72;
                            $[16] = t82;
                            $[17] = t9;
                            $[18] = t10;
                        } else {
                            t10 = $[18];
                        }
                        const ignoreTypesInAllSchema = t10;
                        const t11 = props.schema.description || "A GraphQL schema provides a root type for each kind of operation.";
                        if ($[19] !== t11) {
                            t5 = /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, {
                                type: "description",
                                children: t11
                            });
                            $[19] = t11;
                            $[20] = t5;
                        } else {
                            t5 = $[20];
                        }
                        let t12;
                        if ($[21] !== queryType) {
                            t12 = queryType ? /* @__PURE__ */ jsxRuntime.jsxs("div", {
                                children: [ /* @__PURE__ */ jsxRuntime.jsx("span", {
                                    className: "graphiql-doc-explorer-root-type",
                                    children: "query"
                                }), ": ", /* @__PURE__ */ jsxRuntime.jsx(TypeLink, {
                                    type: queryType
                                })]
                            }) : null;
                            $[21] = queryType;
                            $[22] = t12;
                        } else {
                            t12 = $[22];
                        }
                        let t13;
                        if ($[23] !== mutationType) {
                            t13 = mutationType && /* @__PURE__ */ jsxRuntime.jsxs("div", {
                                children: [ /* @__PURE__ */ jsxRuntime.jsx("span", {
                                    className: "graphiql-doc-explorer-root-type",
                                    children: "mutation"
                                }), ": ", /* @__PURE__ */ jsxRuntime.jsx(TypeLink, {
                                    type: mutationType
                                })]
                            });
                            $[23] = mutationType;
                            $[24] = t13;
                        } else {
                            t13 = $[24];
                        }
                        let t14;
                        if ($[25] !== subscriptionType) {
                            t14 = subscriptionType && /* @__PURE__ */ jsxRuntime.jsxs("div", {
                                children: [ /* @__PURE__ */ jsxRuntime.jsx("span", {
                                    className: "graphiql-doc-explorer-root-type",
                                    children: "subscription"
                                }), ": ", /* @__PURE__ */ jsxRuntime.jsx(TypeLink, {
                                    type: subscriptionType
                                })]
                            });
                            $[25] = subscriptionType;
                            $[26] = t14;
                        } else {
                            t14 = $[26];
                        }
                        if ($[27] !== t12 || $[28] !== t13 || $[29] !== t14) {
                            t6 = /* @__PURE__ */ jsxRuntime.jsxs(ExplorerSection, {
                                title: "Root Types",
                                children: [t12, t13, t14]
                            });
                            $[27] = t12;
                            $[28] = t13;
                            $[29] = t14;
                            $[30] = t6;
                        } else {
                            t6 = $[30];
                        }
                        T0 = ExplorerSection;
                        t3 = "All Schema Types";
                        t4 = typeMap && /* @__PURE__ */ jsxRuntime.jsx("div", {
                            children: Object.values(typeMap).map(type => {
                                if (ignoreTypesInAllSchema.includes(type.name) || type.name.startsWith("__")) {
                                    return null;
                                }
                                return /* @__PURE__ */ jsxRuntime.jsx("div", {
                                    children: /* @__PURE__ */ jsxRuntime.jsx(TypeLink, {
                                        type
                                    })
                                }, type.name);
                            })
                        });
                        $[6] = mutationType;
                        $[7] = props.schema;
                        $[8] = queryType;
                        $[9] = subscriptionType;
                        $[10] = T0;
                        $[11] = t3;
                        $[12] = t4;
                        $[13] = t5;
                        $[14] = t6;
                    } else {
                        T0 = $[10];
                        t3 = $[11];
                        t4 = $[12];
                        t5 = $[13];
                        t6 = $[14];
                    }
                    let t7;
                    if ($[31] !== T0 || $[32] !== t3 || $[33] !== t4) {
                        t7 = /* @__PURE__ */ jsxRuntime.jsx(T0, {
                            title: t3,
                            children: t4
                        });
                        $[31] = T0;
                        $[32] = t3;
                        $[33] = t4;
                        $[34] = t7;
                    } else {
                        t7 = $[34];
                    }
                    let t8;
                    if ($[35] !== t5 || $[36] !== t6 || $[37] !== t7) {
                        t8 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [t5, t6, t7]
                        });
                        $[35] = t5;
                        $[36] = t6;
                        $[37] = t7;
                        $[38] = t8;
                    } else {
                        t8 = $[38];
                    }
                    return t8;
                }

                function debounce(duration, fn) {
                    let timeout;
                    return function(...args) {
                        if (timeout) {
                            window.clearTimeout(timeout);
                        }
                        timeout = window.setTimeout(() => {
                            timeout = null;
                            fn(...args);
                        }, duration);
                    };
                }

                function Search() {
                    "use no memo";

                    const {
                        explorerNavStack,
                        push
                    } = useExplorerContext({
                        nonNull: true,
                        caller: Search
                    });
                    const inputRef = React.useRef(null);
                    const getSearchResults = useSearchResults();
                    const [searchValue, setSearchValue] = React.useState("");
                    const [results, setResults] = React.useState(getSearchResults(searchValue));
                    const debouncedGetSearchResults = React.useMemo(() => debounce(200, search => {
                        setResults(getSearchResults(search));
                    }), [getSearchResults]);
                    React.useEffect(() => {
                        debouncedGetSearchResults(searchValue);
                    }, [debouncedGetSearchResults, searchValue]);
                    React.useEffect(() => {
                        function handleKeyDown(event) {
                            var _a;
                            if (event.metaKey && event.key === "k") {
                                (_a = inputRef.current) == null ? void 0 : _a.focus();
                            }
                        }
                        window.addEventListener("keydown", handleKeyDown);
                        return () => window.removeEventListener("keydown", handleKeyDown);
                    }, []);
                    const navItem = explorerNavStack.at(-1);
                    const onSelect = React.useCallback(def => {
                        push("field" in def ? {
                            name: def.field.name,
                            def: def.field
                        } : {
                            name: def.type.name,
                            def: def.type
                        });
                    }, [push]);
                    const isFocused = React.useRef(false);
                    const handleFocus = React.useCallback(e => {
                        isFocused.current = e.type === "focus";
                    }, []);
                    const shouldSearchBoxAppear = explorerNavStack.length === 1 || graphql.isObjectType(navItem.def) || graphql.isInterfaceType(navItem.def) || graphql.isInputObjectType(navItem.def);
                    if (!shouldSearchBoxAppear) {
                        return null;
                    }
                    return /* @__PURE__ */ jsxRuntime.jsxs(react.Combobox, {
                        as: "div",
                        className: "graphiql-doc-explorer-search",
                        onChange: onSelect,
                        "data-state": isFocused ? void 0 : "idle",
                        "aria-label": `Search ${navItem.name}...`,
                        children: [ /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: "graphiql-doc-explorer-search-input",
                            onClick: () => {
                                var _a;
                                (_a = inputRef.current) == null ? void 0 : _a.focus();
                            },
                            children: [ /* @__PURE__ */ jsxRuntime.jsx(MagnifyingGlassIcon, {}), /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Input, {
                                autoComplete: "off",
                                onFocus: handleFocus,
                                onBlur: handleFocus,
                                onChange: event_0 => setSearchValue(event_0.target.value),
                                placeholder: `${isMacOs ? "⌘" : "Ctrl"} K`,
                                ref: inputRef,
                                value: searchValue,
                                "data-cy": "doc-explorer-input"
                            })]
                        }), isFocused.current && /* @__PURE__ */ jsxRuntime.jsxs(react.Combobox.Options, {
                            "data-cy": "doc-explorer-list",
                            children: [results.within.length + results.types.length + results.fields.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("li", {
                                className: "graphiql-doc-explorer-search-empty",
                                children: "No results found"
                            }) : results.within.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Option, {
                                value: result,
                                "data-cy": "doc-explorer-option",
                                children: /* @__PURE__ */ jsxRuntime.jsx(Field$1, {
                                    field: result.field,
                                    argument: result.argument
                                })
                            }, `within-${i}`)), results.within.length > 0 && results.types.length + results.fields.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", {
                                className: "graphiql-doc-explorer-search-divider",
                                children: "Other results"
                            }) : null, results.types.map((result_0, i_0) => /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Option, {
                                value: result_0,
                                "data-cy": "doc-explorer-option",
                                children: /* @__PURE__ */ jsxRuntime.jsx(Type, {
                                    type: result_0.type
                                })
                            }, `type-${i_0}`)), results.fields.map((result_1, i_1) => /* @__PURE__ */ jsxRuntime.jsxs(react.Combobox.Option, {
                                value: result_1,
                                "data-cy": "doc-explorer-option",
                                children: [ /* @__PURE__ */ jsxRuntime.jsx(Type, {
                                    type: result_1.type
                                }), ".", /* @__PURE__ */ jsxRuntime.jsx(Field$1, {
                                    field: result_1.field,
                                    argument: result_1.argument
                                })]
                            }, `field-${i_1}`))]
                        })]
                    });
                }
                const _useSearchResults = useSearchResults;

                function useSearchResults(caller) {
                    const $ = reactCompilerRuntime.c(9);
                    const t0 = caller || _useSearchResults;
                    let t1;
                    if ($[0] !== t0) {
                        t1 = {
                            nonNull: true,
                            caller: t0
                        };
                        $[0] = t0;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        explorerNavStack
                    } = useExplorerContext(t1);
                    const t2 = caller || _useSearchResults;
                    let t3;
                    if ($[2] !== t2) {
                        t3 = {
                            nonNull: true,
                            caller: t2
                        };
                        $[2] = t2;
                        $[3] = t3;
                    } else {
                        t3 = $[3];
                    }
                    const {
                        schema
                    } = useSchemaContext(t3);
                    let t4;
                    if ($[4] !== explorerNavStack) {
                        t4 = explorerNavStack.at(-1);
                        $[4] = explorerNavStack;
                        $[5] = t4;
                    } else {
                        t4 = $[5];
                    }
                    const navItem = t4;
                    let t5;
                    if ($[6] !== navItem || $[7] !== schema) {
                        t5 = searchValue => {
                            const matches = {
                                within: [],
                                types: [],
                                fields: []
                            };
                            if (!schema) {
                                return matches;
                            }
                            const withinType = navItem.def;
                            const typeMap = schema.getTypeMap();
                            let typeNames = Object.keys(typeMap);
                            if (withinType) {
                                typeNames = typeNames.filter(n => n !== withinType.name);
                                typeNames.unshift(withinType.name);
                            }
                            for (const typeName of typeNames) {
                                if (matches.within.length + matches.types.length + matches.fields.length >= 100) {
                                    break;
                                }
                                const type = typeMap[typeName];
                                if (withinType !== type && isMatch(typeName, searchValue)) {
                                    matches.types.push({
                                        type
                                    });
                                }
                                if (!graphql.isObjectType(type) && !graphql.isInterfaceType(type) && !graphql.isInputObjectType(type)) {
                                    continue;
                                }
                                const fields = type.getFields();
                                for (const fieldName in fields) {
                                    const field = fields[fieldName];
                                    let matchingArgs;
                                    if (!isMatch(fieldName, searchValue)) {
                                        if ("args" in field) {
                                            matchingArgs = field.args.filter(arg => isMatch(arg.name, searchValue));
                                            if (matchingArgs.length === 0) {
                                                continue;
                                            }
                                        } else {
                                            continue;
                                        }
                                    }
                                    matches[withinType === type ? "within" : "fields"].push(...(matchingArgs ? matchingArgs.map(argument => ({
                                        type,
                                        field,
                                        argument
                                    })) : [{
                                        type,
                                        field
                                    }]));
                                }
                            }
                            return matches;
                        };
                        $[6] = navItem;
                        $[7] = schema;
                        $[8] = t5;
                    } else {
                        t5 = $[8];
                    }
                    return t5;
                }

                function isMatch(sourceText, searchValue) {
                    try {
                        const escaped = searchValue.replaceAll(/[^_0-9A-Za-z]/g, ch => "\\" + ch);
                        return sourceText.search(new RegExp(escaped, "i")) !== -1;
                    } catch {
                        return sourceText.toLowerCase().includes(searchValue.toLowerCase());
                    }
                }

                function Type(props) {
                    const $ = reactCompilerRuntime.c(2);
                    let t0;
                    if ($[0] !== props.type.name) {
                        t0 = /* @__PURE__ */ jsxRuntime.jsx("span", {
                            className: "graphiql-doc-explorer-search-type",
                            children: props.type.name
                        });
                        $[0] = props.type.name;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    return t0;
                }

                function Field$1(t0) {
                    const $ = reactCompilerRuntime.c(7);
                    const {
                        field,
                        argument
                    } = t0;
                    let t1;
                    if ($[0] !== field.name) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx("span", {
                            className: "graphiql-doc-explorer-search-field",
                            children: field.name
                        });
                        $[0] = field.name;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    let t2;
                    if ($[2] !== argument) {
                        t2 = argument ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: ["(", /* @__PURE__ */ jsxRuntime.jsx("span", {
                                className: "graphiql-doc-explorer-search-argument",
                                children: argument.name
                            }), ":", " ", renderType(argument.type, _temp$4), ")"]
                        }) : null;
                        $[2] = argument;
                        $[3] = t2;
                    } else {
                        t2 = $[3];
                    }
                    let t3;
                    if ($[4] !== t1 || $[5] !== t2) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [t1, t2]
                        });
                        $[4] = t1;
                        $[5] = t2;
                        $[6] = t3;
                    } else {
                        t3 = $[6];
                    }
                    return t3;
                }

                function _temp$4(namedType) {
                    return /* @__PURE__ */ jsxRuntime.jsx(Type, {
                        type: namedType
                    });
                }

                function FieldLink(props) {
                    const $ = reactCompilerRuntime.c(7);
                    let t0;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t0 = {
                            nonNull: true
                        };
                        $[0] = t0;
                    } else {
                        t0 = $[0];
                    }
                    const {
                        push
                    } = useExplorerContext(t0);
                    let t1;
                    if ($[1] !== props.field || $[2] !== push) {
                        t1 = event => {
                            event.preventDefault();
                            push({
                                name: props.field.name,
                                def: props.field
                            });
                        };
                        $[1] = props.field;
                        $[2] = push;
                        $[3] = t1;
                    } else {
                        t1 = $[3];
                    }
                    let t2;
                    if ($[4] !== props.field.name || $[5] !== t1) {
                        t2 = /* @__PURE__ */ jsxRuntime.jsx("a", {
                            className: "graphiql-doc-explorer-field-name",
                            onClick: t1,
                            href: "#",
                            children: props.field.name
                        });
                        $[4] = props.field.name;
                        $[5] = t1;
                        $[6] = t2;
                    } else {
                        t2 = $[6];
                    }
                    return t2;
                }

                function TypeDocumentation(props) {
                    const $ = reactCompilerRuntime.c(2);
                    let t0;
                    if ($[0] !== props.type) {
                        t0 = graphql.isNamedType(props.type) ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [props.type.description ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, {
                                type: "description",
                                children: props.type.description
                            }) : null, /* @__PURE__ */ jsxRuntime.jsx(ImplementsInterfaces, {
                                type: props.type
                            }), /* @__PURE__ */ jsxRuntime.jsx(Fields, {
                                type: props.type
                            }), /* @__PURE__ */ jsxRuntime.jsx(EnumValues, {
                                type: props.type
                            }), /* @__PURE__ */ jsxRuntime.jsx(PossibleTypes, {
                                type: props.type
                            })]
                        }) : null;
                        $[0] = props.type;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    return t0;
                }

                function ImplementsInterfaces(t0) {
                    const $ = reactCompilerRuntime.c(5);
                    const {
                        type
                    } = t0;
                    if (!graphql.isObjectType(type)) {
                        return null;
                    }
                    let t1;
                    if ($[0] !== type) {
                        t1 = type.getInterfaces();
                        $[0] = type;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const interfaces = t1;
                    let t2;
                    if ($[2] !== interfaces.length || $[3] !== type) {
                        t2 = interfaces.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: "Implements",
                            children: type.getInterfaces().map(_temp$3)
                        }) : null;
                        $[2] = interfaces.length;
                        $[3] = type;
                        $[4] = t2;
                    } else {
                        t2 = $[4];
                    }
                    return t2;
                }

                function _temp$3(implementedInterface) {
                    return /* @__PURE__ */ jsxRuntime.jsx("div", {
                        children: /* @__PURE__ */ jsxRuntime.jsx(TypeLink, {
                            type: implementedInterface
                        })
                    }, implementedInterface.name);
                }

                function Fields(t0) {
                    const $ = reactCompilerRuntime.c(12);
                    const {
                        type
                    } = t0;
                    const [showDeprecated, setShowDeprecated] = React.useState(false);
                    let t1;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = () => {
                            setShowDeprecated(true);
                        };
                        $[0] = t1;
                    } else {
                        t1 = $[0];
                    }
                    const handleShowDeprecated = t1;
                    if (!graphql.isObjectType(type) && !graphql.isInterfaceType(type) && !graphql.isInputObjectType(type)) {
                        return null;
                    }
                    let deprecatedFields;
                    let fields;
                    let t2;
                    if ($[1] !== type) {
                        const fieldMap = type.getFields();
                        fields = [];
                        deprecatedFields = [];
                        for (const field of Object.keys(fieldMap).map(name => fieldMap[name])) {
                            if (field.deprecationReason) {
                                deprecatedFields.push(field);
                            } else {
                                fields.push(field);
                            }
                        }
                        t2 = fields.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: "Fields",
                            children: fields.map(_temp2$1)
                        }) : null;
                        $[1] = type;
                        $[2] = deprecatedFields;
                        $[3] = fields;
                        $[4] = t2;
                    } else {
                        deprecatedFields = $[2];
                        fields = $[3];
                        t2 = $[4];
                    }
                    let t3;
                    if ($[5] !== deprecatedFields || $[6] !== fields.length || $[7] !== showDeprecated) {
                        t3 = deprecatedFields.length > 0 ? showDeprecated || fields.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: "Deprecated Fields",
                            children: deprecatedFields.map(_temp3$1)
                        }) : /* @__PURE__ */ jsxRuntime.jsx(Button$1, {
                            type: "button",
                            onClick: handleShowDeprecated,
                            children: "Show Deprecated Fields"
                        }) : null;
                        $[5] = deprecatedFields;
                        $[6] = fields.length;
                        $[7] = showDeprecated;
                        $[8] = t3;
                    } else {
                        t3 = $[8];
                    }
                    let t4;
                    if ($[9] !== t2 || $[10] !== t3) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [t2, t3]
                        });
                        $[9] = t2;
                        $[10] = t3;
                        $[11] = t4;
                    } else {
                        t4 = $[11];
                    }
                    return t4;
                }

                function _temp3$1(field_1) {
                    return /* @__PURE__ */ jsxRuntime.jsx(Field, {
                        field: field_1
                    }, field_1.name);
                }

                function _temp2$1(field_0) {
                    return /* @__PURE__ */ jsxRuntime.jsx(Field, {
                        field: field_0
                    }, field_0.name);
                }

                function Field(t0) {
                    const $ = reactCompilerRuntime.c(22);
                    const {
                        field
                    } = t0;
                    let t1;
                    let t2;
                    let t3;
                    if ($[0] !== field) {
                        const args = "args" in field ? field.args.filter(_temp4$1) : [];
                        t3 = "graphiql-doc-explorer-item";
                        t1 = /* @__PURE__ */ jsxRuntime.jsx(FieldLink, {
                            field
                        });
                        t2 = args.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: ["(", /* @__PURE__ */ jsxRuntime.jsx("span", {
                                children: args.map(arg_0 => args.length === 1 ? /* @__PURE__ */ jsxRuntime.jsx(Argument, {
                                    arg: arg_0,
                                    inline: true
                                }, arg_0.name) : /* @__PURE__ */ jsxRuntime.jsx("div", {
                                    className: "graphiql-doc-explorer-argument-multiple",
                                    children: /* @__PURE__ */ jsxRuntime.jsx(Argument, {
                                        arg: arg_0,
                                        inline: true
                                    })
                                }, arg_0.name))
                            }), ")"]
                        }) : null;
                        $[0] = field;
                        $[1] = t1;
                        $[2] = t2;
                        $[3] = t3;
                    } else {
                        t1 = $[1];
                        t2 = $[2];
                        t3 = $[3];
                    }
                    let t4;
                    if ($[4] !== field.type) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsx(TypeLink, {
                            type: field.type
                        });
                        $[4] = field.type;
                        $[5] = t4;
                    } else {
                        t4 = $[5];
                    }
                    let t5;
                    if ($[6] !== field) {
                        t5 = /* @__PURE__ */ jsxRuntime.jsx(DefaultValue, {
                            field
                        });
                        $[6] = field;
                        $[7] = t5;
                    } else {
                        t5 = $[7];
                    }
                    let t6;
                    if ($[8] !== t1 || $[9] !== t2 || $[10] !== t4 || $[11] !== t5) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            children: [t1, t2, ": ", t4, t5]
                        });
                        $[8] = t1;
                        $[9] = t2;
                        $[10] = t4;
                        $[11] = t5;
                        $[12] = t6;
                    } else {
                        t6 = $[12];
                    }
                    let t7;
                    if ($[13] !== field.description) {
                        t7 = field.description ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, {
                            type: "description",
                            onlyShowFirstChild: true,
                            children: field.description
                        }) : null;
                        $[13] = field.description;
                        $[14] = t7;
                    } else {
                        t7 = $[14];
                    }
                    let t8;
                    if ($[15] !== field.deprecationReason) {
                        t8 = /* @__PURE__ */ jsxRuntime.jsx(DeprecationReason, {
                            children: field.deprecationReason
                        });
                        $[15] = field.deprecationReason;
                        $[16] = t8;
                    } else {
                        t8 = $[16];
                    }
                    let t9;
                    if ($[17] !== t3 || $[18] !== t6 || $[19] !== t7 || $[20] !== t8) {
                        t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: t3,
                            children: [t6, t7, t8]
                        });
                        $[17] = t3;
                        $[18] = t6;
                        $[19] = t7;
                        $[20] = t8;
                        $[21] = t9;
                    } else {
                        t9 = $[21];
                    }
                    return t9;
                }

                function _temp4$1(arg) {
                    return !arg.deprecationReason;
                }

                function EnumValues(t0) {
                    const $ = reactCompilerRuntime.c(12);
                    const {
                        type
                    } = t0;
                    const [showDeprecated, setShowDeprecated] = React.useState(false);
                    let t1;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = () => {
                            setShowDeprecated(true);
                        };
                        $[0] = t1;
                    } else {
                        t1 = $[0];
                    }
                    const handleShowDeprecated = t1;
                    if (!graphql.isEnumType(type)) {
                        return null;
                    }
                    let deprecatedValues;
                    let t2;
                    let values;
                    if ($[1] !== type) {
                        values = [];
                        deprecatedValues = [];
                        for (const value of type.getValues()) {
                            if (value.deprecationReason) {
                                deprecatedValues.push(value);
                            } else {
                                values.push(value);
                            }
                        }
                        t2 = values.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: "Enum Values",
                            children: values.map(_temp5)
                        }) : null;
                        $[1] = type;
                        $[2] = deprecatedValues;
                        $[3] = t2;
                        $[4] = values;
                    } else {
                        deprecatedValues = $[2];
                        t2 = $[3];
                        values = $[4];
                    }
                    let t3;
                    if ($[5] !== deprecatedValues || $[6] !== showDeprecated || $[7] !== values.length) {
                        t3 = deprecatedValues.length > 0 ? showDeprecated || values.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: "Deprecated Enum Values",
                            children: deprecatedValues.map(_temp6)
                        }) : /* @__PURE__ */ jsxRuntime.jsx(Button$1, {
                            type: "button",
                            onClick: handleShowDeprecated,
                            children: "Show Deprecated Values"
                        }) : null;
                        $[5] = deprecatedValues;
                        $[6] = showDeprecated;
                        $[7] = values.length;
                        $[8] = t3;
                    } else {
                        t3 = $[8];
                    }
                    let t4;
                    if ($[9] !== t2 || $[10] !== t3) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
                            children: [t2, t3]
                        });
                        $[9] = t2;
                        $[10] = t3;
                        $[11] = t4;
                    } else {
                        t4 = $[11];
                    }
                    return t4;
                }

                function _temp6(value_1) {
                    return /* @__PURE__ */ jsxRuntime.jsx(EnumValue, {
                        value: value_1
                    }, value_1.name);
                }

                function _temp5(value_0) {
                    return /* @__PURE__ */ jsxRuntime.jsx(EnumValue, {
                        value: value_0
                    }, value_0.name);
                }

                function EnumValue(t0) {
                    const $ = reactCompilerRuntime.c(10);
                    const {
                        value
                    } = t0;
                    let t1;
                    if ($[0] !== value.name) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            className: "graphiql-doc-explorer-enum-value",
                            children: value.name
                        });
                        $[0] = value.name;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    let t2;
                    if ($[2] !== value.description) {
                        t2 = value.description ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, {
                            type: "description",
                            children: value.description
                        }) : null;
                        $[2] = value.description;
                        $[3] = t2;
                    } else {
                        t2 = $[3];
                    }
                    let t3;
                    if ($[4] !== value.deprecationReason) {
                        t3 = value.deprecationReason ? /* @__PURE__ */ jsxRuntime.jsx(MarkdownContent, {
                            type: "deprecation",
                            children: value.deprecationReason
                        }) : null;
                        $[4] = value.deprecationReason;
                        $[5] = t3;
                    } else {
                        t3 = $[5];
                    }
                    let t4;
                    if ($[6] !== t1 || $[7] !== t2 || $[8] !== t3) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: "graphiql-doc-explorer-item",
                            children: [t1, t2, t3]
                        });
                        $[6] = t1;
                        $[7] = t2;
                        $[8] = t3;
                        $[9] = t4;
                    } else {
                        t4 = $[9];
                    }
                    return t4;
                }

                function PossibleTypes(t0) {
                    const $ = reactCompilerRuntime.c(7);
                    const {
                        type
                    } = t0;
                    let t1;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = {
                            nonNull: true
                        };
                        $[0] = t1;
                    } else {
                        t1 = $[0];
                    }
                    const {
                        schema
                    } = useSchemaContext(t1);
                    if (!schema || !graphql.isAbstractType(type)) {
                        return null;
                    }
                    const t2 = graphql.isInterfaceType(type) ? "Implementations" : "Possible Types";
                    let t3;
                    if ($[1] !== schema || $[2] !== type) {
                        t3 = schema.getPossibleTypes(type).map(_temp7);
                        $[1] = schema;
                        $[2] = type;
                        $[3] = t3;
                    } else {
                        t3 = $[3];
                    }
                    let t4;
                    if ($[4] !== t2 || $[5] !== t3) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsx(ExplorerSection, {
                            title: t2,
                            children: t3
                        });
                        $[4] = t2;
                        $[5] = t3;
                        $[6] = t4;
                    } else {
                        t4 = $[6];
                    }
                    return t4;
                }

                function _temp7(possibleType) {
                    return /* @__PURE__ */ jsxRuntime.jsx("div", {
                        children: /* @__PURE__ */ jsxRuntime.jsx(TypeLink, {
                            type: possibleType
                        })
                    }, possibleType.name);
                }

                function DocExplorer() {
                    const $ = reactCompilerRuntime.c(40);
                    let t0;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t0 = {
                            nonNull: true,
                            caller: DocExplorer
                        };
                        $[0] = t0;
                    } else {
                        t0 = $[0];
                    }
                    const {
                        fetchError,
                        isFetching,
                        schema,
                        validationErrors
                    } = useSchemaContext(t0);
                    let t1;
                    if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = {
                            nonNull: true,
                            caller: DocExplorer
                        };
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        explorerNavStack,
                        pop
                    } = useExplorerContext(t1);
                    let content;
                    let navItem;
                    if ($[2] !== explorerNavStack || $[3] !== fetchError || $[4] !== isFetching || $[5] !== schema || $[6] !== validationErrors) {
                        navItem = explorerNavStack.at(-1);
                        content = null;
                        if (fetchError) {
                            let t22;
                            if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
                                t22 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                                    className: "graphiql-doc-explorer-error",
                                    children: "Error fetching schema"
                                });
                                $[9] = t22;
                            } else {
                                t22 = $[9];
                            }
                            content = t22;
                        } else {
                            if (validationErrors.length > 0) {
                                const t22 = validationErrors[0];
                                let t32;
                                if ($[10] !== t22.message) {
                                    t32 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                                        className: "graphiql-doc-explorer-error",
                                        children: ["Schema is invalid: ", t22.message]
                                    });
                                    $[10] = t22.message;
                                    $[11] = t32;
                                } else {
                                    t32 = $[11];
                                }
                                content = t32;
                            } else {
                                if (isFetching) {
                                    let t22;
                                    if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
                                        t22 = /* @__PURE__ */ jsxRuntime.jsx(Spinner, {});
                                        $[12] = t22;
                                    } else {
                                        t22 = $[12];
                                    }
                                    content = t22;
                                } else {
                                    if (!schema) {
                                        let t22;
                                        if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
                                            t22 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                                                className: "graphiql-doc-explorer-error",
                                                children: "No GraphQL schema available"
                                            });
                                            $[13] = t22;
                                        } else {
                                            t22 = $[13];
                                        }
                                        content = t22;
                                    } else {
                                        if (explorerNavStack.length === 1) {
                                            let t22;
                                            if ($[14] !== schema) {
                                                t22 = /* @__PURE__ */ jsxRuntime.jsx(SchemaDocumentation, {
                                                    schema
                                                });
                                                $[14] = schema;
                                                $[15] = t22;
                                            } else {
                                                t22 = $[15];
                                            }
                                            content = t22;
                                        } else {
                                            if (graphql.isType(navItem.def)) {
                                                let t22;
                                                if ($[16] !== navItem.def) {
                                                    t22 = /* @__PURE__ */ jsxRuntime.jsx(TypeDocumentation, {
                                                        type: navItem.def
                                                    });
                                                    $[16] = navItem.def;
                                                    $[17] = t22;
                                                } else {
                                                    t22 = $[17];
                                                }
                                                content = t22;
                                            } else {
                                                if (navItem.def) {
                                                    let t22;
                                                    if ($[18] !== navItem.def) {
                                                        t22 = /* @__PURE__ */ jsxRuntime.jsx(FieldDocumentation, {
                                                            field: navItem.def
                                                        });
                                                        $[18] = navItem.def;
                                                        $[19] = t22;
                                                    } else {
                                                        t22 = $[19];
                                                    }
                                                    content = t22;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        $[2] = explorerNavStack;
                        $[3] = fetchError;
                        $[4] = isFetching;
                        $[5] = schema;
                        $[6] = validationErrors;
                        $[7] = content;
                        $[8] = navItem;
                    } else {
                        content = $[7];
                        navItem = $[8];
                    }
                    let prevName;
                    if (explorerNavStack.length > 1) {
                        let t22;
                        if ($[20] !== explorerNavStack) {
                            t22 = explorerNavStack.at(-2);
                            $[20] = explorerNavStack;
                            $[21] = t22;
                        } else {
                            t22 = $[21];
                        }
                        prevName = t22.name;
                    }
                    let t2;
                    if ($[22] !== pop || $[23] !== prevName) {
                        t2 = prevName && /* @__PURE__ */ jsxRuntime.jsxs("a", {
                            href: "#",
                            className: "graphiql-doc-explorer-back",
                            onClick: event => {
                                event.preventDefault();
                                pop();
                            },
                            "aria-label": `Go back to ${prevName}`,
                            children: [ /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, {}), prevName]
                        });
                        $[22] = pop;
                        $[23] = prevName;
                        $[24] = t2;
                    } else {
                        t2 = $[24];
                    }
                    let t3;
                    if ($[25] !== navItem.name) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            className: "graphiql-doc-explorer-title",
                            children: navItem.name
                        });
                        $[25] = navItem.name;
                        $[26] = t3;
                    } else {
                        t3 = $[26];
                    }
                    let t4;
                    if ($[27] !== t2 || $[28] !== t3) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: "graphiql-doc-explorer-header-content",
                            children: [t2, t3]
                        });
                        $[27] = t2;
                        $[28] = t3;
                        $[29] = t4;
                    } else {
                        t4 = $[29];
                    }
                    let t5;
                    if ($[30] !== navItem.name) {
                        t5 = /* @__PURE__ */ jsxRuntime.jsx(Search, {}, navItem.name);
                        $[30] = navItem.name;
                        $[31] = t5;
                    } else {
                        t5 = $[31];
                    }
                    let t6;
                    if ($[32] !== t4 || $[33] !== t5) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            className: "graphiql-doc-explorer-header",
                            children: [t4, t5]
                        });
                        $[32] = t4;
                        $[33] = t5;
                        $[34] = t6;
                    } else {
                        t6 = $[34];
                    }
                    let t7;
                    if ($[35] !== content) {
                        t7 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            className: "graphiql-doc-explorer-content",
                            children: content
                        });
                        $[35] = content;
                        $[36] = t7;
                    } else {
                        t7 = $[36];
                    }
                    let t8;
                    if ($[37] !== t6 || $[38] !== t7) {
                        t8 = /* @__PURE__ */ jsxRuntime.jsxs("section", {
                            className: "graphiql-doc-explorer",
                            "aria-label": "Documentation Explorer",
                            children: [t6, t7]
                        });
                        $[37] = t6;
                        $[38] = t7;
                        $[39] = t8;
                    } else {
                        t8 = $[39];
                    }
                    return t8;
                }
                const DOC_EXPLORER_PLUGIN = {
                    title: "Documentation Explorer",
                    icon: function Icon() {
                        const pluginContext = usePluginContext();
                        return (pluginContext == null ? void 0 : pluginContext.visiblePlugin) === DOC_EXPLORER_PLUGIN ? /* @__PURE__ */ jsxRuntime.jsx(DocsFilledIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(DocsIcon, {});
                    },
                    content: DocExplorer
                };
                const HISTORY_PLUGIN = {
                    title: "History",
                    icon: HistoryIcon,
                    content: History
                };
                const PluginContext = createNullableContext("PluginContext");

                function PluginContextProvider(props) {
                    const $ = reactCompilerRuntime.c(27);
                    const storage = useStorageContext();
                    const explorerContext = useExplorerContext();
                    const historyContext = useHistoryContext();
                    const hasExplorerContext = Boolean(explorerContext);
                    const hasHistoryContext = Boolean(historyContext);
                    let t0;
                    let pluginList;
                    if ($[0] !== hasExplorerContext || $[1] !== hasHistoryContext || $[2] !== props.plugins) {
                        pluginList = [];
                        const pluginTitles = {};
                        if (hasExplorerContext) {
                            pluginList.push(DOC_EXPLORER_PLUGIN);
                            pluginTitles[DOC_EXPLORER_PLUGIN.title] = true;
                        }
                        if (hasHistoryContext) {
                            pluginList.push(HISTORY_PLUGIN);
                            pluginTitles[HISTORY_PLUGIN.title] = true;
                        }
                        let t12;
                        if ($[4] !== props.plugins) {
                            t12 = props.plugins || [];
                            $[4] = props.plugins;
                            $[5] = t12;
                        } else {
                            t12 = $[5];
                        }
                        for (const plugin of t12) {
                            if (typeof plugin.title !== "string" || !plugin.title) {
                                throw new Error("All GraphiQL plugins must have a unique title");
                            }
                            if (pluginTitles[plugin.title]) {
                                throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${plugin.title}'`);
                            } else {
                                pluginList.push(plugin);
                                pluginTitles[plugin.title] = true;
                            }
                        }
                        $[0] = hasExplorerContext;
                        $[1] = hasHistoryContext;
                        $[2] = props.plugins;
                        $[3] = pluginList;
                    } else {
                        pluginList = $[3];
                    }
                    t0 = pluginList;
                    const plugins = t0;
                    let t1;
                    if ($[6] !== plugins || $[7] !== props.visiblePlugin || $[8] !== storage) {
                        t1 = () => {
                            const storedValue = storage == null ? void 0 : storage.get(STORAGE_KEY$4);
                            const pluginForStoredValue = plugins.find(plugin_0 => plugin_0.title === storedValue);
                            if (pluginForStoredValue) {
                                return pluginForStoredValue;
                            }
                            if (storedValue) {
                                storage == null ? void 0 : storage.set(STORAGE_KEY$4, "");
                            }
                            if (!props.visiblePlugin) {
                                return null;
                            }
                            return plugins.find(plugin_1 => (typeof props.visiblePlugin === "string" ? plugin_1.title : plugin_1) === props.visiblePlugin) || null;
                        };
                        $[6] = plugins;
                        $[7] = props.visiblePlugin;
                        $[8] = storage;
                        $[9] = t1;
                    } else {
                        t1 = $[9];
                    }
                    const [visiblePlugin, internalSetVisiblePlugin] = React.useState(t1);
                    const {
                        onTogglePluginVisibility,
                        children
                    } = props;
                    let t2;
                    if ($[10] !== onTogglePluginVisibility || $[11] !== plugins) {
                        t2 = plugin_2 => {
                            const newVisiblePlugin = plugin_2 ? plugins.find(p => (typeof plugin_2 === "string" ? p.title : p) === plugin_2) || null : null;
                            internalSetVisiblePlugin(current => {
                                if (newVisiblePlugin === current) {
                                    return current;
                                }
                                onTogglePluginVisibility == null ? void 0 : onTogglePluginVisibility(newVisiblePlugin);
                                return newVisiblePlugin;
                            });
                        };
                        $[10] = onTogglePluginVisibility;
                        $[11] = plugins;
                        $[12] = t2;
                    } else {
                        t2 = $[12];
                    }
                    const setVisiblePlugin = t2;
                    let t3;
                    if ($[13] !== props.visiblePlugin || $[14] !== setVisiblePlugin) {
                        t3 = () => {
                            if (props.visiblePlugin) {
                                setVisiblePlugin(props.visiblePlugin);
                            }
                        };
                        $[13] = props.visiblePlugin;
                        $[14] = setVisiblePlugin;
                        $[15] = t3;
                    } else {
                        t3 = $[15];
                    }
                    let t4;
                    if ($[16] !== plugins || $[17] !== props.visiblePlugin || $[18] !== setVisiblePlugin) {
                        t4 = [plugins, props.visiblePlugin, setVisiblePlugin];
                        $[16] = plugins;
                        $[17] = props.visiblePlugin;
                        $[18] = setVisiblePlugin;
                        $[19] = t4;
                    } else {
                        t4 = $[19];
                    }
                    React.useEffect(t3, t4);
                    let t5;
                    if ($[20] !== plugins || $[21] !== setVisiblePlugin || $[22] !== visiblePlugin) {
                        t5 = {
                            plugins,
                            setVisiblePlugin,
                            visiblePlugin
                        };
                        $[20] = plugins;
                        $[21] = setVisiblePlugin;
                        $[22] = visiblePlugin;
                        $[23] = t5;
                    } else {
                        t5 = $[23];
                    }
                    const value = t5;
                    let t6;
                    if ($[24] !== children || $[25] !== value) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsx(PluginContext.Provider, {
                            value,
                            children
                        });
                        $[24] = children;
                        $[25] = value;
                        $[26] = t6;
                    } else {
                        t6 = $[26];
                    }
                    return t6;
                }
                const usePluginContext = createContextHook(PluginContext);
                const STORAGE_KEY$4 = "visiblePlugin";

                function onHasCompletion(_cm, data, schema, explorer, plugin, callback) {
                    void importCodeMirror([], {
                        useCommonAddons: false
                    }).then(CodeMirror => {
                        let information;
                        let fieldName;
                        let typeNamePill;
                        let typeNamePrefix;
                        let typeName;
                        let typeNameSuffix;
                        let description;
                        let deprecation;
                        let deprecationReason;
                        CodeMirror.on(data, "select",
                            // @ts-expect-error
                            (ctx, el) => {
                                if (!information) {
                                    const hintsUl = el.parentNode;
                                    information = document.createElement("div");
                                    information.className = "CodeMirror-hint-information";
                                    hintsUl.append(information);
                                    const header = document.createElement("header");
                                    header.className = "CodeMirror-hint-information-header";
                                    information.append(header);
                                    fieldName = document.createElement("span");
                                    fieldName.className = "CodeMirror-hint-information-field-name";
                                    header.append(fieldName);
                                    typeNamePill = document.createElement("span");
                                    typeNamePill.className = "CodeMirror-hint-information-type-name-pill";
                                    header.append(typeNamePill);
                                    typeNamePrefix = document.createElement("span");
                                    typeNamePill.append(typeNamePrefix);
                                    typeName = document.createElement("a");
                                    typeName.className = "CodeMirror-hint-information-type-name";
                                    typeName.href = "javascript:void 0";
                                    typeName.addEventListener("click", onClickHintInformation);
                                    typeNamePill.append(typeName);
                                    typeNameSuffix = document.createElement("span");
                                    typeNamePill.append(typeNameSuffix);
                                    description = document.createElement("div");
                                    description.className = "CodeMirror-hint-information-description";
                                    information.append(description);
                                    deprecation = document.createElement("div");
                                    deprecation.className = "CodeMirror-hint-information-deprecation";
                                    information.append(deprecation);
                                    const deprecationLabel = document.createElement("span");
                                    deprecationLabel.className = "CodeMirror-hint-information-deprecation-label";
                                    deprecationLabel.textContent = "Deprecated";
                                    deprecation.append(deprecationLabel);
                                    deprecationReason = document.createElement("div");
                                    deprecationReason.className = "CodeMirror-hint-information-deprecation-reason";
                                    deprecation.append(deprecationReason);
                                    const defaultInformationPadding = parseInt(window.getComputedStyle(information).paddingBottom.replace(/px$/, ""), 10) || 0;
                                    const defaultInformationMaxHeight = parseInt(window.getComputedStyle(information).maxHeight.replace(/px$/, ""), 10) || 0;
                                    const handleScroll = () => {
                                        if (information) {
                                            information.style.paddingTop = hintsUl.scrollTop + defaultInformationPadding + "px";
                                            information.style.maxHeight = hintsUl.scrollTop + defaultInformationMaxHeight + "px";
                                        }
                                    };
                                    hintsUl.addEventListener("scroll", handleScroll);
                                    let onRemoveFn;
                                    hintsUl.addEventListener("DOMNodeRemoved", onRemoveFn = event => {
                                        if (event.target !== hintsUl) {
                                            return;
                                        }
                                        hintsUl.removeEventListener("scroll", handleScroll);
                                        hintsUl.removeEventListener("DOMNodeRemoved", onRemoveFn);
                                        if (information) {
                                            information.removeEventListener("click", onClickHintInformation);
                                        }
                                        information = null;
                                        fieldName = null;
                                        typeNamePill = null;
                                        typeNamePrefix = null;
                                        typeName = null;
                                        typeNameSuffix = null;
                                        description = null;
                                        deprecation = null;
                                        deprecationReason = null;
                                        onRemoveFn = null;
                                    });
                                }
                                if (fieldName) {
                                    fieldName.textContent = ctx.text;
                                }
                                if (typeNamePill && typeNamePrefix && typeName && typeNameSuffix) {
                                    if (ctx.type) {
                                        typeNamePill.style.display = "inline";
                                        const renderType2 = type => {
                                            if (graphql.isNonNullType(type)) {
                                                typeNameSuffix.textContent = "!" + typeNameSuffix.textContent;
                                                renderType2(type.ofType);
                                            } else if (graphql.isListType(type)) {
                                                typeNamePrefix.textContent += "[";
                                                typeNameSuffix.textContent = "]" + typeNameSuffix.textContent;
                                                renderType2(type.ofType);
                                            } else {
                                                typeName.textContent = type.name;
                                            }
                                        };
                                        typeNamePrefix.textContent = "";
                                        typeNameSuffix.textContent = "";
                                        renderType2(ctx.type);
                                    } else {
                                        typeNamePrefix.textContent = "";
                                        typeName.textContent = "";
                                        typeNameSuffix.textContent = "";
                                        typeNamePill.style.display = "none";
                                    }
                                }
                                if (description) {
                                    if (ctx.description) {
                                        description.style.display = "block";
                                        description.innerHTML = markdown.render(ctx.description);
                                    } else {
                                        description.style.display = "none";
                                        description.innerHTML = "";
                                    }
                                }
                                if (deprecation && deprecationReason) {
                                    if (ctx.deprecationReason) {
                                        deprecation.style.display = "block";
                                        deprecationReason.innerHTML = markdown.render(ctx.deprecationReason);
                                    } else {
                                        deprecation.style.display = "none";
                                        deprecationReason.innerHTML = "";
                                    }
                                }
                            });
                    });

                    function onClickHintInformation(event) {
                        if (!schema || !explorer || !plugin || !(event.currentTarget instanceof HTMLElement)) {
                            return;
                        }
                        const typeName = event.currentTarget.textContent || "";
                        const type = schema.getType(typeName);
                        if (type) {
                            plugin.setVisiblePlugin(DOC_EXPLORER_PLUGIN);
                            explorer.push({
                                name: type.name,
                                def: type
                            });
                            callback == null ? void 0 : callback(type);
                        }
                    }
                }

                function useSynchronizeValue(editor, value) {
                    const $ = reactCompilerRuntime.c(4);
                    let t0;
                    let t1;
                    if ($[0] !== editor || $[1] !== value) {
                        t0 = () => {
                            if (editor && typeof value === "string" && value !== editor.getValue()) {
                                editor.setValue(value);
                            }
                        };
                        t1 = [editor, value];
                        $[0] = editor;
                        $[1] = value;
                        $[2] = t0;
                        $[3] = t1;
                    } else {
                        t0 = $[2];
                        t1 = $[3];
                    }
                    React.useEffect(t0, t1);
                }

                function useSynchronizeOption(editor, option, value) {
                    const $ = reactCompilerRuntime.c(5);
                    let t0;
                    let t1;
                    if ($[0] !== editor || $[1] !== option || $[2] !== value) {
                        t0 = () => {
                            if (editor) {
                                editor.setOption(option, value);
                            }
                        };
                        t1 = [editor, option, value];
                        $[0] = editor;
                        $[1] = option;
                        $[2] = value;
                        $[3] = t0;
                        $[4] = t1;
                    } else {
                        t0 = $[3];
                        t1 = $[4];
                    }
                    React.useEffect(t0, t1);
                }

                function useChangeHandler(editor, callback, storageKey, tabProperty, caller) {
                    const $ = reactCompilerRuntime.c(10);
                    let t0;
                    if ($[0] !== caller) {
                        t0 = {
                            nonNull: true,
                            caller
                        };
                        $[0] = caller;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    const {
                        updateActiveTabValues
                    } = useEditorContext(t0);
                    const storage = useStorageContext();
                    let t1;
                    let t2;
                    if ($[2] !== callback || $[3] !== editor || $[4] !== storage || $[5] !== storageKey || $[6] !== tabProperty || $[7] !== updateActiveTabValues) {
                        t1 = () => {
                            if (!editor) {
                                return;
                            }
                            const store = debounce(500, value => {
                                if (!storage || storageKey === null) {
                                    return;
                                }
                                storage.set(storageKey, value);
                            });
                            const updateTab = debounce(100, value_0 => {
                                updateActiveTabValues({
                                    [tabProperty]: value_0
                                });
                            });
                            const handleChange = (editorInstance, changeObj) => {
                                if (!changeObj) {
                                    return;
                                }
                                const newValue = editorInstance.getValue();
                                store(newValue);
                                updateTab(newValue);
                                callback == null ? void 0 : callback(newValue);
                            };
                            editor.on("change", handleChange);
                            return () => editor.off("change", handleChange);
                        };
                        t2 = [callback, editor, storage, storageKey, tabProperty, updateActiveTabValues];
                        $[2] = callback;
                        $[3] = editor;
                        $[4] = storage;
                        $[5] = storageKey;
                        $[6] = tabProperty;
                        $[7] = updateActiveTabValues;
                        $[8] = t1;
                        $[9] = t2;
                    } else {
                        t1 = $[8];
                        t2 = $[9];
                    }
                    React.useEffect(t1, t2);
                }

                function useCompletion(editor, callback, caller) {
                    const $ = reactCompilerRuntime.c(9);
                    let t0;
                    if ($[0] !== caller) {
                        t0 = {
                            nonNull: true,
                            caller
                        };
                        $[0] = caller;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    const {
                        schema
                    } = useSchemaContext(t0);
                    const explorer = useExplorerContext();
                    const plugin = usePluginContext();
                    let t1;
                    let t2;
                    if ($[2] !== callback || $[3] !== editor || $[4] !== explorer || $[5] !== plugin || $[6] !== schema) {
                        t1 = () => {
                            if (!editor) {
                                return;
                            }
                            const handleCompletion = (instance, changeObj) => {
                                onHasCompletion(instance, changeObj, schema, explorer, plugin, type => {
                                    callback == null ? void 0 : callback({
                                        kind: "Type",
                                        type,
                                        schema: schema || void 0
                                    });
                                });
                            };
                            editor.on("hasCompletion", handleCompletion);
                            return () => editor.off("hasCompletion", handleCompletion);
                        };
                        t2 = [callback, editor, explorer, plugin, schema];
                        $[2] = callback;
                        $[3] = editor;
                        $[4] = explorer;
                        $[5] = plugin;
                        $[6] = schema;
                        $[7] = t1;
                        $[8] = t2;
                    } else {
                        t1 = $[7];
                        t2 = $[8];
                    }
                    React.useEffect(t1, t2);
                }

                function useKeyMap(editor, keys, callback) {
                    const $ = reactCompilerRuntime.c(5);
                    let t0;
                    let t1;
                    if ($[0] !== callback || $[1] !== editor || $[2] !== keys) {
                        t0 = () => {
                            if (!editor) {
                                return;
                            }
                            for (const key of keys) {
                                editor.removeKeyMap(key);
                            }
                            if (callback) {
                                const keyMap = {};
                                for (const key_0 of keys) {
                                    keyMap[key_0] = () => callback();
                                }
                                editor.addKeyMap(keyMap);
                            }
                        };
                        t1 = [editor, keys, callback];
                        $[0] = callback;
                        $[1] = editor;
                        $[2] = keys;
                        $[3] = t0;
                        $[4] = t1;
                    } else {
                        t0 = $[3];
                        t1 = $[4];
                    }
                    React.useEffect(t0, t1);
                }
                const _useCopyQuery = useCopyQuery;
                const _useMergeQuery = useMergeQuery;
                const _usePrettifyEditors = usePrettifyEditors;
                const _useAutoCompleteLeafs = useAutoCompleteLeafs;

                function useCopyQuery(t0) {
                    const $ = reactCompilerRuntime.c(7);
                    let t1;
                    if ($[0] !== t0) {
                        t1 = t0 === void 0 ? {} : t0;
                        $[0] = t0;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        caller,
                        onCopyQuery
                    } = t1;
                    const t2 = caller || _useCopyQuery;
                    let t3;
                    if ($[2] !== t2) {
                        t3 = {
                            nonNull: true,
                            caller: t2
                        };
                        $[2] = t2;
                        $[3] = t3;
                    } else {
                        t3 = $[3];
                    }
                    const {
                        queryEditor
                    } = useEditorContext(t3);
                    let t4;
                    if ($[4] !== onCopyQuery || $[5] !== queryEditor) {
                        t4 = () => {
                            if (!queryEditor) {
                                return;
                            }
                            const query = queryEditor.getValue();
                            copyToClipboard(query);
                            onCopyQuery == null ? void 0 : onCopyQuery(query);
                        };
                        $[4] = onCopyQuery;
                        $[5] = queryEditor;
                        $[6] = t4;
                    } else {
                        t4 = $[6];
                    }
                    return t4;
                }

                function useMergeQuery(t0) {
                    const $ = reactCompilerRuntime.c(8);
                    let t1;
                    if ($[0] !== t0) {
                        t1 = t0 === void 0 ? {} : t0;
                        $[0] = t0;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        caller
                    } = t1;
                    const t2 = caller || _useMergeQuery;
                    let t3;
                    if ($[2] !== t2) {
                        t3 = {
                            nonNull: true,
                            caller: t2
                        };
                        $[2] = t2;
                        $[3] = t3;
                    } else {
                        t3 = $[3];
                    }
                    const {
                        queryEditor
                    } = useEditorContext(t3);
                    let t4;
                    if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
                        t4 = {
                            nonNull: true,
                            caller: _useMergeQuery
                        };
                        $[4] = t4;
                    } else {
                        t4 = $[4];
                    }
                    const {
                        schema
                    } = useSchemaContext(t4);
                    let t5;
                    if ($[5] !== queryEditor || $[6] !== schema) {
                        t5 = () => {
                            const documentAST = queryEditor == null ? void 0 : queryEditor.documentAST;
                            const query = queryEditor == null ? void 0 : queryEditor.getValue();
                            if (!documentAST || !query) {
                                return;
                            }
                            queryEditor.setValue(graphql.print(toolkit.mergeAst(documentAST, schema)));
                        };
                        $[5] = queryEditor;
                        $[6] = schema;
                        $[7] = t5;
                    } else {
                        t5 = $[7];
                    }
                    return t5;
                }

                function usePrettifyEditors(t0) {
                    const $ = reactCompilerRuntime.c(8);
                    let t1;
                    if ($[0] !== t0) {
                        t1 = t0 === void 0 ? {} : t0;
                        $[0] = t0;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        caller
                    } = t1;
                    const t2 = caller || _usePrettifyEditors;
                    let t3;
                    if ($[2] !== t2) {
                        t3 = {
                            nonNull: true,
                            caller: t2
                        };
                        $[2] = t2;
                        $[3] = t3;
                    } else {
                        t3 = $[3];
                    }
                    const {
                        queryEditor,
                        headerEditor,
                        variableEditor
                    } = useEditorContext(t3);
                    let t4;
                    if ($[4] !== headerEditor || $[5] !== queryEditor || $[6] !== variableEditor) {
                        t4 = () => {
                            if (variableEditor) {
                                const variableEditorContent = variableEditor.getValue();
                                try {
                                    const prettifiedVariableEditorContent = JSON.stringify(JSON.parse(variableEditorContent), null, 2);
                                    if (prettifiedVariableEditorContent !== variableEditorContent) {
                                        variableEditor.setValue(prettifiedVariableEditorContent);
                                    }
                                } catch {}
                            }
                            if (headerEditor) {
                                const headerEditorContent = headerEditor.getValue();
                                try {
                                    const prettifiedHeaderEditorContent = JSON.stringify(JSON.parse(headerEditorContent), null, 2);
                                    if (prettifiedHeaderEditorContent !== headerEditorContent) {
                                        headerEditor.setValue(prettifiedHeaderEditorContent);
                                    }
                                } catch {}
                            }
                            if (queryEditor) {
                                const editorContent = queryEditor.getValue();
                                const prettifiedEditorContent = graphql.print(graphql.parse(editorContent));
                                if (prettifiedEditorContent !== editorContent) {
                                    queryEditor.setValue(prettifiedEditorContent);
                                }
                            }
                        };
                        $[4] = headerEditor;
                        $[5] = queryEditor;
                        $[6] = variableEditor;
                        $[7] = t4;
                    } else {
                        t4 = $[7];
                    }
                    return t4;
                }

                function useAutoCompleteLeafs(t0) {
                    const $ = reactCompilerRuntime.c(10);
                    let t1;
                    if ($[0] !== t0) {
                        t1 = t0 === void 0 ? {} : t0;
                        $[0] = t0;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        getDefaultFieldNames,
                        caller
                    } = t1;
                    const t2 = caller || _useAutoCompleteLeafs;
                    let t3;
                    if ($[2] !== t2) {
                        t3 = {
                            nonNull: true,
                            caller: t2
                        };
                        $[2] = t2;
                        $[3] = t3;
                    } else {
                        t3 = $[3];
                    }
                    const {
                        schema
                    } = useSchemaContext(t3);
                    const t4 = caller || _useAutoCompleteLeafs;
                    let t5;
                    if ($[4] !== t4) {
                        t5 = {
                            nonNull: true,
                            caller: t4
                        };
                        $[4] = t4;
                        $[5] = t5;
                    } else {
                        t5 = $[5];
                    }
                    const {
                        queryEditor
                    } = useEditorContext(t5);
                    let t6;
                    if ($[6] !== getDefaultFieldNames || $[7] !== queryEditor || $[8] !== schema) {
                        t6 = () => {
                            if (!queryEditor) {
                                return;
                            }
                            const query = queryEditor.getValue();
                            const {
                                insertions,
                                result
                            } = toolkit.fillLeafs(schema, query, getDefaultFieldNames);
                            if (insertions && insertions.length > 0) {
                                queryEditor.operation(() => {
                                    const cursor = queryEditor.getCursor();
                                    const cursorIndex = queryEditor.indexFromPos(cursor);
                                    queryEditor.setValue(result || "");
                                    let added;
                                    added = 0;
                                    const markers = insertions.map(t7 => {
                                        const {
                                            index,
                                            string
                                        } = t7;
                                        added = added + string.length;
                                        return queryEditor.markText(queryEditor.posFromIndex(index + added), queryEditor.posFromIndex(index + added), {
                                            className: "auto-inserted-leaf",
                                            clearOnEnter: true,
                                            title: "Automatically added leaf fields"
                                        });
                                    });
                                    setTimeout(() => {
                                        for (const marker of markers) {
                                            marker.clear();
                                        }
                                    }, 7e3);
                                    let newCursorIndex = cursorIndex;
                                    for (const {
                                            index: index_0,
                                            string: string_0
                                        }
                                        of insertions) {
                                        if (index_0 < cursorIndex) {
                                            newCursorIndex = newCursorIndex + string_0.length;
                                        }
                                    }
                                    queryEditor.setCursor(queryEditor.posFromIndex(newCursorIndex));
                                });
                            }
                            return result;
                        };
                        $[6] = getDefaultFieldNames;
                        $[7] = queryEditor;
                        $[8] = schema;
                        $[9] = t6;
                    } else {
                        t6 = $[9];
                    }
                    return t6;
                }
                const useEditorState = editor => {
                    "use no memo";

                    var _ref2;
                    const context = useEditorContext({
                        nonNull: true
                    });
                    const editorInstance = context[`${editor}Editor`];
                    let valueString = "";
                    const editorValue = (_ref2 = editorInstance == null ? void 0 : editorInstance.getValue()) !== null && _ref2 !== void 0 ? _ref2 : false;
                    if (editorValue && editorValue.length > 0) {
                        valueString = editorValue;
                    }
                    const handleEditorValue = React.useCallback(value => editorInstance == null ? void 0 : editorInstance.setValue(value), [editorInstance]);
                    return React.useMemo(() => [valueString, handleEditorValue], [valueString, handleEditorValue]);
                };
                const useOperationsEditorState = () => {
                    return useEditorState("query");
                };
                const useVariablesEditorState = () => {
                    return useEditorState("variable");
                };
                const useHeadersEditorState = () => {
                    return useEditorState("header");
                };

                function useOptimisticState(t0) {
                    const $ = reactCompilerRuntime.c(12);
                    const [upstreamState, upstreamSetState] = t0;
                    let t1;
                    if ($[0] !== upstreamState) {
                        t1 = {
                            pending: null,
                            last: upstreamState
                        };
                        $[0] = upstreamState;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const lastStateRef = React.useRef(t1);
                    const [state, setOperationsText] = React.useState(upstreamState);
                    let t2;
                    let t3;
                    if ($[2] !== state || $[3] !== upstreamSetState || $[4] !== upstreamState) {
                        t2 = () => {
                            if (lastStateRef.current.last === upstreamState);
                            else {
                                lastStateRef.current.last = upstreamState;
                                if (lastStateRef.current.pending === null) {
                                    setOperationsText(upstreamState);
                                } else {
                                    if (lastStateRef.current.pending === upstreamState) {
                                        lastStateRef.current.pending = null;
                                        if (upstreamState !== state) {
                                            lastStateRef.current.pending = state;
                                            upstreamSetState(state);
                                        }
                                    } else {
                                        lastStateRef.current.pending = null;
                                        setOperationsText(upstreamState);
                                    }
                                }
                            }
                        };
                        t3 = [upstreamState, state, upstreamSetState];
                        $[2] = state;
                        $[3] = upstreamSetState;
                        $[4] = upstreamState;
                        $[5] = t2;
                        $[6] = t3;
                    } else {
                        t2 = $[5];
                        t3 = $[6];
                    }
                    React.useEffect(t2, t3);
                    let t4;
                    if ($[7] !== upstreamSetState) {
                        t4 = newState => {
                            setOperationsText(newState);
                            if (lastStateRef.current.pending === null && lastStateRef.current.last !== newState) {
                                lastStateRef.current.pending = newState;
                                upstreamSetState(newState);
                            }
                        };
                        $[7] = upstreamSetState;
                        $[8] = t4;
                    } else {
                        t4 = $[8];
                    }
                    const setState = t4;
                    let t5;
                    if ($[9] !== setState || $[10] !== state) {
                        t5 = [state, setState];
                        $[9] = setState;
                        $[10] = state;
                        $[11] = t5;
                    } else {
                        t5 = $[11];
                    }
                    return t5;
                }

                function importCodeMirrorImports$3() {
                    return importCodeMirror([ // @ts-expect-error
                        Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/mode/javascript/javascript.js */ "../../../node_modules/codemirror/mode/javascript/javascript.js")))
                    ]);
                }
                const _useHeaderEditor = useHeaderEditor;

                function useHeaderEditor(t0, caller) {
                    const $ = reactCompilerRuntime.c(17);
                    let t1;
                    if ($[0] !== t0) {
                        t1 = t0 === void 0 ? {} : t0;
                        $[0] = t0;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        editorTheme: t2,
                        keyMap: t3,
                        onEdit,
                        readOnly: t4
                    } = t1;
                    const editorTheme = t2 === void 0 ? DEFAULT_EDITOR_THEME : t2;
                    const keyMap = t3 === void 0 ? DEFAULT_KEY_MAP : t3;
                    const readOnly = t4 === void 0 ? false : t4;
                    const t5 = caller || _useHeaderEditor;
                    let t6;
                    if ($[2] !== t5) {
                        t6 = {
                            nonNull: true,
                            caller: t5
                        };
                        $[2] = t5;
                        $[3] = t6;
                    } else {
                        t6 = $[3];
                    }
                    const {
                        initialHeaders,
                        headerEditor,
                        setHeaderEditor,
                        shouldPersistHeaders
                    } = useEditorContext(t6);
                    const executionContext = useExecutionContext();
                    const t7 = caller || _useHeaderEditor;
                    let t8;
                    if ($[4] !== t7) {
                        t8 = {
                            caller: t7
                        };
                        $[4] = t7;
                        $[5] = t8;
                    } else {
                        t8 = $[5];
                    }
                    const merge = useMergeQuery(t8);
                    const t9 = caller || _useHeaderEditor;
                    let t10;
                    if ($[6] !== t9) {
                        t10 = {
                            caller: t9
                        };
                        $[6] = t9;
                        $[7] = t10;
                    } else {
                        t10 = $[7];
                    }
                    const prettify = usePrettifyEditors(t10);
                    const ref = React.useRef(null);
                    let t11;
                    let t12;
                    if ($[8] !== editorTheme || $[9] !== initialHeaders || $[10] !== readOnly || $[11] !== setHeaderEditor) {
                        t11 = () => {
                            let isActive;
                            isActive = true;
                            importCodeMirrorImports$3().then(CodeMirror => {
                                if (!isActive) {
                                    return;
                                }
                                const container = ref.current;
                                if (!container) {
                                    return;
                                }
                                const newEditor = CodeMirror(container, {
                                    value: initialHeaders,
                                    lineNumbers: true,
                                    tabSize: 2,
                                    mode: {
                                        name: "javascript",
                                        json: true
                                    },
                                    theme: editorTheme,
                                    autoCloseBrackets: true,
                                    matchBrackets: true,
                                    showCursorWhenSelecting: true,
                                    readOnly: readOnly ? "nocursor" : false,
                                    foldGutter: true,
                                    gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
                                    extraKeys: commonKeys
                                });
                                newEditor.addKeyMap({
                                    "Cmd-Space"() {
                                        newEditor.showHint({
                                            completeSingle: false,
                                            container
                                        });
                                    },
                                    "Ctrl-Space"() {
                                        newEditor.showHint({
                                            completeSingle: false,
                                            container
                                        });
                                    },
                                    "Alt-Space"() {
                                        newEditor.showHint({
                                            completeSingle: false,
                                            container
                                        });
                                    },
                                    "Shift-Space"() {
                                        newEditor.showHint({
                                            completeSingle: false,
                                            container
                                        });
                                    }
                                });
                                newEditor.on("keyup", _temp$2);
                                setHeaderEditor(newEditor);
                            });
                            return () => {
                                isActive = false;
                            };
                        };
                        t12 = [editorTheme, initialHeaders, readOnly, setHeaderEditor];
                        $[8] = editorTheme;
                        $[9] = initialHeaders;
                        $[10] = readOnly;
                        $[11] = setHeaderEditor;
                        $[12] = t11;
                        $[13] = t12;
                    } else {
                        t11 = $[12];
                        t12 = $[13];
                    }
                    React.useEffect(t11, t12);
                    useSynchronizeOption(headerEditor, "keyMap", keyMap);
                    useChangeHandler(headerEditor, onEdit, shouldPersistHeaders ? STORAGE_KEY$3 : null, "headers", _useHeaderEditor);
                    let t13;
                    if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
                        t13 = ["Cmd-Enter", "Ctrl-Enter"];
                        $[14] = t13;
                    } else {
                        t13 = $[14];
                    }
                    useKeyMap(headerEditor, t13, executionContext == null ? void 0 : executionContext.run);
                    let t14;
                    if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
                        t14 = ["Shift-Ctrl-P"];
                        $[15] = t14;
                    } else {
                        t14 = $[15];
                    }
                    useKeyMap(headerEditor, t14, prettify);
                    let t15;
                    if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
                        t15 = ["Shift-Ctrl-M"];
                        $[16] = t15;
                    } else {
                        t15 = $[16];
                    }
                    useKeyMap(headerEditor, t15, merge);
                    return ref;
                }

                function _temp$2(editorInstance, event) {
                    const {
                        code,
                        key,
                        shiftKey
                    } = event;
                    const isLetter = code.startsWith("Key");
                    const isNumber = !shiftKey && code.startsWith("Digit");
                    if (isLetter || isNumber || key === "_" || key === '"') {
                        editorInstance.execCommand("autocomplete");
                    }
                }
                const STORAGE_KEY$3 = "headers";
                const invalidCharacters = Array.from({
                    length: 11
                }, (_, i) => {
                    return String.fromCharCode(8192 + i);
                }).concat(["\u2028", "\u2029", " ", " "]);
                const sanitizeRegex = new RegExp("[" + invalidCharacters.join("") + "]", "g");

                function normalizeWhitespace(line) {
                    return line.replace(sanitizeRegex, " ");
                }

                function importCodeMirrorImports$2() {
                    return importCodeMirror([Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/comment/comment.js */ "../../../node_modules/codemirror/addon/comment/comment.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/search/search.js */ "../../../node_modules/codemirror/addon/search/search.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/hint.js */ "../../codemirror-graphql/esm/hint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/lint.js */ "../../codemirror-graphql/esm/lint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/info.js */ "../../codemirror-graphql/esm/info.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/jump.js */ "../../codemirror-graphql/esm/jump.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/mode.js */ "../../codemirror-graphql/esm/mode.js")))]);
                }
                const _useQueryEditor = useQueryEditor;

                function updateVariableEditor(variableEditor, operationFacts) {
                    variableEditor.state.lint.linterOptions.variableToType = operationFacts == null ? void 0 : operationFacts.variableToType;
                    variableEditor.options.lint.variableToType = operationFacts == null ? void 0 : operationFacts.variableToType;
                    variableEditor.options.hintOptions.variableToType = operationFacts == null ? void 0 : operationFacts.variableToType;
                }

                function updateEditorSchema(editor, schema) {
                    editor.state.lint.linterOptions.schema = schema;
                    editor.options.lint.schema = schema;
                    editor.options.hintOptions.schema = schema;
                    editor.options.info.schema = schema;
                    editor.options.jump.schema = schema;
                }

                function updateEditorValidationRules(editor, validationRules) {
                    editor.state.lint.linterOptions.validationRules = validationRules;
                    editor.options.lint.validationRules = validationRules;
                }

                function updateEditorExternalFragments(editor, externalFragmentList) {
                    editor.state.lint.linterOptions.externalFragments = externalFragmentList;
                    editor.options.lint.externalFragments = externalFragmentList;
                    editor.options.hintOptions.externalFragments = externalFragmentList;
                }

                function useQueryEditor(t0, caller) {
                    const $ = reactCompilerRuntime.c(41);
                    let t1;
                    if ($[0] !== t0) {
                        t1 = t0 === void 0 ? {} : t0;
                        $[0] = t0;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        editorTheme: t2,
                        keyMap: t3,
                        onClickReference,
                        onCopyQuery,
                        onEdit,
                        readOnly: t4
                    } = t1;
                    const editorTheme = t2 === void 0 ? DEFAULT_EDITOR_THEME : t2;
                    const keyMap = t3 === void 0 ? DEFAULT_KEY_MAP : t3;
                    const readOnly = t4 === void 0 ? false : t4;
                    const t5 = caller || _useQueryEditor;
                    let t6;
                    if ($[2] !== t5) {
                        t6 = {
                            nonNull: true,
                            caller: t5
                        };
                        $[2] = t5;
                        $[3] = t6;
                    } else {
                        t6 = $[3];
                    }
                    const {
                        schema
                    } = useSchemaContext(t6);
                    const t7 = caller || _useQueryEditor;
                    let t8;
                    if ($[4] !== t7) {
                        t8 = {
                            nonNull: true,
                            caller: t7
                        };
                        $[4] = t7;
                        $[5] = t8;
                    } else {
                        t8 = $[5];
                    }
                    const {
                        externalFragments,
                        initialQuery,
                        queryEditor,
                        setOperationName,
                        setQueryEditor,
                        validationRules,
                        variableEditor,
                        updateActiveTabValues
                    } = useEditorContext(t8);
                    const executionContext = useExecutionContext();
                    const storage = useStorageContext();
                    const explorer = useExplorerContext();
                    const plugin = usePluginContext();
                    const t9 = caller || _useQueryEditor;
                    let t10;
                    if ($[6] !== onCopyQuery || $[7] !== t9) {
                        t10 = {
                            caller: t9,
                            onCopyQuery
                        };
                        $[6] = onCopyQuery;
                        $[7] = t9;
                        $[8] = t10;
                    } else {
                        t10 = $[8];
                    }
                    const copy = useCopyQuery(t10);
                    const t11 = caller || _useQueryEditor;
                    let t12;
                    if ($[9] !== t11) {
                        t12 = {
                            caller: t11
                        };
                        $[9] = t11;
                        $[10] = t12;
                    } else {
                        t12 = $[10];
                    }
                    const merge = useMergeQuery(t12);
                    const t13 = caller || _useQueryEditor;
                    let t14;
                    if ($[11] !== t13) {
                        t14 = {
                            caller: t13
                        };
                        $[11] = t13;
                        $[12] = t14;
                    } else {
                        t14 = $[12];
                    }
                    const prettify = usePrettifyEditors(t14);
                    const ref = React.useRef(null);
                    const codeMirrorRef = React.useRef();
                    const onClickReferenceRef = React.useRef(_temp$1);
                    let t15;
                    let t16;
                    if ($[13] !== explorer || $[14] !== onClickReference || $[15] !== plugin) {
                        t15 = () => {
                            onClickReferenceRef.current = reference => {
                                if (!explorer || !plugin) {
                                    return;
                                }
                                plugin.setVisiblePlugin(DOC_EXPLORER_PLUGIN);
                                bb47: switch (reference.kind) {
                                    case "Type": {
                                        explorer.push({
                                            name: reference.type.name,
                                            def: reference.type
                                        });
                                        break bb47;
                                    }
                                    case "Field": {
                                        explorer.push({
                                            name: reference.field.name,
                                            def: reference.field
                                        });
                                        break bb47;
                                    }
                                    case "Argument": {
                                        if (reference.field) {
                                            explorer.push({
                                                name: reference.field.name,
                                                def: reference.field
                                            });
                                        }
                                        break bb47;
                                    }
                                    case "EnumValue": {
                                        if (reference.type) {
                                            explorer.push({
                                                name: reference.type.name,
                                                def: reference.type
                                            });
                                        }
                                    }
                                }
                                onClickReference == null ? void 0 : onClickReference(reference);
                            };
                        };
                        t16 = [explorer, onClickReference, plugin];
                        $[13] = explorer;
                        $[14] = onClickReference;
                        $[15] = plugin;
                        $[16] = t15;
                        $[17] = t16;
                    } else {
                        t15 = $[16];
                        t16 = $[17];
                    }
                    React.useEffect(t15, t16);
                    let t17;
                    let t18;
                    if ($[18] !== editorTheme || $[19] !== initialQuery || $[20] !== readOnly || $[21] !== setQueryEditor) {
                        t17 = () => {
                            let isActive;
                            isActive = true;
                            importCodeMirrorImports$2().then(CodeMirror => {
                                if (!isActive) {
                                    return;
                                }
                                codeMirrorRef.current = CodeMirror;
                                const container = ref.current;
                                if (!container) {
                                    return;
                                }
                                const newEditor = CodeMirror(container, {
                                    value: initialQuery,
                                    lineNumbers: true,
                                    tabSize: 2,
                                    foldGutter: true,
                                    mode: "graphql",
                                    theme: editorTheme,
                                    autoCloseBrackets: true,
                                    matchBrackets: true,
                                    showCursorWhenSelecting: true,
                                    readOnly: readOnly ? "nocursor" : false,
                                    lint: {
                                        schema: void 0,
                                        validationRules: null,
                                        externalFragments: void 0
                                    },
                                    hintOptions: {
                                        schema: void 0,
                                        closeOnUnfocus: false,
                                        completeSingle: false,
                                        container,
                                        externalFragments: void 0,
                                        autocompleteOptions: {
                                            mode: graphqlLanguageService.GraphQLDocumentMode.EXECUTABLE
                                        }
                                    },
                                    info: {
                                        schema: void 0,
                                        renderDescription: _temp2,
                                        onClick(reference_0) {
                                            onClickReferenceRef.current(reference_0);
                                        }
                                    },
                                    jump: {
                                        schema: void 0,
                                        onClick(reference_1) {
                                            onClickReferenceRef.current(reference_1);
                                        }
                                    },
                                    gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
                                    extraKeys: {
                                        ...commonKeys,
                                        "Cmd-S"() {},
                                        "Ctrl-S"() {}
                                    }
                                });
                                newEditor.addKeyMap({
                                    "Cmd-Space"() {
                                        newEditor.showHint({
                                            completeSingle: true,
                                            container
                                        });
                                    },
                                    "Ctrl-Space"() {
                                        newEditor.showHint({
                                            completeSingle: true,
                                            container
                                        });
                                    },
                                    "Alt-Space"() {
                                        newEditor.showHint({
                                            completeSingle: true,
                                            container
                                        });
                                    },
                                    "Shift-Space"() {
                                        newEditor.showHint({
                                            completeSingle: true,
                                            container
                                        });
                                    },
                                    "Shift-Alt-Space"() {
                                        newEditor.showHint({
                                            completeSingle: true,
                                            container
                                        });
                                    }
                                });
                                newEditor.on("keyup", _temp3);
                                let showingHints;
                                showingHints = false;
                                newEditor.on("startCompletion", () => {
                                    showingHints = true;
                                });
                                newEditor.on("endCompletion", () => {
                                    showingHints = false;
                                });
                                newEditor.on("keydown", (editorInstance_0, event_0) => {
                                    if (event_0.key === "Escape" && showingHints) {
                                        event_0.stopPropagation();
                                    }
                                });
                                newEditor.on("beforeChange", _temp4);
                                newEditor.documentAST = null;
                                newEditor.operationName = null;
                                newEditor.operations = null;
                                newEditor.variableToType = null;
                                setQueryEditor(newEditor);
                            });
                            return () => {
                                isActive = false;
                            };
                        };
                        t18 = [editorTheme, initialQuery, readOnly, setQueryEditor];
                        $[18] = editorTheme;
                        $[19] = initialQuery;
                        $[20] = readOnly;
                        $[21] = setQueryEditor;
                        $[22] = t17;
                        $[23] = t18;
                    } else {
                        t17 = $[22];
                        t18 = $[23];
                    }
                    React.useEffect(t17, t18);
                    useSynchronizeOption(queryEditor, "keyMap", keyMap);
                    let t19;
                    let t20;
                    if ($[24] !== onEdit || $[25] !== queryEditor || $[26] !== schema || $[27] !== setOperationName || $[28] !== storage || $[29] !== updateActiveTabValues || $[30] !== variableEditor) {
                        t19 = () => {
                            if (!queryEditor) {
                                return;
                            }
                            const getAndUpdateOperationFacts = function getAndUpdateOperationFacts2(editorInstance_2) {
                                var _editorInstance_2$ope, _editorInstance_2$ope2, _ref3, _ref4;
                                var _a;
                                const operationFacts = graphqlLanguageService.getOperationFacts(schema, editorInstance_2.getValue());
                                const operationName = toolkit.getSelectedOperationName((_editorInstance_2$ope = editorInstance_2.operations) !== null && _editorInstance_2$ope !== void 0 ? _editorInstance_2$ope : void 0, (_editorInstance_2$ope2 = editorInstance_2.operationName) !== null && _editorInstance_2$ope2 !== void 0 ? _editorInstance_2$ope2 : void 0, operationFacts == null ? void 0 : operationFacts.operations);
                                editorInstance_2.documentAST = (_ref3 = operationFacts == null ? void 0 : operationFacts.documentAST) !== null && _ref3 !== void 0 ? _ref3 : null;
                                editorInstance_2.operationName = operationName !== null && operationName !== void 0 ? operationName : null;
                                editorInstance_2.operations = (_ref4 = operationFacts == null ? void 0 : operationFacts.operations) !== null && _ref4 !== void 0 ? _ref4 : null;
                                if (variableEditor) {
                                    updateVariableEditor(variableEditor, operationFacts);
                                    (_a = codeMirrorRef.current) == null ? void 0 : _a.signal(variableEditor, "change", variableEditor);
                                }
                                return operationFacts ? {
                                    ...operationFacts,
                                    operationName
                                } : null;
                            };
                            const handleChange = debounce(100, editorInstance_3 => {
                                var _ref5;
                                const query = editorInstance_3.getValue();
                                storage == null ? void 0 : storage.set(STORAGE_KEY_QUERY, query);
                                const currentOperationName = editorInstance_3.operationName;
                                const operationFacts_0 = getAndUpdateOperationFacts(editorInstance_3);
                                if ((operationFacts_0 == null ? void 0 : operationFacts_0.operationName) !== void 0) {
                                    storage == null ? void 0 : storage.set(STORAGE_KEY_OPERATION_NAME, operationFacts_0.operationName);
                                }
                                onEdit == null ? void 0 : onEdit(query, operationFacts_0 == null ? void 0 : operationFacts_0.documentAST);
                                if ((operationFacts_0 == null ? void 0 : operationFacts_0.operationName) && currentOperationName !== operationFacts_0.operationName) {
                                    setOperationName(operationFacts_0.operationName);
                                }
                                updateActiveTabValues({
                                    query,
                                    operationName: (_ref5 = operationFacts_0 == null ? void 0 : operationFacts_0.operationName) !== null && _ref5 !== void 0 ? _ref5 : null
                                });
                            });
                            getAndUpdateOperationFacts(queryEditor);
                            queryEditor.on("change", handleChange);
                            return () => queryEditor.off("change", handleChange);
                        };
                        t20 = [onEdit, queryEditor, schema, setOperationName, storage, variableEditor, updateActiveTabValues];
                        $[24] = onEdit;
                        $[25] = queryEditor;
                        $[26] = schema;
                        $[27] = setOperationName;
                        $[28] = storage;
                        $[29] = updateActiveTabValues;
                        $[30] = variableEditor;
                        $[31] = t19;
                        $[32] = t20;
                    } else {
                        t19 = $[31];
                        t20 = $[32];
                    }
                    React.useEffect(t19, t20);
                    useSynchronizeSchema(queryEditor, schema !== null && schema !== void 0 ? schema : null, codeMirrorRef);
                    useSynchronizeValidationRules(queryEditor, validationRules !== null && validationRules !== void 0 ? validationRules : null, codeMirrorRef);
                    useSynchronizeExternalFragments(queryEditor, externalFragments, codeMirrorRef);
                    useCompletion(queryEditor, onClickReference || null, _useQueryEditor);
                    const run = executionContext == null ? void 0 : executionContext.run;
                    let t21;
                    if ($[33] !== queryEditor || $[34] !== run || $[35] !== setOperationName) {
                        t21 = () => {
                            var _a;
                            if (!run || !queryEditor || !queryEditor.operations || !queryEditor.hasFocus()) {
                                run == null ? void 0 : run();
                                return;
                            }
                            const cursorIndex = queryEditor.indexFromPos(queryEditor.getCursor());
                            let operationName_0;
                            for (const operation of queryEditor.operations) {
                                if (operation.loc && operation.loc.start <= cursorIndex && operation.loc.end >= cursorIndex) {
                                    operationName_0 = (_a = operation.name) == null ? void 0 : _a.value;
                                }
                            }
                            if (operationName_0 && operationName_0 !== queryEditor.operationName) {
                                setOperationName(operationName_0);
                            }
                            run();
                        };
                        $[33] = queryEditor;
                        $[34] = run;
                        $[35] = setOperationName;
                        $[36] = t21;
                    } else {
                        t21 = $[36];
                    }
                    const runAtCursor = t21;
                    let t22;
                    if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
                        t22 = ["Cmd-Enter", "Ctrl-Enter"];
                        $[37] = t22;
                    } else {
                        t22 = $[37];
                    }
                    useKeyMap(queryEditor, t22, runAtCursor);
                    let t23;
                    if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
                        t23 = ["Shift-Ctrl-C"];
                        $[38] = t23;
                    } else {
                        t23 = $[38];
                    }
                    useKeyMap(queryEditor, t23, copy);
                    let t24;
                    if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
                        t24 = ["Shift-Ctrl-P", "Shift-Ctrl-F"];
                        $[39] = t24;
                    } else {
                        t24 = $[39];
                    }
                    useKeyMap(queryEditor, t24, prettify);
                    let t25;
                    if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
                        t25 = ["Shift-Ctrl-M"];
                        $[40] = t25;
                    } else {
                        t25 = $[40];
                    }
                    useKeyMap(queryEditor, t25, merge);
                    return ref;
                }

                function _temp4(editorInstance_1, change) {
                    var _a;
                    if (change.origin === "paste") {
                        const text_0 = change.text.map(normalizeWhitespace);
                        (_a = change.update) == null ? void 0 : _a.call(change, change.from, change.to, text_0);
                    }
                }

                function _temp3(editorInstance, event) {
                    if (AUTO_COMPLETE_AFTER_KEY.test(event.key)) {
                        editorInstance.execCommand("autocomplete");
                    }
                }

                function _temp2(text) {
                    return markdown.render(text);
                }

                function _temp$1() {}

                function useSynchronizeSchema(editor, schema, codeMirrorRef) {
                    const $ = reactCompilerRuntime.c(5);
                    let t0;
                    let t1;
                    if ($[0] !== codeMirrorRef || $[1] !== editor || $[2] !== schema) {
                        t0 = () => {
                            if (!editor) {
                                return;
                            }
                            const didChange = editor.options.lint.schema !== schema;
                            updateEditorSchema(editor, schema);
                            if (didChange && codeMirrorRef.current) {
                                codeMirrorRef.current.signal(editor, "change", editor);
                            }
                        };
                        t1 = [editor, schema, codeMirrorRef];
                        $[0] = codeMirrorRef;
                        $[1] = editor;
                        $[2] = schema;
                        $[3] = t0;
                        $[4] = t1;
                    } else {
                        t0 = $[3];
                        t1 = $[4];
                    }
                    React.useEffect(t0, t1);
                }

                function useSynchronizeValidationRules(editor, validationRules, codeMirrorRef) {
                    const $ = reactCompilerRuntime.c(5);
                    let t0;
                    let t1;
                    if ($[0] !== codeMirrorRef || $[1] !== editor || $[2] !== validationRules) {
                        t0 = () => {
                            if (!editor) {
                                return;
                            }
                            const didChange = editor.options.lint.validationRules !== validationRules;
                            updateEditorValidationRules(editor, validationRules);
                            if (didChange && codeMirrorRef.current) {
                                codeMirrorRef.current.signal(editor, "change", editor);
                            }
                        };
                        t1 = [editor, validationRules, codeMirrorRef];
                        $[0] = codeMirrorRef;
                        $[1] = editor;
                        $[2] = validationRules;
                        $[3] = t0;
                        $[4] = t1;
                    } else {
                        t0 = $[3];
                        t1 = $[4];
                    }
                    React.useEffect(t0, t1);
                }

                function useSynchronizeExternalFragments(editor, externalFragments, codeMirrorRef) {
                    const $ = reactCompilerRuntime.c(9);
                    let t0;
                    if ($[0] !== externalFragments) {
                        t0 = externalFragments.values();
                        $[0] = externalFragments;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    let t1;
                    if ($[2] !== t0) {
                        t1 = [...t0];
                        $[2] = t0;
                        $[3] = t1;
                    } else {
                        t1 = $[3];
                    }
                    const externalFragmentList = t1;
                    let t2;
                    let t3;
                    if ($[4] !== codeMirrorRef || $[5] !== editor || $[6] !== externalFragmentList) {
                        t2 = () => {
                            if (!editor) {
                                return;
                            }
                            const didChange = editor.options.lint.externalFragments !== externalFragmentList;
                            updateEditorExternalFragments(editor, externalFragmentList);
                            if (didChange && codeMirrorRef.current) {
                                codeMirrorRef.current.signal(editor, "change", editor);
                            }
                        };
                        t3 = [editor, externalFragmentList, codeMirrorRef];
                        $[4] = codeMirrorRef;
                        $[5] = editor;
                        $[6] = externalFragmentList;
                        $[7] = t2;
                        $[8] = t3;
                    } else {
                        t2 = $[7];
                        t3 = $[8];
                    }
                    React.useEffect(t2, t3);
                }
                const AUTO_COMPLETE_AFTER_KEY = /^[a-zA-Z0-9_@(]$/;
                const STORAGE_KEY_QUERY = "query";
                const STORAGE_KEY_OPERATION_NAME = "operationName";

                function getDefaultTabState({
                    defaultQuery,
                    defaultHeaders,
                    headers,
                    defaultTabs,
                    query,
                    variables,
                    storage,
                    shouldPersistHeaders
                }) {
                    const storedState = storage == null ? void 0 : storage.get(STORAGE_KEY$2);
                    try {
                        if (!storedState) {
                            throw new Error("Storage for tabs is empty");
                        }
                        const parsed = JSON.parse(storedState);
                        const headersForHash = shouldPersistHeaders ? headers : void 0;
                        if (isTabsState(parsed)) {
                            const expectedHash = hashFromTabContents({
                                query,
                                variables,
                                headers: headersForHash
                            });
                            let matchingTabIndex = -1;
                            for (let index = 0; index < parsed.tabs.length; index++) {
                                const tab = parsed.tabs[index];
                                tab.hash = hashFromTabContents({
                                    query: tab.query,
                                    variables: tab.variables,
                                    headers: tab.headers
                                });
                                if (tab.hash === expectedHash) {
                                    matchingTabIndex = index;
                                }
                            }
                            if (matchingTabIndex >= 0) {
                                parsed.activeTabIndex = matchingTabIndex;
                            } else {
                                const operationName = query ? fuzzyExtractOperationName(query) : null;
                                parsed.tabs.push({
                                    id: guid(),
                                    hash: expectedHash,
                                    title: operationName || DEFAULT_TITLE,
                                    query,
                                    variables,
                                    headers,
                                    operationName,
                                    response: null
                                });
                                parsed.activeTabIndex = parsed.tabs.length - 1;
                            }
                            return parsed;
                        }
                        throw new Error("Storage for tabs is invalid");
                    } catch {
                        return {
                            activeTabIndex: 0,
                            tabs: (defaultTabs || [{
                                query: query !== null && query !== void 0 ? query : defaultQuery,
                                variables,
                                headers: headers !== null && headers !== void 0 ? headers : defaultHeaders
                            }]).map(createTab)
                        };
                    }
                }

                function isTabsState(obj) {
                    return obj && typeof obj === "object" && !Array.isArray(obj) && hasNumberKey(obj, "activeTabIndex") && "tabs" in obj && Array.isArray(obj.tabs) && obj.tabs.every(isTabState);
                }

                function isTabState(obj) {
                    return obj && typeof obj === "object" && !Array.isArray(obj) && hasStringKey(obj, "id") && hasStringKey(obj, "title") && hasStringOrNullKey(obj, "query") && hasStringOrNullKey(obj, "variables") && hasStringOrNullKey(obj, "headers") && hasStringOrNullKey(obj, "operationName") && hasStringOrNullKey(obj, "response");
                }

                function hasNumberKey(obj, key) {
                    return key in obj && typeof obj[key] === "number";
                }

                function hasStringKey(obj, key) {
                    return key in obj && typeof obj[key] === "string";
                }

                function hasStringOrNullKey(obj, key) {
                    return key in obj && (typeof obj[key] === "string" || obj[key] === null);
                }

                function useSynchronizeActiveTabValues({
                    queryEditor,
                    variableEditor,
                    headerEditor,
                    responseEditor
                }) {
                    return React.useCallback(state => {
                        var _ref6, _ref7, _ref8, _ref9, _ref10;
                        const query = (_ref6 = queryEditor == null ? void 0 : queryEditor.getValue()) !== null && _ref6 !== void 0 ? _ref6 : null;
                        const variables = (_ref7 = variableEditor == null ? void 0 : variableEditor.getValue()) !== null && _ref7 !== void 0 ? _ref7 : null;
                        const headers = (_ref8 = headerEditor == null ? void 0 : headerEditor.getValue()) !== null && _ref8 !== void 0 ? _ref8 : null;
                        const operationName = (_ref9 = queryEditor == null ? void 0 : queryEditor.operationName) !== null && _ref9 !== void 0 ? _ref9 : null;
                        const response = (_ref10 = responseEditor == null ? void 0 : responseEditor.getValue()) !== null && _ref10 !== void 0 ? _ref10 : null;
                        return setPropertiesInActiveTab(state, {
                            query,
                            variables,
                            headers,
                            response,
                            operationName
                        });
                    }, [queryEditor, variableEditor, headerEditor, responseEditor]);
                }

                function serializeTabState(tabState, shouldPersistHeaders = false) {
                    return JSON.stringify(tabState, (key, value) => key === "hash" || key === "response" || !shouldPersistHeaders && key === "headers" ? null : value);
                }

                function useStoreTabs({
                    storage,
                    shouldPersistHeaders
                }) {
                    const store = React.useMemo(() => debounce(500, value => {
                        storage == null ? void 0 : storage.set(STORAGE_KEY$2, value);
                    }), [storage]);
                    return React.useCallback(currentState => {
                        store(serializeTabState(currentState, shouldPersistHeaders));
                    }, [shouldPersistHeaders, store]);
                }

                function useSetEditorValues({
                    queryEditor,
                    variableEditor,
                    headerEditor,
                    responseEditor,
                    defaultHeaders
                }) {
                    return React.useCallback(({
                        query,
                        variables,
                        headers,
                        response
                    }) => {
                        var _ref11;
                        queryEditor == null ? void 0 : queryEditor.setValue(query !== null && query !== void 0 ? query : "");
                        variableEditor == null ? void 0 : variableEditor.setValue(variables !== null && variables !== void 0 ? variables : "");
                        headerEditor == null ? void 0 : headerEditor.setValue((_ref11 = headers !== null && headers !== void 0 ? headers : defaultHeaders) !== null && _ref11 !== void 0 ? _ref11 : "");
                        responseEditor == null ? void 0 : responseEditor.setValue(response !== null && response !== void 0 ? response : "");
                    }, [headerEditor, queryEditor, responseEditor, variableEditor, defaultHeaders]);
                }

                function createTab({
                    query = null,
                    variables = null,
                    headers = null
                } = {}) {
                    return {
                        id: guid(),
                        hash: hashFromTabContents({
                            query,
                            variables,
                            headers
                        }),
                        title: query && fuzzyExtractOperationName(query) || DEFAULT_TITLE,
                        query,
                        variables,
                        headers,
                        operationName: null,
                        response: null
                    };
                }

                function setPropertiesInActiveTab(state, partialTab) {
                    return {
                        ...state,
                        tabs: state.tabs.map((tab, index) => {
                            if (index !== state.activeTabIndex) {
                                return tab;
                            }
                            const newTab = {
                                ...tab,
                                ...partialTab
                            };
                            return {
                                ...newTab,
                                hash: hashFromTabContents(newTab),
                                title: newTab.operationName || (newTab.query ? fuzzyExtractOperationName(newTab.query) : void 0) || DEFAULT_TITLE
                            };
                        })
                    };
                }

                function guid() {
                    const s4 = () => {
                        return Math.floor((1 + Math.random()) * 65536).toString(16).slice(1);
                    };
                    return `${s4()}${s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;
                }

                function hashFromTabContents(args) {
                    var _args$query, _args$variables, _args$headers;
                    return [(_args$query = args.query) !== null && _args$query !== void 0 ? _args$query : "", (_args$variables = args.variables) !== null && _args$variables !== void 0 ? _args$variables : "", (_args$headers = args.headers) !== null && _args$headers !== void 0 ? _args$headers : ""].join("|");
                }

                function fuzzyExtractOperationName(str) {
                    var _ref12;
                    const regex = /^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m;
                    const match = regex.exec(str);
                    return (_ref12 = match == null ? void 0 : match[2]) !== null && _ref12 !== void 0 ? _ref12 : null;
                }

                function clearHeadersFromTabs(storage) {
                    const persistedTabs = storage == null ? void 0 : storage.get(STORAGE_KEY$2);
                    if (persistedTabs) {
                        const parsedTabs = JSON.parse(persistedTabs);
                        storage == null ? void 0 : storage.set(STORAGE_KEY$2, JSON.stringify(parsedTabs, (key, value) => key === "headers" ? null : value));
                    }
                }
                const DEFAULT_TITLE = "<untitled>";
                const STORAGE_KEY$2 = "tabState";

                function importCodeMirrorImports$1() {
                    return importCodeMirror([Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/variables/hint.js */ "../../codemirror-graphql/esm/variables/hint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/variables/lint.js */ "../../codemirror-graphql/esm/variables/lint.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/variables/mode.js */ "../../codemirror-graphql/esm/variables/mode.js")))]);
                }
                const _useVariableEditor = useVariableEditor;

                function useVariableEditor(t0, caller) {
                    const $ = reactCompilerRuntime.c(17);
                    let t1;
                    if ($[0] !== t0) {
                        t1 = t0 === void 0 ? {} : t0;
                        $[0] = t0;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        editorTheme: t2,
                        keyMap: t3,
                        onClickReference,
                        onEdit,
                        readOnly: t4
                    } = t1;
                    const editorTheme = t2 === void 0 ? DEFAULT_EDITOR_THEME : t2;
                    const keyMap = t3 === void 0 ? DEFAULT_KEY_MAP : t3;
                    const readOnly = t4 === void 0 ? false : t4;
                    const t5 = caller || _useVariableEditor;
                    let t6;
                    if ($[2] !== t5) {
                        t6 = {
                            nonNull: true,
                            caller: t5
                        };
                        $[2] = t5;
                        $[3] = t6;
                    } else {
                        t6 = $[3];
                    }
                    const {
                        initialVariables,
                        variableEditor,
                        setVariableEditor
                    } = useEditorContext(t6);
                    const executionContext = useExecutionContext();
                    const t7 = caller || _useVariableEditor;
                    let t8;
                    if ($[4] !== t7) {
                        t8 = {
                            caller: t7
                        };
                        $[4] = t7;
                        $[5] = t8;
                    } else {
                        t8 = $[5];
                    }
                    const merge = useMergeQuery(t8);
                    const t9 = caller || _useVariableEditor;
                    let t10;
                    if ($[6] !== t9) {
                        t10 = {
                            caller: t9
                        };
                        $[6] = t9;
                        $[7] = t10;
                    } else {
                        t10 = $[7];
                    }
                    const prettify = usePrettifyEditors(t10);
                    const ref = React.useRef(null);
                    const codeMirrorRef = React.useRef();
                    let t11;
                    let t12;
                    if ($[8] !== editorTheme || $[9] !== initialVariables || $[10] !== readOnly || $[11] !== setVariableEditor) {
                        t11 = () => {
                            let isActive;
                            isActive = true;
                            importCodeMirrorImports$1().then(CodeMirror => {
                                if (!isActive) {
                                    return;
                                }
                                codeMirrorRef.current = CodeMirror;
                                const container = ref.current;
                                if (!container) {
                                    return;
                                }
                                const newEditor = CodeMirror(container, {
                                    value: initialVariables,
                                    lineNumbers: true,
                                    tabSize: 2,
                                    mode: "graphql-variables",
                                    theme: editorTheme,
                                    autoCloseBrackets: true,
                                    matchBrackets: true,
                                    showCursorWhenSelecting: true,
                                    readOnly: readOnly ? "nocursor" : false,
                                    foldGutter: true,
                                    lint: {
                                        variableToType: void 0
                                    },
                                    hintOptions: {
                                        closeOnUnfocus: false,
                                        completeSingle: false,
                                        container,
                                        variableToType: void 0
                                    },
                                    gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
                                    extraKeys: commonKeys
                                });
                                newEditor.addKeyMap({
                                    "Cmd-Space"() {
                                        newEditor.showHint({
                                            completeSingle: false,
                                            container
                                        });
                                    },
                                    "Ctrl-Space"() {
                                        newEditor.showHint({
                                            completeSingle: false,
                                            container
                                        });
                                    },
                                    "Alt-Space"() {
                                        newEditor.showHint({
                                            completeSingle: false,
                                            container
                                        });
                                    },
                                    "Shift-Space"() {
                                        newEditor.showHint({
                                            completeSingle: false,
                                            container
                                        });
                                    }
                                });
                                newEditor.on("keyup", _temp);
                                setVariableEditor(newEditor);
                            });
                            return () => {
                                isActive = false;
                            };
                        };
                        t12 = [editorTheme, initialVariables, readOnly, setVariableEditor];
                        $[8] = editorTheme;
                        $[9] = initialVariables;
                        $[10] = readOnly;
                        $[11] = setVariableEditor;
                        $[12] = t11;
                        $[13] = t12;
                    } else {
                        t11 = $[12];
                        t12 = $[13];
                    }
                    React.useEffect(t11, t12);
                    useSynchronizeOption(variableEditor, "keyMap", keyMap);
                    useChangeHandler(variableEditor, onEdit, STORAGE_KEY$1, "variables", _useVariableEditor);
                    useCompletion(variableEditor, onClickReference || null, _useVariableEditor);
                    let t13;
                    if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
                        t13 = ["Cmd-Enter", "Ctrl-Enter"];
                        $[14] = t13;
                    } else {
                        t13 = $[14];
                    }
                    useKeyMap(variableEditor, t13, executionContext == null ? void 0 : executionContext.run);
                    let t14;
                    if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
                        t14 = ["Shift-Ctrl-P"];
                        $[15] = t14;
                    } else {
                        t14 = $[15];
                    }
                    useKeyMap(variableEditor, t14, prettify);
                    let t15;
                    if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
                        t15 = ["Shift-Ctrl-M"];
                        $[16] = t15;
                    } else {
                        t15 = $[16];
                    }
                    useKeyMap(variableEditor, t15, merge);
                    return ref;
                }

                function _temp(editorInstance, event) {
                    const {
                        code,
                        key,
                        shiftKey
                    } = event;
                    const isLetter = code.startsWith("Key");
                    const isNumber = !shiftKey && code.startsWith("Digit");
                    if (isLetter || isNumber || key === "_" || key === '"') {
                        editorInstance.execCommand("autocomplete");
                    }
                }
                const STORAGE_KEY$1 = "variables";
                const EditorContext = createNullableContext("EditorContext");

                function EditorContextProvider(props) {
                    const $ = reactCompilerRuntime.c(89);
                    const storage = useStorageContext();
                    const [headerEditor, setHeaderEditor] = React.useState(null);
                    const [queryEditor, setQueryEditor] = React.useState(null);
                    const [responseEditor, setResponseEditor] = React.useState(null);
                    const [variableEditor, setVariableEditor] = React.useState(null);
                    let t0;
                    if ($[0] !== props.shouldPersistHeaders || $[1] !== storage) {
                        t0 = () => {
                            const isStored = (storage == null ? void 0 : storage.get(PERSIST_HEADERS_STORAGE_KEY)) !== null;
                            return props.shouldPersistHeaders !== false && isStored ? (storage == null ? void 0 : storage.get(PERSIST_HEADERS_STORAGE_KEY)) === "true" : Boolean(props.shouldPersistHeaders);
                        };
                        $[0] = props.shouldPersistHeaders;
                        $[1] = storage;
                        $[2] = t0;
                    } else {
                        t0 = $[2];
                    }
                    const [shouldPersistHeaders, setShouldPersistHeadersInternal] = React.useState(t0);
                    useSynchronizeValue(headerEditor, props.headers);
                    useSynchronizeValue(queryEditor, props.query);
                    useSynchronizeValue(responseEditor, props.response);
                    useSynchronizeValue(variableEditor, props.variables);
                    let t1;
                    if ($[3] !== shouldPersistHeaders || $[4] !== storage) {
                        t1 = {
                            storage,
                            shouldPersistHeaders
                        };
                        $[3] = shouldPersistHeaders;
                        $[4] = storage;
                        $[5] = t1;
                    } else {
                        t1 = $[5];
                    }
                    const storeTabs = useStoreTabs(t1);
                    let t2;
                    if ($[6] !== props.defaultHeaders || $[7] !== props.defaultQuery || $[8] !== props.defaultTabs || $[9] !== props.headers || $[10] !== props.query || $[11] !== props.response || $[12] !== props.variables || $[13] !== shouldPersistHeaders || $[14] !== storage || $[15] !== storeTabs) {
                        t2 = () => {
                            var _ref13, _props$query, _ref14, _props$variables, _ref15, _props$headers, _props$response, _ref16, _ref17;
                            const query = (_ref13 = (_props$query = props.query) !== null && _props$query !== void 0 ? _props$query : storage == null ? void 0 : storage.get(STORAGE_KEY_QUERY)) !== null && _ref13 !== void 0 ? _ref13 : null;
                            const variables = (_ref14 = (_props$variables = props.variables) !== null && _props$variables !== void 0 ? _props$variables : storage == null ? void 0 : storage.get(STORAGE_KEY$1)) !== null && _ref14 !== void 0 ? _ref14 : null;
                            const headers = (_ref15 = (_props$headers = props.headers) !== null && _props$headers !== void 0 ? _props$headers : storage == null ? void 0 : storage.get(STORAGE_KEY$3)) !== null && _ref15 !== void 0 ? _ref15 : null;
                            const response = (_props$response = props.response) !== null && _props$response !== void 0 ? _props$response : "";
                            const tabState = getDefaultTabState({
                                query,
                                variables,
                                headers,
                                defaultTabs: props.defaultTabs,
                                defaultQuery: props.defaultQuery || DEFAULT_QUERY,
                                defaultHeaders: props.defaultHeaders,
                                storage,
                                shouldPersistHeaders
                            });
                            storeTabs(tabState);
                            return {
                                query: (_ref16 = query !== null && query !== void 0 ? query : tabState.activeTabIndex === 0 ? tabState.tabs[0].query : null) !== null && _ref16 !== void 0 ? _ref16 : "",
                                variables: variables !== null && variables !== void 0 ? variables : "",
                                headers: (_ref17 = headers !== null && headers !== void 0 ? headers : props.defaultHeaders) !== null && _ref17 !== void 0 ? _ref17 : "",
                                response,
                                tabState
                            };
                        };
                        $[6] = props.defaultHeaders;
                        $[7] = props.defaultQuery;
                        $[8] = props.defaultTabs;
                        $[9] = props.headers;
                        $[10] = props.query;
                        $[11] = props.response;
                        $[12] = props.variables;
                        $[13] = shouldPersistHeaders;
                        $[14] = storage;
                        $[15] = storeTabs;
                        $[16] = t2;
                    } else {
                        t2 = $[16];
                    }
                    const [initialState] = React.useState(t2);
                    const [tabState_0, setTabState] = React.useState(initialState.tabState);
                    let t3;
                    if ($[17] !== headerEditor || $[18] !== storage || $[19] !== tabState_0) {
                        t3 = persist => {
                            if (persist) {
                                var _ref18;
                                storage == null ? void 0 : storage.set(STORAGE_KEY$3, (_ref18 = headerEditor == null ? void 0 : headerEditor.getValue()) !== null && _ref18 !== void 0 ? _ref18 : "");
                                const serializedTabs = serializeTabState(tabState_0, true);
                                storage == null ? void 0 : storage.set(STORAGE_KEY$2, serializedTabs);
                            } else {
                                storage == null ? void 0 : storage.set(STORAGE_KEY$3, "");
                                clearHeadersFromTabs(storage);
                            }
                            setShouldPersistHeadersInternal(persist);
                            storage == null ? void 0 : storage.set(PERSIST_HEADERS_STORAGE_KEY, persist.toString());
                        };
                        $[17] = headerEditor;
                        $[18] = storage;
                        $[19] = tabState_0;
                        $[20] = t3;
                    } else {
                        t3 = $[20];
                    }
                    const setShouldPersistHeaders = t3;
                    const lastShouldPersistHeadersProp = React.useRef();
                    let t4;
                    let t5;
                    if ($[21] !== props.shouldPersistHeaders || $[22] !== setShouldPersistHeaders) {
                        t4 = () => {
                            const propValue = Boolean(props.shouldPersistHeaders);
                            if ((lastShouldPersistHeadersProp == null ? void 0 : lastShouldPersistHeadersProp.current) !== propValue) {
                                setShouldPersistHeaders(propValue);
                                lastShouldPersistHeadersProp.current = propValue;
                            }
                        };
                        t5 = [props.shouldPersistHeaders, setShouldPersistHeaders];
                        $[21] = props.shouldPersistHeaders;
                        $[22] = setShouldPersistHeaders;
                        $[23] = t4;
                        $[24] = t5;
                    } else {
                        t4 = $[23];
                        t5 = $[24];
                    }
                    React.useEffect(t4, t5);
                    let t6;
                    if ($[25] !== headerEditor || $[26] !== queryEditor || $[27] !== responseEditor || $[28] !== variableEditor) {
                        t6 = {
                            queryEditor,
                            variableEditor,
                            headerEditor,
                            responseEditor
                        };
                        $[25] = headerEditor;
                        $[26] = queryEditor;
                        $[27] = responseEditor;
                        $[28] = variableEditor;
                        $[29] = t6;
                    } else {
                        t6 = $[29];
                    }
                    const synchronizeActiveTabValues = useSynchronizeActiveTabValues(t6);
                    const {
                        onTabChange,
                        defaultHeaders,
                        defaultQuery,
                        children
                    } = props;
                    let t7;
                    if ($[30] !== defaultHeaders || $[31] !== headerEditor || $[32] !== queryEditor || $[33] !== responseEditor || $[34] !== variableEditor) {
                        t7 = {
                            queryEditor,
                            variableEditor,
                            headerEditor,
                            responseEditor,
                            defaultHeaders
                        };
                        $[30] = defaultHeaders;
                        $[31] = headerEditor;
                        $[32] = queryEditor;
                        $[33] = responseEditor;
                        $[34] = variableEditor;
                        $[35] = t7;
                    } else {
                        t7 = $[35];
                    }
                    const setEditorValues = useSetEditorValues(t7);
                    let t8;
                    if ($[36] !== defaultHeaders || $[37] !== defaultQuery || $[38] !== onTabChange || $[39] !== setEditorValues || $[40] !== storeTabs || $[41] !== synchronizeActiveTabValues) {
                        t8 = () => {
                            setTabState(current => {
                                const updatedValues = synchronizeActiveTabValues(current);
                                const updated = {
                                    tabs: [...updatedValues.tabs, createTab({
                                        headers: defaultHeaders,
                                        query: defaultQuery !== null && defaultQuery !== void 0 ? defaultQuery : DEFAULT_QUERY
                                    })],
                                    activeTabIndex: updatedValues.tabs.length
                                };
                                storeTabs(updated);
                                setEditorValues(updated.tabs[updated.activeTabIndex]);
                                onTabChange == null ? void 0 : onTabChange(updated);
                                return updated;
                            });
                        };
                        $[36] = defaultHeaders;
                        $[37] = defaultQuery;
                        $[38] = onTabChange;
                        $[39] = setEditorValues;
                        $[40] = storeTabs;
                        $[41] = synchronizeActiveTabValues;
                        $[42] = t8;
                    } else {
                        t8 = $[42];
                    }
                    const addTab = t8;
                    let t9;
                    if ($[43] !== onTabChange || $[44] !== setEditorValues || $[45] !== storeTabs) {
                        t9 = index => {
                            setTabState(current_0 => {
                                const updated_0 = {
                                    ...current_0,
                                    activeTabIndex: index
                                };
                                storeTabs(updated_0);
                                setEditorValues(updated_0.tabs[updated_0.activeTabIndex]);
                                onTabChange == null ? void 0 : onTabChange(updated_0);
                                return updated_0;
                            });
                        };
                        $[43] = onTabChange;
                        $[44] = setEditorValues;
                        $[45] = storeTabs;
                        $[46] = t9;
                    } else {
                        t9 = $[46];
                    }
                    const changeTab = t9;
                    let t10;
                    if ($[47] !== onTabChange || $[48] !== setEditorValues || $[49] !== storeTabs) {
                        t10 = newOrder => {
                            setTabState(current_1 => {
                                const activeTab = current_1.tabs[current_1.activeTabIndex];
                                const updated_1 = {
                                    tabs: newOrder,
                                    activeTabIndex: newOrder.indexOf(activeTab)
                                };
                                storeTabs(updated_1);
                                setEditorValues(updated_1.tabs[updated_1.activeTabIndex]);
                                onTabChange == null ? void 0 : onTabChange(updated_1);
                                return updated_1;
                            });
                        };
                        $[47] = onTabChange;
                        $[48] = setEditorValues;
                        $[49] = storeTabs;
                        $[50] = t10;
                    } else {
                        t10 = $[50];
                    }
                    const moveTab = t10;
                    let t11;
                    if ($[51] !== onTabChange || $[52] !== setEditorValues || $[53] !== storeTabs) {
                        t11 = index_0 => {
                            setTabState(current_2 => {
                                const updated_2 = {
                                    tabs: current_2.tabs.filter((_tab, i) => index_0 !== i),
                                    activeTabIndex: Math.max(current_2.activeTabIndex - 1, 0)
                                };
                                storeTabs(updated_2);
                                setEditorValues(updated_2.tabs[updated_2.activeTabIndex]);
                                onTabChange == null ? void 0 : onTabChange(updated_2);
                                return updated_2;
                            });
                        };
                        $[51] = onTabChange;
                        $[52] = setEditorValues;
                        $[53] = storeTabs;
                        $[54] = t11;
                    } else {
                        t11 = $[54];
                    }
                    const closeTab = t11;
                    let t12;
                    if ($[55] !== onTabChange || $[56] !== storeTabs) {
                        t12 = partialTab => {
                            setTabState(current_3 => {
                                const updated_3 = setPropertiesInActiveTab(current_3, partialTab);
                                storeTabs(updated_3);
                                onTabChange == null ? void 0 : onTabChange(updated_3);
                                return updated_3;
                            });
                        };
                        $[55] = onTabChange;
                        $[56] = storeTabs;
                        $[57] = t12;
                    } else {
                        t12 = $[57];
                    }
                    const updateActiveTabValues = t12;
                    const {
                        onEditOperationName
                    } = props;
                    let t13;
                    if ($[58] !== onEditOperationName || $[59] !== queryEditor || $[60] !== updateActiveTabValues) {
                        t13 = operationName => {
                            if (!queryEditor) {
                                return;
                            }
                            updateQueryEditor(queryEditor, operationName);
                            updateActiveTabValues({
                                operationName
                            });
                            onEditOperationName == null ? void 0 : onEditOperationName(operationName);
                        };
                        $[58] = onEditOperationName;
                        $[59] = queryEditor;
                        $[60] = updateActiveTabValues;
                        $[61] = t13;
                    } else {
                        t13 = $[61];
                    }
                    const setOperationName = t13;
                    let t14;
                    let map;
                    if ($[62] !== props.externalFragments) {
                        map = /* @__PURE__ */ new Map();
                        if (Array.isArray(props.externalFragments)) {
                            for (const fragment of props.externalFragments) {
                                map.set(fragment.name.value, fragment);
                            }
                        } else {
                            if (typeof props.externalFragments === "string") {
                                graphql.visit(graphql.parse(props.externalFragments, {}), {
                                    FragmentDefinition(fragment_0) {
                                        map.set(fragment_0.name.value, fragment_0);
                                    }
                                });
                            } else {
                                if (props.externalFragments) {
                                    throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");
                                }
                            }
                        }
                        $[62] = props.externalFragments;
                        $[63] = map;
                    } else {
                        map = $[63];
                    }
                    t14 = map;
                    const externalFragments = t14;
                    let t15;
                    if ($[64] !== props.validationRules) {
                        t15 = props.validationRules || [];
                        $[64] = props.validationRules;
                        $[65] = t15;
                    } else {
                        t15 = $[65];
                    }
                    const validationRules = t15;
                    let t16;
                    if ($[66] !== addTab || $[67] !== changeTab || $[68] !== closeTab || $[69] !== externalFragments || $[70] !== headerEditor || $[71] !== initialState.headers || $[72] !== initialState.query || $[73] !== initialState.response || $[74] !== initialState.variables || $[75] !== moveTab || $[76] !== queryEditor || $[77] !== responseEditor || $[78] !== setOperationName || $[79] !== setShouldPersistHeaders || $[80] !== shouldPersistHeaders || $[81] !== tabState_0 || $[82] !== updateActiveTabValues || $[83] !== validationRules || $[84] !== variableEditor) {
                        t16 = {
                            ...tabState_0,
                            addTab,
                            changeTab,
                            moveTab,
                            closeTab,
                            updateActiveTabValues,
                            headerEditor,
                            queryEditor,
                            responseEditor,
                            variableEditor,
                            setHeaderEditor,
                            setQueryEditor,
                            setResponseEditor,
                            setVariableEditor,
                            setOperationName,
                            initialQuery: initialState.query,
                            initialVariables: initialState.variables,
                            initialHeaders: initialState.headers,
                            initialResponse: initialState.response,
                            externalFragments,
                            validationRules,
                            shouldPersistHeaders,
                            setShouldPersistHeaders
                        };
                        $[66] = addTab;
                        $[67] = changeTab;
                        $[68] = closeTab;
                        $[69] = externalFragments;
                        $[70] = headerEditor;
                        $[71] = initialState.headers;
                        $[72] = initialState.query;
                        $[73] = initialState.response;
                        $[74] = initialState.variables;
                        $[75] = moveTab;
                        $[76] = queryEditor;
                        $[77] = responseEditor;
                        $[78] = setOperationName;
                        $[79] = setShouldPersistHeaders;
                        $[80] = shouldPersistHeaders;
                        $[81] = tabState_0;
                        $[82] = updateActiveTabValues;
                        $[83] = validationRules;
                        $[84] = variableEditor;
                        $[85] = t16;
                    } else {
                        t16 = $[85];
                    }
                    const value = t16;
                    let t17;
                    if ($[86] !== children || $[87] !== value) {
                        t17 = /* @__PURE__ */ jsxRuntime.jsx(EditorContext.Provider, {
                            value,
                            children
                        });
                        $[86] = children;
                        $[87] = value;
                        $[88] = t17;
                    } else {
                        t17 = $[88];
                    }
                    return t17;
                }

                function updateQueryEditor(queryEditor, operationName) {
                    queryEditor.operationName = operationName;
                }
                const useEditorContext = createContextHook(EditorContext);
                const PERSIST_HEADERS_STORAGE_KEY = "shouldPersistHeaders";
                const DEFAULT_QUERY = `# Welcome to GraphiQL
#
# GraphiQL is an in-browser tool for writing, validating, and
# testing GraphQL queries.
#
# Type queries into this side of the screen, and you will see intelligent
# typeaheads aware of the current GraphQL type schema and live syntax and
# validation errors highlighted within the text.
#
# GraphQL queries typically start with a "{" character. Lines that start
# with a # are ignored.
#
# An example GraphQL query might look like:
#
#     {
#       field(arg: "value") {
#         subField
#       }
#     }
#
# Keyboard shortcuts:
#
#   Prettify query:  Shift-Ctrl-P (or press the prettify button)
#
#  Merge fragments:  Shift-Ctrl-M (or press the merge button)
#
#        Run Query:  Ctrl-Enter (or press the play button)
#
#    Auto Complete:  Ctrl-Space (or just start typing)
#

`;

                function HeaderEditor(t0) {
                    const $ = reactCompilerRuntime.c(13);
                    let hookArgs;
                    let isHidden;
                    if ($[0] !== t0) {
                        ({
                            isHidden,
                            ...hookArgs
                        } = t0);
                        $[0] = t0;
                        $[1] = hookArgs;
                        $[2] = isHidden;
                    } else {
                        hookArgs = $[1];
                        isHidden = $[2];
                    }
                    let t1;
                    if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = {
                            nonNull: true,
                            caller: HeaderEditor
                        };
                        $[3] = t1;
                    } else {
                        t1 = $[3];
                    }
                    const {
                        headerEditor
                    } = useEditorContext(t1);
                    const ref = useHeaderEditor(hookArgs, HeaderEditor);
                    let t2;
                    let t3;
                    if ($[4] !== headerEditor || $[5] !== isHidden) {
                        t2 = () => {
                            if (!isHidden) {
                                headerEditor == null ? void 0 : headerEditor.refresh();
                            }
                        };
                        t3 = [headerEditor, isHidden];
                        $[4] = headerEditor;
                        $[5] = isHidden;
                        $[6] = t2;
                        $[7] = t3;
                    } else {
                        t2 = $[6];
                        t3 = $[7];
                    }
                    React.useEffect(t2, t3);
                    const t4 = isHidden && "hidden";
                    let t5;
                    if ($[8] !== t4) {
                        t5 = clsx.clsx("graphiql-editor", t4);
                        $[8] = t4;
                        $[9] = t5;
                    } else {
                        t5 = $[9];
                    }
                    let t6;
                    if ($[10] !== ref || $[11] !== t5) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            className: t5,
                            ref
                        });
                        $[10] = ref;
                        $[11] = t5;
                        $[12] = t6;
                    } else {
                        t6 = $[12];
                    }
                    return t6;
                }

                function ImagePreview(props) {
                    var _a;
                    const $ = reactCompilerRuntime.c(14);
                    let t0;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t0 = {
                            width: null,
                            height: null
                        };
                        $[0] = t0;
                    } else {
                        t0 = $[0];
                    }
                    const [dimensions, setDimensions] = React.useState(t0);
                    const [mime, setMime] = React.useState(null);
                    const ref = React.useRef(null);
                    const src = (_a = tokenToURL(props.token)) == null ? void 0 : _a.href;
                    let t1;
                    let t2;
                    if ($[1] !== src) {
                        t1 = () => {
                            if (!ref.current) {
                                return;
                            }
                            if (!src) {
                                setDimensions({
                                    width: null,
                                    height: null
                                });
                                setMime(null);
                                return;
                            }
                            fetch(src, {
                                method: "HEAD"
                            }).then(response => {
                                setMime(response.headers.get("Content-Type"));
                            }).catch(() => {
                                setMime(null);
                            });
                        };
                        t2 = [src];
                        $[1] = src;
                        $[2] = t1;
                        $[3] = t2;
                    } else {
                        t1 = $[2];
                        t2 = $[3];
                    }
                    React.useEffect(t1, t2);
                    let t3;
                    if ($[4] !== dimensions.height || $[5] !== dimensions.width || $[6] !== mime) {
                        t3 = dimensions.width !== null && dimensions.height !== null ? /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            children: [dimensions.width, "x", dimensions.height, mime === null ? null : " " + mime]
                        }) : null;
                        $[4] = dimensions.height;
                        $[5] = dimensions.width;
                        $[6] = mime;
                        $[7] = t3;
                    } else {
                        t3 = $[7];
                    }
                    const dims = t3;
                    let t4;
                    if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
                        t4 = () => {
                            var _ref19, _ref20;
                            var _a2, _b;
                            setDimensions({
                                width: (_ref19 = (_a2 = ref.current) == null ? void 0 : _a2.naturalWidth) !== null && _ref19 !== void 0 ? _ref19 : null,
                                height: (_ref20 = (_b = ref.current) == null ? void 0 : _b.naturalHeight) !== null && _ref20 !== void 0 ? _ref20 : null
                            });
                        };
                        $[8] = t4;
                    } else {
                        t4 = $[8];
                    }
                    let t5;
                    if ($[9] !== src) {
                        t5 = /* @__PURE__ */ jsxRuntime.jsx("img", {
                            onLoad: t4,
                            ref,
                            src
                        });
                        $[9] = src;
                        $[10] = t5;
                    } else {
                        t5 = $[10];
                    }
                    let t6;
                    if ($[11] !== dims || $[12] !== t5) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
                            children: [t5, dims]
                        });
                        $[11] = dims;
                        $[12] = t5;
                        $[13] = t6;
                    } else {
                        t6 = $[13];
                    }
                    return t6;
                }
                ImagePreview.shouldRender = function shouldRender(token) {
                    const url = tokenToURL(token);
                    return url ? isImageURL(url) : false;
                };

                function tokenToURL(token) {
                    if (token.type !== "string") {
                        return;
                    }
                    const value = token.string.slice(1).slice(0, -1).trim();
                    try {
                        const {
                            location
                        } = window;
                        return new URL(value, location.protocol + "//" + location.host);
                    } catch {
                        return;
                    }
                }

                function isImageURL(url) {
                    return /\.(bmp|gif|jpe?g|png|svg|webp)$/.test(url.pathname);
                }

                function QueryEditor(props) {
                    const $ = reactCompilerRuntime.c(2);
                    const ref = useQueryEditor(props, QueryEditor);
                    let t0;
                    if ($[0] !== ref) {
                        t0 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            className: "graphiql-editor",
                            ref
                        });
                        $[0] = ref;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    return t0;
                }

                function importCodeMirrorImports() {
                    return importCodeMirror([Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/fold/foldgutter.js */ "../../../node_modules/codemirror/addon/fold/foldgutter.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/fold/brace-fold.js */ "../../../node_modules/codemirror/addon/fold/brace-fold.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/dialog/dialog.js */ "../../../node_modules/codemirror/addon/dialog/dialog.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/search/search.js */ "../../../node_modules/codemirror/addon/search/search.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/search/searchcursor.js */ "../../../node_modules/codemirror/addon/search/searchcursor.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/addon/search/jump-to-line.js */ "../../../node_modules/codemirror/addon/search/jump-to-line.js"))), // @ts-expect-error
                        Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror/keymap/sublime.js */ "../../../node_modules/codemirror/keymap/sublime.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/results/mode.js */ "../../codemirror-graphql/esm/results/mode.js"))), Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! codemirror-graphql/esm/utils/info-addon.js */ "../../codemirror-graphql/esm/utils/info-addon.js")))
                    ], {
                        useCommonAddons: false
                    });
                }
                const _useResponseEditor = useResponseEditor;

                function useResponseEditor(t0, caller) {
                    const $ = reactCompilerRuntime.c(19);
                    let t1;
                    if ($[0] !== t0) {
                        t1 = t0 === void 0 ? {} : t0;
                        $[0] = t0;
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        responseTooltip,
                        editorTheme: t2,
                        keyMap: t3
                    } = t1;
                    const editorTheme = t2 === void 0 ? DEFAULT_EDITOR_THEME : t2;
                    const keyMap = t3 === void 0 ? DEFAULT_KEY_MAP : t3;
                    const t4 = caller || _useResponseEditor;
                    let t5;
                    if ($[2] !== t4) {
                        t5 = {
                            nonNull: true,
                            caller: t4
                        };
                        $[2] = t4;
                        $[3] = t5;
                    } else {
                        t5 = $[3];
                    }
                    const {
                        fetchError,
                        validationErrors
                    } = useSchemaContext(t5);
                    const t6 = caller || _useResponseEditor;
                    let t7;
                    if ($[4] !== t6) {
                        t7 = {
                            nonNull: true,
                            caller: t6
                        };
                        $[4] = t6;
                        $[5] = t7;
                    } else {
                        t7 = $[5];
                    }
                    const {
                        initialResponse,
                        responseEditor,
                        setResponseEditor
                    } = useEditorContext(t7);
                    const ref = React.useRef(null);
                    const responseTooltipRef = React.useRef(responseTooltip);
                    let t8;
                    let t9;
                    if ($[6] !== responseTooltip) {
                        t8 = () => {
                            responseTooltipRef.current = responseTooltip;
                        };
                        t9 = [responseTooltip];
                        $[6] = responseTooltip;
                        $[7] = t8;
                        $[8] = t9;
                    } else {
                        t8 = $[7];
                        t9 = $[8];
                    }
                    React.useEffect(t8, t9);
                    let t10;
                    let t11;
                    if ($[9] !== editorTheme || $[10] !== initialResponse || $[11] !== setResponseEditor) {
                        t10 = () => {
                            let isActive;
                            isActive = true;
                            importCodeMirrorImports().then(CodeMirror => {
                                if (!isActive) {
                                    return;
                                }
                                const tooltipDiv = document.createElement("div");
                                CodeMirror.registerHelper("info", "graphql-results", (token, _options, _cm, pos) => {
                                    const infoElements = [];
                                    const ResponseTooltipComponent = responseTooltipRef.current;
                                    if (ResponseTooltipComponent) {
                                        infoElements.push( /* @__PURE__ */ jsxRuntime.jsx(ResponseTooltipComponent, {
                                            pos,
                                            token
                                        }));
                                    }
                                    if (ImagePreview.shouldRender(token)) {
                                        infoElements.push( /* @__PURE__ */ jsxRuntime.jsx(ImagePreview, {
                                            token
                                        }, "image-preview"));
                                    }
                                    if (!infoElements.length) {
                                        ReactDOM.unmountComponentAtNode(tooltipDiv);
                                        return null;
                                    }
                                    ReactDOM.render(infoElements, tooltipDiv);
                                    return tooltipDiv;
                                });
                                const container = ref.current;
                                if (!container) {
                                    return;
                                }
                                const newEditor = CodeMirror(container, {
                                    value: initialResponse,
                                    lineWrapping: true,
                                    readOnly: true,
                                    theme: editorTheme,
                                    mode: "graphql-results",
                                    foldGutter: true,
                                    gutters: ["CodeMirror-foldgutter"],
                                    info: true,
                                    extraKeys: commonKeys
                                });
                                setResponseEditor(newEditor);
                            });
                            return () => {
                                isActive = false;
                            };
                        };
                        t11 = [editorTheme, initialResponse, setResponseEditor];
                        $[9] = editorTheme;
                        $[10] = initialResponse;
                        $[11] = setResponseEditor;
                        $[12] = t10;
                        $[13] = t11;
                    } else {
                        t10 = $[12];
                        t11 = $[13];
                    }
                    React.useEffect(t10, t11);
                    useSynchronizeOption(responseEditor, "keyMap", keyMap);
                    let t12;
                    let t13;
                    if ($[14] !== fetchError || $[15] !== responseEditor || $[16] !== validationErrors) {
                        t12 = () => {
                            if (fetchError) {
                                responseEditor == null ? void 0 : responseEditor.setValue(fetchError);
                            }
                            if (validationErrors.length > 0) {
                                responseEditor == null ? void 0 : responseEditor.setValue(toolkit.formatError(validationErrors));
                            }
                        };
                        t13 = [responseEditor, fetchError, validationErrors];
                        $[14] = fetchError;
                        $[15] = responseEditor;
                        $[16] = validationErrors;
                        $[17] = t12;
                        $[18] = t13;
                    } else {
                        t12 = $[17];
                        t13 = $[18];
                    }
                    React.useEffect(t12, t13);
                    return ref;
                }

                function ResponseEditor(props) {
                    const $ = reactCompilerRuntime.c(2);
                    const ref = useResponseEditor(props, ResponseEditor);
                    let t0;
                    if ($[0] !== ref) {
                        t0 = /* @__PURE__ */ jsxRuntime.jsx("section", {
                            className: "result-window",
                            "aria-label": "Result Window",
                            "aria-live": "polite",
                            "aria-atomic": "true",
                            ref
                        });
                        $[0] = ref;
                        $[1] = t0;
                    } else {
                        t0 = $[1];
                    }
                    return t0;
                }

                function VariableEditor(t0) {
                    const $ = reactCompilerRuntime.c(13);
                    let hookArgs;
                    let isHidden;
                    if ($[0] !== t0) {
                        ({
                            isHidden,
                            ...hookArgs
                        } = t0);
                        $[0] = t0;
                        $[1] = hookArgs;
                        $[2] = isHidden;
                    } else {
                        hookArgs = $[1];
                        isHidden = $[2];
                    }
                    let t1;
                    if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = {
                            nonNull: true,
                            caller: VariableEditor
                        };
                        $[3] = t1;
                    } else {
                        t1 = $[3];
                    }
                    const {
                        variableEditor
                    } = useEditorContext(t1);
                    const ref = useVariableEditor(hookArgs, VariableEditor);
                    let t2;
                    let t3;
                    if ($[4] !== isHidden || $[5] !== variableEditor) {
                        t2 = () => {
                            if (variableEditor && !isHidden) {
                                variableEditor.refresh();
                            }
                        };
                        t3 = [variableEditor, isHidden];
                        $[4] = isHidden;
                        $[5] = variableEditor;
                        $[6] = t2;
                        $[7] = t3;
                    } else {
                        t2 = $[6];
                        t3 = $[7];
                    }
                    React.useEffect(t2, t3);
                    const t4 = isHidden && "hidden";
                    let t5;
                    if ($[8] !== t4) {
                        t5 = clsx.clsx("graphiql-editor", t4);
                        $[8] = t4;
                        $[9] = t5;
                    } else {
                        t5 = $[9];
                    }
                    let t6;
                    if ($[10] !== ref || $[11] !== t5) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsx("div", {
                            className: t5,
                            ref
                        });
                        $[10] = ref;
                        $[11] = t5;
                        $[12] = t6;
                    } else {
                        t6 = $[12];
                    }
                    return t6;
                }

                function GraphiQLProvider(t0) {
                    const $ = reactCompilerRuntime.c(39);
                    const {
                        children,
                        dangerouslyAssumeSchemaIsValid,
                        defaultQuery,
                        defaultHeaders,
                        defaultTabs,
                        externalFragments,
                        fetcher,
                        getDefaultFieldNames,
                        headers,
                        inputValueDeprecation,
                        introspectionQueryName,
                        maxHistoryLength,
                        onEditOperationName,
                        onSchemaChange,
                        onTabChange,
                        onTogglePluginVisibility,
                        operationName,
                        plugins,
                        query,
                        response,
                        schema,
                        schemaDescription,
                        shouldPersistHeaders,
                        storage,
                        validationRules,
                        variables,
                        visiblePlugin
                    } = t0;
                    let t1;
                    if ($[0] !== children || $[1] !== onTogglePluginVisibility || $[2] !== plugins || $[3] !== visiblePlugin) {
                        t1 = /* @__PURE__ */ jsxRuntime.jsx(ExplorerContextProvider, {
                            children: /* @__PURE__ */ jsxRuntime.jsx(PluginContextProvider, {
                                onTogglePluginVisibility,
                                plugins,
                                visiblePlugin,
                                children
                            })
                        });
                        $[0] = children;
                        $[1] = onTogglePluginVisibility;
                        $[2] = plugins;
                        $[3] = visiblePlugin;
                        $[4] = t1;
                    } else {
                        t1 = $[4];
                    }
                    let t2;
                    if ($[5] !== fetcher || $[6] !== getDefaultFieldNames || $[7] !== operationName || $[8] !== t1) {
                        t2 = /* @__PURE__ */ jsxRuntime.jsx(ExecutionContextProvider, {
                            getDefaultFieldNames,
                            fetcher,
                            operationName,
                            children: t1
                        });
                        $[5] = fetcher;
                        $[6] = getDefaultFieldNames;
                        $[7] = operationName;
                        $[8] = t1;
                        $[9] = t2;
                    } else {
                        t2 = $[9];
                    }
                    let t3;
                    if ($[10] !== dangerouslyAssumeSchemaIsValid || $[11] !== fetcher || $[12] !== inputValueDeprecation || $[13] !== introspectionQueryName || $[14] !== onSchemaChange || $[15] !== schema || $[16] !== schemaDescription || $[17] !== t2) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsx(SchemaContextProvider, {
                            dangerouslyAssumeSchemaIsValid,
                            fetcher,
                            inputValueDeprecation,
                            introspectionQueryName,
                            onSchemaChange,
                            schema,
                            schemaDescription,
                            children: t2
                        });
                        $[10] = dangerouslyAssumeSchemaIsValid;
                        $[11] = fetcher;
                        $[12] = inputValueDeprecation;
                        $[13] = introspectionQueryName;
                        $[14] = onSchemaChange;
                        $[15] = schema;
                        $[16] = schemaDescription;
                        $[17] = t2;
                        $[18] = t3;
                    } else {
                        t3 = $[18];
                    }
                    let t4;
                    if ($[19] !== defaultHeaders || $[20] !== defaultQuery || $[21] !== defaultTabs || $[22] !== externalFragments || $[23] !== headers || $[24] !== onEditOperationName || $[25] !== onTabChange || $[26] !== query || $[27] !== response || $[28] !== shouldPersistHeaders || $[29] !== t3 || $[30] !== validationRules || $[31] !== variables) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsx(EditorContextProvider, {
                            defaultQuery,
                            defaultHeaders,
                            defaultTabs,
                            externalFragments,
                            headers,
                            onEditOperationName,
                            onTabChange,
                            query,
                            response,
                            shouldPersistHeaders,
                            validationRules,
                            variables,
                            children: t3
                        });
                        $[19] = defaultHeaders;
                        $[20] = defaultQuery;
                        $[21] = defaultTabs;
                        $[22] = externalFragments;
                        $[23] = headers;
                        $[24] = onEditOperationName;
                        $[25] = onTabChange;
                        $[26] = query;
                        $[27] = response;
                        $[28] = shouldPersistHeaders;
                        $[29] = t3;
                        $[30] = validationRules;
                        $[31] = variables;
                        $[32] = t4;
                    } else {
                        t4 = $[32];
                    }
                    let t5;
                    if ($[33] !== maxHistoryLength || $[34] !== t4) {
                        t5 = /* @__PURE__ */ jsxRuntime.jsx(HistoryContextProvider, {
                            maxHistoryLength,
                            children: t4
                        });
                        $[33] = maxHistoryLength;
                        $[34] = t4;
                        $[35] = t5;
                    } else {
                        t5 = $[35];
                    }
                    let t6;
                    if ($[36] !== storage || $[37] !== t5) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsx(StorageContextProvider, {
                            storage,
                            children: t5
                        });
                        $[36] = storage;
                        $[37] = t5;
                        $[38] = t6;
                    } else {
                        t6 = $[38];
                    }
                    return t6;
                }

                function useTheme(t0) {
                    const $ = reactCompilerRuntime.c(11);
                    const defaultTheme = t0 === void 0 ? null : t0;
                    const storageContext = useStorageContext();
                    let t1;
                    if ($[0] !== defaultTheme || $[1] !== storageContext) {
                        t1 = () => {
                            if (!storageContext) {
                                return null;
                            }
                            const stored = storageContext.get(STORAGE_KEY);
                            switch (stored) {
                                case "light": {
                                    return "light";
                                }
                                case "dark": {
                                    return "dark";
                                }
                                default: {
                                    if (typeof stored === "string") {
                                        storageContext.set(STORAGE_KEY, "");
                                    }
                                    return defaultTheme;
                                }
                            }
                        };
                        $[0] = defaultTheme;
                        $[1] = storageContext;
                        $[2] = t1;
                    } else {
                        t1 = $[2];
                    }
                    const [theme, setThemeInternal] = React.useState(t1);
                    let t2;
                    let t3;
                    if ($[3] !== theme) {
                        t2 = () => {
                            if (typeof window === "undefined") {
                                return;
                            }
                            document.body.classList.remove("graphiql-light", "graphiql-dark");
                            if (theme) {
                                document.body.classList.add(`graphiql-${theme}`);
                            }
                        };
                        t3 = [theme];
                        $[3] = theme;
                        $[4] = t2;
                        $[5] = t3;
                    } else {
                        t2 = $[4];
                        t3 = $[5];
                    }
                    React.useLayoutEffect(t2, t3);
                    let t4;
                    if ($[6] !== storageContext) {
                        t4 = newTheme => {
                            storageContext == null ? void 0 : storageContext.set(STORAGE_KEY, newTheme || "");
                            setThemeInternal(newTheme);
                        };
                        $[6] = storageContext;
                        $[7] = t4;
                    } else {
                        t4 = $[7];
                    }
                    const setTheme = t4;
                    let t5;
                    if ($[8] !== setTheme || $[9] !== theme) {
                        t5 = {
                            theme,
                            setTheme
                        };
                        $[8] = setTheme;
                        $[9] = theme;
                        $[10] = t5;
                    } else {
                        t5 = $[10];
                    }
                    return t5;
                }
                const STORAGE_KEY = "theme";

                function useDragResize(t0) {
                    const $ = reactCompilerRuntime.c(31);
                    const {
                        defaultSizeRelation: t1,
                        direction,
                        initiallyHidden,
                        onHiddenElementChange,
                        sizeThresholdFirst: t2,
                        sizeThresholdSecond: t3,
                        storageKey
                    } = t0;
                    const defaultSizeRelation = t1 === void 0 ? DEFAULT_FLEX : t1;
                    const sizeThresholdFirst = t2 === void 0 ? 100 : t2;
                    const sizeThresholdSecond = t3 === void 0 ? 100 : t3;
                    const storage = useStorageContext();
                    let t4;
                    if ($[0] !== storage || $[1] !== storageKey) {
                        t4 = debounce(500, value => {
                            if (storageKey) {
                                storage == null ? void 0 : storage.set(storageKey, value);
                            }
                        });
                        $[0] = storage;
                        $[1] = storageKey;
                        $[2] = t4;
                    } else {
                        t4 = $[2];
                    }
                    const store = t4;
                    let t5;
                    if ($[3] !== initiallyHidden || $[4] !== storage || $[5] !== storageKey) {
                        t5 = () => {
                            const storedValue = storageKey && (storage == null ? void 0 : storage.get(storageKey));
                            if (storedValue === HIDE_FIRST || initiallyHidden === "first") {
                                return "first";
                            }
                            if (storedValue === HIDE_SECOND || initiallyHidden === "second") {
                                return "second";
                            }
                            return null;
                        };
                        $[3] = initiallyHidden;
                        $[4] = storage;
                        $[5] = storageKey;
                        $[6] = t5;
                    } else {
                        t5 = $[6];
                    }
                    const [hiddenElement, setHiddenElement] = React.useState(t5);
                    let t6;
                    if ($[7] !== hiddenElement || $[8] !== onHiddenElementChange) {
                        t6 = element => {
                            if (element !== hiddenElement) {
                                setHiddenElement(element);
                                onHiddenElementChange == null ? void 0 : onHiddenElementChange(element);
                            }
                        };
                        $[7] = hiddenElement;
                        $[8] = onHiddenElementChange;
                        $[9] = t6;
                    } else {
                        t6 = $[9];
                    }
                    const setHiddenElementWithCallback = t6;
                    const firstRef = React.useRef(null);
                    const dragBarRef = React.useRef(null);
                    const secondRef = React.useRef(null);
                    const defaultFlexRef = React.useRef(`${defaultSizeRelation}`);
                    let t7;
                    if ($[10] !== storage || $[11] !== storageKey) {
                        t7 = () => {
                            const storedValue_0 = storageKey && (storage == null ? void 0 : storage.get(storageKey)) || defaultFlexRef.current;
                            if (firstRef.current) {
                                firstRef.current.style.display = "flex";
                                firstRef.current.style.flex = storedValue_0 === HIDE_FIRST || storedValue_0 === HIDE_SECOND ? defaultFlexRef.current : storedValue_0;
                            }
                            if (secondRef.current) {
                                secondRef.current.style.display = "flex";
                                secondRef.current.style.flex = "1";
                            }
                            if (dragBarRef.current) {
                                dragBarRef.current.style.display = "flex";
                            }
                        };
                        $[10] = storage;
                        $[11] = storageKey;
                        $[12] = t7;
                    } else {
                        t7 = $[12];
                    }
                    let t8;
                    if ($[13] !== direction || $[14] !== storage || $[15] !== storageKey) {
                        t8 = [direction, storage, storageKey];
                        $[13] = direction;
                        $[14] = storage;
                        $[15] = storageKey;
                        $[16] = t8;
                    } else {
                        t8 = $[16];
                    }
                    React.useLayoutEffect(t7, t8);
                    let t10;
                    let t9;
                    if ($[17] !== hiddenElement || $[18] !== storage || $[19] !== storageKey) {
                        t9 = () => {
                            const hide = resizableElement => {
                                const element_0 = resizableElement === "first" ? firstRef.current : secondRef.current;
                                if (!element_0) {
                                    return;
                                }
                                element_0.style.left = "-1000px";
                                element_0.style.position = "absolute";
                                element_0.style.opacity = "0";
                                element_0.style.height = "500px";
                                element_0.style.width = "500px";
                                if (firstRef.current) {
                                    const flex = parseFloat(firstRef.current.style.flex);
                                    if (!Number.isFinite(flex) || flex < 1) {
                                        firstRef.current.style.flex = "1";
                                    }
                                }
                            };
                            const show = resizableElement_0 => {
                                const element_1 = resizableElement_0 === "first" ? firstRef.current : secondRef.current;
                                if (!element_1) {
                                    return;
                                }
                                element_1.style.width = "";
                                element_1.style.height = "";
                                element_1.style.opacity = "";
                                element_1.style.position = "";
                                element_1.style.left = "";
                                if (storage && storageKey) {
                                    const storedValue_1 = storage.get(storageKey);
                                    if (firstRef.current && storedValue_1 !== HIDE_FIRST && storedValue_1 !== HIDE_SECOND) {
                                        firstRef.current.style.flex = storedValue_1 || defaultFlexRef.current;
                                    }
                                }
                            };
                            if (hiddenElement === "first") {
                                hide("first");
                            } else {
                                show("first");
                            }
                            if (hiddenElement === "second") {
                                hide("second");
                            } else {
                                show("second");
                            }
                        };
                        t10 = [hiddenElement, storage, storageKey];
                        $[17] = hiddenElement;
                        $[18] = storage;
                        $[19] = storageKey;
                        $[20] = t10;
                        $[21] = t9;
                    } else {
                        t10 = $[20];
                        t9 = $[21];
                    }
                    React.useLayoutEffect(t9, t10);
                    let t11;
                    let t12;
                    if ($[22] !== direction || $[23] !== setHiddenElementWithCallback || $[24] !== sizeThresholdFirst || $[25] !== sizeThresholdSecond || $[26] !== store) {
                        t11 = () => {
                            if (!dragBarRef.current || !firstRef.current || !secondRef.current) {
                                return;
                            }
                            const dragBarContainer = dragBarRef.current;
                            const firstContainer = firstRef.current;
                            const wrapper = firstContainer.parentElement;
                            const eventProperty = direction === "horizontal" ? "clientX" : "clientY";
                            const rectProperty = direction === "horizontal" ? "left" : "top";
                            const adjacentRectProperty = direction === "horizontal" ? "right" : "bottom";
                            const sizeProperty = direction === "horizontal" ? "clientWidth" : "clientHeight";
                            const handleMouseDown = function handleMouseDown2(downEvent) {
                                downEvent.preventDefault();
                                const offset = downEvent[eventProperty] - dragBarContainer.getBoundingClientRect()[rectProperty];
                                const handleMouseMove = function handleMouseMove2(moveEvent) {
                                    if (moveEvent.buttons === 0) {
                                        return handleMouseUp();
                                    }
                                    const firstSize = moveEvent[eventProperty] - wrapper.getBoundingClientRect()[rectProperty] - offset;
                                    const secondSize = wrapper.getBoundingClientRect()[adjacentRectProperty] - moveEvent[eventProperty] + offset - dragBarContainer[sizeProperty];
                                    if (firstSize < sizeThresholdFirst) {
                                        setHiddenElementWithCallback("first");
                                        store(HIDE_FIRST);
                                    } else {
                                        if (secondSize < sizeThresholdSecond) {
                                            setHiddenElementWithCallback("second");
                                            store(HIDE_SECOND);
                                        } else {
                                            setHiddenElementWithCallback(null);
                                            const newFlex = `${firstSize / secondSize}`;
                                            firstContainer.style.flex = newFlex;
                                            store(newFlex);
                                        }
                                    }
                                };

                                function handleMouseUp() {
                                    document.removeEventListener("mousemove", handleMouseMove);
                                    document.removeEventListener("mouseup", handleMouseUp);
                                }
                                document.addEventListener("mousemove", handleMouseMove);
                                document.addEventListener("mouseup", handleMouseUp);
                            };
                            dragBarContainer.addEventListener("mousedown", handleMouseDown);
                            const reset = function reset2() {
                                if (firstRef.current) {
                                    firstRef.current.style.flex = defaultFlexRef.current;
                                }
                                store(defaultFlexRef.current);
                                setHiddenElementWithCallback(null);
                            };
                            dragBarContainer.addEventListener("dblclick", reset);
                            return () => {
                                dragBarContainer.removeEventListener("mousedown", handleMouseDown);
                                dragBarContainer.removeEventListener("dblclick", reset);
                            };
                        };
                        t12 = [direction, setHiddenElementWithCallback, sizeThresholdFirst, sizeThresholdSecond, store];
                        $[22] = direction;
                        $[23] = setHiddenElementWithCallback;
                        $[24] = sizeThresholdFirst;
                        $[25] = sizeThresholdSecond;
                        $[26] = store;
                        $[27] = t11;
                        $[28] = t12;
                    } else {
                        t11 = $[27];
                        t12 = $[28];
                    }
                    React.useEffect(t11, t12);
                    let t13;
                    if ($[29] !== hiddenElement) {
                        t13 = {
                            dragBarRef,
                            hiddenElement,
                            firstRef,
                            setHiddenElement,
                            secondRef
                        };
                        $[29] = hiddenElement;
                        $[30] = t13;
                    } else {
                        t13 = $[30];
                    }
                    return t13;
                }
                const DEFAULT_FLEX = 1;
                const HIDE_FIRST = "hide-first";
                const HIDE_SECOND = "hide-second";
                const ToolbarButton = React.forwardRef((t0, ref) => {
                    const $ = reactCompilerRuntime.c(19);
                    let label;
                    let onClick;
                    let props;
                    if ($[0] !== t0) {
                        ({
                            label,
                            onClick,
                            ...props
                        } = t0);
                        $[0] = t0;
                        $[1] = label;
                        $[2] = onClick;
                        $[3] = props;
                    } else {
                        label = $[1];
                        onClick = $[2];
                        props = $[3];
                    }
                    const [error, setError] = React.useState(null);
                    let t1;
                    if ($[4] !== onClick) {
                        t1 = event => {
                            try {
                                if (onClick) {
                                    onClick(event);
                                }
                                setError(null);
                            } catch (t22) {
                                const err = t22;
                                setError(err instanceof Error ? err : new Error(`Toolbar button click failed: ${err}`));
                            }
                        };
                        $[4] = onClick;
                        $[5] = t1;
                    } else {
                        t1 = $[5];
                    }
                    const handleClick = t1;
                    const t2 = error && "error";
                    let t3;
                    if ($[6] !== props.className || $[7] !== t2) {
                        t3 = clsx.clsx("graphiql-toolbar-button", t2, props.className);
                        $[6] = props.className;
                        $[7] = t2;
                        $[8] = t3;
                    } else {
                        t3 = $[8];
                    }
                    const t4 = error ? error.message : label;
                    const t5 = error ? "true" : props["aria-invalid"];
                    let t6;
                    if ($[9] !== handleClick || $[10] !== props || $[11] !== ref || $[12] !== t3 || $[13] !== t4 || $[14] !== t5) {
                        t6 = /* @__PURE__ */ jsxRuntime.jsx(UnStyledButton, {
                            ...props,
                            ref,
                            type: "button",
                            className: t3,
                            onClick: handleClick,
                            "aria-label": t4,
                            "aria-invalid": t5
                        });
                        $[9] = handleClick;
                        $[10] = props;
                        $[11] = ref;
                        $[12] = t3;
                        $[13] = t4;
                        $[14] = t5;
                        $[15] = t6;
                    } else {
                        t6 = $[15];
                    }
                    let t7;
                    if ($[16] !== label || $[17] !== t6) {
                        t7 = /* @__PURE__ */ jsxRuntime.jsx(Tooltip, {
                            label,
                            children: t6
                        });
                        $[16] = label;
                        $[17] = t6;
                        $[18] = t7;
                    } else {
                        t7 = $[18];
                    }
                    return t7;
                });
                ToolbarButton.displayName = "ToolbarButton";

                function ExecuteButton() {
                    const $ = reactCompilerRuntime.c(19);
                    let t0;
                    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
                        t0 = {
                            nonNull: true,
                            caller: ExecuteButton
                        };
                        $[0] = t0;
                    } else {
                        t0 = $[0];
                    }
                    const {
                        queryEditor,
                        setOperationName
                    } = useEditorContext(t0);
                    let t1;
                    if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
                        t1 = {
                            nonNull: true,
                            caller: ExecuteButton
                        };
                        $[1] = t1;
                    } else {
                        t1 = $[1];
                    }
                    const {
                        isFetching,
                        isSubscribed,
                        operationName,
                        run,
                        stop
                    } = useExecutionContext(t1);
                    let t2;
                    if ($[2] !== (queryEditor == null ? void 0 : queryEditor.operations)) {
                        t2 = (queryEditor == null ? void 0 : queryEditor.operations) || [];
                        $[2] = queryEditor == null ? void 0 : queryEditor.operations;
                        $[3] = t2;
                    } else {
                        t2 = $[3];
                    }
                    const operations = t2;
                    const hasOptions = operations.length > 1 && typeof operationName !== "string";
                    const isRunning = isFetching || isSubscribed;
                    const label = `${isRunning ? "Stop" : "Execute"} query (Ctrl-Enter)`;
                    let t3;
                    if ($[4] !== isRunning) {
                        t3 = isRunning ? /* @__PURE__ */ jsxRuntime.jsx(StopIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(PlayIcon, {});
                        $[4] = isRunning;
                        $[5] = t3;
                    } else {
                        t3 = $[5];
                    }
                    let t4;
                    if ($[6] !== label || $[7] !== t3) {
                        t4 = {
                            type: "button",
                            className: "graphiql-execute-button",
                            children: t3,
                            "aria-label": label
                        };
                        $[6] = label;
                        $[7] = t3;
                        $[8] = t4;
                    } else {
                        t4 = $[8];
                    }
                    const buttonProps = t4;
                    let t5;
                    if ($[9] !== buttonProps || $[10] !== hasOptions || $[11] !== isRunning || $[12] !== label || $[13] !== operations || $[14] !== queryEditor || $[15] !== run || $[16] !== setOperationName || $[17] !== stop) {
                        t5 = hasOptions && !isRunning ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, {
                            children: [ /* @__PURE__ */ jsxRuntime.jsx(Tooltip, {
                                label,
                                children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu.Button, {
                                    ...buttonProps
                                })
                            }), /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu.Content, {
                                children: operations.map((operation, i) => {
                                    const opName = operation.name ? operation.name.value : `<Unnamed ${operation.operation}>`;
                                    return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu.Item, {
                                        onSelect: () => {
                                            var _a;
                                            const selectedOperationName = (_a = operation.name) == null ? void 0 : _a.value;
                                            if (queryEditor && selectedOperationName && selectedOperationName !== queryEditor.operationName) {
                                                setOperationName(selectedOperationName);
                                            }
                                            run();
                                        },
                                        children: opName
                                    }, `${opName}-${i}`);
                                })
                            })]
                        }) : /* @__PURE__ */ jsxRuntime.jsx(Tooltip, {
                            label,
                            children: /* @__PURE__ */ jsxRuntime.jsx("button", {
                                ...buttonProps,
                                onClick: () => {
                                    if (isRunning) {
                                        stop();
                                    } else {
                                        run();
                                    }
                                }
                            })
                        });
                        $[9] = buttonProps;
                        $[10] = hasOptions;
                        $[11] = isRunning;
                        $[12] = label;
                        $[13] = operations;
                        $[14] = queryEditor;
                        $[15] = run;
                        $[16] = setOperationName;
                        $[17] = stop;
                        $[18] = t5;
                    } else {
                        t5 = $[18];
                    }
                    return t5;
                }
                const ToolbarMenuRoot = t0 => {
                    const $ = reactCompilerRuntime.c(20);
                    let button;
                    let children;
                    let label;
                    let props;
                    if ($[0] !== t0) {
                        ({
                            button,
                            children,
                            label,
                            ...props
                        } = t0);
                        $[0] = t0;
                        $[1] = button;
                        $[2] = children;
                        $[3] = label;
                        $[4] = props;
                    } else {
                        button = $[1];
                        children = $[2];
                        label = $[3];
                        props = $[4];
                    }
                    let t1;
                    if ($[5] !== props.className) {
                        t1 = clsx.clsx("graphiql-un-styled graphiql-toolbar-menu", props.className);
                        $[5] = props.className;
                        $[6] = t1;
                    } else {
                        t1 = $[6];
                    }
                    let t2;
                    if ($[7] !== button || $[8] !== label || $[9] !== t1) {
                        t2 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu.Button, {
                            className: t1,
                            "aria-label": label,
                            children: button
                        });
                        $[7] = button;
                        $[8] = label;
                        $[9] = t1;
                        $[10] = t2;
                    } else {
                        t2 = $[10];
                    }
                    let t3;
                    if ($[11] !== label || $[12] !== t2) {
                        t3 = /* @__PURE__ */ jsxRuntime.jsx(Tooltip, {
                            label,
                            children: t2
                        });
                        $[11] = label;
                        $[12] = t2;
                        $[13] = t3;
                    } else {
                        t3 = $[13];
                    }
                    let t4;
                    if ($[14] !== children) {
                        t4 = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu.Content, {
                            children
                        });
                        $[14] = children;
                        $[15] = t4;
                    } else {
                        t4 = $[15];
                    }
                    let t5;
                    if ($[16] !== props || $[17] !== t3 || $[18] !== t4) {
                        t5 = /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, {
                            ...props,
                            children: [t3, t4]
                        });
                        $[16] = props;
                        $[17] = t3;
                        $[18] = t4;
                        $[19] = t5;
                    } else {
                        t5 = $[19];
                    }
                    return t5;
                };
                const ToolbarMenu = createComponentGroup(ToolbarMenuRoot, {
                    Item: DropdownMenu.Item
                });
                exports.Argument = Argument;
                exports.ArgumentIcon = ArgumentIcon;
                exports.Button = Button$1;
                exports.ButtonGroup = ButtonGroup;
                exports.ChevronDownIcon = ChevronDownIcon;
                exports.ChevronLeftIcon = ChevronLeftIcon;
                exports.ChevronUpIcon = ChevronUpIcon;
                exports.CloseIcon = CloseIcon;
                exports.CopyIcon = CopyIcon;
                exports.DOC_EXPLORER_PLUGIN = DOC_EXPLORER_PLUGIN;
                exports.DefaultValue = DefaultValue;
                exports.DeprecatedArgumentIcon = DeprecatedArgumentIcon;
                exports.DeprecatedEnumValueIcon = DeprecatedEnumValueIcon;
                exports.DeprecatedFieldIcon = DeprecatedFieldIcon;
                exports.DeprecationReason = DeprecationReason;
                exports.Dialog = Dialog;
                exports.DialogRoot = DialogRoot;
                exports.Directive = Directive;
                exports.DirectiveIcon = DirectiveIcon;
                exports.DocExplorer = DocExplorer;
                exports.DocsFilledIcon = DocsFilledIcon;
                exports.DocsIcon = DocsIcon;
                exports.DropdownMenu = DropdownMenu;
                exports.EditorContext = EditorContext;
                exports.EditorContextProvider = EditorContextProvider;
                exports.EnumValueIcon = EnumValueIcon;
                exports.ExecuteButton = ExecuteButton;
                exports.ExecutionContext = ExecutionContext;
                exports.ExecutionContextProvider = ExecutionContextProvider;
                exports.ExplorerContext = ExplorerContext;
                exports.ExplorerContextProvider = ExplorerContextProvider;
                exports.ExplorerSection = ExplorerSection;
                exports.FieldDocumentation = FieldDocumentation;
                exports.FieldIcon = FieldIcon;
                exports.FieldLink = FieldLink;
                exports.GraphiQLProvider = GraphiQLProvider;
                exports.HISTORY_PLUGIN = HISTORY_PLUGIN;
                exports.HeaderEditor = HeaderEditor;
                exports.History = History;
                exports.HistoryContext = HistoryContext;
                exports.HistoryContextProvider = HistoryContextProvider;
                exports.HistoryIcon = HistoryIcon;
                exports.ImagePreview = ImagePreview;
                exports.ImplementsIcon = ImplementsIcon;
                exports.KeyboardShortcutIcon = KeyboardShortcutIcon;
                exports.MagnifyingGlassIcon = MagnifyingGlassIcon;
                exports.MarkdownContent = MarkdownContent;
                exports.MergeIcon = MergeIcon;
                exports.PenIcon = PenIcon;
                exports.PlayIcon = PlayIcon;
                exports.PluginContext = PluginContext;
                exports.PluginContextProvider = PluginContextProvider;
                exports.PlusIcon = PlusIcon;
                exports.PrettifyIcon = PrettifyIcon;
                exports.QueryEditor = QueryEditor;
                exports.ReloadIcon = ReloadIcon;
                exports.ResponseEditor = ResponseEditor;
                exports.RootTypeIcon = RootTypeIcon;
                exports.SchemaContext = SchemaContext;
                exports.SchemaContextProvider = SchemaContextProvider;
                exports.SchemaDocumentation = SchemaDocumentation;
                exports.Search = Search;
                exports.SettingsIcon = SettingsIcon;
                exports.Spinner = Spinner;
                exports.StarFilledIcon = StarFilledIcon;
                exports.StarIcon = StarIcon;
                exports.StopIcon = StopIcon;
                exports.StorageContext = StorageContext;
                exports.StorageContextProvider = StorageContextProvider;
                exports.Tab = Tab;
                exports.Tabs = Tabs;
                exports.ToolbarButton = ToolbarButton;
                exports.ToolbarMenu = ToolbarMenu;
                exports.Tooltip = Tooltip;
                exports.TooltipRoot = TooltipRoot;
                exports.TrashIcon = TrashIcon;
                exports.TypeDocumentation = TypeDocumentation;
                exports.TypeIcon = TypeIcon;
                exports.TypeLink = TypeLink;
                exports.UnStyledButton = UnStyledButton;
                exports.VariableEditor = VariableEditor;
                exports.isMacOs = isMacOs;
                exports.useAutoCompleteLeafs = useAutoCompleteLeafs;
                exports.useCopyQuery = useCopyQuery;
                exports.useDragResize = useDragResize;
                exports.useEditorContext = useEditorContext;
                exports.useEditorState = useEditorState;
                exports.useExecutionContext = useExecutionContext;
                exports.useExplorerContext = useExplorerContext;
                exports.useHeaderEditor = useHeaderEditor;
                exports.useHeadersEditorState = useHeadersEditorState;
                exports.useHistoryContext = useHistoryContext;
                exports.useMergeQuery = useMergeQuery;
                exports.useOperationsEditorState = useOperationsEditorState;
                exports.useOptimisticState = useOptimisticState;
                exports.usePluginContext = usePluginContext;
                exports.usePrettifyEditors = usePrettifyEditors;
                exports.useQueryEditor = useQueryEditor;
                exports.useResponseEditor = useResponseEditor;
                exports.useSchemaContext = useSchemaContext;
                exports.useStorageContext = useStorageContext;
                exports.useTheme = useTheme;
                exports.useVariableEditor = useVariableEditor;
                exports.useVariablesEditorState = useVariablesEditorState;

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/async-helpers/index.js":
            /*!**************************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/async-helpers/index.js ***!
              \**************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.fetcherReturnToPromise = fetcherReturnToPromise;
                exports.isAsyncIterable = isAsyncIterable;
                exports.isObservable = isObservable;
                exports.isPromise = isPromise;
                __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");

                function isPromise(value) {
                    return typeof value == "object" && value !== null && typeof value.then == "function";
                }

                function observableToPromise(observable) {
                    return new Promise((resolve, reject) => {
                        const subscription = observable.subscribe({
                            next(v) {
                                resolve(v), subscription.unsubscribe();
                            },
                            error: reject,
                            complete() {
                                reject(new Error("no value resolved"));
                            }
                        });
                    });
                }

                function isObservable(value) {
                    return typeof value == "object" && value !== null && "subscribe" in value && typeof value.subscribe == "function";
                }

                function isAsyncIterable(input) {
                    return typeof input == "object" && input !== null && (
                        // Some browsers still don't have Symbol.asyncIterator implemented (iOS Safari)
                        // That means every custom AsyncIterable must be built using a AsyncGeneratorFunction (async function * () {})
                        input[Symbol.toStringTag] === "AsyncGenerator" || Symbol.asyncIterator in input);
                }
                async function asyncIterableToPromise(input) {
                    var _a;
                    const iteratorReturn = (_a = ("return" in input ? input : input[Symbol.asyncIterator]()).return) == null ? void 0 : _a.bind(input),
                        result = await ("next" in input ? input : input[Symbol.asyncIterator]()).next.bind(input)();
                    return iteratorReturn == null || iteratorReturn(), result.value;
                }
                async function fetcherReturnToPromise(fetcherResult) {
                    const result = await fetcherResult;
                    return isAsyncIterable(result) ? asyncIterableToPromise(result) : isObservable(result) ? observableToPromise(result) : result;
                }

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js":
            /*!*********************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.__spreadValues = exports.__spreadProps = exports.__forAwait = exports.__await = exports.__asyncGenerator = void 0;
                var __defProp = Object.defineProperty,
                    __defProps = Object.defineProperties;
                var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
                var __getOwnPropSymbols = Object.getOwnPropertySymbols;
                var __hasOwnProp = Object.prototype.hasOwnProperty,
                    __propIsEnum = Object.prototype.propertyIsEnumerable;
                var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
                var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
                        enumerable: !0,
                        configurable: !0,
                        writable: !0,
                        value
                    }) : obj[key] = value,
                    __spreadValues = (a, b) => {
                        for (var prop in b || (b = {})) __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
                        if (__getOwnPropSymbols)
                            for (var prop of __getOwnPropSymbols(b)) __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
                        return a;
                    },
                    __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
                exports.__spreadProps = __spreadProps;
                exports.__spreadValues = __spreadValues;
                var __await = function(promise, isYieldStar) {
                        this[0] = promise, this[1] = isYieldStar;
                    },
                    __asyncGenerator = (__this, __arguments, generator) => {
                        var resume = (k, v, yes, no) => {
                                try {
                                    var x = generator[k](v),
                                        isAwait = (v = x.value) instanceof __await,
                                        done = x.done;
                                    Promise.resolve(isAwait ? v[0] : v).then(y => isAwait ? resume(k === "return" ? k : "next", v[1] ? {
                                        done: y.done,
                                        value: y.value
                                    } : y, yes, no) : yes({
                                        value: y,
                                        done
                                    })).catch(e => resume("throw", e, yes, no));
                                } catch (e) {
                                    no(e);
                                }
                            },
                            method = k => it[k] = x => new Promise((yes, no) => resume(k, x, yes, no)),
                            it = {};
                        return generator = generator.apply(__this, __arguments), it[__knownSymbol("asyncIterator")] = () => it, method("next"), method("throw"), method("return"), it;
                    };
                exports.__asyncGenerator = __asyncGenerator;
                exports.__await = __await;
                var __forAwait = (obj, it, method) => (it = obj[__knownSymbol("asyncIterator")]) ? it.call(obj) : (obj = obj[__knownSymbol("iterator")](), it = {}, method = (key, fn) => (fn = obj[key]) && (it[key] = arg => new Promise((yes, no, done) => (arg = fn.call(obj, arg), done = arg.done, Promise.resolve(arg.value).then(value => yes({
                    value,
                    done
                }), no)))), method("next"), method("return"), it);
                exports.__forAwait = __forAwait;

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/create-fetcher/createFetcher.js":
            /*!***********************************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/create-fetcher/createFetcher.js ***!
              \***********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createGraphiQLFetcher = createGraphiQLFetcher;
                __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");
                var _lib = __webpack_require__( /*! ./lib */ "../../graphiql-toolkit/dist/esm/create-fetcher/lib.js");

                function createGraphiQLFetcher(options) {
                    const httpFetch = options.fetch || typeof window != "undefined" && window.fetch;
                    if (!httpFetch) throw new Error("No valid fetcher implementation available");
                    options.enableIncrementalDelivery = options.enableIncrementalDelivery !== !1;
                    const simpleFetcher = (0, _lib.createSimpleFetcher)(options, httpFetch),
                        httpFetcher = options.enableIncrementalDelivery ? (0, _lib.createMultipartFetcher)(options, httpFetch) : simpleFetcher;
                    return async (graphQLParams, fetcherOpts) => {
                        if (graphQLParams.operationName === "IntrospectionQuery") return (options.schemaFetcher || simpleFetcher)(graphQLParams, fetcherOpts);
                        if (fetcherOpts != null && fetcherOpts.documentAST ? (0, _lib.isSubscriptionWithName)(fetcherOpts.documentAST, graphQLParams.operationName || void 0) : !1) {
                            const wsFetcher = await (0, _lib.getWsFetcher)(options, fetcherOpts);
                            if (!wsFetcher) throw new Error(`Your GraphiQL createFetcher is not properly configured for websocket subscriptions yet. ${options.subscriptionUrl ? `Provided URL ${options.subscriptionUrl} failed` : "Please provide subscriptionUrl, wsClient or legacyClient option first."}`);
                            return wsFetcher(graphQLParams);
                        }
                        return httpFetcher(graphQLParams, fetcherOpts);
                    };
                }

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/create-fetcher/index.js":
            /*!***************************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/create-fetcher/index.js ***!
              \***************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                var _exportNames = {
                    createGraphiQLFetcher: true
                };
                Object.defineProperty(exports, "createGraphiQLFetcher", ({
                    enumerable: true,
                    get: function() {
                        return _createFetcher.createGraphiQLFetcher;
                    }
                }));
                __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");
                var _types = __webpack_require__( /*! ./types */ "../../graphiql-toolkit/dist/esm/create-fetcher/types.js");
                Object.keys(_types).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
                    if (key in exports && exports[key] === _types[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _types[key];
                        }
                    });
                });
                var _createFetcher = __webpack_require__( /*! ./createFetcher */ "../../graphiql-toolkit/dist/esm/create-fetcher/createFetcher.js");

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/create-fetcher/lib.js":
            /*!*************************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/create-fetcher/lib.js ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createWebsocketsFetcherFromClient = exports.createSimpleFetcher = exports.createMultipartFetcher = exports.createLegacyWebsocketsFetcher = void 0;
                exports.createWebsocketsFetcherFromUrl = createWebsocketsFetcherFromUrl;
                exports.getWsFetcher = getWsFetcher;
                exports.isSubscriptionWithName = void 0;
                var _chunkLMOQIXV = __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _meros = __webpack_require__( /*! meros */ "../../../node_modules/meros/browser/index.js");
                var _pushPullAsyncIterableIterator = __webpack_require__( /*! @n1ru4l/push-pull-async-iterable-iterator */ "../../../node_modules/@n1ru4l/push-pull-async-iterable-iterator/index.js");

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }
                const errorHasCode = err => typeof err == "object" && err !== null && "code" in err,
                    isSubscriptionWithName = (document, name) => {
                        let isSubscription = !1;
                        return (0, _graphql.visit)(document, {
                            OperationDefinition(node) {
                                var _a;
                                name === ((_a = node.name) == null ? void 0 : _a.value) && node.operation === "subscription" && (isSubscription = !0);
                            }
                        }), isSubscription;
                    },
                    createSimpleFetcher = (options, httpFetch) => async (graphQLParams, fetcherOpts) => (await httpFetch(options.url, {
                        method: "POST",
                        body: JSON.stringify(graphQLParams),
                        headers: (0, _chunkLMOQIXV.__spreadValues)((0, _chunkLMOQIXV.__spreadValues)({
                            "content-type": "application/json"
                        }, options.headers), fetcherOpts == null ? void 0 : fetcherOpts.headers)
                    })).json();
                exports.createSimpleFetcher = createSimpleFetcher;
                exports.isSubscriptionWithName = isSubscriptionWithName;
                async function createWebsocketsFetcherFromUrl(url, connectionParams) {
                    let wsClient;
                    try {
                        const {
                            createClient
                        } = await Promise.resolve().then(() => _interopRequireWildcard(__webpack_require__( /*! graphql-ws */ "../../../node_modules/graphql-ws/lib/index.js")));
                        return wsClient = createClient({
                            url,
                            connectionParams
                        }), createWebsocketsFetcherFromClient(wsClient);
                    } catch (err) {
                        if (errorHasCode(err) && err.code === "MODULE_NOT_FOUND") throw new Error("You need to install the 'graphql-ws' package to use websockets when passing a 'subscriptionUrl'");
                        console.error(`Error creating websocket client for ${url}`, err);
                    }
                }
                const createWebsocketsFetcherFromClient = wsClient => graphQLParams => (0, _pushPullAsyncIterableIterator.makeAsyncIterableIteratorFromSink)(sink => wsClient.subscribe(graphQLParams, (0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, sink), {
                        error(err) {
                            err instanceof CloseEvent ? sink.error(new Error(`Socket closed with event ${err.code} ${err.reason || ""}`.trim())) : sink.error(err);
                        }
                    }))),
                    createLegacyWebsocketsFetcher = legacyWsClient => graphQLParams => {
                        const observable = legacyWsClient.request(graphQLParams);
                        return (0, _pushPullAsyncIterableIterator.makeAsyncIterableIteratorFromSink)(
                            // @ts-ignore
                            sink => observable.subscribe(sink).unsubscribe);
                    },
                    createMultipartFetcher = (options, httpFetch) => function(graphQLParams, fetcherOpts) {
                        return (0, _chunkLMOQIXV.__asyncGenerator)(this, null, function*() {
                            const response = yield new _chunkLMOQIXV.__await(httpFetch(options.url, {
                                method: "POST",
                                body: JSON.stringify(graphQLParams),
                                headers: (0, _chunkLMOQIXV.__spreadValues)((0, _chunkLMOQIXV.__spreadValues)({
                                    "content-type": "application/json",
                                    accept: "application/json, multipart/mixed"
                                }, options.headers), fetcherOpts == null ? void 0 : fetcherOpts.headers)
                            }).then(r => (0, _meros.meros)(r, {
                                multiple: !0
                            })));
                            if (!(0, _pushPullAsyncIterableIterator.isAsyncIterable)(response)) return yield response.json();
                            try {
                                for (var iter = (0, _chunkLMOQIXV.__forAwait)(response), more, temp, error; more = !(temp = yield new _chunkLMOQIXV.__await(iter.next())).done; more = !1) {
                                    const chunk = temp.value;
                                    if (chunk.some(part => !part.json)) {
                                        const message = chunk.map(part => `Headers::
${part.headers}

Body::
${part.body}`);
                                        throw new Error(`Expected multipart chunks to be of json type. got:
${message}`);
                                    }
                                    yield chunk.map(part => part.body);
                                }
                            } catch (temp) {
                                error = [temp];
                            } finally {
                                try {
                                    more && (temp = iter.return) && (yield new _chunkLMOQIXV.__await(temp.call(iter)));
                                } finally {
                                    if (error) throw error[0];
                                }
                            }
                        });
                    };
                exports.createMultipartFetcher = createMultipartFetcher;
                exports.createLegacyWebsocketsFetcher = createLegacyWebsocketsFetcher;
                exports.createWebsocketsFetcherFromClient = createWebsocketsFetcherFromClient;
                async function getWsFetcher(options, fetcherOpts) {
                    if (options.wsClient) return createWebsocketsFetcherFromClient(options.wsClient);
                    if (options.subscriptionUrl) return createWebsocketsFetcherFromUrl(options.subscriptionUrl, (0, _chunkLMOQIXV.__spreadValues)((0, _chunkLMOQIXV.__spreadValues)({}, options.wsConnectionParams), fetcherOpts == null ? void 0 : fetcherOpts.headers));
                    const legacyWebsocketsClient = options.legacyClient || options.legacyWsClient;
                    if (legacyWebsocketsClient) return createLegacyWebsocketsFetcher(legacyWebsocketsClient);
                }

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/create-fetcher/types.js":
            /*!***************************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/create-fetcher/types.js ***!
              \***************************************************************/
            /***/
            (function() {

                "use strict";


                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/format/index.js":
            /*!*******************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/format/index.js ***!
              \*******************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.formatError = formatError;
                exports.formatResult = formatResult;
                var _chunkLMOQIXV = __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");

                function stringify(obj) {
                    return JSON.stringify(obj, null, 2);
                }

                function formatSingleError(error) {
                    return (0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, error), {
                        // Raise these details even if they're non-enumerable
                        message: error.message,
                        stack: error.stack
                    });
                }

                function handleSingleError(error) {
                    return error instanceof Error ? formatSingleError(error) : error;
                }

                function formatError(error) {
                    return Array.isArray(error) ? stringify({
                        errors: error.map(e => handleSingleError(e))
                    }) : stringify({
                        errors: [handleSingleError(error)]
                    });
                }

                function formatResult(result) {
                    return stringify(result);
                }

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/graphql-helpers/auto-complete.js":
            /*!************************************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/graphql-helpers/auto-complete.js ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.fillLeafs = fillLeafs;
                __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");

                function fillLeafs(schema, docString, getDefaultFieldNames) {
                    const insertions = [];
                    if (!schema || !docString) return {
                        insertions,
                        result: docString
                    };
                    let ast;
                    try {
                        ast = (0, _graphql.parse)(docString);
                    } catch (e) {
                        return {
                            insertions,
                            result: docString
                        };
                    }
                    const fieldNameFn = getDefaultFieldNames || defaultGetDefaultFieldNames,
                        typeInfo = new _graphql.TypeInfo(schema);
                    return (0, _graphql.visit)(ast, {
                        leave(node) {
                            typeInfo.leave(node);
                        },
                        enter(node) {
                            if (typeInfo.enter(node), node.kind === "Field" && !node.selectionSet) {
                                const fieldType = typeInfo.getType(),
                                    selectionSet = buildSelectionSet(isFieldType(fieldType), fieldNameFn);
                                if (selectionSet && node.loc) {
                                    const indent = getIndentation(docString, node.loc.start);
                                    insertions.push({
                                        index: node.loc.end,
                                        string: " " + (0, _graphql.print)(selectionSet).replaceAll(`
`, `
` + indent)
                                    });
                                }
                            }
                        }
                    }), {
                        insertions,
                        result: withInsertions(docString, insertions)
                    };
                }

                function defaultGetDefaultFieldNames(type) {
                    if (!("getFields" in type)) return [];
                    const fields = type.getFields();
                    if (fields.id) return ["id"];
                    if (fields.edges) return ["edges"];
                    if (fields.node) return ["node"];
                    const leafFieldNames = [];
                    for (const fieldName of Object.keys(fields))(0, _graphql.isLeafType)(fields[fieldName].type) && leafFieldNames.push(fieldName);
                    return leafFieldNames;
                }

                function buildSelectionSet(type, getDefaultFieldNames) {
                    const namedType = (0, _graphql.getNamedType)(type);
                    if (!type || (0, _graphql.isLeafType)(type)) return;
                    const fieldNames = getDefaultFieldNames(namedType);
                    if (!(!Array.isArray(fieldNames) || fieldNames.length === 0 || !("getFields" in namedType))) return {
                        kind: _graphql.Kind.SELECTION_SET,
                        selections: fieldNames.map(fieldName => {
                            const fieldDef = namedType.getFields()[fieldName],
                                fieldType = fieldDef ? fieldDef.type : null;
                            return {
                                kind: _graphql.Kind.FIELD,
                                name: {
                                    kind: _graphql.Kind.NAME,
                                    value: fieldName
                                },
                                // we can use as here, because we already know that fieldType
                                // comes from an origin parameter
                                selectionSet: buildSelectionSet(fieldType, getDefaultFieldNames)
                            };
                        })
                    };
                }

                function withInsertions(initial, insertions) {
                    if (insertions.length === 0) return initial;
                    let edited = "",
                        prevIndex = 0;
                    for (const {
                            index,
                            string
                        }
                        of insertions) edited += initial.slice(prevIndex, index) + string, prevIndex = index;
                    return edited += initial.slice(prevIndex), edited;
                }

                function getIndentation(str, index) {
                    let indentStart = index,
                        indentEnd = index;
                    for (; indentStart;) {
                        const c = str.charCodeAt(indentStart - 1);
                        if (c === 10 || c === 13 || c === 8232 || c === 8233) break;
                        indentStart--, c !== 9 && c !== 11 && c !== 12 && c !== 32 && c !== 160 && (indentEnd = indentStart);
                    }
                    return str.slice(indentStart, indentEnd);
                }

                function isFieldType(fieldType) {
                    if (fieldType) return fieldType;
                }

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/graphql-helpers/index.js":
            /*!****************************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/graphql-helpers/index.js ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                var _autoComplete = __webpack_require__( /*! ./auto-complete */ "../../graphiql-toolkit/dist/esm/graphql-helpers/auto-complete.js");
                Object.keys(_autoComplete).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _autoComplete[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _autoComplete[key];
                        }
                    });
                });
                var _mergeAst = __webpack_require__( /*! ./merge-ast */ "../../graphiql-toolkit/dist/esm/graphql-helpers/merge-ast.js");
                Object.keys(_mergeAst).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _mergeAst[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _mergeAst[key];
                        }
                    });
                });
                var _operationName = __webpack_require__( /*! ./operation-name */ "../../graphiql-toolkit/dist/esm/graphql-helpers/operation-name.js");
                Object.keys(_operationName).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _operationName[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _operationName[key];
                        }
                    });
                });

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/graphql-helpers/merge-ast.js":
            /*!********************************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/graphql-helpers/merge-ast.js ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.mergeAst = mergeAst;
                var _chunkLMOQIXV = __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");

                function uniqueBy(array, iteratee) {
                    var _a;
                    const FilteredMap = /* @__PURE__ */ new Map(),
                        result = [];
                    for (const item of array)
                        if (item.kind === "Field") {
                            const uniqueValue = iteratee(item),
                                existing = FilteredMap.get(uniqueValue);
                            if ((_a = item.directives) != null && _a.length) {
                                const itemClone = (0, _chunkLMOQIXV.__spreadValues)({}, item);
                                result.push(itemClone);
                            } else if (existing != null && existing.selectionSet && item.selectionSet) existing.selectionSet.selections = [...existing.selectionSet.selections, ...item.selectionSet.selections];
                            else if (!existing) {
                                const itemClone = (0, _chunkLMOQIXV.__spreadValues)({}, item);
                                FilteredMap.set(uniqueValue, itemClone), result.push(itemClone);
                            }
                        } else result.push(item);
                    return result;
                }

                function inlineRelevantFragmentSpreads(fragmentDefinitions, selections, selectionSetType) {
                    var _a;
                    const selectionSetTypeName = selectionSetType ? (0, _graphql.getNamedType)(selectionSetType).name : null,
                        outputSelections = [],
                        seenSpreads = [];
                    for (let selection of selections) {
                        if (selection.kind === "FragmentSpread") {
                            const fragmentName = selection.name.value;
                            if (!selection.directives || selection.directives.length === 0) {
                                if (seenSpreads.includes(fragmentName)) continue;
                                seenSpreads.push(fragmentName);
                            }
                            const fragmentDefinition = fragmentDefinitions[selection.name.value];
                            if (fragmentDefinition) {
                                const {
                                    typeCondition,
                                    directives,
                                    selectionSet
                                } = fragmentDefinition;
                                selection = {
                                    kind: _graphql.Kind.INLINE_FRAGMENT,
                                    typeCondition,
                                    directives,
                                    selectionSet
                                };
                            }
                        }
                        if (selection.kind === _graphql.Kind.INLINE_FRAGMENT && (
                                // Cannot inline if there are directives
                                !selection.directives || ((_a = selection.directives) == null ? void 0 : _a.length) === 0)) {
                            const fragmentTypeName = selection.typeCondition ? selection.typeCondition.name.value : null;
                            if (!fragmentTypeName || fragmentTypeName === selectionSetTypeName) {
                                outputSelections.push(...inlineRelevantFragmentSpreads(fragmentDefinitions, selection.selectionSet.selections, selectionSetType));
                                continue;
                            }
                        }
                        outputSelections.push(selection);
                    }
                    return outputSelections;
                }

                function mergeAst(documentAST, schema) {
                    const typeInfo = schema ? new _graphql.TypeInfo(schema) : null,
                        fragmentDefinitions = /* @__PURE__ */ Object.create(null);
                    for (const definition of documentAST.definitions) definition.kind === _graphql.Kind.FRAGMENT_DEFINITION && (fragmentDefinitions[definition.name.value] = definition);
                    const flattenVisitors = {
                            SelectionSet(node) {
                                const selectionSetType = typeInfo ? typeInfo.getParentType() : null;
                                let {
                                    selections
                                } = node;
                                return selections = inlineRelevantFragmentSpreads(fragmentDefinitions, selections, selectionSetType), (0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, node), {
                                    selections
                                });
                            },
                            FragmentDefinition() {
                                return null;
                            }
                        },
                        flattenedAST = (0, _graphql.visit)(documentAST, typeInfo ? (0, _graphql.visitWithTypeInfo)(typeInfo, flattenVisitors) : flattenVisitors);
                    return (0, _graphql.visit)(flattenedAST, {
                        SelectionSet(node) {
                            let {
                                selections
                            } = node;
                            return selections = uniqueBy(selections, selection => selection.alias ? selection.alias.value : selection.name.value), (0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, node), {
                                selections
                            });
                        },
                        FragmentDefinition() {
                            return null;
                        }
                    });
                }

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/graphql-helpers/operation-name.js":
            /*!*************************************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/graphql-helpers/operation-name.js ***!
              \*************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getSelectedOperationName = getSelectedOperationName;
                __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");

                function getSelectedOperationName(prevOperations, prevSelectedOperationName, operations) {
                    if (!operations || operations.length < 1) return;
                    const names = operations.map(op => {
                        var _a;
                        return (_a = op.name) == null ? void 0 : _a.value;
                    });
                    if (prevSelectedOperationName && names.includes(prevSelectedOperationName)) return prevSelectedOperationName;
                    if (prevSelectedOperationName && prevOperations) {
                        const prevIndex = prevOperations.map(op => {
                            var _a;
                            return (_a = op.name) == null ? void 0 : _a.value;
                        }).indexOf(prevSelectedOperationName);
                        if (prevIndex !== -1 && prevIndex < names.length) return names[prevIndex];
                    }
                    return names[0];
                }

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/index.js":
            /*!************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/index.js ***!
              \************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                var _asyncHelpers = __webpack_require__( /*! ./async-helpers */ "../../graphiql-toolkit/dist/esm/async-helpers/index.js");
                Object.keys(_asyncHelpers).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _asyncHelpers[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _asyncHelpers[key];
                        }
                    });
                });
                var _createFetcher = __webpack_require__( /*! ./create-fetcher */ "../../graphiql-toolkit/dist/esm/create-fetcher/index.js");
                Object.keys(_createFetcher).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _createFetcher[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _createFetcher[key];
                        }
                    });
                });
                var _format = __webpack_require__( /*! ./format */ "../../graphiql-toolkit/dist/esm/format/index.js");
                Object.keys(_format).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _format[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _format[key];
                        }
                    });
                });
                var _graphqlHelpers = __webpack_require__( /*! ./graphql-helpers */ "../../graphiql-toolkit/dist/esm/graphql-helpers/index.js");
                Object.keys(_graphqlHelpers).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _graphqlHelpers[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _graphqlHelpers[key];
                        }
                    });
                });
                var _storage = __webpack_require__( /*! ./storage */ "../../graphiql-toolkit/dist/esm/storage/index.js");
                Object.keys(_storage).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _storage[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _storage[key];
                        }
                    });
                });

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/storage/base.js":
            /*!*******************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/storage/base.js ***!
              \*******************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.StorageAPI = void 0;
                __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");

                function isQuotaError(storage, e) {
                    return e instanceof DOMException && (
                            // everything except Firefox
                            e.code === 22 ||
                            // Firefox
                            e.code === 1014 ||
                            // test name field too, because code might not be present
                            // everything except Firefox
                            e.name === "QuotaExceededError" ||
                            // Firefox
                            e.name === "NS_ERROR_DOM_QUOTA_REACHED") &&
                        // acknowledge QuotaExceededError only if there's something already stored
                        storage.length !== 0;
                }
                class StorageAPI {
                    constructor(storage) {
                        storage ? this.storage = storage : storage === null ? this.storage = null : typeof window == "undefined" ? this.storage = null : this.storage = {
                            getItem: localStorage.getItem.bind(localStorage),
                            setItem: localStorage.setItem.bind(localStorage),
                            removeItem: localStorage.removeItem.bind(localStorage),
                            get length() {
                                let keys = 0;
                                for (const key in localStorage) key.indexOf(`${STORAGE_NAMESPACE}:`) === 0 && (keys += 1);
                                return keys;
                            },
                            clear() {
                                for (const key in localStorage) key.indexOf(`${STORAGE_NAMESPACE}:`) === 0 && localStorage.removeItem(key);
                            }
                        };
                    }
                    get(name) {
                        if (!this.storage) return null;
                        const key = `${STORAGE_NAMESPACE}:${name}`,
                            value = this.storage.getItem(key);
                        return value === "null" || value === "undefined" ? (this.storage.removeItem(key), null) : value || null;
                    }
                    set(name, value) {
                        let quotaError = !1,
                            error = null;
                        if (this.storage) {
                            const key = `${STORAGE_NAMESPACE}:${name}`;
                            if (value) try {
                                this.storage.setItem(key, value);
                            } catch (e) {
                                error = e instanceof Error ? e : new Error(`${e}`), quotaError = isQuotaError(this.storage, e);
                            } else this.storage.removeItem(key);
                        }
                        return {
                            isQuotaError: quotaError,
                            error
                        };
                    }
                    clear() {
                        this.storage && this.storage.clear();
                    }
                }
                exports.StorageAPI = StorageAPI;
                const STORAGE_NAMESPACE = "graphiql";

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/storage/custom.js":
            /*!*********************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/storage/custom.js ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.createLocalStorage = createLocalStorage;
                __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");

                function createLocalStorage({
                    namespace
                }) {
                    const storageKeyPrefix = `${namespace}:`,
                        getStorageKey = key => `${storageKeyPrefix}${key}`;
                    return {
                        setItem: (key, value) => localStorage.setItem(getStorageKey(key), value),
                        getItem: key => localStorage.getItem(getStorageKey(key)),
                        removeItem: key => localStorage.removeItem(getStorageKey(key)),
                        get length() {
                            let keys = 0;
                            for (const key in localStorage) key.indexOf(storageKeyPrefix) === 0 && (keys += 1);
                            return keys;
                        },
                        clear() {
                            for (const key in localStorage) key.indexOf(storageKeyPrefix) === 0 && localStorage.removeItem(key);
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/storage/history.js":
            /*!**********************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/storage/history.js ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.HistoryStore = void 0;
                var _chunkLMOQIXV = __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _query = __webpack_require__( /*! ./query */ "../../graphiql-toolkit/dist/esm/storage/query.js");
                const MAX_QUERY_SIZE = 1e5;
                class HistoryStore {
                    constructor(storage, maxHistoryLength) {
                        this.storage = storage;
                        this.maxHistoryLength = maxHistoryLength;
                        this.updateHistory = ({
                            query,
                            variables,
                            headers,
                            operationName
                        }) => {
                            if (!this.shouldSaveQuery(query, variables, headers, this.history.fetchRecent())) return;
                            this.history.push({
                                query,
                                variables,
                                headers,
                                operationName
                            });
                            const historyQueries = this.history.items,
                                favoriteQueries = this.favorite.items;
                            this.queries = historyQueries.concat(favoriteQueries);
                        };
                        this.deleteHistory = ({
                            query,
                            variables,
                            headers,
                            operationName,
                            favorite
                        }, clearFavorites = !1) => {
                            function deleteFromStore(store) {
                                const found = store.items.find(x => x.query === query && x.variables === variables && x.headers === headers && x.operationName === operationName);
                                found && store.delete(found);
                            }
                            (favorite || clearFavorites) && deleteFromStore(this.favorite), (!favorite || clearFavorites) && deleteFromStore(this.history), this.queries = [...this.history.items, ...this.favorite.items];
                        };
                        this.history = new _query.QueryStore("queries", this.storage, this.maxHistoryLength), this.favorite = new _query.QueryStore("favorites", this.storage, null), this.queries = [...this.history.fetchAll(), ...this.favorite.fetchAll()];
                    }
                    shouldSaveQuery(query, variables, headers, lastQuerySaved) {
                        if (!query) return !1;
                        try {
                            (0, _graphql.parse)(query);
                        } catch (e) {
                            return !1;
                        }
                        return query.length > MAX_QUERY_SIZE ? !1 : lastQuerySaved ? !(JSON.stringify(query) === JSON.stringify(lastQuerySaved.query) && (JSON.stringify(variables) === JSON.stringify(lastQuerySaved.variables) && (JSON.stringify(headers) === JSON.stringify(lastQuerySaved.headers) || headers && !lastQuerySaved.headers) || variables && !lastQuerySaved.variables)) : !0;
                    }
                    toggleFavorite({
                        query,
                        variables,
                        headers,
                        operationName,
                        label,
                        favorite
                    }) {
                        const item = {
                            query,
                            variables,
                            headers,
                            operationName,
                            label
                        };
                        favorite ? (item.favorite = !1, this.favorite.delete(item), this.history.push(item)) : (item.favorite = !0, this.favorite.push(item), this.history.delete(item)), this.queries = [...this.history.items, ...this.favorite.items];
                    }
                    editLabel({
                        query,
                        variables,
                        headers,
                        operationName,
                        label,
                        favorite
                    }, index) {
                        const item = {
                            query,
                            variables,
                            headers,
                            operationName,
                            label
                        };
                        favorite ? this.favorite.edit((0, _chunkLMOQIXV.__spreadProps)((0, _chunkLMOQIXV.__spreadValues)({}, item), {
                            favorite
                        }), index) : this.history.edit(item, index), this.queries = [...this.history.items, ...this.favorite.items];
                    }
                }
                exports.HistoryStore = HistoryStore;

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/storage/index.js":
            /*!********************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/storage/index.js ***!
              \********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                var _base = __webpack_require__( /*! ./base */ "../../graphiql-toolkit/dist/esm/storage/base.js");
                Object.keys(_base).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _base[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _base[key];
                        }
                    });
                });
                var _history = __webpack_require__( /*! ./history */ "../../graphiql-toolkit/dist/esm/storage/history.js");
                Object.keys(_history).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _history[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _history[key];
                        }
                    });
                });
                var _query = __webpack_require__( /*! ./query */ "../../graphiql-toolkit/dist/esm/storage/query.js");
                Object.keys(_query).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _query[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _query[key];
                        }
                    });
                });
                var _custom = __webpack_require__( /*! ./custom */ "../../graphiql-toolkit/dist/esm/storage/custom.js");
                Object.keys(_custom).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (key in exports && exports[key] === _custom[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _custom[key];
                        }
                    });
                });

                /***/
            }),

        /***/
        "../../graphiql-toolkit/dist/esm/storage/query.js":
            /*!********************************************************!*\
              !*** ../../graphiql-toolkit/dist/esm/storage/query.js ***!
              \********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.QueryStore = void 0;
                __webpack_require__( /*! ../chunk-LMOQIXV4.js */ "../../graphiql-toolkit/dist/esm/chunk-LMOQIXV4.js");
                class QueryStore {
                    constructor(key, storage, maxSize = null) {
                        this.key = key;
                        this.storage = storage;
                        this.maxSize = maxSize;
                        this.items = this.fetchAll();
                    }
                    get length() {
                        return this.items.length;
                    }
                    contains(item) {
                        return this.items.some(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName);
                    }
                    edit(item, index) {
                        if (typeof index == "number" && this.items[index]) {
                            const found = this.items[index];
                            if (found.query === item.query && found.variables === item.variables && found.headers === item.headers && found.operationName === item.operationName) {
                                this.items.splice(index, 1, item), this.save();
                                return;
                            }
                        }
                        const itemIndex = this.items.findIndex(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName);
                        itemIndex !== -1 && (this.items.splice(itemIndex, 1, item), this.save());
                    }
                    delete(item) {
                        const itemIndex = this.items.findIndex(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName);
                        itemIndex !== -1 && (this.items.splice(itemIndex, 1), this.save());
                    }
                    fetchRecent() {
                        return this.items.at(-1);
                    }
                    fetchAll() {
                        const raw = this.storage.get(this.key);
                        return raw ? JSON.parse(raw)[this.key] : [];
                    }
                    push(item) {
                        const items = [...this.items, item];
                        this.maxSize && items.length > this.maxSize && items.shift();
                        for (let attempts = 0; attempts < 5; attempts++) {
                            const response = this.storage.set(this.key, JSON.stringify({
                                [this.key]: items
                            }));
                            if (!(response != null && response.error)) this.items = items;
                            else if (response.isQuotaError && this.maxSize) items.shift();
                            else return;
                        }
                    }
                    save() {
                        this.storage.set(this.key, JSON.stringify({
                            [this.key]: this.items
                        }));
                    }
                }
                exports.QueryStore = QueryStore;

                /***/
            }),

        /***/
        "./GraphiQL.tsx":
            /*!**********************!*\
              !*** ./GraphiQL.tsx ***!
              \**********************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.GraphiQL = GraphiQL;
                exports.GraphiQLInterface = GraphiQLInterface;
                var _react = _interopRequireWildcard(__webpack_require__( /*! react */ "react"));
                var _react2 = __webpack_require__( /*! @graphiql/react */ "../../graphiql-react/dist/index.js");

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }

                function _extends() {
                    _extends = Object.assign ? Object.assign.bind() : function(target) {
                        for (var i = 1; i < arguments.length; i++) {
                            var source = arguments[i];
                            for (var key in source) {
                                if (Object.prototype.hasOwnProperty.call(source, key)) {
                                    target[key] = source[key];
                                }
                            }
                        }
                        return target;
                    };
                    return _extends.apply(this, arguments);
                }
                /**
                 *  Copyright (c) 2020 GraphQL Contributors.
                 *
                 *  This source code is licensed under the MIT license found in the
                 *  LICENSE file in the root directory of this source tree.
                 */
                const majorVersion = parseInt(_react.default.version.slice(0, 2), 10);
                if (majorVersion < 16) {
                    throw new Error(['GraphiQL 0.18.0 and after is not compatible with React 15 or below.', 'If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:', 'https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49'].join('\n'));
                }

                /**
                 * API docs for this live here:
                 *
                 * https://graphiql-test.netlify.app/typedoc/modules/graphiql.html#graphiqlprops
                 */

                /**
                 * The top-level React component for GraphiQL, intended to encompass the entire
                 * browser viewport.
                 *
                 * @see https://github.com/graphql/graphiql#usage
                 */
                function GraphiQL({
                    dangerouslyAssumeSchemaIsValid,
                    confirmCloseTab,
                    defaultQuery,
                    defaultTabs,
                    externalFragments,
                    fetcher,
                    getDefaultFieldNames,
                    headers,
                    inputValueDeprecation,
                    introspectionQueryName,
                    maxHistoryLength,
                    onEditOperationName,
                    onSchemaChange,
                    onTabChange,
                    onTogglePluginVisibility,
                    operationName,
                    plugins,
                    query,
                    response,
                    schema,
                    schemaDescription,
                    shouldPersistHeaders,
                    storage,
                    validationRules,
                    variables,
                    visiblePlugin,
                    defaultHeaders,
                    ...props
                }) {
                    var _props$disableTabs;
                    // Ensure props are correct
                    if (typeof fetcher !== 'function') {
                        throw new TypeError('The `GraphiQL` component requires a `fetcher` function to be passed as prop.');
                    }
                    return /*#__PURE__*/ _react.default.createElement(_react2.GraphiQLProvider, {
                        getDefaultFieldNames: getDefaultFieldNames,
                        dangerouslyAssumeSchemaIsValid: dangerouslyAssumeSchemaIsValid,
                        defaultQuery: defaultQuery,
                        defaultHeaders: defaultHeaders,
                        defaultTabs: defaultTabs,
                        externalFragments: externalFragments,
                        fetcher: fetcher,
                        headers: headers,
                        inputValueDeprecation: inputValueDeprecation,
                        introspectionQueryName: introspectionQueryName,
                        maxHistoryLength: maxHistoryLength,
                        onEditOperationName: onEditOperationName,
                        onSchemaChange: onSchemaChange,
                        onTabChange: onTabChange,
                        onTogglePluginVisibility: onTogglePluginVisibility,
                        plugins: plugins,
                        visiblePlugin: visiblePlugin,
                        operationName: operationName,
                        query: query,
                        response: response,
                        schema: schema,
                        schemaDescription: schemaDescription,
                        shouldPersistHeaders: shouldPersistHeaders,
                        storage: storage,
                        validationRules: validationRules,
                        variables: variables
                    }, /*#__PURE__*/ _react.default.createElement(GraphiQLInterface, _extends({
                        confirmCloseTab: confirmCloseTab,
                        showPersistHeadersSettings: shouldPersistHeaders !== false,
                        disableTabs: (_props$disableTabs = props.disableTabs) !== null && _props$disableTabs !== void 0 ? _props$disableTabs : false,
                        forcedTheme: props.forcedTheme
                    }, props)));
                }

                // Export main windows/panes to be used separately if desired.
                GraphiQL.Logo = GraphiQLLogo;
                GraphiQL.Toolbar = GraphiQLToolbar;
                GraphiQL.Footer = GraphiQLFooter;
                const THEMES = ['light', 'dark', 'system'];
                const TAB_CLASS_PREFIX = 'graphiql-session-tab-';

                function GraphiQLInterface(props) {
                    var _props$isHeadersEdito, _pluginContext$visibl, _props$toolbar, _props$toolbar2;
                    const isHeadersEditorEnabled = (_props$isHeadersEdito = props.isHeadersEditorEnabled) !== null && _props$isHeadersEdito !== void 0 ? _props$isHeadersEdito : true;
                    const editorContext = (0, _react2.useEditorContext)({
                        nonNull: true
                    });
                    const executionContext = (0, _react2.useExecutionContext)({
                        nonNull: true
                    });
                    const schemaContext = (0, _react2.useSchemaContext)({
                        nonNull: true
                    });
                    const storageContext = (0, _react2.useStorageContext)();
                    const pluginContext = (0, _react2.usePluginContext)();
                    const forcedTheme = (0, _react.useMemo)(() => props.forcedTheme && THEMES.includes(props.forcedTheme) ? props.forcedTheme : undefined, [props.forcedTheme]);
                    const copy = (0, _react2.useCopyQuery)({
                        onCopyQuery: props.onCopyQuery
                    });
                    const merge = (0, _react2.useMergeQuery)();
                    const prettify = (0, _react2.usePrettifyEditors)();
                    const {
                        theme,
                        setTheme
                    } = (0, _react2.useTheme)(props.defaultTheme);
                    (0, _react.useEffect)(() => {
                        if (forcedTheme === 'system') {
                            setTheme(null);
                        } else if (forcedTheme === 'light' || forcedTheme === 'dark') {
                            setTheme(forcedTheme);
                        }
                    }, [forcedTheme, setTheme]);
                    const PluginContent = pluginContext === null || pluginContext === void 0 ? void 0 : (_pluginContext$visibl = pluginContext.visiblePlugin) === null || _pluginContext$visibl === void 0 ? void 0 : _pluginContext$visibl.content;
                    const pluginResize = (0, _react2.useDragResize)({
                        defaultSizeRelation: 1 / 3,
                        direction: 'horizontal',
                        initiallyHidden: pluginContext !== null && pluginContext !== void 0 && pluginContext.visiblePlugin ? undefined : 'first',
                        onHiddenElementChange(resizableElement) {
                            if (resizableElement === 'first') {
                                pluginContext === null || pluginContext === void 0 ? void 0 : pluginContext.setVisiblePlugin(null);
                            }
                        },
                        sizeThresholdSecond: 200,
                        storageKey: 'docExplorerFlex'
                    });
                    const editorResize = (0, _react2.useDragResize)({
                        direction: 'horizontal',
                        storageKey: 'editorFlex'
                    });
                    const editorToolsResize = (0, _react2.useDragResize)({
                        defaultSizeRelation: 3,
                        direction: 'vertical',
                        initiallyHidden: (() => {
                            if (props.defaultEditorToolsVisibility === 'variables' || props.defaultEditorToolsVisibility === 'headers') {
                                return;
                            }
                            if (typeof props.defaultEditorToolsVisibility === 'boolean') {
                                return props.defaultEditorToolsVisibility ? undefined : 'second';
                            }
                            return editorContext.initialVariables || editorContext.initialHeaders ? undefined : 'second';
                        })(),
                        sizeThresholdSecond: 60,
                        storageKey: 'secondaryEditorFlex'
                    });
                    const [activeSecondaryEditor, setActiveSecondaryEditor] = (0, _react.useState)(() => {
                        if (props.defaultEditorToolsVisibility === 'variables' || props.defaultEditorToolsVisibility === 'headers') {
                            return props.defaultEditorToolsVisibility;
                        }
                        return !editorContext.initialVariables && editorContext.initialHeaders && isHeadersEditorEnabled ? 'headers' : 'variables';
                    });
                    const [showDialog, setShowDialog] = (0, _react.useState)(null);
                    const [clearStorageStatus, setClearStorageStatus] = (0, _react.useState)(null);
                    const children = _react.default.Children.toArray(props.children);
                    const logo = children.find(child => isChildComponentType(child, GraphiQL.Logo)) || /*#__PURE__*/ _react.default.createElement(GraphiQL.Logo, null);
                    const toolbar = children.find(child => isChildComponentType(child, GraphiQL.Toolbar)) || /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement(_react2.ToolbarButton, {
                        onClick: prettify,
                        label: "Prettify query (Shift-Ctrl-P)"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.PrettifyIcon, {
                        className: "graphiql-toolbar-icon",
                        "aria-hidden": "true"
                    })), /*#__PURE__*/ _react.default.createElement(_react2.ToolbarButton, {
                        onClick: merge,
                        label: "Merge fragments into query (Shift-Ctrl-M)"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.MergeIcon, {
                        className: "graphiql-toolbar-icon",
                        "aria-hidden": "true"
                    })), /*#__PURE__*/ _react.default.createElement(_react2.ToolbarButton, {
                        onClick: copy,
                        label: "Copy query (Shift-Ctrl-C)"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.CopyIcon, {
                        className: "graphiql-toolbar-icon",
                        "aria-hidden": "true"
                    })), (_props$toolbar = props.toolbar) === null || _props$toolbar === void 0 ? void 0 : _props$toolbar.additionalContent, ((_props$toolbar2 = props.toolbar) === null || _props$toolbar2 === void 0 ? void 0 : _props$toolbar2.additionalComponent) && /*#__PURE__*/ _react.default.createElement(props.toolbar.additionalComponent, null));
                    const footer = children.find(child => isChildComponentType(child, GraphiQL.Footer));
                    const onClickReference = (0, _react.useCallback)(() => {
                        if (pluginResize.hiddenElement === 'first') {
                            pluginResize.setHiddenElement(null);
                        }
                    }, [pluginResize]);
                    const handleClearData = (0, _react.useCallback)(() => {
                        try {
                            storageContext === null || storageContext === void 0 ? void 0 : storageContext.clear();
                            setClearStorageStatus('success');
                        } catch {
                            setClearStorageStatus('error');
                        }
                    }, [storageContext]);
                    const handlePersistHeaders = (0, _react.useCallback)(event => {
                        editorContext.setShouldPersistHeaders(event.currentTarget.dataset.value === 'true');
                    }, [editorContext]);
                    const handleChangeTheme = (0, _react.useCallback)(event => {
                        const selectedTheme = event.currentTarget.dataset.theme;
                        setTheme(selectedTheme || null);
                    }, [setTheme]);
                    const handleAddTab = editorContext.addTab;
                    const handleRefetchSchema = schemaContext.introspect;
                    const handleReorder = editorContext.moveTab;
                    const handleShowDialog = (0, _react.useCallback)(event => {
                        setShowDialog(event.currentTarget.dataset.value);
                    }, []);
                    const handlePluginClick = (0, _react.useCallback)(event => {
                        const context = pluginContext;
                        const pluginIndex = Number(event.currentTarget.dataset.index);
                        const plugin = context.plugins.find((_, index) => pluginIndex === index);
                        const isVisible = plugin === context.visiblePlugin;
                        if (isVisible) {
                            context.setVisiblePlugin(null);
                            pluginResize.setHiddenElement('first');
                        } else {
                            context.setVisiblePlugin(plugin);
                            pluginResize.setHiddenElement(null);
                        }
                    }, [pluginContext, pluginResize]);
                    const handleToolsTabClick = (0, _react.useCallback)(event => {
                        if (editorToolsResize.hiddenElement === 'second') {
                            editorToolsResize.setHiddenElement(null);
                        }
                        setActiveSecondaryEditor(event.currentTarget.dataset.name);
                    }, [editorToolsResize]);
                    const toggleEditorTools = (0, _react.useCallback)(() => {
                        editorToolsResize.setHiddenElement(editorToolsResize.hiddenElement === 'second' ? null : 'second');
                    }, [editorToolsResize]);
                    const handleOpenShortKeysDialog = (0, _react.useCallback)(isOpen => {
                        if (!isOpen) {
                            setShowDialog(null);
                        }
                    }, []);
                    const handleOpenSettingsDialog = (0, _react.useCallback)(isOpen => {
                        if (!isOpen) {
                            setShowDialog(null);
                            setClearStorageStatus(null);
                        }
                    }, []);
                    const addTab = /*#__PURE__*/ _react.default.createElement(_react2.Tooltip, {
                        label: "Add tab"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.UnStyledButton, {
                        type: "button",
                        className: "graphiql-tab-add",
                        onClick: handleAddTab,
                        "aria-label": "Add tab"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.PlusIcon, {
                        "aria-hidden": "true"
                    })));
                    const className = props.className ? ` ${props.className}` : '';
                    const confirmClose = props.confirmCloseTab;
                    const handleTabClose = (0, _react.useCallback)(async event => {
                        const tabButton = event.currentTarget.previousSibling;
                        const index = Number(tabButton.id.replace(TAB_CLASS_PREFIX, ''));

                        /** TODO:
                         * Move everything after into `editorContext.closeTab` once zustand will be used instead of
                         * React context, since now we can't use execution context inside editor context, since editor
                         * context is used in execution context.
                         */
                        const shouldCloseTab = confirmClose ? await confirmClose(index) : true;
                        if (!shouldCloseTab) {
                            return;
                        }
                        if (editorContext.activeTabIndex === index) {
                            executionContext.stop();
                        }
                        editorContext.closeTab(index);
                    }, [confirmClose, editorContext, executionContext]);
                    const handleTabClick = (0, _react.useCallback)(event => {
                        const index = Number(event.currentTarget.id.replace(TAB_CLASS_PREFIX, ''));
                        /** TODO:
                         * Move everything after into `editorContext.changeTab` once zustand will be used instead of
                         * React context, since now we can't use execution context inside editor context, since editor
                         * context is used in execution context.
                         */
                        executionContext.stop();
                        editorContext.changeTab(index);
                    }, [editorContext, executionContext]);
                    return /*#__PURE__*/ _react.default.createElement(_react2.Tooltip.Provider, null, /*#__PURE__*/ _react.default.createElement("div", {
                        "data-testid": "graphiql-container",
                        className: `graphiql-container${className}`
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-sidebar"
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-sidebar-section"
                    }, pluginContext === null || pluginContext === void 0 ? void 0 : pluginContext.plugins.map((plugin, index) => {
                        const isVisible = plugin === pluginContext.visiblePlugin;
                        const label = `${isVisible ? 'Hide' : 'Show'} ${plugin.title}`;
                        return /*#__PURE__*/ _react.default.createElement(_react2.Tooltip, {
                            key: plugin.title,
                            label: label
                        }, /*#__PURE__*/ _react.default.createElement(_react2.UnStyledButton, {
                            type: "button",
                            className: isVisible ? 'active' : '',
                            onClick: handlePluginClick,
                            "data-index": index,
                            "aria-label": label
                        }, /*#__PURE__*/ _react.default.createElement(plugin.icon, {
                            "aria-hidden": "true"
                        })));
                    })), /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-sidebar-section"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.Tooltip, {
                        label: "Re-fetch GraphQL schema"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.UnStyledButton, {
                        type: "button",
                        disabled: schemaContext.isFetching,
                        onClick: handleRefetchSchema,
                        "aria-label": "Re-fetch GraphQL schema"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.ReloadIcon, {
                        className: schemaContext.isFetching ? 'graphiql-spin' : '',
                        "aria-hidden": "true"
                    }))), /*#__PURE__*/ _react.default.createElement(_react2.Tooltip, {
                        label: "Open short keys dialog"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.UnStyledButton, {
                        type: "button",
                        "data-value": "short-keys",
                        onClick: handleShowDialog,
                        "aria-label": "Open short keys dialog"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.KeyboardShortcutIcon, {
                        "aria-hidden": "true"
                    }))), /*#__PURE__*/ _react.default.createElement(_react2.Tooltip, {
                        label: "Open settings dialog"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.UnStyledButton, {
                        type: "button",
                        "data-value": "settings",
                        onClick: handleShowDialog,
                        "aria-label": "Open settings dialog"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.SettingsIcon, {
                        "aria-hidden": "true"
                    }))))), /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-main"
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        ref: pluginResize.firstRef,
                        style: {
                            // Make sure the container shrinks when containing long
                            // non-breaking texts
                            minWidth: '200px'
                        }
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-plugin"
                    }, PluginContent ? /*#__PURE__*/ _react.default.createElement(PluginContent, null) : null)), (pluginContext === null || pluginContext === void 0 ? void 0 : pluginContext.visiblePlugin) && /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-horizontal-drag-bar",
                        ref: pluginResize.dragBarRef
                    }), /*#__PURE__*/ _react.default.createElement("div", {
                        ref: pluginResize.secondRef,
                        className: "graphiql-sessions"
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-session-header"
                    }, !props.disableTabs && /*#__PURE__*/ _react.default.createElement(_react2.Tabs, {
                        values: editorContext.tabs,
                        onReorder: handleReorder,
                        "aria-label": "Select active operation"
                    }, editorContext.tabs.length > 1 && /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, editorContext.tabs.map((tab, index) => /*#__PURE__*/ _react.default.createElement(_react2.Tab, {
                        key: tab.id,
                        value: tab,
                        isActive: index === editorContext.activeTabIndex
                    }, /*#__PURE__*/ _react.default.createElement(_react2.Tab.Button, {
                        "aria-controls": "graphiql-session",
                        id: `${TAB_CLASS_PREFIX}${index}`,
                        onClick: handleTabClick
                    }, tab.title), /*#__PURE__*/ _react.default.createElement(_react2.Tab.Close, {
                        onClick: handleTabClose
                    }))), addTab)), /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-session-header-right"
                    }, editorContext.tabs.length === 1 && addTab, logo)), /*#__PURE__*/ _react.default.createElement("div", {
                        role: "tabpanel",
                        id: "graphiql-session" // used by aria-controls="graphiql-session"
                            ,
                        className: "graphiql-session",
                        "aria-labelledby": `${TAB_CLASS_PREFIX}${editorContext.activeTabIndex}`
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        ref: editorResize.firstRef
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        className: `graphiql-editors${editorContext.tabs.length === 1 ? ' full-height' : ''}`
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        ref: editorToolsResize.firstRef
                    }, /*#__PURE__*/ _react.default.createElement("section", {
                        className: "graphiql-query-editor",
                        "aria-label": "Query Editor"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.QueryEditor, {
                        editorTheme: props.editorTheme,
                        keyMap: props.keyMap,
                        onClickReference: onClickReference,
                        onCopyQuery: props.onCopyQuery,
                        onEdit: props.onEditQuery,
                        readOnly: props.readOnly
                    }), /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-toolbar",
                        role: "toolbar",
                        "aria-label": "Editor Commands"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.ExecuteButton, null), toolbar))), /*#__PURE__*/ _react.default.createElement("div", {
                        ref: editorToolsResize.dragBarRef
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-editor-tools"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.UnStyledButton, {
                        type: "button",
                        className: activeSecondaryEditor === 'variables' && editorToolsResize.hiddenElement !== 'second' ? 'active' : '',
                        onClick: handleToolsTabClick,
                        "data-name": "variables"
                    }, "Variables"), isHeadersEditorEnabled && /*#__PURE__*/ _react.default.createElement(_react2.UnStyledButton, {
                        type: "button",
                        className: activeSecondaryEditor === 'headers' && editorToolsResize.hiddenElement !== 'second' ? 'active' : '',
                        onClick: handleToolsTabClick,
                        "data-name": "headers"
                    }, "Headers"), /*#__PURE__*/ _react.default.createElement(_react2.Tooltip, {
                        label: editorToolsResize.hiddenElement === 'second' ? 'Show editor tools' : 'Hide editor tools'
                    }, /*#__PURE__*/ _react.default.createElement(_react2.UnStyledButton, {
                        type: "button",
                        onClick: toggleEditorTools,
                        "aria-label": editorToolsResize.hiddenElement === 'second' ? 'Show editor tools' : 'Hide editor tools',
                        className: "graphiql-toggle-editor-tools"
                    }, editorToolsResize.hiddenElement === 'second' ? /*#__PURE__*/ _react.default.createElement(_react2.ChevronUpIcon, {
                        className: "graphiql-chevron-icon",
                        "aria-hidden": "true"
                    }) : /*#__PURE__*/ _react.default.createElement(_react2.ChevronDownIcon, {
                        className: "graphiql-chevron-icon",
                        "aria-hidden": "true"
                    }))))), /*#__PURE__*/ _react.default.createElement("div", {
                        ref: editorToolsResize.secondRef
                    }, /*#__PURE__*/ _react.default.createElement("section", {
                        className: "graphiql-editor-tool",
                        "aria-label": activeSecondaryEditor === 'variables' ? 'Variables' : 'Headers'
                    }, /*#__PURE__*/ _react.default.createElement(_react2.VariableEditor, {
                        editorTheme: props.editorTheme,
                        isHidden: activeSecondaryEditor !== 'variables',
                        keyMap: props.keyMap,
                        onEdit: props.onEditVariables,
                        onClickReference: onClickReference,
                        readOnly: props.readOnly
                    }), isHeadersEditorEnabled && /*#__PURE__*/ _react.default.createElement(_react2.HeaderEditor, {
                        editorTheme: props.editorTheme,
                        isHidden: activeSecondaryEditor !== 'headers',
                        keyMap: props.keyMap,
                        onEdit: props.onEditHeaders,
                        readOnly: props.readOnly
                    }))))), /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-horizontal-drag-bar",
                        ref: editorResize.dragBarRef
                    }), /*#__PURE__*/ _react.default.createElement("div", {
                        ref: editorResize.secondRef
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-response"
                    }, executionContext.isFetching ? /*#__PURE__*/ _react.default.createElement(_react2.Spinner, null) : null, /*#__PURE__*/ _react.default.createElement(_react2.ResponseEditor, {
                        editorTheme: props.editorTheme,
                        responseTooltip: props.responseTooltip,
                        keyMap: props.keyMap
                    }), footer))))), /*#__PURE__*/ _react.default.createElement(_react2.Dialog, {
                        open: showDialog === 'short-keys',
                        onOpenChange: handleOpenShortKeysDialog
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-header"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.Dialog.Title, {
                        className: "graphiql-dialog-title"
                    }, "Short Keys"), /*#__PURE__*/ _react.default.createElement(_react2.Dialog.Close, null)), /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section"
                    }, /*#__PURE__*/ _react.default.createElement(ShortKeys, {
                        keyMap: props.keyMap || 'sublime'
                    }))), /*#__PURE__*/ _react.default.createElement(_react2.Dialog, {
                        open: showDialog === 'settings',
                        onOpenChange: handleOpenSettingsDialog
                    }, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-header"
                    }, /*#__PURE__*/ _react.default.createElement(_react2.Dialog.Title, {
                        className: "graphiql-dialog-title"
                    }, "Settings"), /*#__PURE__*/ _react.default.createElement(_react2.Dialog.Close, null)), props.showPersistHeadersSettings ? /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section"
                    }, /*#__PURE__*/ _react.default.createElement("div", null, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section-title"
                    }, "Persist headers"), /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section-caption"
                    }, "Save headers upon reloading.", ' ', /*#__PURE__*/ _react.default.createElement("span", {
                        className: "graphiql-warning-text"
                    }, "Only enable if you trust this device."))), /*#__PURE__*/ _react.default.createElement(_react2.ButtonGroup, null, /*#__PURE__*/ _react.default.createElement(_react2.Button, {
                        type: "button",
                        id: "enable-persist-headers",
                        className: editorContext.shouldPersistHeaders ? 'active' : '',
                        "data-value": "true",
                        onClick: handlePersistHeaders
                    }, "On"), /*#__PURE__*/ _react.default.createElement(_react2.Button, {
                        type: "button",
                        id: "disable-persist-headers",
                        className: editorContext.shouldPersistHeaders ? '' : 'active',
                        onClick: handlePersistHeaders
                    }, "Off"))) : null, !forcedTheme && /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section"
                    }, /*#__PURE__*/ _react.default.createElement("div", null, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section-title"
                    }, "Theme"), /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section-caption"
                    }, "Adjust how the interface appears.")), /*#__PURE__*/ _react.default.createElement(_react2.ButtonGroup, null, /*#__PURE__*/ _react.default.createElement(_react2.Button, {
                        type: "button",
                        className: theme === null ? 'active' : '',
                        onClick: handleChangeTheme
                    }, "System"), /*#__PURE__*/ _react.default.createElement(_react2.Button, {
                        type: "button",
                        className: theme === 'light' ? 'active' : '',
                        "data-theme": "light",
                        onClick: handleChangeTheme
                    }, "Light"), /*#__PURE__*/ _react.default.createElement(_react2.Button, {
                        type: "button",
                        className: theme === 'dark' ? 'active' : '',
                        "data-theme": "dark",
                        onClick: handleChangeTheme
                    }, "Dark"))), storageContext ? /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section"
                    }, /*#__PURE__*/ _react.default.createElement("div", null, /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section-title"
                    }, "Clear storage"), /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-dialog-section-caption"
                    }, "Remove all locally stored data and start fresh.")), /*#__PURE__*/ _react.default.createElement(_react2.Button, {
                        type: "button",
                        state: clearStorageStatus || undefined,
                        disabled: clearStorageStatus === 'success',
                        onClick: handleClearData
                    }, {
                        success: 'Cleared data',
                        error: 'Failed'
                    } [clearStorageStatus] || 'Clear data')) : null)));
                }
                const modifier = _react2.isMacOs ? '⌘' : 'Ctrl';
                const SHORT_KEYS = Object.entries({
                    'Search in editor': [modifier, 'F'],
                    'Search in documentation': [modifier, 'K'],
                    'Execute query': [modifier, 'Enter'],
                    'Prettify editors': ['Ctrl', 'Shift', 'P'],
                    'Merge fragments definitions into operation definition': ['Ctrl', 'Shift', 'M'],
                    'Copy query': ['Ctrl', 'Shift', 'C'],
                    'Re-fetch schema using introspection': ['Ctrl', 'Shift', 'R']
                });

                function ShortKeys({
                    keyMap
                }) {
                    return /*#__PURE__*/ _react.default.createElement("div", null, /*#__PURE__*/ _react.default.createElement("table", {
                        className: "graphiql-table"
                    }, /*#__PURE__*/ _react.default.createElement("thead", null, /*#__PURE__*/ _react.default.createElement("tr", null, /*#__PURE__*/ _react.default.createElement("th", null, "Short Key"), /*#__PURE__*/ _react.default.createElement("th", null, "Function"))), /*#__PURE__*/ _react.default.createElement("tbody", null, SHORT_KEYS.map(([title, keys]) => /*#__PURE__*/ _react.default.createElement("tr", {
                        key: title
                    }, /*#__PURE__*/ _react.default.createElement("td", null, keys.map((key, index, array) => /*#__PURE__*/ _react.default.createElement(_react.Fragment, {
                        key: key
                    }, /*#__PURE__*/ _react.default.createElement("code", {
                        className: "graphiql-key"
                    }, key), index !== array.length - 1 && ' + '))), /*#__PURE__*/ _react.default.createElement("td", null, title))))), /*#__PURE__*/ _react.default.createElement("p", null, "The editors use", ' ', /*#__PURE__*/ _react.default.createElement("a", {
                        href: "https://codemirror.net/5/doc/manual.html#keymaps",
                        target: "_blank",
                        rel: "noopener noreferrer"
                    }, "CodeMirror Key Maps"), ' ', "that add more short keys. This instance of Graph", /*#__PURE__*/ _react.default.createElement("em", null, "i"), "QL uses", ' ', /*#__PURE__*/ _react.default.createElement("code", null, keyMap), "."));
                }

                // Configure the UI by providing this Component as a child of GraphiQL.
                function GraphiQLLogo(props) {
                    return /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-logo"
                    }, props.children || /*#__PURE__*/ _react.default.createElement("a", {
                        className: "graphiql-logo-link",
                        href: "https://github.com/graphql/graphiql",
                        target: "_blank",
                        rel: "noreferrer"
                    }, "Graph", /*#__PURE__*/ _react.default.createElement("em", null, "i"), "QL"));
                }
                GraphiQLLogo.displayName = 'GraphiQLLogo';

                // Configure the UI by providing this Component as a child of GraphiQL.
                function GraphiQLToolbar(props) {
                    // eslint-disable-next-line react/jsx-no-useless-fragment
                    return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, props.children);
                }
                GraphiQLToolbar.displayName = 'GraphiQLToolbar';

                // Configure the UI by providing this Component as a child of GraphiQL.
                function GraphiQLFooter(props) {
                    return /*#__PURE__*/ _react.default.createElement("div", {
                        className: "graphiql-footer"
                    }, props.children);
                }
                GraphiQLFooter.displayName = 'GraphiQLFooter';

                // Determines if the React child is of the same type of the provided React component
                function isChildComponentType(child, component) {
                    var _child$type;
                    if (child !== null && child !== void 0 && (_child$type = child.type) !== null && _child$type !== void 0 && _child$type.displayName && child.type.displayName === component.displayName) {
                        return true;
                    }
                    return child.type === component;
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/index.js":
            /*!***************************************************!*\
              !*** ../../graphql-language-service/esm/index.js ***!
              \***************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "CharacterStream", ({
                    enumerable: true,
                    get: function() {
                        return _parser.CharacterStream;
                    }
                }));
                Object.defineProperty(exports, "CompletionItemKind", ({
                    enumerable: true,
                    get: function() {
                        return _types.CompletionItemKind;
                    }
                }));
                Object.defineProperty(exports, "DIAGNOSTIC_SEVERITY", ({
                    enumerable: true,
                    get: function() {
                        return _interface.DIAGNOSTIC_SEVERITY;
                    }
                }));
                Object.defineProperty(exports, "FileChangeTypeKind", ({
                    enumerable: true,
                    get: function() {
                        return _types.FileChangeTypeKind;
                    }
                }));
                Object.defineProperty(exports, "GraphQLDocumentMode", ({
                    enumerable: true,
                    get: function() {
                        return _parser.GraphQLDocumentMode;
                    }
                }));
                Object.defineProperty(exports, "LexRules", ({
                    enumerable: true,
                    get: function() {
                        return _parser.LexRules;
                    }
                }));
                Object.defineProperty(exports, "ParseRules", ({
                    enumerable: true,
                    get: function() {
                        return _parser.ParseRules;
                    }
                }));
                Object.defineProperty(exports, "Position", ({
                    enumerable: true,
                    get: function() {
                        return _utils.Position;
                    }
                }));
                Object.defineProperty(exports, "Range", ({
                    enumerable: true,
                    get: function() {
                        return _utils.Range;
                    }
                }));
                Object.defineProperty(exports, "RuleKinds", ({
                    enumerable: true,
                    get: function() {
                        return _parser.RuleKinds;
                    }
                }));
                Object.defineProperty(exports, "SEVERITY", ({
                    enumerable: true,
                    get: function() {
                        return _interface.SEVERITY;
                    }
                }));
                Object.defineProperty(exports, "SuggestionCommand", ({
                    enumerable: true,
                    get: function() {
                        return _interface.SuggestionCommand;
                    }
                }));
                Object.defineProperty(exports, "canUseDirective", ({
                    enumerable: true,
                    get: function() {
                        return _interface.canUseDirective;
                    }
                }));
                Object.defineProperty(exports, "collectVariables", ({
                    enumerable: true,
                    get: function() {
                        return _utils.collectVariables;
                    }
                }));
                Object.defineProperty(exports, "getASTNodeAtPosition", ({
                    enumerable: true,
                    get: function() {
                        return _utils.getASTNodeAtPosition;
                    }
                }));
                Object.defineProperty(exports, "getAutocompleteSuggestions", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getAutocompleteSuggestions;
                    }
                }));
                Object.defineProperty(exports, "getDefinitionQueryResultForArgument", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getDefinitionQueryResultForArgument;
                    }
                }));
                Object.defineProperty(exports, "getDefinitionQueryResultForDefinitionNode", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getDefinitionQueryResultForDefinitionNode;
                    }
                }));
                Object.defineProperty(exports, "getDefinitionQueryResultForField", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getDefinitionQueryResultForField;
                    }
                }));
                Object.defineProperty(exports, "getDefinitionQueryResultForFragmentSpread", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getDefinitionQueryResultForFragmentSpread;
                    }
                }));
                Object.defineProperty(exports, "getDefinitionQueryResultForNamedType", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getDefinitionQueryResultForNamedType;
                    }
                }));
                Object.defineProperty(exports, "getDefinitionState", ({
                    enumerable: true,
                    get: function() {
                        return _parser.getDefinitionState;
                    }
                }));
                Object.defineProperty(exports, "getDiagnostics", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getDiagnostics;
                    }
                }));
                Object.defineProperty(exports, "getFieldDef", ({
                    enumerable: true,
                    get: function() {
                        return _parser.getFieldDef;
                    }
                }));
                Object.defineProperty(exports, "getFragmentDefinitions", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getFragmentDefinitions;
                    }
                }));
                Object.defineProperty(exports, "getFragmentDependencies", ({
                    enumerable: true,
                    get: function() {
                        return _utils.getFragmentDependencies;
                    }
                }));
                Object.defineProperty(exports, "getFragmentDependenciesForAST", ({
                    enumerable: true,
                    get: function() {
                        return _utils.getFragmentDependenciesForAST;
                    }
                }));
                Object.defineProperty(exports, "getHoverInformation", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getHoverInformation;
                    }
                }));
                Object.defineProperty(exports, "getOperationASTFacts", ({
                    enumerable: true,
                    get: function() {
                        return _utils.getOperationASTFacts;
                    }
                }));
                Object.defineProperty(exports, "getOperationFacts", ({
                    enumerable: true,
                    get: function() {
                        return _utils.getOperationFacts;
                    }
                }));
                Object.defineProperty(exports, "getOutline", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getOutline;
                    }
                }));
                Object.defineProperty(exports, "getQueryFacts", ({
                    enumerable: true,
                    get: function() {
                        return _utils.getQueryFacts;
                    }
                }));
                Object.defineProperty(exports, "getRange", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getRange;
                    }
                }));
                Object.defineProperty(exports, "getTokenAtPosition", ({
                    enumerable: true,
                    get: function() {
                        return _parser.getTokenAtPosition;
                    }
                }));
                Object.defineProperty(exports, "getTypeInfo", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getTypeInfo;
                    }
                }));
                Object.defineProperty(exports, "getVariableCompletions", ({
                    enumerable: true,
                    get: function() {
                        return _interface.getVariableCompletions;
                    }
                }));
                Object.defineProperty(exports, "getVariablesJSONSchema", ({
                    enumerable: true,
                    get: function() {
                        return _utils.getVariablesJSONSchema;
                    }
                }));
                Object.defineProperty(exports, "isIgnored", ({
                    enumerable: true,
                    get: function() {
                        return _parser.isIgnored;
                    }
                }));
                Object.defineProperty(exports, "list", ({
                    enumerable: true,
                    get: function() {
                        return _parser.list;
                    }
                }));
                Object.defineProperty(exports, "offsetToPosition", ({
                    enumerable: true,
                    get: function() {
                        return _utils.offsetToPosition;
                    }
                }));
                Object.defineProperty(exports, "onlineParser", ({
                    enumerable: true,
                    get: function() {
                        return _parser.onlineParser;
                    }
                }));
                Object.defineProperty(exports, "opt", ({
                    enumerable: true,
                    get: function() {
                        return _parser.opt;
                    }
                }));
                Object.defineProperty(exports, "p", ({
                    enumerable: true,
                    get: function() {
                        return _parser.p;
                    }
                }));
                Object.defineProperty(exports, "pointToOffset", ({
                    enumerable: true,
                    get: function() {
                        return _utils.pointToOffset;
                    }
                }));
                Object.defineProperty(exports, "t", ({
                    enumerable: true,
                    get: function() {
                        return _parser.t;
                    }
                }));
                Object.defineProperty(exports, "validateQuery", ({
                    enumerable: true,
                    get: function() {
                        return _interface.validateQuery;
                    }
                }));
                Object.defineProperty(exports, "validateWithCustomRules", ({
                    enumerable: true,
                    get: function() {
                        return _utils.validateWithCustomRules;
                    }
                }));
                var _interface = __webpack_require__( /*! ./interface */ "../../graphql-language-service/esm/interface/index.js");
                var _parser = __webpack_require__( /*! ./parser */ "../../graphql-language-service/esm/parser/index.js");
                var _types = __webpack_require__( /*! ./types */ "../../graphql-language-service/esm/types.js");
                var _utils = __webpack_require__( /*! ./utils */ "../../graphql-language-service/esm/utils/index.js");

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/interface/autocompleteUtils.js":
            /*!*************************************************************************!*\
              !*** ../../graphql-language-service/esm/interface/autocompleteUtils.js ***!
              \*************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getInsertText = exports.getInputInsertText = exports.getFieldInsertText = void 0;
                exports.hintList = hintList;
                exports.objectValues = objectValues;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");

                function objectValues(object) {
                    const keys = Object.keys(object);
                    const len = keys.length;
                    const values = new Array(len);
                    for (let i = 0; i < len; ++i) {
                        values[i] = object[keys[i]];
                    }
                    return values;
                }

                function hintList(token, list) {
                    return filterAndSortList(list, normalizeText(token.string));
                }

                function filterAndSortList(list, text) {
                    if (!text || text.trim() === '' || text.trim() === ':' || text.trim() === '{') {
                        return filterNonEmpty(list, entry => !entry.isDeprecated);
                    }
                    const byProximity = list.map(entry => ({
                        proximity: getProximity(normalizeText(entry.label), text),
                        entry
                    }));
                    return filterNonEmpty(filterNonEmpty(byProximity, pair => pair.proximity <= 2), pair => !pair.entry.isDeprecated).sort((a, b) => (a.entry.isDeprecated ? 1 : 0) - (b.entry.isDeprecated ? 1 : 0) || a.proximity - b.proximity || a.entry.label.length - b.entry.label.length).map(pair => pair.entry);
                }

                function filterNonEmpty(array, predicate) {
                    const filtered = array.filter(predicate);
                    return filtered.length === 0 ? array : filtered;
                }

                function normalizeText(text) {
                    return text.toLowerCase().replaceAll(/\W/g, '');
                }

                function getProximity(suggestion, text) {
                    let proximity = lexicalDistance(text, suggestion);
                    if (suggestion.length > text.length) {
                        proximity -= suggestion.length - text.length - 1;
                        proximity += suggestion.indexOf(text) === 0 ? 0 : 0.5;
                    }
                    return proximity;
                }

                function lexicalDistance(a, b) {
                    let i;
                    let j;
                    const d = [];
                    const aLength = a.length;
                    const bLength = b.length;
                    for (i = 0; i <= aLength; i++) {
                        d[i] = [i];
                    }
                    for (j = 1; j <= bLength; j++) {
                        d[0][j] = j;
                    }
                    for (i = 1; i <= aLength; i++) {
                        for (j = 1; j <= bLength; j++) {
                            const cost = a[i - 1] === b[j - 1] ? 0 : 1;
                            d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost);
                            if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
                                d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost);
                            }
                        }
                    }
                    return d[aLength][bLength];
                }
                const insertSuffix = n => ` {\n   $${n !== null && n !== void 0 ? n : 1}\n}`;
                const getInsertText = (prefix, type, fallback) => {
                    if (!type) {
                        return fallback !== null && fallback !== void 0 ? fallback : prefix;
                    }
                    const namedType = (0, _graphql.getNamedType)(type);
                    if ((0, _graphql.isObjectType)(namedType) || (0, _graphql.isInputObjectType)(namedType) || (0, _graphql.isListType)(namedType) || (0, _graphql.isAbstractType)(namedType)) {
                        return prefix + insertSuffix();
                    }
                    return fallback !== null && fallback !== void 0 ? fallback : prefix;
                };
                exports.getInsertText = getInsertText;
                const getInputInsertText = (prefix, type, fallback) => {
                    if ((0, _graphql.isListType)(type)) {
                        const baseType = (0, _graphql.getNamedType)(type.ofType);
                        return prefix + `[${getInsertText('', baseType, '$1')}]`;
                    }
                    return getInsertText(prefix, type, fallback);
                };
                exports.getInputInsertText = getInputInsertText;
                const getFieldInsertText = field => {
                    const requiredArgs = field.args.filter(arg => arg.type.toString().endsWith('!'));
                    if (!requiredArgs.length) {
                        return;
                    }
                    return field.name + `(${requiredArgs.map((arg, i) => `${arg.name}: $${i + 1}`)}) ${getInsertText('', field.type, '\n')}`;
                };
                exports.getFieldInsertText = getFieldInsertText;

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/interface/getAutocompleteSuggestions.js":
            /*!**********************************************************************************!*\
              !*** ../../graphql-language-service/esm/interface/getAutocompleteSuggestions.js ***!
              \**********************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.SuggestionCommand = void 0;
                exports.canUseDirective = canUseDirective;
                exports.getAutocompleteSuggestions = getAutocompleteSuggestions;
                exports.getFragmentDefinitions = getFragmentDefinitions;
                Object.defineProperty(exports, "getTypeInfo", ({
                    enumerable: true,
                    get: function() {
                        return _parser.getTypeInfo;
                    }
                }));
                exports.getVariableCompletions = getVariableCompletions;
                Object.defineProperty(exports, "runOnlineParser", ({
                    enumerable: true,
                    get: function() {
                        return _parser.runOnlineParser;
                    }
                }));
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _types = __webpack_require__( /*! ../types */ "../../graphql-language-service/esm/types.js");
                var _parser = __webpack_require__( /*! ../parser */ "../../graphql-language-service/esm/parser/index.js");
                var _autocompleteUtils = __webpack_require__( /*! ./autocompleteUtils */ "../../graphql-language-service/esm/interface/autocompleteUtils.js");
                var _vscodeLanguageserverTypes = __webpack_require__( /*! vscode-languageserver-types */ "../../../node_modules/vscode-languageserver-types/lib/esm/main.js");
                const SuggestionCommand = exports.SuggestionCommand = {
                    command: 'editor.action.triggerSuggest',
                    title: 'Suggestions'
                };
                const collectFragmentDefs = op => {
                    const externalFragments = [];
                    if (op) {
                        try {
                            (0, _graphql.visit)((0, _graphql.parse)(op), {
                                FragmentDefinition(def) {
                                    externalFragments.push(def);
                                }
                            });
                        } catch (_a) {
                            return [];
                        }
                    }
                    return externalFragments;
                };

                function getAutocompleteSuggestions(schema, queryText, cursor, contextToken, fragmentDefs, options) {
                    var _a;
                    const opts = Object.assign(Object.assign({}, options), {
                        schema
                    });
                    const context = (0, _parser.getContextAtPosition)(queryText, cursor, schema, contextToken, options);
                    if (!context) {
                        return [];
                    }
                    const {
                        state,
                        typeInfo,
                        mode,
                        token
                    } = context;
                    const {
                        kind,
                        step,
                        prevState
                    } = state;
                    if (kind === _parser.RuleKinds.DOCUMENT) {
                        if (mode === _parser.GraphQLDocumentMode.TYPE_SYSTEM) {
                            return getSuggestionsForTypeSystemDefinitions(token);
                        }
                        if (mode === _parser.GraphQLDocumentMode.EXECUTABLE) {
                            return getSuggestionsForExecutableDefinitions(token);
                        }
                        return getSuggestionsForUnknownDocumentMode(token);
                    }
                    if (kind === _parser.RuleKinds.EXTEND_DEF) {
                        return getSuggestionsForExtensionDefinitions(token);
                    }
                    if (((_a = prevState === null || prevState === void 0 ? void 0 : prevState.prevState) === null || _a === void 0 ? void 0 : _a.kind) === _parser.RuleKinds.EXTENSION_DEFINITION && state.name) {
                        return (0, _autocompleteUtils.hintList)(token, []);
                    }
                    if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.SCALAR_TYPE_EXTENSION) {
                        return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(_graphql.isScalarType).map(type => ({
                            label: type.name,
                            kind: _types.CompletionItemKind.Function
                        })));
                    }
                    if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.OBJECT_TYPE_EXTENSION) {
                        return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isObjectType)(type) && !type.name.startsWith('__')).map(type => ({
                            label: type.name,
                            kind: _types.CompletionItemKind.Function
                        })));
                    }
                    if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.INTERFACE_TYPE_EXTENSION) {
                        return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(_graphql.isInterfaceType).map(type => ({
                            label: type.name,
                            kind: _types.CompletionItemKind.Function
                        })));
                    }
                    if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.UNION_TYPE_EXTENSION) {
                        return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(_graphql.isUnionType).map(type => ({
                            label: type.name,
                            kind: _types.CompletionItemKind.Function
                        })));
                    }
                    if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.ENUM_TYPE_EXTENSION) {
                        return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isEnumType)(type) && !type.name.startsWith('__')).map(type => ({
                            label: type.name,
                            kind: _types.CompletionItemKind.Function
                        })));
                    }
                    if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION) {
                        return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(_graphql.isInputObjectType).map(type => ({
                            label: type.name,
                            kind: _types.CompletionItemKind.Function
                        })));
                    }
                    if (kind === _parser.RuleKinds.IMPLEMENTS || kind === _parser.RuleKinds.NAMED_TYPE && (prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _parser.RuleKinds.IMPLEMENTS) {
                        return getSuggestionsForImplements(token, state, schema, queryText, typeInfo);
                    }
                    if (kind === _parser.RuleKinds.SELECTION_SET || kind === _parser.RuleKinds.FIELD || kind === _parser.RuleKinds.ALIASED_FIELD) {
                        return getSuggestionsForFieldNames(token, typeInfo, opts);
                    }
                    if (kind === _parser.RuleKinds.ARGUMENTS || kind === _parser.RuleKinds.ARGUMENT && step === 0) {
                        const {
                            argDefs
                        } = typeInfo;
                        if (argDefs) {
                            return (0, _autocompleteUtils.hintList)(token, argDefs.map(argDef => {
                                var _a;
                                return {
                                    label: argDef.name,
                                    insertText: (0, _autocompleteUtils.getInputInsertText)(argDef.name + ': ', argDef.type),
                                    insertTextMode: _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation,
                                    insertTextFormat: _types.InsertTextFormat.Snippet,
                                    command: SuggestionCommand,
                                    labelDetails: {
                                        detail: ' ' + String(argDef.type)
                                    },
                                    documentation: (_a = argDef.description) !== null && _a !== void 0 ? _a : undefined,
                                    kind: _types.CompletionItemKind.Variable,
                                    type: argDef.type
                                };
                            }));
                        }
                    }
                    if ((kind === _parser.RuleKinds.OBJECT_VALUE || kind === _parser.RuleKinds.OBJECT_FIELD && step === 0) && typeInfo.objectFieldDefs) {
                        const objectFields = (0, _autocompleteUtils.objectValues)(typeInfo.objectFieldDefs);
                        const completionKind = kind === _parser.RuleKinds.OBJECT_VALUE ? _types.CompletionItemKind.Value : _types.CompletionItemKind.Field;
                        return (0, _autocompleteUtils.hintList)(token, objectFields.map(field => {
                            var _a;
                            return {
                                label: field.name,
                                detail: String(field.type),
                                documentation: (_a = field === null || field === void 0 ? void 0 : field.description) !== null && _a !== void 0 ? _a : undefined,
                                kind: completionKind,
                                type: field.type,
                                insertText: (0, _autocompleteUtils.getInputInsertText)(field.name + ': ', field.type),
                                insertTextMode: _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation,
                                insertTextFormat: _types.InsertTextFormat.Snippet,
                                command: SuggestionCommand
                            };
                        }));
                    }
                    if (kind === _parser.RuleKinds.ENUM_VALUE || kind === _parser.RuleKinds.LIST_VALUE && step === 1 || kind === _parser.RuleKinds.OBJECT_FIELD && step === 2 || kind === _parser.RuleKinds.ARGUMENT && step === 2) {
                        return getSuggestionsForInputValues(token, typeInfo, queryText, schema);
                    }
                    if (kind === _parser.RuleKinds.VARIABLE && step === 1) {
                        const namedInputType = (0, _graphql.getNamedType)(typeInfo.inputType);
                        const variableDefinitions = getVariableCompletions(queryText, schema, token);
                        return (0, _autocompleteUtils.hintList)(token, variableDefinitions.filter(v => v.detail === (namedInputType === null || namedInputType === void 0 ? void 0 : namedInputType.name)));
                    }
                    if (kind === _parser.RuleKinds.TYPE_CONDITION && step === 1 || kind === _parser.RuleKinds.NAMED_TYPE && prevState != null && prevState.kind === _parser.RuleKinds.TYPE_CONDITION) {
                        return getSuggestionsForFragmentTypeConditions(token, typeInfo, schema, kind);
                    }
                    if (kind === _parser.RuleKinds.FRAGMENT_SPREAD && step === 1) {
                        return getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, Array.isArray(fragmentDefs) ? fragmentDefs : collectFragmentDefs(fragmentDefs));
                    }
                    const unwrappedState = unwrapType(state);
                    if (unwrappedState.kind === _parser.RuleKinds.FIELD_DEF) {
                        return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isOutputType)(type) && !type.name.startsWith('__')).map(type => ({
                            label: type.name,
                            kind: _types.CompletionItemKind.Function,
                            insertText: (options === null || options === void 0 ? void 0 : options.fillLeafsOnComplete) ? type.name + '\n' : type.name,
                            insertTextMode: _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation
                        })));
                    }
                    if (unwrappedState.kind === _parser.RuleKinds.INPUT_VALUE_DEF && step === 2) {
                        return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isInputType)(type) && !type.name.startsWith('__')).map(type => ({
                            label: type.name,
                            kind: _types.CompletionItemKind.Function,
                            insertText: (options === null || options === void 0 ? void 0 : options.fillLeafsOnComplete) ? type.name + '\n$1' : type.name,
                            insertTextMode: _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation,
                            insertTextFormat: _types.InsertTextFormat.Snippet
                        })));
                    }
                    if (kind === _parser.RuleKinds.VARIABLE_DEFINITION && step === 2 || kind === _parser.RuleKinds.LIST_TYPE && step === 1 || kind === _parser.RuleKinds.NAMED_TYPE && prevState && (prevState.kind === _parser.RuleKinds.VARIABLE_DEFINITION || prevState.kind === _parser.RuleKinds.LIST_TYPE || prevState.kind === _parser.RuleKinds.NON_NULL_TYPE)) {
                        return getSuggestionsForVariableDefinition(token, schema, kind);
                    }
                    if (kind === _parser.RuleKinds.DIRECTIVE) {
                        return getSuggestionsForDirective(token, state, schema, kind);
                    }
                    if (kind === _parser.RuleKinds.DIRECTIVE_DEF) {
                        return getSuggestionsForDirectiveArguments(token, state, schema, kind);
                    }
                    return [];
                }
                const typeSystemCompletionItems = [{
                    label: 'type',
                    kind: _types.CompletionItemKind.Function
                }, {
                    label: 'interface',
                    kind: _types.CompletionItemKind.Function
                }, {
                    label: 'union',
                    kind: _types.CompletionItemKind.Function
                }, {
                    label: 'input',
                    kind: _types.CompletionItemKind.Function
                }, {
                    label: 'scalar',
                    kind: _types.CompletionItemKind.Function
                }, {
                    label: 'schema',
                    kind: _types.CompletionItemKind.Function
                }];
                const executableCompletionItems = [{
                    label: 'query',
                    kind: _types.CompletionItemKind.Function
                }, {
                    label: 'mutation',
                    kind: _types.CompletionItemKind.Function
                }, {
                    label: 'subscription',
                    kind: _types.CompletionItemKind.Function
                }, {
                    label: 'fragment',
                    kind: _types.CompletionItemKind.Function
                }, {
                    label: '{',
                    kind: _types.CompletionItemKind.Constructor
                }];

                function getSuggestionsForTypeSystemDefinitions(token) {
                    return (0, _autocompleteUtils.hintList)(token, [{
                        label: 'extend',
                        kind: _types.CompletionItemKind.Function
                    }, ...typeSystemCompletionItems]);
                }

                function getSuggestionsForExecutableDefinitions(token) {
                    return (0, _autocompleteUtils.hintList)(token, executableCompletionItems);
                }

                function getSuggestionsForUnknownDocumentMode(token) {
                    return (0, _autocompleteUtils.hintList)(token, [{
                        label: 'extend',
                        kind: _types.CompletionItemKind.Function
                    }, ...executableCompletionItems, ...typeSystemCompletionItems]);
                }

                function getSuggestionsForExtensionDefinitions(token) {
                    return (0, _autocompleteUtils.hintList)(token, typeSystemCompletionItems);
                }

                function getSuggestionsForFieldNames(token, typeInfo, options) {
                    var _a;
                    if (typeInfo.parentType) {
                        const {
                            parentType
                        } = typeInfo;
                        let fields = [];
                        if ('getFields' in parentType) {
                            fields = (0, _autocompleteUtils.objectValues)(parentType.getFields());
                        }
                        if ((0, _graphql.isCompositeType)(parentType)) {
                            fields.push(_graphql.TypeNameMetaFieldDef);
                        }
                        if (parentType === ((_a = options === null || options === void 0 ? void 0 : options.schema) === null || _a === void 0 ? void 0 : _a.getQueryType())) {
                            fields.push(_graphql.SchemaMetaFieldDef, _graphql.TypeMetaFieldDef);
                        }
                        return (0, _autocompleteUtils.hintList)(token, fields.map((field, index) => {
                            var _a;
                            const suggestion = {
                                sortText: String(index) + field.name,
                                label: field.name,
                                detail: String(field.type),
                                documentation: (_a = field.description) !== null && _a !== void 0 ? _a : undefined,
                                deprecated: Boolean(field.deprecationReason),
                                isDeprecated: Boolean(field.deprecationReason),
                                deprecationReason: field.deprecationReason,
                                kind: _types.CompletionItemKind.Field,
                                labelDetails: {
                                    detail: ' ' + field.type.toString()
                                },
                                type: field.type
                            };
                            if (options === null || options === void 0 ? void 0 : options.fillLeafsOnComplete) {
                                suggestion.insertText = (0, _autocompleteUtils.getFieldInsertText)(field);
                                if (!suggestion.insertText) {
                                    suggestion.insertText = (0, _autocompleteUtils.getInsertText)(field.name, field.type, field.name + (token.state.needsAdvance ? '' : '\n'));
                                }
                                if (suggestion.insertText) {
                                    suggestion.insertTextFormat = _types.InsertTextFormat.Snippet;
                                    suggestion.insertTextMode = _vscodeLanguageserverTypes.InsertTextMode.adjustIndentation;
                                    suggestion.command = SuggestionCommand;
                                }
                            }
                            return suggestion;
                        }));
                    }
                    return [];
                }

                function getSuggestionsForInputValues(token, typeInfo, queryText, schema) {
                    const namedInputType = (0, _graphql.getNamedType)(typeInfo.inputType);
                    const queryVariables = getVariableCompletions(queryText, schema, token).filter(v => v.detail === (namedInputType === null || namedInputType === void 0 ? void 0 : namedInputType.name));
                    if (namedInputType instanceof _graphql.GraphQLEnumType) {
                        const values = namedInputType.getValues();
                        return (0, _autocompleteUtils.hintList)(token, values.map(value => {
                            var _a;
                            return {
                                label: value.name,
                                detail: String(namedInputType),
                                documentation: (_a = value.description) !== null && _a !== void 0 ? _a : undefined,
                                deprecated: Boolean(value.deprecationReason),
                                isDeprecated: Boolean(value.deprecationReason),
                                deprecationReason: value.deprecationReason,
                                kind: _types.CompletionItemKind.EnumMember,
                                type: namedInputType
                            };
                        }).concat(queryVariables));
                    }
                    if (namedInputType === _graphql.GraphQLBoolean) {
                        return (0, _autocompleteUtils.hintList)(token, queryVariables.concat([{
                            label: 'true',
                            detail: String(_graphql.GraphQLBoolean),
                            documentation: 'Not false.',
                            kind: _types.CompletionItemKind.Variable,
                            type: _graphql.GraphQLBoolean
                        }, {
                            label: 'false',
                            detail: String(_graphql.GraphQLBoolean),
                            documentation: 'Not true.',
                            kind: _types.CompletionItemKind.Variable,
                            type: _graphql.GraphQLBoolean
                        }]));
                    }
                    return queryVariables;
                }

                function getSuggestionsForImplements(token, tokenState, schema, documentText, typeInfo) {
                    if (tokenState.needsSeparator) {
                        return [];
                    }
                    const typeMap = schema.getTypeMap();
                    const schemaInterfaces = (0, _autocompleteUtils.objectValues)(typeMap).filter(_graphql.isInterfaceType);
                    const schemaInterfaceNames = schemaInterfaces.map(({
                        name
                    }) => name);
                    const inlineInterfaces = new Set();
                    (0, _parser.runOnlineParser)(documentText, (_, state) => {
                        var _a, _b, _c, _d, _e;
                        if (state.name) {
                            if (state.kind === _parser.RuleKinds.INTERFACE_DEF && !schemaInterfaceNames.includes(state.name)) {
                                inlineInterfaces.add(state.name);
                            }
                            if (state.kind === _parser.RuleKinds.NAMED_TYPE && ((_a = state.prevState) === null || _a === void 0 ? void 0 : _a.kind) === _parser.RuleKinds.IMPLEMENTS) {
                                if (typeInfo.interfaceDef) {
                                    const existingType = (_b = typeInfo.interfaceDef) === null || _b === void 0 ? void 0 : _b.getInterfaces().find(({
                                        name
                                    }) => name === state.name);
                                    if (existingType) {
                                        return;
                                    }
                                    const type = schema.getType(state.name);
                                    const interfaceConfig = (_c = typeInfo.interfaceDef) === null || _c === void 0 ? void 0 : _c.toConfig();
                                    typeInfo.interfaceDef = new _graphql.GraphQLInterfaceType(Object.assign(Object.assign({}, interfaceConfig), {
                                        interfaces: [...interfaceConfig.interfaces, type || new _graphql.GraphQLInterfaceType({
                                            name: state.name,
                                            fields: {}
                                        })]
                                    }));
                                } else if (typeInfo.objectTypeDef) {
                                    const existingType = (_d = typeInfo.objectTypeDef) === null || _d === void 0 ? void 0 : _d.getInterfaces().find(({
                                        name
                                    }) => name === state.name);
                                    if (existingType) {
                                        return;
                                    }
                                    const type = schema.getType(state.name);
                                    const objectTypeConfig = (_e = typeInfo.objectTypeDef) === null || _e === void 0 ? void 0 : _e.toConfig();
                                    typeInfo.objectTypeDef = new _graphql.GraphQLObjectType(Object.assign(Object.assign({}, objectTypeConfig), {
                                        interfaces: [...objectTypeConfig.interfaces, type || new _graphql.GraphQLInterfaceType({
                                            name: state.name,
                                            fields: {}
                                        })]
                                    }));
                                }
                            }
                        }
                    });
                    const currentTypeToExtend = typeInfo.interfaceDef || typeInfo.objectTypeDef;
                    const siblingInterfaces = (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.getInterfaces()) || [];
                    const siblingInterfaceNames = siblingInterfaces.map(({
                        name
                    }) => name);
                    const possibleInterfaces = schemaInterfaces.concat([...inlineInterfaces].map(name => ({
                        name
                    }))).filter(({
                        name
                    }) => name !== (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.name) && !siblingInterfaceNames.includes(name));
                    return (0, _autocompleteUtils.hintList)(token, possibleInterfaces.map(type => {
                        const result = {
                            label: type.name,
                            kind: _types.CompletionItemKind.Interface,
                            type
                        };
                        if (type === null || type === void 0 ? void 0 : type.description) {
                            result.documentation = type.description;
                        }
                        return result;
                    }));
                }

                function getSuggestionsForFragmentTypeConditions(token, typeInfo, schema, _kind) {
                    let possibleTypes;
                    if (typeInfo.parentType) {
                        if ((0, _graphql.isAbstractType)(typeInfo.parentType)) {
                            const abstractType = (0, _graphql.assertAbstractType)(typeInfo.parentType);
                            const possibleObjTypes = schema.getPossibleTypes(abstractType);
                            const possibleIfaceMap = Object.create(null);
                            for (const type of possibleObjTypes) {
                                for (const iface of type.getInterfaces()) {
                                    possibleIfaceMap[iface.name] = iface;
                                }
                            }
                            possibleTypes = possibleObjTypes.concat((0, _autocompleteUtils.objectValues)(possibleIfaceMap));
                        } else {
                            possibleTypes = [typeInfo.parentType];
                        }
                    } else {
                        const typeMap = schema.getTypeMap();
                        possibleTypes = (0, _autocompleteUtils.objectValues)(typeMap).filter(type => (0, _graphql.isCompositeType)(type) && !type.name.startsWith('__'));
                    }
                    return (0, _autocompleteUtils.hintList)(token, possibleTypes.map(type => {
                        const namedType = (0, _graphql.getNamedType)(type);
                        return {
                            label: String(type),
                            documentation: (namedType === null || namedType === void 0 ? void 0 : namedType.description) || '',
                            kind: _types.CompletionItemKind.Field
                        };
                    }));
                }

                function getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, fragmentDefs) {
                    if (!queryText) {
                        return [];
                    }
                    const typeMap = schema.getTypeMap();
                    const defState = (0, _parser.getDefinitionState)(token.state);
                    const fragments = getFragmentDefinitions(queryText);
                    if (fragmentDefs && fragmentDefs.length > 0) {
                        fragments.push(...fragmentDefs);
                    }
                    const relevantFrags = fragments.filter(frag => typeMap[frag.typeCondition.name.value] && !(defState && defState.kind === _parser.RuleKinds.FRAGMENT_DEFINITION && defState.name === frag.name.value) && (0, _graphql.isCompositeType)(typeInfo.parentType) && (0, _graphql.isCompositeType)(typeMap[frag.typeCondition.name.value]) && (0, _graphql.doTypesOverlap)(schema, typeInfo.parentType, typeMap[frag.typeCondition.name.value]));
                    return (0, _autocompleteUtils.hintList)(token, relevantFrags.map(frag => ({
                        label: frag.name.value,
                        detail: String(typeMap[frag.typeCondition.name.value]),
                        documentation: `fragment ${frag.name.value} on ${frag.typeCondition.name.value}`,
                        labelDetails: {
                            detail: `fragment ${frag.name.value} on ${frag.typeCondition.name.value}`
                        },
                        kind: _types.CompletionItemKind.Field,
                        type: typeMap[frag.typeCondition.name.value]
                    })));
                }
                const getParentDefinition = (state, kind) => {
                    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
                    if (((_a = state.prevState) === null || _a === void 0 ? void 0 : _a.kind) === kind) {
                        return state.prevState;
                    }
                    if (((_c = (_b = state.prevState) === null || _b === void 0 ? void 0 : _b.prevState) === null || _c === void 0 ? void 0 : _c.kind) === kind) {
                        return state.prevState.prevState;
                    }
                    if (((_f = (_e = (_d = state.prevState) === null || _d === void 0 ? void 0 : _d.prevState) === null || _e === void 0 ? void 0 : _e.prevState) === null || _f === void 0 ? void 0 : _f.kind) === kind) {
                        return state.prevState.prevState.prevState;
                    }
                    if (((_k = (_j = (_h = (_g = state.prevState) === null || _g === void 0 ? void 0 : _g.prevState) === null || _h === void 0 ? void 0 : _h.prevState) === null || _j === void 0 ? void 0 : _j.prevState) === null || _k === void 0 ? void 0 : _k.kind) === kind) {
                        return state.prevState.prevState.prevState.prevState;
                    }
                };

                function getVariableCompletions(queryText, schema, token) {
                    let variableName = null;
                    let variableType;
                    const definitions = Object.create({});
                    (0, _parser.runOnlineParser)(queryText, (_, state) => {
                        var _a;
                        if ((state === null || state === void 0 ? void 0 : state.kind) === _parser.RuleKinds.VARIABLE && state.name) {
                            variableName = state.name;
                        }
                        if ((state === null || state === void 0 ? void 0 : state.kind) === _parser.RuleKinds.NAMED_TYPE && variableName) {
                            const parentDefinition = getParentDefinition(state, _parser.RuleKinds.TYPE);
                            if (parentDefinition === null || parentDefinition === void 0 ? void 0 : parentDefinition.type) {
                                variableType = schema.getType(parentDefinition === null || parentDefinition === void 0 ? void 0 : parentDefinition.type);
                            }
                        }
                        if (variableName && variableType && !definitions[variableName]) {
                            const replaceString = token.string === '$' || ((_a = token === null || token === void 0 ? void 0 : token.state) === null || _a === void 0 ? void 0 : _a.kind) === 'Variable' ? variableName : '$' + variableName;
                            definitions[variableName] = {
                                detail: variableType.toString(),
                                insertText: replaceString,
                                label: '$' + variableName,
                                rawInsert: replaceString,
                                type: variableType,
                                kind: _types.CompletionItemKind.Variable
                            };
                            variableName = null;
                            variableType = null;
                        }
                    });
                    return (0, _autocompleteUtils.objectValues)(definitions);
                }

                function getFragmentDefinitions(queryText) {
                    const fragmentDefs = [];
                    (0, _parser.runOnlineParser)(queryText, (_, state) => {
                        if (state.kind === _parser.RuleKinds.FRAGMENT_DEFINITION && state.name && state.type) {
                            fragmentDefs.push({
                                kind: _parser.RuleKinds.FRAGMENT_DEFINITION,
                                name: {
                                    kind: _graphql.Kind.NAME,
                                    value: state.name
                                },
                                selectionSet: {
                                    kind: _parser.RuleKinds.SELECTION_SET,
                                    selections: []
                                },
                                typeCondition: {
                                    kind: _parser.RuleKinds.NAMED_TYPE,
                                    name: {
                                        kind: _graphql.Kind.NAME,
                                        value: state.type
                                    }
                                }
                            });
                        }
                    });
                    return fragmentDefs;
                }

                function getSuggestionsForVariableDefinition(token, schema, _kind) {
                    const inputTypeMap = schema.getTypeMap();
                    const inputTypes = (0, _autocompleteUtils.objectValues)(inputTypeMap).filter(_graphql.isInputType);
                    return (0, _autocompleteUtils.hintList)(token, inputTypes.map(type => ({
                        label: type.name,
                        documentation: (type === null || type === void 0 ? void 0 : type.description) || '',
                        kind: _types.CompletionItemKind.Variable
                    })));
                }

                function getSuggestionsForDirective(token, state, schema, _kind) {
                    var _a;
                    if ((_a = state.prevState) === null || _a === void 0 ? void 0 : _a.kind) {
                        const directives = schema.getDirectives().filter(directive => canUseDirective(state.prevState, directive));
                        return (0, _autocompleteUtils.hintList)(token, directives.map(directive => ({
                            label: directive.name,
                            documentation: (directive === null || directive === void 0 ? void 0 : directive.description) || '',
                            kind: _types.CompletionItemKind.Function
                        })));
                    }
                    return [];
                }

                function getSuggestionsForDirectiveArguments(token, state, schema, _kind) {
                    const directive = schema.getDirectives().find(d => d.name === state.name);
                    return (0, _autocompleteUtils.hintList)(token, (directive === null || directive === void 0 ? void 0 : directive.args.map(arg => ({
                        label: arg.name,
                        documentation: arg.description || '',
                        kind: _types.CompletionItemKind.Field
                    }))) || []);
                }

                function canUseDirective(state, directive) {
                    if (!(state === null || state === void 0 ? void 0 : state.kind)) {
                        return false;
                    }
                    const {
                        kind,
                        prevState
                    } = state;
                    const {
                        locations
                    } = directive;
                    switch (kind) {
                        case _parser.RuleKinds.QUERY:
                            return locations.includes(_graphql.DirectiveLocation.QUERY);
                        case _parser.RuleKinds.MUTATION:
                            return locations.includes(_graphql.DirectiveLocation.MUTATION);
                        case _parser.RuleKinds.SUBSCRIPTION:
                            return locations.includes(_graphql.DirectiveLocation.SUBSCRIPTION);
                        case _parser.RuleKinds.FIELD:
                        case _parser.RuleKinds.ALIASED_FIELD:
                            return locations.includes(_graphql.DirectiveLocation.FIELD);
                        case _parser.RuleKinds.FRAGMENT_DEFINITION:
                            return locations.includes(_graphql.DirectiveLocation.FRAGMENT_DEFINITION);
                        case _parser.RuleKinds.FRAGMENT_SPREAD:
                            return locations.includes(_graphql.DirectiveLocation.FRAGMENT_SPREAD);
                        case _parser.RuleKinds.INLINE_FRAGMENT:
                            return locations.includes(_graphql.DirectiveLocation.INLINE_FRAGMENT);
                        case _parser.RuleKinds.SCHEMA_DEF:
                            return locations.includes(_graphql.DirectiveLocation.SCHEMA);
                        case _parser.RuleKinds.SCALAR_DEF:
                            return locations.includes(_graphql.DirectiveLocation.SCALAR);
                        case _parser.RuleKinds.OBJECT_TYPE_DEF:
                            return locations.includes(_graphql.DirectiveLocation.OBJECT);
                        case _parser.RuleKinds.FIELD_DEF:
                            return locations.includes(_graphql.DirectiveLocation.FIELD_DEFINITION);
                        case _parser.RuleKinds.INTERFACE_DEF:
                            return locations.includes(_graphql.DirectiveLocation.INTERFACE);
                        case _parser.RuleKinds.UNION_DEF:
                            return locations.includes(_graphql.DirectiveLocation.UNION);
                        case _parser.RuleKinds.ENUM_DEF:
                            return locations.includes(_graphql.DirectiveLocation.ENUM);
                        case _parser.RuleKinds.ENUM_VALUE:
                            return locations.includes(_graphql.DirectiveLocation.ENUM_VALUE);
                        case _parser.RuleKinds.INPUT_DEF:
                            return locations.includes(_graphql.DirectiveLocation.INPUT_OBJECT);
                        case _parser.RuleKinds.INPUT_VALUE_DEF:
                            const prevStateKind = prevState === null || prevState === void 0 ? void 0 : prevState.kind;
                            switch (prevStateKind) {
                                case _parser.RuleKinds.ARGUMENTS_DEF:
                                    return locations.includes(_graphql.DirectiveLocation.ARGUMENT_DEFINITION);
                                case _parser.RuleKinds.INPUT_DEF:
                                    return locations.includes(_graphql.DirectiveLocation.INPUT_FIELD_DEFINITION);
                            }
                    }
                    return false;
                }

                function unwrapType(state) {
                    if (state.prevState && state.kind && [_parser.RuleKinds.NAMED_TYPE, _parser.RuleKinds.LIST_TYPE, _parser.RuleKinds.TYPE, _parser.RuleKinds.NON_NULL_TYPE].includes(state.kind)) {
                        return unwrapType(state.prevState);
                    }
                    return state;
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/interface/getDefinition.js":
            /*!*********************************************************************!*\
              !*** ../../graphql-language-service/esm/interface/getDefinition.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.LANGUAGE = void 0;
                exports.getDefinitionQueryResultForArgument = getDefinitionQueryResultForArgument;
                exports.getDefinitionQueryResultForDefinitionNode = getDefinitionQueryResultForDefinitionNode;
                exports.getDefinitionQueryResultForField = getDefinitionQueryResultForField;
                exports.getDefinitionQueryResultForFragmentSpread = getDefinitionQueryResultForFragmentSpread;
                exports.getDefinitionQueryResultForNamedType = getDefinitionQueryResultForNamedType;
                var _utils = __webpack_require__( /*! ../utils */ "../../graphql-language-service/esm/utils/index.js");
                var __awaiter = void 0 && (void 0).__awaiter || function(thisArg, _arguments, P, generator) {
                    function adopt(value) {
                        return value instanceof P ? value : new P(function(resolve) {
                            resolve(value);
                        });
                    }
                    return new(P || (P = Promise))(function(resolve, reject) {
                        function fulfilled(value) {
                            try {
                                step(generator.next(value));
                            } catch (e) {
                                reject(e);
                            }
                        }

                        function rejected(value) {
                            try {
                                step(generator["throw"](value));
                            } catch (e) {
                                reject(e);
                            }
                        }

                        function step(result) {
                            result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
                        }
                        step((generator = generator.apply(thisArg, _arguments || [])).next());
                    });
                };
                const LANGUAGE = exports.LANGUAGE = 'GraphQL';

                function assert(value, message) {
                    if (!value) {
                        throw new Error(message);
                    }
                }

                function getRange(text, node) {
                    const location = node.loc;
                    assert(location, 'Expected ASTNode to have a location.');
                    return (0, _utils.locToRange)(text, location);
                }

                function getPosition(text, node) {
                    const location = node.loc;
                    assert(location, 'Expected ASTNode to have a location.');
                    return (0, _utils.offsetToPosition)(text, location.start);
                }

                function getDefinitionQueryResultForNamedType(text, node, dependencies) {
                    return __awaiter(this, void 0, void 0, function*() {
                        const name = node.name.value;
                        const defNodes = dependencies.filter(({
                            definition
                        }) => definition.name && definition.name.value === name);
                        if (defNodes.length === 0) {
                            throw new Error(`Definition not found for GraphQL type ${name}`);
                        }
                        const definitions = defNodes.map(({
                            filePath,
                            content,
                            definition
                        }) => getDefinitionForNodeDefinition(filePath || '', content, definition));
                        return {
                            definitions,
                            queryRange: definitions.map(_ => getRange(text, node)),
                            printedName: name
                        };
                    });
                }

                function getDefinitionQueryResultForField(fieldName, typeName, dependencies) {
                    var _a;
                    return __awaiter(this, void 0, void 0, function*() {
                        const defNodes = dependencies.filter(({
                            definition
                        }) => definition.name && definition.name.value === typeName);
                        if (defNodes.length === 0) {
                            throw new Error(`Definition not found for GraphQL type ${typeName}`);
                        }
                        const definitions = [];
                        for (const {
                                filePath,
                                content,
                                definition
                            }
                            of defNodes) {
                            const fieldDefinition = (_a = definition.fields) === null || _a === void 0 ? void 0 : _a.find(item => item.name.value === fieldName);
                            if (fieldDefinition == null) {
                                continue;
                            }
                            definitions.push(getDefinitionForFieldDefinition(filePath || '', content, fieldDefinition));
                        }
                        return {
                            definitions,
                            queryRange: [],
                            printedName: [typeName, fieldName].join('.')
                        };
                    });
                }

                function getDefinitionQueryResultForArgument(argumentName, fieldName, typeName, dependencies) {
                    var _a, _b, _c;
                    return __awaiter(this, void 0, void 0, function*() {
                        const definitions = [];
                        for (const {
                                filePath,
                                content,
                                definition
                            }
                            of dependencies) {
                            const argDefinition = (_c = (_b = (_a = definition.fields) === null || _a === void 0 ? void 0 : _a.find(item => item.name.value === fieldName)) === null || _b === void 0 ? void 0 : _b.arguments) === null || _c === void 0 ? void 0 : _c.find(item => item.name.value === argumentName);
                            if (argDefinition == null) {
                                continue;
                            }
                            definitions.push(getDefinitionForArgumentDefinition(filePath || '', content, argDefinition));
                        }
                        return {
                            definitions,
                            queryRange: [],
                            printedName: `${[typeName, fieldName].join('.')}(${argumentName})`
                        };
                    });
                }

                function getDefinitionQueryResultForFragmentSpread(text, fragment, dependencies) {
                    return __awaiter(this, void 0, void 0, function*() {
                        const name = fragment.name.value;
                        const defNodes = dependencies.filter(({
                            definition
                        }) => definition.name.value === name);
                        if (defNodes.length === 0) {
                            throw new Error(`Definition not found for GraphQL fragment ${name}`);
                        }
                        const definitions = defNodes.map(({
                            filePath,
                            content,
                            definition
                        }) => getDefinitionForFragmentDefinition(filePath || '', content, definition));
                        return {
                            definitions,
                            queryRange: definitions.map(_ => getRange(text, fragment)),
                            printedName: name
                        };
                    });
                }

                function getDefinitionQueryResultForDefinitionNode(path, text, definition) {
                    var _a;
                    return {
                        definitions: [getDefinitionForFragmentDefinition(path, text, definition)],
                        queryRange: definition.name ? [getRange(text, definition.name)] : [],
                        printedName: (_a = definition.name) === null || _a === void 0 ? void 0 : _a.value
                    };
                }

                function getDefinitionForFragmentDefinition(path, text, definition) {
                    const {
                        name
                    } = definition;
                    if (!name) {
                        throw new Error('Expected ASTNode to have a Name.');
                    }
                    return {
                        path,
                        position: getPosition(text, definition),
                        range: getRange(text, definition),
                        name: name.value || '',
                        language: LANGUAGE,
                        projectRoot: path
                    };
                }

                function getDefinitionForNodeDefinition(path, text, definition) {
                    const {
                        name
                    } = definition;
                    assert(name, 'Expected ASTNode to have a Name.');
                    return {
                        path,
                        position: getPosition(text, definition),
                        range: getRange(text, definition),
                        name: name.value || '',
                        language: LANGUAGE,
                        projectRoot: path
                    };
                }

                function getDefinitionForFieldDefinition(path, text, definition) {
                    const {
                        name
                    } = definition;
                    assert(name, 'Expected ASTNode to have a Name.');
                    return {
                        path,
                        position: getPosition(text, definition),
                        range: getRange(text, definition),
                        name: name.value || '',
                        language: LANGUAGE,
                        projectRoot: path
                    };
                }

                function getDefinitionForArgumentDefinition(path, text, definition) {
                    const {
                        name
                    } = definition;
                    assert(name, 'Expected ASTNode to have a Name.');
                    return {
                        path,
                        position: getPosition(text, definition),
                        range: getRange(text, definition),
                        name: name.value || '',
                        language: LANGUAGE,
                        projectRoot: path
                    };
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/interface/getDiagnostics.js":
            /*!**********************************************************************!*\
              !*** ../../graphql-language-service/esm/interface/getDiagnostics.js ***!
              \**********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.SEVERITY = exports.DIAGNOSTIC_SEVERITY = void 0;
                exports.getDiagnostics = getDiagnostics;
                exports.getRange = getRange;
                exports.validateQuery = validateQuery;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _parser = __webpack_require__( /*! ../parser */ "../../graphql-language-service/esm/parser/index.js");
                var _utils = __webpack_require__( /*! ../utils */ "../../graphql-language-service/esm/utils/index.js");
                const SEVERITY = exports.SEVERITY = {
                    Error: 'Error',
                    Warning: 'Warning',
                    Information: 'Information',
                    Hint: 'Hint'
                };
                const DIAGNOSTIC_SEVERITY = exports.DIAGNOSTIC_SEVERITY = {
                    [SEVERITY.Error]: 1,
                    [SEVERITY.Warning]: 2,
                    [SEVERITY.Information]: 3,
                    [SEVERITY.Hint]: 4
                };
                const invariant = (condition, message) => {
                    if (!condition) {
                        throw new Error(message);
                    }
                };

                function getDiagnostics(query, schema = null, customRules, isRelayCompatMode, externalFragments) {
                    var _a, _b;
                    let ast = null;
                    let fragments = '';
                    if (externalFragments) {
                        fragments = typeof externalFragments === 'string' ? externalFragments : externalFragments.reduce((acc, node) => acc + (0, _graphql.print)(node) + '\n\n', '');
                    }
                    const enhancedQuery = fragments ? `${query}\n\n${fragments}` : query;
                    try {
                        ast = (0, _graphql.parse)(enhancedQuery);
                    } catch (error) {
                        if (error instanceof _graphql.GraphQLError) {
                            const range = getRange((_b = (_a = error.locations) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : {
                                line: 0,
                                column: 0
                            }, enhancedQuery);
                            return [{
                                severity: DIAGNOSTIC_SEVERITY.Error,
                                message: error.message,
                                source: 'GraphQL: Syntax',
                                range
                            }];
                        }
                        throw error;
                    }
                    return validateQuery(ast, schema, customRules, isRelayCompatMode);
                }

                function validateQuery(ast, schema = null, customRules, isRelayCompatMode) {
                    if (!schema) {
                        return [];
                    }
                    const validationErrorAnnotations = (0, _utils.validateWithCustomRules)(schema, ast, customRules, isRelayCompatMode).flatMap(error => annotations(error, DIAGNOSTIC_SEVERITY.Error, 'Validation'));
                    const deprecationWarningAnnotations = (0, _graphql.validate)(schema, ast, [_graphql.NoDeprecatedCustomRule]).flatMap(error => annotations(error, DIAGNOSTIC_SEVERITY.Warning, 'Deprecation'));
                    return validationErrorAnnotations.concat(deprecationWarningAnnotations);
                }

                function annotations(error, severity, type) {
                    if (!error.nodes) {
                        return [];
                    }
                    const highlightedNodes = [];
                    for (const [i, node] of error.nodes.entries()) {
                        const highlightNode = node.kind !== 'Variable' && 'name' in node && node.name !== undefined ? node.name : 'variable' in node && node.variable !== undefined ? node.variable : node;
                        if (highlightNode) {
                            invariant(error.locations, 'GraphQL validation error requires locations.');
                            const loc = error.locations[i];
                            const highlightLoc = getLocation(highlightNode);
                            const end = loc.column + (highlightLoc.end - highlightLoc.start);
                            highlightedNodes.push({
                                source: `GraphQL: ${type}`,
                                message: error.message,
                                severity,
                                range: new _utils.Range(new _utils.Position(loc.line - 1, loc.column - 1), new _utils.Position(loc.line - 1, end))
                            });
                        }
                    }
                    return highlightedNodes;
                }

                function getRange(location, queryText) {
                    const parser = (0, _parser.onlineParser)();
                    const state = parser.startState();
                    const lines = queryText.split('\n');
                    invariant(lines.length >= location.line, 'Query text must have more lines than where the error happened');
                    let stream = null;
                    for (let i = 0; i < location.line; i++) {
                        stream = new _parser.CharacterStream(lines[i]);
                        while (!stream.eol()) {
                            const style = parser.token(stream, state);
                            if (style === 'invalidchar') {
                                break;
                            }
                        }
                    }
                    invariant(stream, 'Expected Parser stream to be available.');
                    const line = location.line - 1;
                    const start = stream.getStartOfToken();
                    const end = stream.getCurrentPosition();
                    return new _utils.Range(new _utils.Position(line, start), new _utils.Position(line, end));
                }

                function getLocation(node) {
                    const typeCastedNode = node;
                    const location = typeCastedNode.loc;
                    invariant(location, 'Expected ASTNode to have a location.');
                    return location;
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/interface/getHoverInformation.js":
            /*!***************************************************************************!*\
              !*** ../../graphql-language-service/esm/interface/getHoverInformation.js ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getHoverInformation = getHoverInformation;
                exports.renderArg = renderArg;
                exports.renderDirective = renderDirective;
                exports.renderEnumValue = renderEnumValue;
                exports.renderField = renderField;
                exports.renderType = renderType;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _parser = __webpack_require__( /*! ../parser */ "../../graphql-language-service/esm/parser/index.js");

                function getHoverInformation(schema, queryText, cursor, contextToken, config) {
                    const options = Object.assign(Object.assign({}, config), {
                        schema
                    });
                    const context = (0, _parser.getContextAtPosition)(queryText, cursor, schema, contextToken);
                    if (!context) {
                        return '';
                    }
                    const {
                        typeInfo,
                        token
                    } = context;
                    const {
                        kind,
                        step
                    } = token.state;
                    if (kind === 'Field' && step === 0 && typeInfo.fieldDef || kind === 'AliasedField' && step === 2 && typeInfo.fieldDef || kind === 'ObjectField' && step === 0 && typeInfo.fieldDef) {
                        const into = [];
                        renderMdCodeStart(into, options);
                        renderField(into, typeInfo, options);
                        renderMdCodeEnd(into, options);
                        renderDescription(into, options, typeInfo.fieldDef);
                        return into.join('').trim();
                    }
                    if (kind === 'Directive' && step === 1 && typeInfo.directiveDef) {
                        const into = [];
                        renderMdCodeStart(into, options);
                        renderDirective(into, typeInfo, options);
                        renderMdCodeEnd(into, options);
                        renderDescription(into, options, typeInfo.directiveDef);
                        return into.join('').trim();
                    }
                    if (kind === 'Variable' && typeInfo.type) {
                        const into = [];
                        renderMdCodeStart(into, options);
                        renderType(into, typeInfo, options, typeInfo.type);
                        renderMdCodeEnd(into, options);
                        renderDescription(into, options, typeInfo.type);
                        return into.join('').trim();
                    }
                    if (kind === 'Argument' && step === 0 && typeInfo.argDef) {
                        const into = [];
                        renderMdCodeStart(into, options);
                        renderArg(into, typeInfo, options);
                        renderMdCodeEnd(into, options);
                        renderDescription(into, options, typeInfo.argDef);
                        return into.join('').trim();
                    }
                    if (kind === 'EnumValue' && typeInfo.enumValue && 'description' in typeInfo.enumValue) {
                        const into = [];
                        renderMdCodeStart(into, options);
                        renderEnumValue(into, typeInfo, options);
                        renderMdCodeEnd(into, options);
                        renderDescription(into, options, typeInfo.enumValue);
                        return into.join('').trim();
                    }
                    if (kind === 'NamedType' && typeInfo.type && 'description' in typeInfo.type) {
                        const into = [];
                        renderMdCodeStart(into, options);
                        renderType(into, typeInfo, options, typeInfo.type);
                        renderMdCodeEnd(into, options);
                        renderDescription(into, options, typeInfo.type);
                        return into.join('').trim();
                    }
                    return '';
                }

                function renderMdCodeStart(into, options) {
                    if (options.useMarkdown) {
                        text(into, '```graphql\n');
                    }
                }

                function renderMdCodeEnd(into, options) {
                    if (options.useMarkdown) {
                        text(into, '\n```');
                    }
                }

                function renderField(into, typeInfo, options) {
                    renderQualifiedField(into, typeInfo, options);
                    renderTypeAnnotation(into, typeInfo, options, typeInfo.type);
                }

                function renderQualifiedField(into, typeInfo, options) {
                    if (!typeInfo.fieldDef) {
                        return;
                    }
                    const fieldName = typeInfo.fieldDef.name;
                    if (fieldName.slice(0, 2) !== '__') {
                        renderType(into, typeInfo, options, typeInfo.parentType);
                        text(into, '.');
                    }
                    text(into, fieldName);
                }

                function renderDirective(into, typeInfo, _options) {
                    if (!typeInfo.directiveDef) {
                        return;
                    }
                    const name = '@' + typeInfo.directiveDef.name;
                    text(into, name);
                }

                function renderArg(into, typeInfo, options) {
                    if (typeInfo.directiveDef) {
                        renderDirective(into, typeInfo, options);
                    } else if (typeInfo.fieldDef) {
                        renderQualifiedField(into, typeInfo, options);
                    }
                    if (!typeInfo.argDef) {
                        return;
                    }
                    const {
                        name
                    } = typeInfo.argDef;
                    text(into, '(');
                    text(into, name);
                    renderTypeAnnotation(into, typeInfo, options, typeInfo.inputType);
                    text(into, ')');
                }

                function renderTypeAnnotation(into, typeInfo, options, t) {
                    text(into, ': ');
                    renderType(into, typeInfo, options, t);
                }

                function renderEnumValue(into, typeInfo, options) {
                    if (!typeInfo.enumValue) {
                        return;
                    }
                    const {
                        name
                    } = typeInfo.enumValue;
                    renderType(into, typeInfo, options, typeInfo.inputType);
                    text(into, '.');
                    text(into, name);
                }

                function renderType(into, typeInfo, options, t) {
                    if (!t) {
                        return;
                    }
                    if (t instanceof _graphql.GraphQLNonNull) {
                        renderType(into, typeInfo, options, t.ofType);
                        text(into, '!');
                    } else if (t instanceof _graphql.GraphQLList) {
                        text(into, '[');
                        renderType(into, typeInfo, options, t.ofType);
                        text(into, ']');
                    } else {
                        text(into, t.name);
                    }
                }

                function renderDescription(into, options, def) {
                    if (!def) {
                        return;
                    }
                    const description = typeof def.description === 'string' ? def.description : null;
                    if (description) {
                        text(into, '\n\n');
                        text(into, description);
                    }
                    renderDeprecation(into, options, def);
                }

                function renderDeprecation(into, _options, def) {
                    if (!def) {
                        return;
                    }
                    const reason = def.deprecationReason || null;
                    if (!reason) {
                        return;
                    }
                    text(into, '\n\n');
                    text(into, 'Deprecated: ');
                    text(into, reason);
                }

                function text(into, content) {
                    into.push(content);
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/interface/getOutline.js":
            /*!******************************************************************!*\
              !*** ../../graphql-language-service/esm/interface/getOutline.js ***!
              \******************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getOutline = getOutline;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _utils = __webpack_require__( /*! ../utils */ "../../graphql-language-service/esm/utils/index.js");
                const {
                    INLINE_FRAGMENT
                } = _graphql.Kind;
                const OUTLINEABLE_KINDS = {
                    Field: true,
                    OperationDefinition: true,
                    Document: true,
                    SelectionSet: true,
                    Name: true,
                    FragmentDefinition: true,
                    FragmentSpread: true,
                    InlineFragment: true,
                    ObjectTypeDefinition: true,
                    InputObjectTypeDefinition: true,
                    InterfaceTypeDefinition: true,
                    EnumTypeDefinition: true,
                    EnumValueDefinition: true,
                    InputValueDefinition: true,
                    FieldDefinition: true
                };

                function getOutline(documentText) {
                    let ast;
                    try {
                        ast = (0, _graphql.parse)(documentText);
                    } catch (_a) {
                        return null;
                    }
                    const visitorFns = outlineTreeConverter(documentText);
                    const outlineTrees = (0, _graphql.visit)(ast, {
                        leave(node) {
                            if (visitorFns !== undefined && node.kind in visitorFns) {
                                return visitorFns[node.kind](node);
                            }
                            return null;
                        }
                    });
                    return {
                        outlineTrees
                    };
                }

                function outlineTreeConverter(docText) {
                    const meta = node => {
                        return {
                            representativeName: node.name,
                            startPosition: (0, _utils.offsetToPosition)(docText, node.loc.start),
                            endPosition: (0, _utils.offsetToPosition)(docText, node.loc.end),
                            kind: node.kind,
                            children: node.selectionSet || node.fields || node.values || node.arguments || []
                        };
                    };
                    return {
                        Field(node) {
                            const tokenizedText = node.alias ? [buildToken('plain', node.alias), buildToken('plain', ': ')] : [];
                            tokenizedText.push(buildToken('plain', node.name));
                            return Object.assign({
                                tokenizedText
                            }, meta(node));
                        },
                        OperationDefinition: node => Object.assign({
                            tokenizedText: [buildToken('keyword', node.operation), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
                        }, meta(node)),
                        Document: node => node.definitions,
                        SelectionSet: node => concatMap(node.selections, child => {
                            return child.kind === INLINE_FRAGMENT ? child.selectionSet : child;
                        }),
                        Name: node => node.value,
                        FragmentDefinition: node => Object.assign({
                            tokenizedText: [buildToken('keyword', 'fragment'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
                        }, meta(node)),
                        InterfaceTypeDefinition: node => Object.assign({
                            tokenizedText: [buildToken('keyword', 'interface'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
                        }, meta(node)),
                        EnumTypeDefinition: node => Object.assign({
                            tokenizedText: [buildToken('keyword', 'enum'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
                        }, meta(node)),
                        EnumValueDefinition: node => Object.assign({
                            tokenizedText: [buildToken('plain', node.name)]
                        }, meta(node)),
                        ObjectTypeDefinition: node => Object.assign({
                            tokenizedText: [buildToken('keyword', 'type'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
                        }, meta(node)),
                        InputObjectTypeDefinition: node => Object.assign({
                            tokenizedText: [buildToken('keyword', 'input'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
                        }, meta(node)),
                        FragmentSpread: node => Object.assign({
                            tokenizedText: [buildToken('plain', '...'), buildToken('class-name', node.name)]
                        }, meta(node)),
                        InputValueDefinition(node) {
                            return Object.assign({
                                tokenizedText: [buildToken('plain', node.name)]
                            }, meta(node));
                        },
                        FieldDefinition(node) {
                            return Object.assign({
                                tokenizedText: [buildToken('plain', node.name)]
                            }, meta(node));
                        },
                        InlineFragment: node => node.selectionSet
                    };
                }

                function buildToken(kind, value) {
                    return {
                        kind,
                        value
                    };
                }

                function concatMap(arr, fn) {
                    const res = [];
                    for (let i = 0; i < arr.length; i++) {
                        const x = fn(arr[i], i);
                        if (Array.isArray(x)) {
                            res.push(...x);
                        } else {
                            res.push(x);
                        }
                    }
                    return res;
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/interface/index.js":
            /*!*************************************************************!*\
              !*** ../../graphql-language-service/esm/interface/index.js ***!
              \*************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                var _exportNames = {
                    getOutline: true,
                    getHoverInformation: true
                };
                Object.defineProperty(exports, "getHoverInformation", ({
                    enumerable: true,
                    get: function() {
                        return _getHoverInformation.getHoverInformation;
                    }
                }));
                Object.defineProperty(exports, "getOutline", ({
                    enumerable: true,
                    get: function() {
                        return _getOutline.getOutline;
                    }
                }));
                var _autocompleteUtils = __webpack_require__( /*! ./autocompleteUtils */ "../../graphql-language-service/esm/interface/autocompleteUtils.js");
                Object.keys(_autocompleteUtils).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
                    if (key in exports && exports[key] === _autocompleteUtils[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _autocompleteUtils[key];
                        }
                    });
                });
                var _getAutocompleteSuggestions = __webpack_require__( /*! ./getAutocompleteSuggestions */ "../../graphql-language-service/esm/interface/getAutocompleteSuggestions.js");
                Object.keys(_getAutocompleteSuggestions).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
                    if (key in exports && exports[key] === _getAutocompleteSuggestions[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _getAutocompleteSuggestions[key];
                        }
                    });
                });
                var _getDefinition = __webpack_require__( /*! ./getDefinition */ "../../graphql-language-service/esm/interface/getDefinition.js");
                Object.keys(_getDefinition).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
                    if (key in exports && exports[key] === _getDefinition[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _getDefinition[key];
                        }
                    });
                });
                var _getDiagnostics = __webpack_require__( /*! ./getDiagnostics */ "../../graphql-language-service/esm/interface/getDiagnostics.js");
                Object.keys(_getDiagnostics).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
                    if (key in exports && exports[key] === _getDiagnostics[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _getDiagnostics[key];
                        }
                    });
                });
                var _getOutline = __webpack_require__( /*! ./getOutline */ "../../graphql-language-service/esm/interface/getOutline.js");
                var _getHoverInformation = __webpack_require__( /*! ./getHoverInformation */ "../../graphql-language-service/esm/interface/getHoverInformation.js");

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/parser/CharacterStream.js":
            /*!********************************************************************!*\
              !*** ../../graphql-language-service/esm/parser/CharacterStream.js ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = void 0;
                class CharacterStream {
                    constructor(sourceText) {
                        this._start = 0;
                        this._pos = 0;
                        this.getStartOfToken = () => this._start;
                        this.getCurrentPosition = () => this._pos;
                        this.eol = () => this._sourceText.length === this._pos;
                        this.sol = () => this._pos === 0;
                        this.peek = () => {
                            return this._sourceText.charAt(this._pos) || null;
                        };
                        this.next = () => {
                            const char = this._sourceText.charAt(this._pos);
                            this._pos++;
                            return char;
                        };
                        this.eat = pattern => {
                            const isMatched = this._testNextCharacter(pattern);
                            if (isMatched) {
                                this._start = this._pos;
                                this._pos++;
                                return this._sourceText.charAt(this._pos - 1);
                            }
                            return undefined;
                        };
                        this.eatWhile = match => {
                            let isMatched = this._testNextCharacter(match);
                            let didEat = false;
                            if (isMatched) {
                                didEat = isMatched;
                                this._start = this._pos;
                            }
                            while (isMatched) {
                                this._pos++;
                                isMatched = this._testNextCharacter(match);
                                didEat = true;
                            }
                            return didEat;
                        };
                        this.eatSpace = () => this.eatWhile(/[\s\u00a0]/);
                        this.skipToEnd = () => {
                            this._pos = this._sourceText.length;
                        };
                        this.skipTo = position => {
                            this._pos = position;
                        };
                        this.match = (pattern, consume = true, caseFold = false) => {
                            let token = null;
                            let match = null;
                            if (typeof pattern === 'string') {
                                const regex = new RegExp(pattern, caseFold ? 'i' : 'g');
                                match = regex.test(this._sourceText.slice(this._pos, this._pos + pattern.length));
                                token = pattern;
                            } else if (pattern instanceof RegExp) {
                                match = this._sourceText.slice(this._pos).match(pattern);
                                token = match === null || match === void 0 ? void 0 : match[0];
                            }
                            if (match != null && (typeof pattern === 'string' || match instanceof Array && this._sourceText.startsWith(match[0], this._pos))) {
                                if (consume) {
                                    this._start = this._pos;
                                    if (token && token.length) {
                                        this._pos += token.length;
                                    }
                                }
                                return match;
                            }
                            return false;
                        };
                        this.backUp = num => {
                            this._pos -= num;
                        };
                        this.column = () => this._pos;
                        this.indentation = () => {
                            const match = this._sourceText.match(/\s*/);
                            let indent = 0;
                            if (match && match.length !== 0) {
                                const whiteSpaces = match[0];
                                let pos = 0;
                                while (whiteSpaces.length > pos) {
                                    if (whiteSpaces.charCodeAt(pos) === 9) {
                                        indent += 2;
                                    } else {
                                        indent++;
                                    }
                                    pos++;
                                }
                            }
                            return indent;
                        };
                        this.current = () => this._sourceText.slice(this._start, this._pos);
                        this._sourceText = sourceText;
                    }
                    _testNextCharacter(pattern) {
                        const character = this._sourceText.charAt(this._pos);
                        let isMatched = false;
                        if (typeof pattern === 'string') {
                            isMatched = character === pattern;
                        } else {
                            isMatched = pattern instanceof RegExp ? pattern.test(character) : pattern(character);
                        }
                        return isMatched;
                    }
                }
                exports["default"] = CharacterStream;

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/parser/RuleHelpers.js":
            /*!****************************************************************!*\
              !*** ../../graphql-language-service/esm/parser/RuleHelpers.js ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.butNot = butNot;
                exports.list = list;
                exports.opt = opt;
                exports.p = p;
                exports.t = t;

                function opt(ofRule) {
                    return {
                        ofRule
                    };
                }

                function list(ofRule, separator) {
                    return {
                        ofRule,
                        isList: true,
                        separator
                    };
                }

                function butNot(rule, exclusions) {
                    const ruleMatch = rule.match;
                    rule.match = token => {
                        let check = false;
                        if (ruleMatch) {
                            check = ruleMatch(token);
                        }
                        return check && exclusions.every(exclusion => exclusion.match && !exclusion.match(token));
                    };
                    return rule;
                }

                function t(kind, style) {
                    return {
                        style,
                        match: token => token.kind === kind
                    };
                }

                function p(value, style) {
                    return {
                        style: style || 'punctuation',
                        match: token => token.kind === 'Punctuation' && token.value === value
                    };
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/parser/Rules.js":
            /*!**********************************************************!*\
              !*** ../../graphql-language-service/esm/parser/Rules.js ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.isIgnored = exports.ParseRules = exports.LexRules = void 0;
                var _RuleHelpers = __webpack_require__( /*! ./RuleHelpers */ "../../graphql-language-service/esm/parser/RuleHelpers.js");
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                const isIgnored = ch => ch === ' ' || ch === '\t' || ch === ',' || ch === '\n' || ch === '\r' || ch === '\uFEFF' || ch === '\u00A0';
                exports.isIgnored = isIgnored;
                const LexRules = exports.LexRules = {
                    Name: /^[_A-Za-z][_0-9A-Za-z]*/,
                    Punctuation: /^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,
                    Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
                    String: /^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,
                    Comment: /^#.*/
                };
                const ParseRules = exports.ParseRules = {
                    Document: [(0, _RuleHelpers.list)('Definition')],
                    Definition(token) {
                        switch (token.value) {
                            case '{':
                                return 'ShortQuery';
                            case 'query':
                                return 'Query';
                            case 'mutation':
                                return 'Mutation';
                            case 'subscription':
                                return 'Subscription';
                            case 'fragment':
                                return _graphql.Kind.FRAGMENT_DEFINITION;
                            case 'schema':
                                return 'SchemaDef';
                            case 'scalar':
                                return 'ScalarDef';
                            case 'type':
                                return 'ObjectTypeDef';
                            case 'interface':
                                return 'InterfaceDef';
                            case 'union':
                                return 'UnionDef';
                            case 'enum':
                                return 'EnumDef';
                            case 'input':
                                return 'InputDef';
                            case 'extend':
                                return 'ExtendDef';
                            case 'directive':
                                return 'DirectiveDef';
                        }
                    },
                    ShortQuery: ['SelectionSet'],
                    Query: [word('query'), (0, _RuleHelpers.opt)(name('def')), (0, _RuleHelpers.opt)('VariableDefinitions'), (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
                    Mutation: [word('mutation'), (0, _RuleHelpers.opt)(name('def')), (0, _RuleHelpers.opt)('VariableDefinitions'), (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
                    Subscription: [word('subscription'), (0, _RuleHelpers.opt)(name('def')), (0, _RuleHelpers.opt)('VariableDefinitions'), (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
                    VariableDefinitions: [(0, _RuleHelpers.p)('('), (0, _RuleHelpers.list)('VariableDefinition'), (0, _RuleHelpers.p)(')')],
                    VariableDefinition: ['Variable', (0, _RuleHelpers.p)(':'), 'Type', (0, _RuleHelpers.opt)('DefaultValue')],
                    Variable: [(0, _RuleHelpers.p)('$', 'variable'), name('variable')],
                    DefaultValue: [(0, _RuleHelpers.p)('='), 'Value'],
                    SelectionSet: [(0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('Selection'), (0, _RuleHelpers.p)('}')],
                    Selection(token, stream) {
                        return token.value === '...' ? stream.match(/[\s\u00a0,]*(on\b|@|{)/, false) ? 'InlineFragment' : 'FragmentSpread' : stream.match(/[\s\u00a0,]*:/, false) ? 'AliasedField' : 'Field';
                    },
                    AliasedField: [name('property'), (0, _RuleHelpers.p)(':'), name('qualifier'), (0, _RuleHelpers.opt)('Arguments'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.opt)('SelectionSet')],
                    Field: [name('property'), (0, _RuleHelpers.opt)('Arguments'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.opt)('SelectionSet')],
                    Arguments: [(0, _RuleHelpers.p)('('), (0, _RuleHelpers.list)('Argument'), (0, _RuleHelpers.p)(')')],
                    Argument: [name('attribute'), (0, _RuleHelpers.p)(':'), 'Value'],
                    FragmentSpread: [(0, _RuleHelpers.p)('...'), name('def'), (0, _RuleHelpers.list)('Directive')],
                    InlineFragment: [(0, _RuleHelpers.p)('...'), (0, _RuleHelpers.opt)('TypeCondition'), (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
                    FragmentDefinition: [word('fragment'), (0, _RuleHelpers.opt)((0, _RuleHelpers.butNot)(name('def'), [word('on')])), 'TypeCondition', (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
                    TypeCondition: [word('on'), 'NamedType'],
                    Value(token) {
                        switch (token.kind) {
                            case 'Number':
                                return 'NumberValue';
                            case 'String':
                                return 'StringValue';
                            case 'Punctuation':
                                switch (token.value) {
                                    case '[':
                                        return 'ListValue';
                                    case '{':
                                        return 'ObjectValue';
                                    case '$':
                                        return 'Variable';
                                    case '&':
                                        return 'NamedType';
                                }
                                return null;
                            case 'Name':
                                switch (token.value) {
                                    case 'true':
                                    case 'false':
                                        return 'BooleanValue';
                                }
                                if (token.value === 'null') {
                                    return 'NullValue';
                                }
                                return 'EnumValue';
                        }
                    },
                    NumberValue: [(0, _RuleHelpers.t)('Number', 'number')],
                    StringValue: [{
                        style: 'string',
                        match: token => token.kind === 'String',
                        update(state, token) {
                            if (token.value.startsWith('"""')) {
                                state.inBlockstring = !token.value.slice(3).endsWith('"""');
                            }
                        }
                    }],
                    BooleanValue: [(0, _RuleHelpers.t)('Name', 'builtin')],
                    NullValue: [(0, _RuleHelpers.t)('Name', 'keyword')],
                    EnumValue: [name('string-2')],
                    ListValue: [(0, _RuleHelpers.p)('['), (0, _RuleHelpers.list)('Value'), (0, _RuleHelpers.p)(']')],
                    ObjectValue: [(0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('ObjectField'), (0, _RuleHelpers.p)('}')],
                    ObjectField: [name('attribute'), (0, _RuleHelpers.p)(':'), 'Value'],
                    Type(token) {
                        return token.value === '[' ? 'ListType' : 'NonNullType';
                    },
                    ListType: [(0, _RuleHelpers.p)('['), 'Type', (0, _RuleHelpers.p)(']'), (0, _RuleHelpers.opt)((0, _RuleHelpers.p)('!'))],
                    NonNullType: ['NamedType', (0, _RuleHelpers.opt)((0, _RuleHelpers.p)('!'))],
                    NamedType: [type('atom')],
                    Directive: [(0, _RuleHelpers.p)('@', 'meta'), name('meta'), (0, _RuleHelpers.opt)('Arguments')],
                    DirectiveDef: [word('directive'), (0, _RuleHelpers.p)('@', 'meta'), name('meta'), (0, _RuleHelpers.opt)('ArgumentsDef'), word('on'), (0, _RuleHelpers.list)('DirectiveLocation', (0, _RuleHelpers.p)('|'))],
                    InterfaceDef: [word('interface'), name('atom'), (0, _RuleHelpers.opt)('Implements'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('FieldDef'), (0, _RuleHelpers.p)('}')],
                    Implements: [word('implements'), (0, _RuleHelpers.list)('NamedType', (0, _RuleHelpers.p)('&'))],
                    DirectiveLocation: [name('string-2')],
                    SchemaDef: [word('schema'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('OperationTypeDef'), (0, _RuleHelpers.p)('}')],
                    OperationTypeDef: [name('keyword'), (0, _RuleHelpers.p)(':'), name('atom')],
                    ScalarDef: [word('scalar'), name('atom'), (0, _RuleHelpers.list)('Directive')],
                    ObjectTypeDef: [word('type'), name('atom'), (0, _RuleHelpers.opt)('Implements'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('FieldDef'), (0, _RuleHelpers.p)('}')],
                    FieldDef: [name('property'), (0, _RuleHelpers.opt)('ArgumentsDef'), (0, _RuleHelpers.p)(':'), 'Type', (0, _RuleHelpers.list)('Directive')],
                    ArgumentsDef: [(0, _RuleHelpers.p)('('), (0, _RuleHelpers.list)('InputValueDef'), (0, _RuleHelpers.p)(')')],
                    InputValueDef: [name('attribute'), (0, _RuleHelpers.p)(':'), 'Type', (0, _RuleHelpers.opt)('DefaultValue'), (0, _RuleHelpers.list)('Directive')],
                    UnionDef: [word('union'), name('atom'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('='), (0, _RuleHelpers.list)('UnionMember', (0, _RuleHelpers.p)('|'))],
                    UnionMember: ['NamedType'],
                    EnumDef: [word('enum'), name('atom'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('EnumValueDef'), (0, _RuleHelpers.p)('}')],
                    EnumValueDef: [name('string-2'), (0, _RuleHelpers.list)('Directive')],
                    InputDef: [word('input'), name('atom'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('InputValueDef'), (0, _RuleHelpers.p)('}')],
                    ExtendDef: [word('extend'), 'ExtensionDefinition'],
                    ExtensionDefinition(token) {
                        switch (token.value) {
                            case 'schema':
                                return _graphql.Kind.SCHEMA_EXTENSION;
                            case 'scalar':
                                return _graphql.Kind.SCALAR_TYPE_EXTENSION;
                            case 'type':
                                return _graphql.Kind.OBJECT_TYPE_EXTENSION;
                            case 'interface':
                                return _graphql.Kind.INTERFACE_TYPE_EXTENSION;
                            case 'union':
                                return _graphql.Kind.UNION_TYPE_EXTENSION;
                            case 'enum':
                                return _graphql.Kind.ENUM_TYPE_EXTENSION;
                            case 'input':
                                return _graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION;
                        }
                    },
                    [_graphql.Kind.SCHEMA_EXTENSION]: ['SchemaDef'],
                    [_graphql.Kind.SCALAR_TYPE_EXTENSION]: ['ScalarDef'],
                    [_graphql.Kind.OBJECT_TYPE_EXTENSION]: ['ObjectTypeDef'],
                    [_graphql.Kind.INTERFACE_TYPE_EXTENSION]: ['InterfaceDef'],
                    [_graphql.Kind.UNION_TYPE_EXTENSION]: ['UnionDef'],
                    [_graphql.Kind.ENUM_TYPE_EXTENSION]: ['EnumDef'],
                    [_graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION]: ['InputDef']
                };

                function word(value) {
                    return {
                        style: 'keyword',
                        match: token => token.kind === 'Name' && token.value === value
                    };
                }

                function name(style) {
                    return {
                        style,
                        match: token => token.kind === 'Name',
                        update(state, token) {
                            state.name = token.value;
                        }
                    };
                }

                function type(style) {
                    return {
                        style,
                        match: token => token.kind === 'Name',
                        update(state, token) {
                            var _a;
                            if ((_a = state.prevState) === null || _a === void 0 ? void 0 : _a.prevState) {
                                state.name = token.value;
                                state.prevState.prevState.type = token.value;
                            }
                        }
                    };
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/parser/api.js":
            /*!********************************************************!*\
              !*** ../../graphql-language-service/esm/parser/api.js ***!
              \********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.TYPE_SYSTEM_KINDS = exports.GraphQLDocumentMode = void 0;
                exports.getContextAtPosition = getContextAtPosition;
                exports.getDocumentMode = getDocumentMode;
                exports.getTokenAtPosition = getTokenAtPosition;
                exports.runOnlineParser = runOnlineParser;
                var _ = __webpack_require__( /*! . */ "../../graphql-language-service/esm/parser/index.js");
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");

                function runOnlineParser(queryText, callback) {
                    const lines = queryText.split('\n');
                    const parser = (0, _.onlineParser)();
                    let state = parser.startState();
                    let style = '';
                    let stream = new _.CharacterStream('');
                    for (let i = 0; i < lines.length; i++) {
                        stream = new _.CharacterStream(lines[i]);
                        while (!stream.eol()) {
                            style = parser.token(stream, state);
                            const code = callback(stream, state, style, i);
                            if (code === 'BREAK') {
                                break;
                            }
                        }
                        callback(stream, state, style, i);
                        if (!state.kind) {
                            state = parser.startState();
                        }
                    }
                    return {
                        start: stream.getStartOfToken(),
                        end: stream.getCurrentPosition(),
                        string: stream.current(),
                        state,
                        style
                    };
                }
                var GraphQLDocumentMode;
                (function(GraphQLDocumentMode) {
                    GraphQLDocumentMode["TYPE_SYSTEM"] = "TYPE_SYSTEM";
                    GraphQLDocumentMode["EXECUTABLE"] = "EXECUTABLE";
                    GraphQLDocumentMode["UNKNOWN"] = "UNKNOWN";
                })(GraphQLDocumentMode || (exports.GraphQLDocumentMode = GraphQLDocumentMode = {}));
                const TYPE_SYSTEM_KINDS = exports.TYPE_SYSTEM_KINDS = [_graphql.Kind.SCHEMA_DEFINITION, _graphql.Kind.OPERATION_TYPE_DEFINITION, _graphql.Kind.SCALAR_TYPE_DEFINITION, _graphql.Kind.OBJECT_TYPE_DEFINITION, _graphql.Kind.INTERFACE_TYPE_DEFINITION, _graphql.Kind.UNION_TYPE_DEFINITION, _graphql.Kind.ENUM_TYPE_DEFINITION, _graphql.Kind.INPUT_OBJECT_TYPE_DEFINITION, _graphql.Kind.DIRECTIVE_DEFINITION, _graphql.Kind.SCHEMA_EXTENSION, _graphql.Kind.SCALAR_TYPE_EXTENSION, _graphql.Kind.OBJECT_TYPE_EXTENSION, _graphql.Kind.INTERFACE_TYPE_EXTENSION, _graphql.Kind.UNION_TYPE_EXTENSION, _graphql.Kind.ENUM_TYPE_EXTENSION, _graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION];
                const getParsedMode = sdl => {
                    let mode = GraphQLDocumentMode.UNKNOWN;
                    if (sdl) {
                        try {
                            (0, _graphql.visit)((0, _graphql.parse)(sdl), {
                                enter(node) {
                                    if (node.kind === 'Document') {
                                        mode = GraphQLDocumentMode.EXECUTABLE;
                                        return;
                                    }
                                    if (TYPE_SYSTEM_KINDS.includes(node.kind)) {
                                        mode = GraphQLDocumentMode.TYPE_SYSTEM;
                                        return _graphql.BREAK;
                                    }
                                    return false;
                                }
                            });
                        } catch (_a) {
                            return mode;
                        }
                    }
                    return mode;
                };

                function getDocumentMode(documentText, uri) {
                    if (uri === null || uri === void 0 ? void 0 : uri.endsWith('.graphqls')) {
                        return GraphQLDocumentMode.TYPE_SYSTEM;
                    }
                    return getParsedMode(documentText);
                }

                function getTokenAtPosition(queryText, cursor, offset = 0) {
                    let styleAtCursor = null;
                    let stateAtCursor = null;
                    let stringAtCursor = null;
                    const token = runOnlineParser(queryText, (stream, state, style, index) => {
                        if (index !== cursor.line || stream.getCurrentPosition() + offset < cursor.character + 1) {
                            return;
                        }
                        styleAtCursor = style;
                        stateAtCursor = Object.assign({}, state);
                        stringAtCursor = stream.current();
                        return 'BREAK';
                    });
                    return {
                        start: token.start,
                        end: token.end,
                        string: stringAtCursor || token.string,
                        state: stateAtCursor || token.state,
                        style: styleAtCursor || token.style
                    };
                }

                function getContextAtPosition(queryText, cursor, schema, contextToken, options) {
                    const token = contextToken || getTokenAtPosition(queryText, cursor, 1);
                    if (!token) {
                        return null;
                    }
                    const state = token.state.kind === 'Invalid' ? token.state.prevState : token.state;
                    if (!state) {
                        return null;
                    }
                    const typeInfo = (0, _.getTypeInfo)(schema, token.state);
                    const mode = (options === null || options === void 0 ? void 0 : options.mode) || getDocumentMode(queryText, options === null || options === void 0 ? void 0 : options.uri);
                    return {
                        token,
                        state,
                        typeInfo,
                        mode
                    };
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/parser/getTypeInfo.js":
            /*!****************************************************************!*\
              !*** ../../graphql-language-service/esm/parser/getTypeInfo.js ***!
              \****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.forEachState = forEachState;
                exports.getDefinitionState = getDefinitionState;
                exports.getFieldDef = getFieldDef;
                exports.getTypeInfo = getTypeInfo;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _ = __webpack_require__( /*! . */ "../../graphql-language-service/esm/parser/index.js");

                function getFieldDef(schema, type, fieldName) {
                    if (fieldName === _graphql.SchemaMetaFieldDef.name && schema.getQueryType() === type) {
                        return _graphql.SchemaMetaFieldDef;
                    }
                    if (fieldName === _graphql.TypeMetaFieldDef.name && schema.getQueryType() === type) {
                        return _graphql.TypeMetaFieldDef;
                    }
                    if (fieldName === _graphql.TypeNameMetaFieldDef.name && (0, _graphql.isCompositeType)(type)) {
                        return _graphql.TypeNameMetaFieldDef;
                    }
                    if ('getFields' in type) {
                        return type.getFields()[fieldName];
                    }
                    return null;
                }

                function forEachState(stack, fn) {
                    const reverseStateStack = [];
                    let state = stack;
                    while (state === null || state === void 0 ? void 0 : state.kind) {
                        reverseStateStack.push(state);
                        state = state.prevState;
                    }
                    for (let i = reverseStateStack.length - 1; i >= 0; i--) {
                        fn(reverseStateStack[i]);
                    }
                }

                function getDefinitionState(tokenState) {
                    let definitionState;
                    forEachState(tokenState, state => {
                        switch (state.kind) {
                            case 'Query':
                            case 'ShortQuery':
                            case 'Mutation':
                            case 'Subscription':
                            case 'FragmentDefinition':
                                definitionState = state;
                                break;
                        }
                    });
                    return definitionState;
                }

                function getTypeInfo(schema, tokenState) {
                    let argDef;
                    let argDefs;
                    let directiveDef;
                    let enumValue;
                    let fieldDef;
                    let inputType;
                    let objectTypeDef;
                    let objectFieldDefs;
                    let parentType;
                    let type;
                    let interfaceDef;
                    forEachState(tokenState, state => {
                        var _a;
                        switch (state.kind) {
                            case _.RuleKinds.QUERY:
                            case 'ShortQuery':
                                type = schema.getQueryType();
                                break;
                            case _.RuleKinds.MUTATION:
                                type = schema.getMutationType();
                                break;
                            case _.RuleKinds.SUBSCRIPTION:
                                type = schema.getSubscriptionType();
                                break;
                            case _.RuleKinds.INLINE_FRAGMENT:
                            case _.RuleKinds.FRAGMENT_DEFINITION:
                                if (state.type) {
                                    type = schema.getType(state.type);
                                }
                                break;
                            case _.RuleKinds.FIELD:
                            case _.RuleKinds.ALIASED_FIELD: {
                                if (!type || !state.name) {
                                    fieldDef = null;
                                } else {
                                    fieldDef = parentType ? getFieldDef(schema, parentType, state.name) : null;
                                    type = fieldDef ? fieldDef.type : null;
                                }
                                break;
                            }
                            case _.RuleKinds.SELECTION_SET:
                                parentType = (0, _graphql.getNamedType)(type);
                                break;
                            case _.RuleKinds.DIRECTIVE:
                                directiveDef = state.name ? schema.getDirective(state.name) : null;
                                break;
                            case _.RuleKinds.INTERFACE_DEF:
                                if (state.name) {
                                    objectTypeDef = null;
                                    interfaceDef = new _graphql.GraphQLInterfaceType({
                                        name: state.name,
                                        interfaces: [],
                                        fields: {}
                                    });
                                }
                                break;
                            case _.RuleKinds.OBJECT_TYPE_DEF:
                                if (state.name) {
                                    interfaceDef = null;
                                    objectTypeDef = new _graphql.GraphQLObjectType({
                                        name: state.name,
                                        interfaces: [],
                                        fields: {}
                                    });
                                }
                                break;
                            case _.RuleKinds.ARGUMENTS: {
                                if (state.prevState) {
                                    switch (state.prevState.kind) {
                                        case _.RuleKinds.FIELD:
                                            argDefs = fieldDef && fieldDef.args;
                                            break;
                                        case _.RuleKinds.DIRECTIVE:
                                            argDefs = directiveDef && directiveDef.args;
                                            break;
                                        case _.RuleKinds.ALIASED_FIELD: {
                                            const name = (_a = state.prevState) === null || _a === void 0 ? void 0 : _a.name;
                                            if (!name) {
                                                argDefs = null;
                                                break;
                                            }
                                            const field = parentType ? getFieldDef(schema, parentType, name) : null;
                                            if (!field) {
                                                argDefs = null;
                                                break;
                                            }
                                            argDefs = field.args;
                                            break;
                                        }
                                        default:
                                            argDefs = null;
                                            break;
                                    }
                                } else {
                                    argDefs = null;
                                }
                                break;
                            }
                            case _.RuleKinds.ARGUMENT:
                                if (argDefs) {
                                    for (let i = 0; i < argDefs.length; i++) {
                                        if (argDefs[i].name === state.name) {
                                            argDef = argDefs[i];
                                            break;
                                        }
                                    }
                                }
                                inputType = argDef === null || argDef === void 0 ? void 0 : argDef.type;
                                break;
                            case _.RuleKinds.VARIABLE_DEFINITION:
                            case _.RuleKinds.VARIABLE:
                                type = inputType;
                                break;
                            case _.RuleKinds.ENUM_VALUE:
                                const enumType = (0, _graphql.getNamedType)(inputType);
                                enumValue = enumType instanceof _graphql.GraphQLEnumType ? enumType.getValues().find(val => val.value === state.name) : null;
                                break;
                            case _.RuleKinds.LIST_VALUE:
                                const nullableType = (0, _graphql.getNullableType)(inputType);
                                inputType = nullableType instanceof _graphql.GraphQLList ? nullableType.ofType : null;
                                break;
                            case _.RuleKinds.OBJECT_VALUE:
                                const objectType = (0, _graphql.getNamedType)(inputType);
                                objectFieldDefs = objectType instanceof _graphql.GraphQLInputObjectType ? objectType.getFields() : null;
                                break;
                            case _.RuleKinds.OBJECT_FIELD:
                                const objectField = state.name && objectFieldDefs ? objectFieldDefs[state.name] : null;
                                inputType = objectField === null || objectField === void 0 ? void 0 : objectField.type;
                                fieldDef = objectField;
                                type = fieldDef ? fieldDef.type : null;
                                break;
                            case _.RuleKinds.NAMED_TYPE:
                                if (state.name) {
                                    type = schema.getType(state.name);
                                }
                                break;
                        }
                    });
                    return {
                        argDef,
                        argDefs,
                        directiveDef,
                        enumValue,
                        fieldDef,
                        inputType,
                        objectFieldDefs,
                        parentType,
                        type,
                        interfaceDef,
                        objectTypeDef
                    };
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/parser/index.js":
            /*!**********************************************************!*\
              !*** ../../graphql-language-service/esm/parser/index.js ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                var _exportNames = {
                    CharacterStream: true,
                    LexRules: true,
                    ParseRules: true,
                    isIgnored: true,
                    butNot: true,
                    list: true,
                    opt: true,
                    p: true,
                    t: true,
                    onlineParser: true,
                    runOnlineParser: true,
                    getTokenAtPosition: true,
                    getContextAtPosition: true,
                    GraphQLDocumentMode: true,
                    getDocumentMode: true,
                    getTypeInfo: true,
                    getDefinitionState: true,
                    getFieldDef: true
                };
                Object.defineProperty(exports, "CharacterStream", ({
                    enumerable: true,
                    get: function() {
                        return _CharacterStream.default;
                    }
                }));
                Object.defineProperty(exports, "GraphQLDocumentMode", ({
                    enumerable: true,
                    get: function() {
                        return _api.GraphQLDocumentMode;
                    }
                }));
                Object.defineProperty(exports, "LexRules", ({
                    enumerable: true,
                    get: function() {
                        return _Rules.LexRules;
                    }
                }));
                Object.defineProperty(exports, "ParseRules", ({
                    enumerable: true,
                    get: function() {
                        return _Rules.ParseRules;
                    }
                }));
                Object.defineProperty(exports, "butNot", ({
                    enumerable: true,
                    get: function() {
                        return _RuleHelpers.butNot;
                    }
                }));
                Object.defineProperty(exports, "getContextAtPosition", ({
                    enumerable: true,
                    get: function() {
                        return _api.getContextAtPosition;
                    }
                }));
                Object.defineProperty(exports, "getDefinitionState", ({
                    enumerable: true,
                    get: function() {
                        return _getTypeInfo.getDefinitionState;
                    }
                }));
                Object.defineProperty(exports, "getDocumentMode", ({
                    enumerable: true,
                    get: function() {
                        return _api.getDocumentMode;
                    }
                }));
                Object.defineProperty(exports, "getFieldDef", ({
                    enumerable: true,
                    get: function() {
                        return _getTypeInfo.getFieldDef;
                    }
                }));
                Object.defineProperty(exports, "getTokenAtPosition", ({
                    enumerable: true,
                    get: function() {
                        return _api.getTokenAtPosition;
                    }
                }));
                Object.defineProperty(exports, "getTypeInfo", ({
                    enumerable: true,
                    get: function() {
                        return _getTypeInfo.getTypeInfo;
                    }
                }));
                Object.defineProperty(exports, "isIgnored", ({
                    enumerable: true,
                    get: function() {
                        return _Rules.isIgnored;
                    }
                }));
                Object.defineProperty(exports, "list", ({
                    enumerable: true,
                    get: function() {
                        return _RuleHelpers.list;
                    }
                }));
                Object.defineProperty(exports, "onlineParser", ({
                    enumerable: true,
                    get: function() {
                        return _onlineParser.default;
                    }
                }));
                Object.defineProperty(exports, "opt", ({
                    enumerable: true,
                    get: function() {
                        return _RuleHelpers.opt;
                    }
                }));
                Object.defineProperty(exports, "p", ({
                    enumerable: true,
                    get: function() {
                        return _RuleHelpers.p;
                    }
                }));
                Object.defineProperty(exports, "runOnlineParser", ({
                    enumerable: true,
                    get: function() {
                        return _api.runOnlineParser;
                    }
                }));
                Object.defineProperty(exports, "t", ({
                    enumerable: true,
                    get: function() {
                        return _RuleHelpers.t;
                    }
                }));
                var _CharacterStream = _interopRequireDefault(__webpack_require__( /*! ./CharacterStream */ "../../graphql-language-service/esm/parser/CharacterStream.js"));
                var _Rules = __webpack_require__( /*! ./Rules */ "../../graphql-language-service/esm/parser/Rules.js");
                var _RuleHelpers = __webpack_require__( /*! ./RuleHelpers */ "../../graphql-language-service/esm/parser/RuleHelpers.js");
                var _onlineParser = _interopRequireDefault(__webpack_require__( /*! ./onlineParser */ "../../graphql-language-service/esm/parser/onlineParser.js"));
                var _api = __webpack_require__( /*! ./api */ "../../graphql-language-service/esm/parser/api.js");
                var _getTypeInfo = __webpack_require__( /*! ./getTypeInfo */ "../../graphql-language-service/esm/parser/getTypeInfo.js");
                var _types = __webpack_require__( /*! ./types */ "../../graphql-language-service/esm/parser/types.js");
                Object.keys(_types).forEach(function(key) {
                    if (key === "default" || key === "__esModule") return;
                    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
                    if (key in exports && exports[key] === _types[key]) return;
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: function() {
                            return _types[key];
                        }
                    });
                });

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/parser/onlineParser.js":
            /*!*****************************************************************!*\
              !*** ../../graphql-language-service/esm/parser/onlineParser.js ***!
              \*****************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = onlineParser;
                var _Rules = __webpack_require__( /*! ./Rules */ "../../graphql-language-service/esm/parser/Rules.js");
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");

                function onlineParser(options = {
                    eatWhitespace: stream => stream.eatWhile(_Rules.isIgnored),
                    lexRules: _Rules.LexRules,
                    parseRules: _Rules.ParseRules,
                    editorConfig: {}
                }) {
                    return {
                        startState() {
                            const initialState = {
                                level: 0,
                                step: 0,
                                name: null,
                                kind: null,
                                type: null,
                                rule: null,
                                needsSeparator: false,
                                prevState: null
                            };
                            pushRule(options.parseRules, initialState, _graphql.Kind.DOCUMENT);
                            return initialState;
                        },
                        token(stream, state) {
                            return getToken(stream, state, options);
                        }
                    };
                }

                function getToken(stream, state, options) {
                    var _a;
                    if (state.inBlockstring) {
                        if (stream.match(/.*"""/)) {
                            state.inBlockstring = false;
                            return 'string';
                        }
                        stream.skipToEnd();
                        return 'string';
                    }
                    const {
                        lexRules,
                        parseRules,
                        eatWhitespace,
                        editorConfig
                    } = options;
                    if (state.rule && state.rule.length === 0) {
                        popRule(state);
                    } else if (state.needsAdvance) {
                        state.needsAdvance = false;
                        advanceRule(state, true);
                    }
                    if (stream.sol()) {
                        const tabSize = (editorConfig === null || editorConfig === void 0 ? void 0 : editorConfig.tabSize) || 2;
                        state.indentLevel = Math.floor(stream.indentation() / tabSize);
                    }
                    if (eatWhitespace(stream)) {
                        return 'ws';
                    }
                    const token = lex(lexRules, stream);
                    if (!token) {
                        const matchedSomething = stream.match(/\S+/);
                        if (!matchedSomething) {
                            stream.match(/\s/);
                        }
                        pushRule(SpecialParseRules, state, 'Invalid');
                        return 'invalidchar';
                    }
                    if (token.kind === 'Comment') {
                        pushRule(SpecialParseRules, state, 'Comment');
                        return 'comment';
                    }
                    const backupState = assign({}, state);
                    if (token.kind === 'Punctuation') {
                        if (/^[{([]/.test(token.value)) {
                            if (state.indentLevel !== undefined) {
                                state.levels = (state.levels || []).concat(state.indentLevel + 1);
                            }
                        } else if (/^[})\]]/.test(token.value)) {
                            const levels = state.levels = (state.levels || []).slice(0, -1);
                            if (state.indentLevel && levels.length > 0 && levels.at(-1) < state.indentLevel) {
                                state.indentLevel = levels.at(-1);
                            }
                        }
                    }
                    while (state.rule) {
                        let expected = typeof state.rule === 'function' ? state.step === 0 ? state.rule(token, stream) : null : state.rule[state.step];
                        if (state.needsSeparator) {
                            expected = expected === null || expected === void 0 ? void 0 : expected.separator;
                        }
                        if (expected) {
                            if (expected.ofRule) {
                                expected = expected.ofRule;
                            }
                            if (typeof expected === 'string') {
                                pushRule(parseRules, state, expected);
                                continue;
                            }
                            if ((_a = expected.match) === null || _a === void 0 ? void 0 : _a.call(expected, token)) {
                                if (expected.update) {
                                    expected.update(state, token);
                                }
                                if (token.kind === 'Punctuation') {
                                    advanceRule(state, true);
                                } else {
                                    state.needsAdvance = true;
                                }
                                return expected.style;
                            }
                        }
                        unsuccessful(state);
                    }
                    assign(state, backupState);
                    pushRule(SpecialParseRules, state, 'Invalid');
                    return 'invalidchar';
                }

                function assign(to, from) {
                    const keys = Object.keys(from);
                    for (let i = 0; i < keys.length; i++) {
                        to[keys[i]] = from[keys[i]];
                    }
                    return to;
                }
                const SpecialParseRules = {
                    Invalid: [],
                    Comment: []
                };

                function pushRule(rules, state, ruleKind) {
                    if (!rules[ruleKind]) {
                        throw new TypeError('Unknown rule: ' + ruleKind);
                    }
                    state.prevState = Object.assign({}, state);
                    state.kind = ruleKind;
                    state.name = null;
                    state.type = null;
                    state.rule = rules[ruleKind];
                    state.step = 0;
                    state.needsSeparator = false;
                }

                function popRule(state) {
                    if (!state.prevState) {
                        return;
                    }
                    state.kind = state.prevState.kind;
                    state.name = state.prevState.name;
                    state.type = state.prevState.type;
                    state.rule = state.prevState.rule;
                    state.step = state.prevState.step;
                    state.needsSeparator = state.prevState.needsSeparator;
                    state.prevState = state.prevState.prevState;
                }

                function advanceRule(state, successful) {
                    var _a;
                    if (isList(state) && state.rule) {
                        const step = state.rule[state.step];
                        if (step.separator) {
                            const {
                                separator
                            } = step;
                            state.needsSeparator = !state.needsSeparator;
                            if (!state.needsSeparator && separator.ofRule) {
                                return;
                            }
                        }
                        if (successful) {
                            return;
                        }
                    }
                    state.needsSeparator = false;
                    state.step++;
                    while (state.rule && !(Array.isArray(state.rule) && state.step < state.rule.length)) {
                        popRule(state);
                        if (state.rule) {
                            if (isList(state)) {
                                if ((_a = state.rule) === null || _a === void 0 ? void 0 : _a[state.step].separator) {
                                    state.needsSeparator = !state.needsSeparator;
                                }
                            } else {
                                state.needsSeparator = false;
                                state.step++;
                            }
                        }
                    }
                }

                function isList(state) {
                    const step = Array.isArray(state.rule) && typeof state.rule[state.step] !== 'string' && state.rule[state.step];
                    return step && step.isList;
                }

                function unsuccessful(state) {
                    while (state.rule && !(Array.isArray(state.rule) && state.rule[state.step].ofRule)) {
                        popRule(state);
                    }
                    if (state.rule) {
                        advanceRule(state, false);
                    }
                }

                function lex(lexRules, stream) {
                    const kinds = Object.keys(lexRules);
                    for (let i = 0; i < kinds.length; i++) {
                        const match = stream.match(lexRules[kinds[i]]);
                        if (match && match instanceof Array) {
                            return {
                                kind: kinds[i],
                                value: match[0]
                            };
                        }
                    }
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/parser/types.js":
            /*!**********************************************************!*\
              !*** ../../graphql-language-service/esm/parser/types.js ***!
              \**********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.RuleKinds = exports.AdditionalRuleKinds = void 0;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                const AdditionalRuleKinds = exports.AdditionalRuleKinds = {
                    ALIASED_FIELD: 'AliasedField',
                    ARGUMENTS: 'Arguments',
                    SHORT_QUERY: 'ShortQuery',
                    QUERY: 'Query',
                    MUTATION: 'Mutation',
                    SUBSCRIPTION: 'Subscription',
                    TYPE_CONDITION: 'TypeCondition',
                    INVALID: 'Invalid',
                    COMMENT: 'Comment',
                    SCHEMA_DEF: 'SchemaDef',
                    SCALAR_DEF: 'ScalarDef',
                    OBJECT_TYPE_DEF: 'ObjectTypeDef',
                    OBJECT_VALUE: 'ObjectValue',
                    LIST_VALUE: 'ListValue',
                    INTERFACE_DEF: 'InterfaceDef',
                    UNION_DEF: 'UnionDef',
                    ENUM_DEF: 'EnumDef',
                    ENUM_VALUE: 'EnumValue',
                    FIELD_DEF: 'FieldDef',
                    INPUT_DEF: 'InputDef',
                    INPUT_VALUE_DEF: 'InputValueDef',
                    ARGUMENTS_DEF: 'ArgumentsDef',
                    EXTEND_DEF: 'ExtendDef',
                    EXTENSION_DEFINITION: 'ExtensionDefinition',
                    DIRECTIVE_DEF: 'DirectiveDef',
                    IMPLEMENTS: 'Implements',
                    VARIABLE_DEFINITIONS: 'VariableDefinitions',
                    TYPE: 'Type',
                    VARIABLE: 'Variable'
                };
                const RuleKinds = exports.RuleKinds = Object.assign(Object.assign({}, _graphql.Kind), AdditionalRuleKinds);

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/types.js":
            /*!***************************************************!*\
              !*** ../../graphql-language-service/esm/types.js ***!
              \***************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.FileChangeTypeKind = exports.CompletionItemKind = void 0;
                Object.defineProperty(exports, "GraphQLDocumentMode", ({
                    enumerable: true,
                    get: function() {
                        return _parser.GraphQLDocumentMode;
                    }
                }));
                Object.defineProperty(exports, "InsertTextFormat", ({
                    enumerable: true,
                    get: function() {
                        return _vscodeLanguageserverTypes.InsertTextFormat;
                    }
                }));
                var _vscodeLanguageserverTypes = __webpack_require__( /*! vscode-languageserver-types */ "../../../node_modules/vscode-languageserver-types/lib/esm/main.js");
                var _parser = __webpack_require__( /*! ./parser */ "../../graphql-language-service/esm/parser/index.js");
                const FileChangeTypeKind = exports.FileChangeTypeKind = {
                    Created: 1,
                    Changed: 2,
                    Deleted: 3
                };
                var CompletionItemKind;
                (function(CompletionItemKind) {
                    CompletionItemKind.Text = 1;
                    CompletionItemKind.Method = 2;
                    CompletionItemKind.Function = 3;
                    CompletionItemKind.Constructor = 4;
                    CompletionItemKind.Field = 5;
                    CompletionItemKind.Variable = 6;
                    CompletionItemKind.Class = 7;
                    CompletionItemKind.Interface = 8;
                    CompletionItemKind.Module = 9;
                    CompletionItemKind.Property = 10;
                    CompletionItemKind.Unit = 11;
                    CompletionItemKind.Value = 12;
                    CompletionItemKind.Enum = 13;
                    CompletionItemKind.Keyword = 14;
                    CompletionItemKind.Snippet = 15;
                    CompletionItemKind.Color = 16;
                    CompletionItemKind.File = 17;
                    CompletionItemKind.Reference = 18;
                    CompletionItemKind.Folder = 19;
                    CompletionItemKind.EnumMember = 20;
                    CompletionItemKind.Constant = 21;
                    CompletionItemKind.Struct = 22;
                    CompletionItemKind.Event = 23;
                    CompletionItemKind.Operator = 24;
                    CompletionItemKind.TypeParameter = 25;
                })(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {}));

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/utils/Range.js":
            /*!*********************************************************!*\
              !*** ../../graphql-language-service/esm/utils/Range.js ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.Range = exports.Position = void 0;
                exports.locToRange = locToRange;
                exports.offsetToPosition = offsetToPosition;
                class Range {
                    constructor(start, end) {
                        this.containsPosition = position => {
                            if (this.start.line === position.line) {
                                return this.start.character <= position.character;
                            }
                            if (this.end.line === position.line) {
                                return this.end.character >= position.character;
                            }
                            return this.start.line <= position.line && this.end.line >= position.line;
                        };
                        this.start = start;
                        this.end = end;
                    }
                    setStart(line, character) {
                        this.start = new Position(line, character);
                    }
                    setEnd(line, character) {
                        this.end = new Position(line, character);
                    }
                }
                exports.Range = Range;
                class Position {
                    constructor(line, character) {
                        this.lessThanOrEqualTo = position => this.line < position.line || this.line === position.line && this.character <= position.character;
                        this.line = line;
                        this.character = character;
                    }
                    setLine(line) {
                        this.line = line;
                    }
                    setCharacter(character) {
                        this.character = character;
                    }
                }
                exports.Position = Position;

                function offsetToPosition(text, loc) {
                    const EOL = '\n';
                    const buf = text.slice(0, loc);
                    const lines = buf.split(EOL).length - 1;
                    const lastLineIndex = buf.lastIndexOf(EOL);
                    return new Position(lines, loc - lastLineIndex - 1);
                }

                function locToRange(text, loc) {
                    const start = offsetToPosition(text, loc.start);
                    const end = offsetToPosition(text, loc.end);
                    return new Range(start, end);
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/utils/collectVariables.js":
            /*!********************************************************************!*\
              !*** ../../graphql-language-service/esm/utils/collectVariables.js ***!
              \********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.collectVariables = collectVariables;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");

                function collectVariables(schema, documentAST) {
                    const variableToType = Object.create(null);
                    for (const definition of documentAST.definitions) {
                        if (definition.kind === 'OperationDefinition') {
                            const {
                                variableDefinitions
                            } = definition;
                            if (variableDefinitions) {
                                for (const {
                                        variable,
                                        type
                                    }
                                    of variableDefinitions) {
                                    const inputType = (0, _graphql.typeFromAST)(schema, type);
                                    if (inputType) {
                                        variableToType[variable.name.value] = inputType;
                                    } else if (type.kind === _graphql.Kind.NAMED_TYPE && type.name.value === 'Float') {
                                        variableToType[variable.name.value] = _graphql.GraphQLFloat;
                                    }
                                }
                            }
                        }
                    }
                    return variableToType;
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/utils/fragmentDependencies.js":
            /*!************************************************************************!*\
              !*** ../../graphql-language-service/esm/utils/fragmentDependencies.js ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getFragmentDependenciesForAST = exports.getFragmentDependencies = void 0;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _nullthrows = _interopRequireDefault(__webpack_require__( /*! nullthrows */ "../../../node_modules/nullthrows/nullthrows.js"));

                function _interopRequireDefault(obj) {
                    return obj && obj.__esModule ? obj : {
                        default: obj
                    };
                }
                const getFragmentDependencies = (operationString, fragmentDefinitions) => {
                    if (!fragmentDefinitions) {
                        return [];
                    }
                    let parsedOperation;
                    try {
                        parsedOperation = (0, _graphql.parse)(operationString);
                    } catch (_a) {
                        return [];
                    }
                    return getFragmentDependenciesForAST(parsedOperation, fragmentDefinitions);
                };
                exports.getFragmentDependencies = getFragmentDependencies;
                const getFragmentDependenciesForAST = (parsedOperation, fragmentDefinitions) => {
                    if (!fragmentDefinitions) {
                        return [];
                    }
                    const existingFrags = new Map();
                    const referencedFragNames = new Set();
                    (0, _graphql.visit)(parsedOperation, {
                        FragmentDefinition(node) {
                            existingFrags.set(node.name.value, true);
                        },
                        FragmentSpread(node) {
                            if (!referencedFragNames.has(node.name.value)) {
                                referencedFragNames.add(node.name.value);
                            }
                        }
                    });
                    const asts = new Set();
                    for (const name of referencedFragNames) {
                        if (!existingFrags.has(name) && fragmentDefinitions.has(name)) {
                            asts.add((0, _nullthrows.default)(fragmentDefinitions.get(name)));
                        }
                    }
                    const referencedFragments = [];
                    for (const ast of asts) {
                        (0, _graphql.visit)(ast, {
                            FragmentSpread(node) {
                                if (!referencedFragNames.has(node.name.value) && fragmentDefinitions.get(node.name.value)) {
                                    asts.add((0, _nullthrows.default)(fragmentDefinitions.get(node.name.value)));
                                    referencedFragNames.add(node.name.value);
                                }
                            }
                        });
                        if (!existingFrags.has(ast.name.value)) {
                            referencedFragments.push(ast);
                        }
                    }
                    return referencedFragments;
                };
                exports.getFragmentDependenciesForAST = getFragmentDependenciesForAST;

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/utils/getASTNodeAtPosition.js":
            /*!************************************************************************!*\
              !*** ../../graphql-language-service/esm/utils/getASTNodeAtPosition.js ***!
              \************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.getASTNodeAtPosition = getASTNodeAtPosition;
                exports.pointToOffset = pointToOffset;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");

                function getASTNodeAtPosition(query, ast, point) {
                    const offset = pointToOffset(query, point);
                    let nodeContainingPosition;
                    (0, _graphql.visit)(ast, {
                        enter(node) {
                            if (node.kind !== 'Name' && node.loc && node.loc.start <= offset && offset <= node.loc.end) {
                                nodeContainingPosition = node;
                            } else {
                                return false;
                            }
                        },
                        leave(node) {
                            if (node.loc && node.loc.start <= offset && offset <= node.loc.end) {
                                return false;
                            }
                        }
                    });
                    return nodeContainingPosition;
                }

                function pointToOffset(text, point) {
                    const linesUntilPosition = text.split('\n').slice(0, point.line);
                    return point.character + linesUntilPosition.map(line => line.length + 1).reduce((a, b) => a + b, 0);
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/utils/getOperationFacts.js":
            /*!*********************************************************************!*\
              !*** ../../graphql-language-service/esm/utils/getOperationFacts.js ***!
              \*********************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports["default"] = getOperationFacts;
                exports.getOperationASTFacts = getOperationASTFacts;
                exports.getQueryFacts = void 0;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                var _collectVariables = __webpack_require__( /*! ./collectVariables */ "../../graphql-language-service/esm/utils/collectVariables.js");

                function getOperationASTFacts(documentAST, schema) {
                    const variableToType = schema ? (0, _collectVariables.collectVariables)(schema, documentAST) : undefined;
                    const operations = [];
                    (0, _graphql.visit)(documentAST, {
                        OperationDefinition(node) {
                            operations.push(node);
                        }
                    });
                    return {
                        variableToType,
                        operations
                    };
                }

                function getOperationFacts(schema, documentString) {
                    if (!documentString) {
                        return;
                    }
                    try {
                        const documentAST = (0, _graphql.parse)(documentString);
                        return Object.assign(Object.assign({}, getOperationASTFacts(documentAST, schema)), {
                            documentAST
                        });
                    } catch (_a) {
                        return;
                    }
                }
                const getQueryFacts = exports.getQueryFacts = getOperationFacts;

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/utils/getVariablesJSONSchema.js":
            /*!**************************************************************************!*\
              !*** ../../graphql-language-service/esm/utils/getVariablesJSONSchema.js ***!
              \**************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.defaultJSONSchemaOptions = void 0;
                exports.getVariablesJSONSchema = getVariablesJSONSchema;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                const defaultJSONSchemaOptions = exports.defaultJSONSchemaOptions = {
                    useMarkdownDescription: false
                };

                function text(into, newText) {
                    into.push(newText);
                }

                function renderType(into, t) {
                    if ((0, _graphql.isNonNullType)(t)) {
                        renderType(into, t.ofType);
                        text(into, '!');
                    } else if ((0, _graphql.isListType)(t)) {
                        text(into, '[');
                        renderType(into, t.ofType);
                        text(into, ']');
                    } else {
                        text(into, t.name);
                    }
                }

                function renderDefinitionDescription(t, useMarkdown, description) {
                    const into = [];
                    const type = 'type' in t ? t.type : t;
                    if ('type' in t && t.description) {
                        text(into, t.description);
                        text(into, '\n\n');
                    }
                    text(into, renderTypeToString(type, useMarkdown));
                    if (description) {
                        text(into, '\n');
                        text(into, description);
                    } else if (!(0, _graphql.isScalarType)(type) && 'description' in type && type.description) {
                        text(into, '\n');
                        text(into, type.description);
                    } else if ('ofType' in type && !(0, _graphql.isScalarType)(type.ofType) && 'description' in type.ofType && type.ofType.description) {
                        text(into, '\n');
                        text(into, type.ofType.description);
                    }
                    return into.join('');
                }

                function renderTypeToString(t, useMarkdown) {
                    const into = [];
                    if (useMarkdown) {
                        text(into, '```graphql\n');
                    }
                    renderType(into, t);
                    if (useMarkdown) {
                        text(into, '\n```');
                    }
                    return into.join('');
                }
                const defaultScalarTypesMap = {
                    Int: {
                        type: 'integer'
                    },
                    String: {
                        type: 'string'
                    },
                    Float: {
                        type: 'number'
                    },
                    ID: {
                        type: 'string'
                    },
                    Boolean: {
                        type: 'boolean'
                    },
                    DateTime: {
                        type: 'string'
                    }
                };
                class Marker {
                    constructor() {
                        this.set = new Set();
                    }
                    mark(name) {
                        if (this.set.has(name)) {
                            return false;
                        }
                        this.set.add(name);
                        return true;
                    }
                }

                function getJSONSchemaFromGraphQLType(fieldOrType, options) {
                    var _a, _b;
                    let definition = Object.create(null);
                    const definitions = Object.create(null);
                    const isField = ('type' in fieldOrType);
                    const type = isField ? fieldOrType.type : fieldOrType;
                    const baseType = (0, _graphql.isNonNullType)(type) ? type.ofType : type;
                    const required = (0, _graphql.isNonNullType)(type);
                    if ((0, _graphql.isScalarType)(baseType)) {
                        if ((_a = options === null || options === void 0 ? void 0 : options.scalarSchemas) === null || _a === void 0 ? void 0 : _a[baseType.name]) {
                            definition = JSON.parse(JSON.stringify(options.scalarSchemas[baseType.name]));
                        } else {
                            definition.type = ['string', 'number', 'boolean', 'integer'];
                        }
                        if (!required) {
                            if (Array.isArray(definition.type)) {
                                definition.type.push('null');
                            } else if (definition.type) {
                                definition.type = [definition.type, 'null'];
                            } else if (definition.enum) {
                                definition.enum.push(null);
                            } else if (definition.oneOf) {
                                definition.oneOf.push({
                                    type: 'null'
                                });
                            } else {
                                definition = {
                                    oneOf: [definition, {
                                        type: 'null'
                                    }]
                                };
                            }
                        }
                    } else if ((0, _graphql.isEnumType)(baseType)) {
                        definition.enum = baseType.getValues().map(val => val.name);
                        if (!required) {
                            definition.enum.push(null);
                        }
                    } else if ((0, _graphql.isListType)(baseType)) {
                        if (required) {
                            definition.type = 'array';
                        } else {
                            definition.type = ['array', 'null'];
                        }
                        const {
                            definition: def,
                            definitions: defs
                        } = getJSONSchemaFromGraphQLType(baseType.ofType, options);
                        definition.items = def;
                        if (defs) {
                            for (const defName of Object.keys(defs)) {
                                definitions[defName] = defs[defName];
                            }
                        }
                    } else if ((0, _graphql.isInputObjectType)(baseType)) {
                        if (required) {
                            definition.$ref = `#/definitions/${baseType.name}`;
                        } else {
                            definition.oneOf = [{
                                $ref: `#/definitions/${baseType.name}`
                            }, {
                                type: 'null'
                            }];
                        }
                        if ((_b = options === null || options === void 0 ? void 0 : options.definitionMarker) === null || _b === void 0 ? void 0 : _b.mark(baseType.name)) {
                            const fields = baseType.getFields();
                            const fieldDef = {
                                type: 'object',
                                properties: {},
                                required: []
                            };
                            fieldDef.description = renderDefinitionDescription(baseType);
                            if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) {
                                fieldDef.markdownDescription = renderDefinitionDescription(baseType, true);
                            }
                            for (const fieldName of Object.keys(fields)) {
                                const field = fields[fieldName];
                                const {
                                    required: fieldRequired,
                                    definition: fieldDefinition,
                                    definitions: typeDefinitions
                                } = getJSONSchemaFromGraphQLType(field, options);
                                fieldDef.properties[fieldName] = fieldDefinition;
                                if (fieldRequired) {
                                    fieldDef.required.push(fieldName);
                                }
                                if (typeDefinitions) {
                                    for (const [defName, value] of Object.entries(typeDefinitions)) {
                                        definitions[defName] = value;
                                    }
                                }
                            }
                            definitions[baseType.name] = fieldDef;
                        }
                    }
                    if ('defaultValue' in fieldOrType && fieldOrType.defaultValue !== undefined) {
                        definition.default = fieldOrType.defaultValue;
                    }
                    const {
                        description
                    } = definition;
                    definition.description = renderDefinitionDescription(fieldOrType, false, description);
                    if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) {
                        definition.markdownDescription = renderDefinitionDescription(fieldOrType, true, description);
                    }
                    return {
                        required,
                        definition,
                        definitions
                    };
                }

                function getVariablesJSONSchema(variableToType, options) {
                    var _a;
                    const jsonSchema = {
                        $schema: 'http://json-schema.org/draft-04/schema',
                        type: 'object',
                        properties: {},
                        required: []
                    };
                    const runtimeOptions = Object.assign(Object.assign({}, options), {
                        definitionMarker: new Marker(),
                        scalarSchemas: Object.assign(Object.assign({}, defaultScalarTypesMap), options === null || options === void 0 ? void 0 : options.scalarSchemas)
                    });
                    if (variableToType) {
                        for (const [variableName, type] of Object.entries(variableToType)) {
                            const {
                                definition,
                                required,
                                definitions
                            } = getJSONSchemaFromGraphQLType(type, runtimeOptions);
                            jsonSchema.properties[variableName] = definition;
                            if (required) {
                                (_a = jsonSchema.required) === null || _a === void 0 ? void 0 : _a.push(variableName);
                            }
                            if (definitions) {
                                jsonSchema.definitions = Object.assign(Object.assign({}, jsonSchema === null || jsonSchema === void 0 ? void 0 : jsonSchema.definitions), definitions);
                            }
                        }
                    }
                    return jsonSchema;
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/utils/index.js":
            /*!*********************************************************!*\
              !*** ../../graphql-language-service/esm/utils/index.js ***!
              \*********************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                Object.defineProperty(exports, "Position", ({
                    enumerable: true,
                    get: function() {
                        return _Range.Position;
                    }
                }));
                Object.defineProperty(exports, "Range", ({
                    enumerable: true,
                    get: function() {
                        return _Range.Range;
                    }
                }));
                Object.defineProperty(exports, "collectVariables", ({
                    enumerable: true,
                    get: function() {
                        return _collectVariables.collectVariables;
                    }
                }));
                Object.defineProperty(exports, "getASTNodeAtPosition", ({
                    enumerable: true,
                    get: function() {
                        return _getASTNodeAtPosition.getASTNodeAtPosition;
                    }
                }));
                Object.defineProperty(exports, "getFragmentDependencies", ({
                    enumerable: true,
                    get: function() {
                        return _fragmentDependencies.getFragmentDependencies;
                    }
                }));
                Object.defineProperty(exports, "getFragmentDependenciesForAST", ({
                    enumerable: true,
                    get: function() {
                        return _fragmentDependencies.getFragmentDependenciesForAST;
                    }
                }));
                Object.defineProperty(exports, "getOperationASTFacts", ({
                    enumerable: true,
                    get: function() {
                        return _getOperationFacts.getOperationASTFacts;
                    }
                }));
                Object.defineProperty(exports, "getOperationFacts", ({
                    enumerable: true,
                    get: function() {
                        return _getOperationFacts.default;
                    }
                }));
                Object.defineProperty(exports, "getQueryFacts", ({
                    enumerable: true,
                    get: function() {
                        return _getOperationFacts.getQueryFacts;
                    }
                }));
                Object.defineProperty(exports, "getVariablesJSONSchema", ({
                    enumerable: true,
                    get: function() {
                        return _getVariablesJSONSchema.getVariablesJSONSchema;
                    }
                }));
                Object.defineProperty(exports, "locToRange", ({
                    enumerable: true,
                    get: function() {
                        return _Range.locToRange;
                    }
                }));
                Object.defineProperty(exports, "offsetToPosition", ({
                    enumerable: true,
                    get: function() {
                        return _Range.offsetToPosition;
                    }
                }));
                Object.defineProperty(exports, "pointToOffset", ({
                    enumerable: true,
                    get: function() {
                        return _getASTNodeAtPosition.pointToOffset;
                    }
                }));
                Object.defineProperty(exports, "validateWithCustomRules", ({
                    enumerable: true,
                    get: function() {
                        return _validateWithCustomRules.validateWithCustomRules;
                    }
                }));
                var _fragmentDependencies = __webpack_require__( /*! ./fragmentDependencies */ "../../graphql-language-service/esm/utils/fragmentDependencies.js");
                var _getVariablesJSONSchema = __webpack_require__( /*! ./getVariablesJSONSchema */ "../../graphql-language-service/esm/utils/getVariablesJSONSchema.js");
                var _getASTNodeAtPosition = __webpack_require__( /*! ./getASTNodeAtPosition */ "../../graphql-language-service/esm/utils/getASTNodeAtPosition.js");
                var _Range = __webpack_require__( /*! ./Range */ "../../graphql-language-service/esm/utils/Range.js");
                var _validateWithCustomRules = __webpack_require__( /*! ./validateWithCustomRules */ "../../graphql-language-service/esm/utils/validateWithCustomRules.js");
                var _collectVariables = __webpack_require__( /*! ./collectVariables */ "../../graphql-language-service/esm/utils/collectVariables.js");
                var _getOperationFacts = _interopRequireWildcard(__webpack_require__( /*! ./getOperationFacts */ "../../graphql-language-service/esm/utils/getOperationFacts.js"));

                function _getRequireWildcardCache(e) {
                    if ("function" != typeof WeakMap) return null;
                    var r = new WeakMap(),
                        t = new WeakMap();
                    return (_getRequireWildcardCache = function(e) {
                        return e ? t : r;
                    })(e);
                }

                function _interopRequireWildcard(e, r) {
                    if (!r && e && e.__esModule) return e;
                    if (null === e || "object" != typeof e && "function" != typeof e) return {
                        default: e
                    };
                    var t = _getRequireWildcardCache(r);
                    if (t && t.has(e)) return t.get(e);
                    var n = {
                            __proto__: null
                        },
                        a = Object.defineProperty && Object.getOwnPropertyDescriptor;
                    for (var u in e)
                        if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                            var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                            i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                        } return n.default = e, t && t.set(e, n), n;
                }

                /***/
            }),

        /***/
        "../../graphql-language-service/esm/utils/validateWithCustomRules.js":
            /*!***************************************************************************!*\
              !*** ../../graphql-language-service/esm/utils/validateWithCustomRules.js ***!
              \***************************************************************************/
            /***/
            (function(__unused_webpack_module, exports, __webpack_require__) {

                "use strict";


                Object.defineProperty(exports, "__esModule", ({
                    value: true
                }));
                exports.validateWithCustomRules = validateWithCustomRules;
                var _graphql = __webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs");
                const specifiedSDLRules = [_graphql.LoneSchemaDefinitionRule, _graphql.UniqueOperationTypesRule, _graphql.UniqueTypeNamesRule, _graphql.UniqueEnumValueNamesRule, _graphql.UniqueFieldDefinitionNamesRule, _graphql.UniqueDirectiveNamesRule, _graphql.KnownTypeNamesRule, _graphql.KnownDirectivesRule, _graphql.UniqueDirectivesPerLocationRule, _graphql.PossibleTypeExtensionsRule, _graphql.UniqueArgumentNamesRule, _graphql.UniqueInputFieldNamesRule, _graphql.UniqueVariableNamesRule, _graphql.FragmentsOnCompositeTypesRule, _graphql.ProvidedRequiredArgumentsRule];

                function validateWithCustomRules(schema, ast, customRules, isRelayCompatMode, isSchemaDocument) {
                    const rules = _graphql.specifiedRules.filter(rule => {
                        if (rule === _graphql.NoUnusedFragmentsRule || rule === _graphql.ExecutableDefinitionsRule) {
                            return false;
                        }
                        if (isRelayCompatMode && rule === _graphql.KnownFragmentNamesRule) {
                            return false;
                        }
                        return true;
                    });
                    if (customRules) {
                        Array.prototype.push.apply(rules, customRules);
                    }
                    if (isSchemaDocument) {
                        Array.prototype.push.apply(rules, specifiedSDLRules);
                    }
                    const errors = (0, _graphql.validate)(schema, ast, rules);
                    return errors.filter(error => {
                        if (error.message.includes('Unknown directive') && error.nodes) {
                            const node = error.nodes[0];
                            if (node && node.kind === _graphql.Kind.DIRECTIVE) {
                                const name = node.name.value;
                                if (name === 'arguments' || name === 'argumentDefinitions') {
                                    return false;
                                }
                            }
                        }
                        return true;
                    });
                }

                /***/
            }),

        /***/
        "./style.css":
            /*!*******************!*\
              !*** ./style.css ***!
              \*******************/
            /***/
            (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

                "use strict";
                __webpack_require__.r(__webpack_exports__);
                // extracted by mini-css-extract-plugin


                /***/
            }),

        /***/
        "../../graphiql-react/dist/style.css":
            /*!*******************************************!*\
              !*** ../../graphiql-react/dist/style.css ***!
              \*******************************************/
            /***/
            (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

                "use strict";
                __webpack_require__.r(__webpack_exports__);
                // extracted by mini-css-extract-plugin


                /***/
            }),

        /***/
        "../../graphiql-react/font/fira-code.css":
            /*!***********************************************!*\
              !*** ../../graphiql-react/font/fira-code.css ***!
              \***********************************************/
            /***/
            (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

                "use strict";
                __webpack_require__.r(__webpack_exports__);
                // extracted by mini-css-extract-plugin


                /***/
            }),

        /***/
        "../../graphiql-react/font/roboto.css":
            /*!********************************************!*\
              !*** ../../graphiql-react/font/roboto.css ***!
              \********************************************/
            /***/
            (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

                "use strict";
                __webpack_require__.r(__webpack_exports__);
                // extracted by mini-css-extract-plugin


                /***/
            }),

        /***/
        "react":
            /*!************************!*\
              !*** external "React" ***!
              \************************/
            /***/
            (function(module) {

                "use strict";
                module.exports = window["React"];

                /***/
            }),

        /***/
        "react-dom":
            /*!***************************!*\
              !*** external "ReactDOM" ***!
              \***************************/
            /***/
            (function(module) {

                "use strict";
                module.exports = window["ReactDOM"];

                /***/
            }),

        /***/
        "../../../node_modules/@headlessui/react/dist/headlessui.dev.cjs":
            /*!***********************************************************************!*\
              !*** ../../../node_modules/@headlessui/react/dist/headlessui.dev.cjs ***!
              \***********************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";

                var __create = Object.create;
                var __defProp = Object.defineProperty;
                var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
                var __getOwnPropNames = Object.getOwnPropertyNames;
                var __getProtoOf = Object.getPrototypeOf;
                var __hasOwnProp = Object.prototype.hasOwnProperty;
                var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
                    enumerable: true,
                    configurable: true,
                    writable: true,
                    value
                }) : obj[key] = value;
                var __export = (target, all) => {
                    for (var name in all)
                        __defProp(target, name, {
                            get: all[name],
                            enumerable: true
                        });
                };
                var __copyProps = (to, from, except, desc) => {
                    if (from && typeof from === "object" || typeof from === "function") {
                        for (let key of __getOwnPropNames(from))
                            if (!__hasOwnProp.call(to, key) && key !== except)
                                __defProp(to, key, {
                                    get: () => from[key],
                                    enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
                                });
                    }
                    return to;
                };
                var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
                    // If the importer is in node compatibility mode or this is not an ESM
                    // file that has been converted to a CommonJS file using a Babel-
                    // compatible transform (i.e. "__esModule" has not been set), then set
                    // "default" to the CommonJS "module.exports" for node compatibility.
                    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
                        value: mod,
                        enumerable: true
                    }) : target,
                    mod
                ));
                var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
                    value: true
                }), mod);
                var __publicField = (obj, key, value) => {
                    __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
                    return value;
                };

                // src/index.ts
                var src_exports = {};
                __export(src_exports, {
                    Combobox: () => Combobox,
                    Dialog: () => Dialog,
                    Disclosure: () => Disclosure,
                    FocusTrap: () => FocusTrap,
                    Listbox: () => Listbox,
                    Menu: () => Menu,
                    Popover: () => Popover,
                    Portal: () => Portal,
                    RadioGroup: () => RadioGroup,
                    Switch: () => Switch,
                    Tab: () => Tab,
                    Transition: () => Transition
                });
                module.exports = __toCommonJS(src_exports);

                // src/components/combobox/combobox.tsx
                var import_react19 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/hooks/use-computed.ts
                var import_react3 = __webpack_require__( /*! react */ "react");

                // src/hooks/use-iso-morphic-effect.ts
                var import_react = __webpack_require__( /*! react */ "react");

                // src/utils/env.ts
                var Env = class {
                    constructor() {
                        __publicField(this, "current", this.detect());
                        __publicField(this, "handoffState", "pending");
                        __publicField(this, "currentId", 0);
                    }
                    set(env2) {
                        if (this.current === env2)
                            return;
                        this.handoffState = "pending";
                        this.currentId = 0;
                        this.current = env2;
                    }
                    reset() {
                        this.set(this.detect());
                    }
                    nextId() {
                        return ++this.currentId;
                    }
                    get isServer() {
                        return this.current === "server";
                    }
                    get isClient() {
                        return this.current === "client";
                    }
                    detect() {
                        if (typeof window === "undefined" || typeof document === "undefined") {
                            return "server";
                        }
                        return "client";
                    }
                    handoff() {
                        if (this.handoffState === "pending") {
                            this.handoffState = "complete";
                        }
                    }
                    get isHandoffComplete() {
                        return this.handoffState === "complete";
                    }
                };
                var env = new Env();

                // src/hooks/use-iso-morphic-effect.ts
                var useIsoMorphicEffect = (effect, deps) => {
                    if (env.isServer) {
                        (0, import_react.useEffect)(effect, deps);
                    } else {
                        (0, import_react.useLayoutEffect)(effect, deps);
                    }
                };

                // src/hooks/use-latest-value.ts
                var import_react2 = __webpack_require__( /*! react */ "react");

                function useLatestValue(value) {
                    let cache = (0, import_react2.useRef)(value);
                    useIsoMorphicEffect(() => {
                        cache.current = value;
                    }, [value]);
                    return cache;
                }

                // src/hooks/use-computed.ts
                function useComputed(cb, dependencies) {
                    let [value, setValue] = (0, import_react3.useState)(cb);
                    let cbRef = useLatestValue(cb);
                    useIsoMorphicEffect(() => setValue(cbRef.current), [cbRef, setValue, ...dependencies]);
                    return value;
                }

                // src/hooks/use-disposables.ts
                var import_react4 = __webpack_require__( /*! react */ "react");

                // src/utils/micro-task.ts
                function microTask(cb) {
                    if (typeof queueMicrotask === "function") {
                        queueMicrotask(cb);
                    } else {
                        Promise.resolve().then(cb).catch(
                            (e) => setTimeout(() => {
                                throw e;
                            })
                        );
                    }
                }

                // src/utils/disposables.ts
                function disposables() {
                    let _disposables = [];
                    let api = {
                        addEventListener(element, name, listener, options) {
                            element.addEventListener(name, listener, options);
                            return api.add(() => element.removeEventListener(name, listener, options));
                        },
                        requestAnimationFrame(...args) {
                            let raf = requestAnimationFrame(...args);
                            return api.add(() => cancelAnimationFrame(raf));
                        },
                        nextFrame(...args) {
                            return api.requestAnimationFrame(() => {
                                return api.requestAnimationFrame(...args);
                            });
                        },
                        setTimeout(...args) {
                            let timer = setTimeout(...args);
                            return api.add(() => clearTimeout(timer));
                        },
                        microTask(...args) {
                            let task = {
                                current: true
                            };
                            microTask(() => {
                                if (task.current) {
                                    args[0]();
                                }
                            });
                            return api.add(() => {
                                task.current = false;
                            });
                        },
                        style(node, property, value) {
                            let previous = node.style.getPropertyValue(property);
                            Object.assign(node.style, {
                                [property]: value
                            });
                            return this.add(() => {
                                Object.assign(node.style, {
                                    [property]: previous
                                });
                            });
                        },
                        group(cb) {
                            let d = disposables();
                            cb(d);
                            return this.add(() => d.dispose());
                        },
                        add(cb) {
                            _disposables.push(cb);
                            return () => {
                                let idx = _disposables.indexOf(cb);
                                if (idx >= 0) {
                                    for (let dispose of _disposables.splice(idx, 1)) {
                                        dispose();
                                    }
                                }
                            };
                        },
                        dispose() {
                            for (let dispose of _disposables.splice(0)) {
                                dispose();
                            }
                        }
                    };
                    return api;
                }

                // src/hooks/use-disposables.ts
                function useDisposables() {
                    let [d] = (0, import_react4.useState)(disposables);
                    (0, import_react4.useEffect)(() => () => d.dispose(), [d]);
                    return d;
                }

                // src/hooks/use-event.ts
                var import_react5 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var useEvent = (
                    // TODO: Add React.useEvent ?? once the useEvent hook is available
                    function useEvent2(cb) {
                        let cache = useLatestValue(cb);
                        return import_react5.default.useCallback((...args) => cache.current(...args), [cache]);
                    }
                );

                // src/hooks/use-id.ts
                var import_react7 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/hooks/use-server-handoff-complete.ts
                var import_react6 = __webpack_require__( /*! react */ "react");

                function useServerHandoffComplete() {
                    let [complete, setComplete] = (0, import_react6.useState)(env.isHandoffComplete);
                    if (complete && env.isHandoffComplete === false) {
                        setComplete(false);
                    }
                    (0, import_react6.useEffect)(() => {
                        if (complete === true)
                            return;
                        setComplete(true);
                    }, [complete]);
                    (0, import_react6.useEffect)(() => env.handoff(), []);
                    return complete;
                }

                // src/hooks/use-id.ts
                var _a;
                var useId = (
                    // Prefer React's `useId` if it's available.
                    // @ts-expect-error - `useId` doesn't exist in React < 18.
                    (_a = import_react7.default.useId) != null ? _a : function useId2() {
                        let ready = useServerHandoffComplete();
                        let [id, setId] = import_react7.default.useState(ready ? () => env.nextId() : null);
                        useIsoMorphicEffect(() => {
                            if (id === null)
                                setId(env.nextId());
                        }, [id]);
                        return id != null ? "" + id : void 0;
                    }
                );

                // src/hooks/use-outside-click.ts
                var import_react10 = __webpack_require__( /*! react */ "react");

                // src/utils/match.ts
                function match(value, lookup, ...args) {
                    if (value in lookup) {
                        let returnValue = lookup[value];
                        return typeof returnValue === "function" ? returnValue(...args) : returnValue;
                    }
                    let error = new Error(
                        `Tried to handle "${value}" but there is no handler defined. Only defined handlers are: ${Object.keys(
      lookup
    ).map((key) => `"${key}"`).join(", ")}.`
                    );
                    if (Error.captureStackTrace)
                        Error.captureStackTrace(error, match);
                    throw error;
                }

                // src/utils/owner.ts
                function getOwnerDocument(element) {
                    if (env.isServer)
                        return null;
                    if (element instanceof Node)
                        return element.ownerDocument;
                    if (element == null ? void 0 : element.hasOwnProperty("current")) {
                        if (element.current instanceof Node)
                            return element.current.ownerDocument;
                    }
                    return document;
                }

                // src/utils/focus-management.ts
                var focusableSelector = [
                    "[contentEditable=true]",
                    "[tabindex]",
                    "a[href]",
                    "area[href]",
                    "button:not([disabled])",
                    "iframe",
                    "input:not([disabled])",
                    "select:not([disabled])",
                    "textarea:not([disabled])"
                ].map(
                    false ? (
                        // TODO: Remove this once JSDOM fixes the issue where an element that is
                        // "hidden" can be the document.activeElement, because this is not possible
                        // in real browsers.
                        0
                    ) : (selector) => `${selector}:not([tabindex='-1'])`
                ).join(",");

                function getFocusableElements(container = document.body) {
                    if (container == null)
                        return [];
                    return Array.from(container.querySelectorAll(focusableSelector)).sort(
                        // We want to move `tabIndex={0}` to the end of the list, this is what the browser does as well.
                        (a, z) => Math.sign((a.tabIndex || Number.MAX_SAFE_INTEGER) - (z.tabIndex || Number.MAX_SAFE_INTEGER))
                    );
                }

                function isFocusableElement(element, mode = 0 /* Strict */ ) {
                    var _a3;
                    if (element === ((_a3 = getOwnerDocument(element)) == null ? void 0 : _a3.body))
                        return false;
                    return match(mode, {
                        [0 /* Strict */ ]() {
                            return element.matches(focusableSelector);
                        },
                        [1 /* Loose */ ]() {
                            let next = element;
                            while (next !== null) {
                                if (next.matches(focusableSelector))
                                    return true;
                                next = next.parentElement;
                            }
                            return false;
                        }
                    });
                }

                function restoreFocusIfNecessary(element) {
                    let ownerDocument = getOwnerDocument(element);
                    disposables().nextFrame(() => {
                        if (ownerDocument && !isFocusableElement(ownerDocument.activeElement, 0 /* Strict */ )) {
                            focusElement(element);
                        }
                    });
                }
                if (typeof window !== "undefined" && typeof document !== "undefined") {
                    document.addEventListener(
                        "keydown",
                        (event) => {
                            if (event.metaKey || event.altKey || event.ctrlKey) {
                                return;
                            }
                            document.documentElement.dataset.headlessuiFocusVisible = "";
                        },
                        true
                    );
                    document.addEventListener(
                        "click",
                        (event) => {
                            if (event.detail === 1 /* Mouse */ ) {
                                delete document.documentElement.dataset.headlessuiFocusVisible;
                            } else if (event.detail === 0 /* Keyboard */ ) {
                                document.documentElement.dataset.headlessuiFocusVisible = "";
                            }
                        },
                        true
                    );
                }

                function focusElement(element) {
                    element == null ? void 0 : element.focus({
                        preventScroll: true
                    });
                }
                var selectableSelector = ["textarea", "input"].join(",");

                function isSelectableElement(element) {
                    var _a3, _b;
                    return (_b = (_a3 = element == null ? void 0 : element.matches) == null ? void 0 : _a3.call(element, selectableSelector)) != null ? _b : false;
                }

                function sortByDomNode(nodes, resolveKey = (i) => i) {
                    return nodes.slice().sort((aItem, zItem) => {
                        let a = resolveKey(aItem);
                        let z = resolveKey(zItem);
                        if (a === null || z === null)
                            return 0;
                        let position = a.compareDocumentPosition(z);
                        if (position & Node.DOCUMENT_POSITION_FOLLOWING)
                            return -1;
                        if (position & Node.DOCUMENT_POSITION_PRECEDING)
                            return 1;
                        return 0;
                    });
                }

                function focusFrom(current, focus) {
                    return focusIn(getFocusableElements(), focus, {
                        relativeTo: current
                    });
                }

                function focusIn(container, focus, {
                    sorted = true,
                    relativeTo = null,
                    skipElements = []
                } = {}) {
                    let ownerDocument = Array.isArray(container) ? container.length > 0 ? container[0].ownerDocument : document : container.ownerDocument;
                    let elements = Array.isArray(container) ? sorted ? sortByDomNode(container) : container : getFocusableElements(container);
                    if (skipElements.length > 0 && elements.length > 1) {
                        elements = elements.filter((x) => !skipElements.includes(x));
                    }
                    relativeTo = relativeTo != null ? relativeTo : ownerDocument.activeElement;
                    let direction = (() => {
                        if (focus & (1 /* First */ | 4 /* Next */ ))
                            return 1 /* Next */ ;
                        if (focus & (2 /* Previous */ | 8 /* Last */ ))
                            return -1 /* Previous */ ;
                        throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
                    })();
                    let startIndex = (() => {
                        if (focus & 1 /* First */ )
                            return 0;
                        if (focus & 2 /* Previous */ )
                            return Math.max(0, elements.indexOf(relativeTo)) - 1;
                        if (focus & 4 /* Next */ )
                            return Math.max(0, elements.indexOf(relativeTo)) + 1;
                        if (focus & 8 /* Last */ )
                            return elements.length - 1;
                        throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
                    })();
                    let focusOptions = focus & 32 /* NoScroll */ ? {
                        preventScroll: true
                    } : {};
                    let offset = 0;
                    let total = elements.length;
                    let next = void 0;
                    do {
                        if (offset >= total || offset + total <= 0)
                            return 0 /* Error */ ;
                        let nextIdx = startIndex + offset;
                        if (focus & 16 /* WrapAround */ ) {
                            nextIdx = (nextIdx + total) % total;
                        } else {
                            if (nextIdx < 0)
                                return 3 /* Underflow */ ;
                            if (nextIdx >= total)
                                return 1 /* Overflow */ ;
                        }
                        next = elements[nextIdx];
                        next == null ? void 0 : next.focus(focusOptions);
                        offset += direction;
                    } while (next !== ownerDocument.activeElement);
                    if (focus & (4 /* Next */ | 2 /* Previous */ ) && isSelectableElement(next)) {
                        next.select();
                    }
                    return 2 /* Success */ ;
                }

                // src/hooks/use-document-event.ts
                var import_react8 = __webpack_require__( /*! react */ "react");

                function useDocumentEvent(type, listener, options) {
                    let listenerRef = useLatestValue(listener);
                    (0, import_react8.useEffect)(() => {
                        function handler(event) {
                            listenerRef.current(event);
                        }
                        document.addEventListener(type, handler, options);
                        return () => document.removeEventListener(type, handler, options);
                    }, [type, options]);
                }

                // src/hooks/use-window-event.ts
                var import_react9 = __webpack_require__( /*! react */ "react");

                function useWindowEvent(type, listener, options) {
                    let listenerRef = useLatestValue(listener);
                    (0, import_react9.useEffect)(() => {
                        function handler(event) {
                            listenerRef.current(event);
                        }
                        window.addEventListener(type, handler, options);
                        return () => window.removeEventListener(type, handler, options);
                    }, [type, options]);
                }

                // src/hooks/use-outside-click.ts
                function useOutsideClick(containers, cb, enabled = true) {
                    let enabledRef = (0, import_react10.useRef)(false);
                    (0, import_react10.useEffect)(
                        false ? 0 : () => {
                            requestAnimationFrame(() => {
                                enabledRef.current = enabled;
                            });
                        },
                        [enabled]
                    );

                    function handleOutsideClick(event, resolveTarget) {
                        if (!enabledRef.current)
                            return;
                        if (event.defaultPrevented)
                            return;
                        let target = resolveTarget(event);
                        if (target === null) {
                            return;
                        }
                        if (!target.getRootNode().contains(target))
                            return;
                        let _containers = function resolve(containers2) {
                            if (typeof containers2 === "function") {
                                return resolve(containers2());
                            }
                            if (Array.isArray(containers2)) {
                                return containers2;
                            }
                            if (containers2 instanceof Set) {
                                return containers2;
                            }
                            return [containers2];
                        }(containers);
                        for (let container of _containers) {
                            if (container === null)
                                continue;
                            let domNode = container instanceof HTMLElement ? container : container.current;
                            if (domNode == null ? void 0 : domNode.contains(target)) {
                                return;
                            }
                            if (event.composed && event.composedPath().includes(domNode)) {
                                return;
                            }
                        }
                        if (
                            // This check alllows us to know whether or not we clicked on a "focusable" element like a
                            // button or an input. This is a backwards compatibility check so that you can open a <Menu
                            // /> and click on another <Menu /> which should close Menu A and open Menu B. We might
                            // revisit that so that you will require 2 clicks instead.
                            !isFocusableElement(target, 1 /* Loose */ ) && // This could be improved, but the `Combobox.Button` adds tabIndex={-1} to make it
                            // unfocusable via the keyboard so that tabbing to the next item from the input doesn't
                            // first go to the button.
                            target.tabIndex !== -1
                        ) {
                            event.preventDefault();
                        }
                        return cb(event, target);
                    }
                    let initialClickTarget = (0, import_react10.useRef)(null);
                    useDocumentEvent(
                        "mousedown",
                        (event) => {
                            var _a3, _b;
                            if (enabledRef.current) {
                                initialClickTarget.current = ((_b = (_a3 = event.composedPath) == null ? void 0 : _a3.call(event)) == null ? void 0 : _b[0]) || event.target;
                            }
                        },
                        true
                    );
                    useDocumentEvent(
                        "click",
                        (event) => {
                            if (!initialClickTarget.current) {
                                return;
                            }
                            handleOutsideClick(event, () => {
                                return initialClickTarget.current;
                            });
                            initialClickTarget.current = null;
                        },
                        // We will use the `capture` phase so that layers in between with `event.stopPropagation()`
                        // don't "cancel" this outside click check. E.g.: A `Menu` inside a `DialogPanel` if the `Menu`
                        // is open, and you click outside of it in the `DialogPanel` the `Menu` should close. However,
                        // the `DialogPanel` has a `onClick(e) { e.stopPropagation() }` which would cancel this.
                        true
                    );
                    useWindowEvent(
                        "blur",
                        (event) => handleOutsideClick(
                            event,
                            () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null
                        ),
                        true
                    );
                }

                // src/hooks/use-resolve-button-type.ts
                var import_react11 = __webpack_require__( /*! react */ "react");

                function resolveType(props) {
                    var _a3;
                    if (props.type)
                        return props.type;
                    let tag = (_a3 = props.as) != null ? _a3 : "button";
                    if (typeof tag === "string" && tag.toLowerCase() === "button")
                        return "button";
                    return void 0;
                }

                function useResolveButtonType(props, ref) {
                    let [type, setType] = (0, import_react11.useState)(() => resolveType(props));
                    useIsoMorphicEffect(() => {
                        setType(resolveType(props));
                    }, [props.type, props.as]);
                    useIsoMorphicEffect(() => {
                        if (type)
                            return;
                        if (!ref.current)
                            return;
                        if (ref.current instanceof HTMLButtonElement && !ref.current.hasAttribute("type")) {
                            setType("button");
                        }
                    }, [type, ref]);
                    return type;
                }

                // src/hooks/use-sync-refs.ts
                var import_react12 = __webpack_require__( /*! react */ "react");
                var Optional = Symbol();

                function optionalRef(cb, isOptional = true) {
                    return Object.assign(cb, {
                        [Optional]: isOptional
                    });
                }

                function useSyncRefs(...refs) {
                    let cache = (0, import_react12.useRef)(refs);
                    (0, import_react12.useEffect)(() => {
                        cache.current = refs;
                    }, [refs]);
                    let syncRefs = useEvent((value) => {
                        for (let ref of cache.current) {
                            if (ref == null)
                                continue;
                            if (typeof ref === "function")
                                ref(value);
                            else
                                ref.current = value;
                        }
                    });
                    return refs.every(
                        (ref) => ref == null || // @ts-expect-error
                        (ref == null ? void 0 : ref[Optional])
                    ) ? void 0 : syncRefs;
                }

                // src/hooks/use-tree-walker.ts
                var import_react13 = __webpack_require__( /*! react */ "react");

                function useTreeWalker({
                    container,
                    accept,
                    walk,
                    enabled = true
                }) {
                    let acceptRef = (0, import_react13.useRef)(accept);
                    let walkRef = (0, import_react13.useRef)(walk);
                    (0, import_react13.useEffect)(() => {
                        acceptRef.current = accept;
                        walkRef.current = walk;
                    }, [accept, walk]);
                    useIsoMorphicEffect(() => {
                        if (!container)
                            return;
                        if (!enabled)
                            return;
                        let ownerDocument = getOwnerDocument(container);
                        if (!ownerDocument)
                            return;
                        let accept2 = acceptRef.current;
                        let walk2 = walkRef.current;
                        let acceptNode = Object.assign((node) => accept2(node), {
                            acceptNode: accept2
                        });
                        let walker = ownerDocument.createTreeWalker(
                            container,
                            NodeFilter.SHOW_ELEMENT,
                            acceptNode,
                            // @ts-expect-error This `false` is a simple small fix for older browsers
                            false
                        );
                        while (walker.nextNode())
                            walk2(walker.currentNode);
                    }, [container, enabled, acceptRef, walkRef]);
                }

                // src/utils/calculate-active-index.ts
                function assertNever(x) {
                    throw new Error("Unexpected object: " + x);
                }

                function calculateActiveIndex(action, resolvers) {
                    let items = resolvers.resolveItems();
                    if (items.length <= 0)
                        return null;
                    let currentActiveIndex = resolvers.resolveActiveIndex();
                    let activeIndex = currentActiveIndex != null ? currentActiveIndex : -1;
                    let nextActiveIndex = (() => {
                        switch (action.focus) {
                            case 0 /* First */ :
                                return items.findIndex((item) => !resolvers.resolveDisabled(item));
                            case 1 /* Previous */ : {
                                let idx = items.slice().reverse().findIndex((item, idx2, all) => {
                                    if (activeIndex !== -1 && all.length - idx2 - 1 >= activeIndex)
                                        return false;
                                    return !resolvers.resolveDisabled(item);
                                });
                                if (idx === -1)
                                    return idx;
                                return items.length - 1 - idx;
                            }
                            case 2 /* Next */ :
                                return items.findIndex((item, idx) => {
                                    if (idx <= activeIndex)
                                        return false;
                                    return !resolvers.resolveDisabled(item);
                                });
                            case 3 /* Last */ : {
                                let idx = items.slice().reverse().findIndex((item) => !resolvers.resolveDisabled(item));
                                if (idx === -1)
                                    return idx;
                                return items.length - 1 - idx;
                            }
                            case 4 /* Specific */ :
                                return items.findIndex((item) => resolvers.resolveId(item) === action.id);
                            case 5 /* Nothing */ :
                                return null;
                            default:
                                assertNever(action);
                        }
                    })();
                    return nextActiveIndex === -1 ? currentActiveIndex : nextActiveIndex;
                }

                // src/utils/render.ts
                var import_react14 = __webpack_require__( /*! react */ "react");

                // src/utils/class-names.ts
                function classNames(...classes) {
                    return classes.filter(Boolean).join(" ");
                }

                // src/utils/render.ts
                function render({
                    ourProps,
                    theirProps,
                    slot,
                    defaultTag,
                    features,
                    visible = true,
                    name
                }) {
                    let props = mergeProps(theirProps, ourProps);
                    if (visible)
                        return _render(props, slot, defaultTag, name);
                    let featureFlags = features != null ? features : 0 /* None */ ;
                    if (featureFlags & 2 /* Static */ ) {
                        let {
                            static: isStatic = false,
                            ...rest
                        } = props;
                        if (isStatic)
                            return _render(rest, slot, defaultTag, name);
                    }
                    if (featureFlags & 1 /* RenderStrategy */ ) {
                        let {
                            unmount = true, ...rest
                        } = props;
                        let strategy = unmount ? 0 /* Unmount */ : 1 /* Hidden */ ;
                        return match(strategy, {
                            [0 /* Unmount */ ]() {
                                return null;
                            },
                            [1 /* Hidden */ ]() {
                                return _render({
                                        ...rest,
                                        ...{
                                            hidden: true,
                                            style: {
                                                display: "none"
                                            }
                                        }
                                    },
                                    slot,
                                    defaultTag,
                                    name
                                );
                            }
                        });
                    }
                    return _render(props, slot, defaultTag, name);
                }

                function _render(props, slot = {}, tag, name) {
                    let {
                        as: Component = tag,
                        children,
                        refName = "ref",
                        ...rest
                    } = omit(props, ["unmount", "static"]);
                    let refRelatedProps = props.ref !== void 0 ? {
                        [refName]: props.ref
                    } : {};
                    let resolvedChildren = typeof children === "function" ? children(slot) : children;
                    if ("className" in rest && rest.className && typeof rest.className === "function") {
                        rest.className = rest.className(slot);
                    }
                    let dataAttributes = {};
                    if (slot) {
                        let exposeState = false;
                        let states = [];
                        for (let [k, v] of Object.entries(slot)) {
                            if (typeof v === "boolean") {
                                exposeState = true;
                            }
                            if (v === true) {
                                states.push(k);
                            }
                        }
                        if (exposeState)
                            dataAttributes[`data-headlessui-state`] = states.join(" ");
                    }
                    if (Component === import_react14.Fragment) {
                        if (Object.keys(compact(rest)).length > 0) {
                            if (!(0, import_react14.isValidElement)(resolvedChildren) || Array.isArray(resolvedChildren) && resolvedChildren.length > 1) {
                                throw new Error(
                                    [
                                        'Passing props on "Fragment"!',
                                        "",
                                        `The current component <${name} /> is rendering a "Fragment".`,
                                        `However we need to passthrough the following props:`,
                                        Object.keys(rest).map((line) => `  - ${line}`).join("\n"),
                                        "",
                                        "You can apply a few solutions:",
                                        [
                                            'Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',
                                            "Render a single element as the child so that we can forward the props onto that element."
                                        ].map((line) => `  - ${line}`).join("\n")
                                    ].join("\n")
                                );
                            }
                            let childProps = resolvedChildren.props;
                            let newClassName = typeof(childProps == null ? void 0 : childProps.className) === "function" ? (...args) => classNames(childProps == null ? void 0 : childProps.className(...args), rest.className) : classNames(childProps == null ? void 0 : childProps.className, rest.className);
                            let classNameProps = newClassName ? {
                                className: newClassName
                            } : {};
                            return (0, import_react14.cloneElement)(
                                resolvedChildren,
                                Object.assign({},
                                    // Filter out undefined values so that they don't override the existing values
                                    mergeProps(resolvedChildren.props, compact(omit(rest, ["ref"]))),
                                    dataAttributes,
                                    refRelatedProps,
                                    mergeRefs(resolvedChildren.ref, refRelatedProps.ref),
                                    classNameProps
                                )
                            );
                        }
                    }
                    return (0, import_react14.createElement)(
                        Component,
                        Object.assign({},
                            omit(rest, ["ref"]),
                            Component !== import_react14.Fragment && refRelatedProps,
                            Component !== import_react14.Fragment && dataAttributes
                        ),
                        resolvedChildren
                    );
                }

                function mergeRefs(...refs) {
                    return {
                        ref: refs.every((ref) => ref == null) ? void 0 : (value) => {
                            for (let ref of refs) {
                                if (ref == null)
                                    continue;
                                if (typeof ref === "function")
                                    ref(value);
                                else
                                    ref.current = value;
                            }
                        }
                    };
                }

                function mergeProps(...listOfProps) {
                    var _a3;
                    if (listOfProps.length === 0)
                        return {};
                    if (listOfProps.length === 1)
                        return listOfProps[0];
                    let target = {};
                    let eventHandlers = {};
                    for (let props of listOfProps) {
                        for (let prop in props) {
                            if (prop.startsWith("on") && typeof props[prop] === "function") {
                                (_a3 = eventHandlers[prop]) != null ? _a3 : eventHandlers[prop] = [];
                                eventHandlers[prop].push(props[prop]);
                            } else {
                                target[prop] = props[prop];
                            }
                        }
                    }
                    if (target.disabled || target["aria-disabled"]) {
                        return Object.assign(
                            target,
                            // Set all event listeners that we collected to `undefined`. This is
                            // important because of the `cloneElement` from above, which merges the
                            // existing and new props, they don't just override therefore we have to
                            // explicitly nullify them.
                            Object.fromEntries(Object.keys(eventHandlers).map((eventName) => [eventName, void 0]))
                        );
                    }
                    for (let eventName in eventHandlers) {
                        Object.assign(target, {
                            [eventName](event, ...args) {
                                let handlers = eventHandlers[eventName];
                                for (let handler of handlers) {
                                    if ((event instanceof Event || (event == null ? void 0 : event.nativeEvent) instanceof Event) && event.defaultPrevented) {
                                        return;
                                    }
                                    handler(event, ...args);
                                }
                            }
                        });
                    }
                    return target;
                }

                function forwardRefWithAs(component) {
                    var _a3;
                    return Object.assign((0, import_react14.forwardRef)(component), {
                        displayName: (_a3 = component.displayName) != null ? _a3 : component.name
                    });
                }

                function compact(object) {
                    let clone = Object.assign({}, object);
                    for (let key in clone) {
                        if (clone[key] === void 0)
                            delete clone[key];
                    }
                    return clone;
                }

                function omit(object, keysToOmit = []) {
                    let clone = Object.assign({}, object);
                    for (let key of keysToOmit) {
                        if (key in clone)
                            delete clone[key];
                    }
                    return clone;
                }

                // src/utils/bugs.ts
                function isDisabledReactIssue7711(element) {
                    let parent = element.parentElement;
                    let legend = null;
                    while (parent && !(parent instanceof HTMLFieldSetElement)) {
                        if (parent instanceof HTMLLegendElement)
                            legend = parent;
                        parent = parent.parentElement;
                    }
                    let isParentDisabled = (parent == null ? void 0 : parent.getAttribute("disabled")) === "";
                    if (isParentDisabled && isFirstLegend(legend))
                        return false;
                    return isParentDisabled;
                }

                function isFirstLegend(element) {
                    if (!element)
                        return false;
                    let previous = element.previousElementSibling;
                    while (previous !== null) {
                        if (previous instanceof HTMLLegendElement)
                            return false;
                        previous = previous.previousElementSibling;
                    }
                    return true;
                }

                // src/utils/form.ts
                function objectToFormEntries(source = {}, parentKey = null, entries = []) {
                    for (let [key, value] of Object.entries(source)) {
                        append(entries, composeKey(parentKey, key), value);
                    }
                    return entries;
                }

                function composeKey(parent, key) {
                    return parent ? parent + "[" + key + "]" : key;
                }

                function append(entries, key, value) {
                    if (Array.isArray(value)) {
                        for (let [subkey, subvalue] of value.entries()) {
                            append(entries, composeKey(key, subkey.toString()), subvalue);
                        }
                    } else if (value instanceof Date) {
                        entries.push([key, value.toISOString()]);
                    } else if (typeof value === "boolean") {
                        entries.push([key, value ? "1" : "0"]);
                    } else if (typeof value === "string") {
                        entries.push([key, value]);
                    } else if (typeof value === "number") {
                        entries.push([key, `${value}`]);
                    } else if (value === null || value === void 0) {
                        entries.push([key, ""]);
                    } else {
                        objectToFormEntries(value, key, entries);
                    }
                }

                function attemptSubmit(element) {
                    var _a3;
                    let form = (_a3 = element == null ? void 0 : element.form) != null ? _a3 : element.closest("form");
                    if (!form)
                        return;
                    for (let element2 of form.elements) {
                        if (element2.tagName === "INPUT" && element2.type === "submit" || element2.tagName === "BUTTON" && element2.type === "submit" || element2.nodeName === "INPUT" && element2.type === "image") {
                            element2.click();
                            return;
                        }
                    }
                }

                // src/internal/hidden.tsx
                var DEFAULT_VISUALLY_HIDDEN_TAG = "div";

                function VisuallyHidden(props, ref) {
                    let {
                        features = 1 /* None */ , ...theirProps
                    } = props;
                    let ourProps = {
                        ref,
                        "aria-hidden": (features & 2 /* Focusable */ ) === 2 /* Focusable */ ? true : void 0,
                        style: {
                            position: "fixed",
                            top: 1,
                            left: 1,
                            width: 1,
                            height: 0,
                            padding: 0,
                            margin: -1,
                            overflow: "hidden",
                            clip: "rect(0, 0, 0, 0)",
                            whiteSpace: "nowrap",
                            borderWidth: "0",
                            ...(features & 4 /* Hidden */ ) === 4 /* Hidden */ && !((features & 2 /* Focusable */ ) === 2 /* Focusable */ ) && {
                                display: "none"
                            }
                        }
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot: {},
                        defaultTag: DEFAULT_VISUALLY_HIDDEN_TAG,
                        name: "Hidden"
                    });
                }
                var Hidden = forwardRefWithAs(VisuallyHidden);

                // src/internal/open-closed.tsx
                var import_react15 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var Context = (0, import_react15.createContext)(null);
                Context.displayName = "OpenClosedContext";

                function useOpenClosed() {
                    return (0, import_react15.useContext)(Context);
                }

                function OpenClosedProvider({
                    value,
                    children
                }) {
                    return /* @__PURE__ */ import_react15.default.createElement(Context.Provider, {
                        value
                    }, children);
                }

                // src/hooks/use-controllable.ts
                var import_react16 = __webpack_require__( /*! react */ "react");

                function useControllable(controlledValue, onChange, defaultValue) {
                    let [internalValue, setInternalValue] = (0, import_react16.useState)(defaultValue);
                    let isControlled = controlledValue !== void 0;
                    let wasControlled = (0, import_react16.useRef)(isControlled);
                    let didWarnOnUncontrolledToControlled = (0, import_react16.useRef)(false);
                    let didWarnOnControlledToUncontrolled = (0, import_react16.useRef)(false);
                    if (isControlled && !wasControlled.current && !didWarnOnUncontrolledToControlled.current) {
                        didWarnOnUncontrolledToControlled.current = true;
                        wasControlled.current = isControlled;
                        console.error(
                            "A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen."
                        );
                    } else if (!isControlled && wasControlled.current && !didWarnOnControlledToUncontrolled.current) {
                        didWarnOnControlledToUncontrolled.current = true;
                        wasControlled.current = isControlled;
                        console.error(
                            "A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen."
                        );
                    }
                    return [
                        isControlled ? controlledValue : internalValue,
                        useEvent((value) => {
                            if (isControlled) {
                                return onChange == null ? void 0 : onChange(value);
                            } else {
                                setInternalValue(value);
                                return onChange == null ? void 0 : onChange(value);
                            }
                        })
                    ];
                }

                // src/hooks/use-watch.ts
                var import_react17 = __webpack_require__( /*! react */ "react");

                function useWatch(cb, dependencies) {
                    let track = (0, import_react17.useRef)([]);
                    let action = useEvent(cb);
                    (0, import_react17.useEffect)(() => {
                        let oldValues = [...track.current];
                        for (let [idx, value] of dependencies.entries()) {
                            if (track.current[idx] !== value) {
                                let returnValue = action(dependencies, oldValues);
                                track.current = dependencies;
                                return returnValue;
                            }
                        }
                    }, [action, ...dependencies]);
                }

                // src/hooks/use-tracked-pointer.ts
                var import_react18 = __webpack_require__( /*! react */ "react");

                function eventToPosition(evt) {
                    return [evt.screenX, evt.screenY];
                }

                function useTrackedPointer() {
                    let lastPos = (0, import_react18.useRef)([-1, -1]);
                    return {
                        wasMoved(evt) {
                            if (false) {}
                            let newPos = eventToPosition(evt);
                            if (lastPos.current[0] === newPos[0] && lastPos.current[1] === newPos[1]) {
                                return false;
                            }
                            lastPos.current = newPos;
                            return true;
                        },
                        update(evt) {
                            lastPos.current = eventToPosition(evt);
                        }
                    };
                }

                // src/utils/platform.ts
                function isIOS() {
                    return (
                        // Check if it is an iPhone
                        /iPhone/gi.test(window.navigator.platform) || // Check if it is an iPad. iPad reports itself as "MacIntel", but we can check if it is a touch
                        // screen. Let's hope that Apple doesn't release a touch screen Mac (or maybe this would then
                        // work as expected 🤔).
                        /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0
                    );
                }

                function isAndroid() {
                    return /Android/gi.test(window.navigator.userAgent);
                }

                function isMobile() {
                    return isIOS() || isAndroid();
                }

                // src/components/combobox/combobox.tsx
                function adjustOrderedState(state, adjustment = (i) => i) {
                    let currentActiveOption = state.activeOptionIndex !== null ? state.options[state.activeOptionIndex] : null;
                    let sortedOptions = sortByDomNode(
                        adjustment(state.options.slice()),
                        (option) => option.dataRef.current.domRef.current
                    );
                    let adjustedActiveOptionIndex = currentActiveOption ? sortedOptions.indexOf(currentActiveOption) : null;
                    if (adjustedActiveOptionIndex === -1) {
                        adjustedActiveOptionIndex = null;
                    }
                    return {
                        options: sortedOptions,
                        activeOptionIndex: adjustedActiveOptionIndex
                    };
                }
                var reducers = {
                    [1 /* CloseCombobox */ ](state) {
                        var _a3;
                        if ((_a3 = state.dataRef.current) == null ? void 0 : _a3.disabled)
                            return state;
                        if (state.comboboxState === 1 /* Closed */ )
                            return state;
                        return {
                            ...state,
                            activeOptionIndex: null,
                            comboboxState: 1 /* Closed */
                        };
                    },
                    [0 /* OpenCombobox */ ](state) {
                        var _a3;
                        if ((_a3 = state.dataRef.current) == null ? void 0 : _a3.disabled)
                            return state;
                        if (state.comboboxState === 0 /* Open */ )
                            return state;
                        let activeOptionIndex = state.activeOptionIndex;
                        if (state.dataRef.current) {
                            let {
                                isSelected
                            } = state.dataRef.current;
                            let optionIdx = state.options.findIndex((option) => isSelected(option.dataRef.current.value));
                            if (optionIdx !== -1) {
                                activeOptionIndex = optionIdx;
                            }
                        }
                        return {
                            ...state,
                            comboboxState: 0 /* Open */ ,
                            activeOptionIndex
                        };
                    },
                    [2 /* GoToOption */ ](state, action) {
                        var _a3, _b, _c, _d;
                        if ((_a3 = state.dataRef.current) == null ? void 0 : _a3.disabled)
                            return state;
                        if (((_b = state.dataRef.current) == null ? void 0 : _b.optionsRef.current) && !((_c = state.dataRef.current) == null ? void 0 : _c.optionsPropsRef.current.static) && state.comboboxState === 1 /* Closed */ ) {
                            return state;
                        }
                        let adjustedState = adjustOrderedState(state);
                        if (adjustedState.activeOptionIndex === null) {
                            let localActiveOptionIndex = adjustedState.options.findIndex(
                                (option) => !option.dataRef.current.disabled
                            );
                            if (localActiveOptionIndex !== -1) {
                                adjustedState.activeOptionIndex = localActiveOptionIndex;
                            }
                        }
                        let activeOptionIndex = calculateActiveIndex(action, {
                            resolveItems: () => adjustedState.options,
                            resolveActiveIndex: () => adjustedState.activeOptionIndex,
                            resolveId: (item) => item.id,
                            resolveDisabled: (item) => item.dataRef.current.disabled
                        });
                        return {
                            ...state,
                            ...adjustedState,
                            activeOptionIndex,
                            activationTrigger: (_d = action.trigger) != null ? _d : 1 /* Other */
                        };
                    },
                    [3 /* RegisterOption */ ]: (state, action) => {
                        var _a3, _b;
                        let option = {
                            id: action.id,
                            dataRef: action.dataRef
                        };
                        let adjustedState = adjustOrderedState(state, (options) => [...options, option]);
                        if (state.activeOptionIndex === null) {
                            if ((_a3 = state.dataRef.current) == null ? void 0 : _a3.isSelected(action.dataRef.current.value)) {
                                adjustedState.activeOptionIndex = adjustedState.options.indexOf(option);
                            }
                        }
                        let nextState = {
                            ...state,
                            ...adjustedState,
                            activationTrigger: 1 /* Other */
                        };
                        if (((_b = state.dataRef.current) == null ? void 0 : _b.__demoMode) && state.dataRef.current.value === void 0) {
                            nextState.activeOptionIndex = 0;
                        }
                        return nextState;
                    },
                    [4 /* UnregisterOption */ ]: (state, action) => {
                        let adjustedState = adjustOrderedState(state, (options) => {
                            let idx = options.findIndex((a) => a.id === action.id);
                            if (idx !== -1)
                                options.splice(idx, 1);
                            return options;
                        });
                        return {
                            ...state,
                            ...adjustedState,
                            activationTrigger: 1 /* Other */
                        };
                    },
                    [5 /* RegisterLabel */ ]: (state, action) => {
                        return {
                            ...state,
                            labelId: action.id
                        };
                    }
                };
                var ComboboxActionsContext = (0, import_react19.createContext)(null);
                ComboboxActionsContext.displayName = "ComboboxActionsContext";

                function useActions(component) {
                    let context = (0, import_react19.useContext)(ComboboxActionsContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Combobox /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useActions);
                        throw err;
                    }
                    return context;
                }
                var ComboboxDataContext = (0, import_react19.createContext)(null);
                ComboboxDataContext.displayName = "ComboboxDataContext";

                function useData(component) {
                    let context = (0, import_react19.useContext)(ComboboxDataContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Combobox /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useData);
                        throw err;
                    }
                    return context;
                }

                function stateReducer(state, action) {
                    return match(action.type, reducers, state, action);
                }
                var DEFAULT_COMBOBOX_TAG = import_react19.Fragment;

                function ComboboxFn(props, ref) {
                    let {
                        value: controlledValue,
                        defaultValue,
                        onChange: controlledOnChange,
                        form: formName,
                        name,
                        by = (a, z) => a === z,
                        disabled = false,
                        __demoMode = false,
                        nullable = false,
                        multiple = false,
                        ...theirProps
                    } = props;
                    let [value = multiple ? [] : void 0, theirOnChange] = useControllable(
                        controlledValue,
                        controlledOnChange,
                        defaultValue
                    );
                    let [state, dispatch] = (0, import_react19.useReducer)(stateReducer, {
                        dataRef: (0, import_react19.createRef)(),
                        comboboxState: __demoMode ? 0 /* Open */ : 1 /* Closed */ ,
                        options: [],
                        activeOptionIndex: null,
                        activationTrigger: 1 /* Other */ ,
                        labelId: null
                    });
                    let defaultToFirstOption = (0, import_react19.useRef)(false);
                    let optionsPropsRef = (0, import_react19.useRef)({
                        static: false,
                        hold: false
                    });
                    let labelRef = (0, import_react19.useRef)(null);
                    let inputRef = (0, import_react19.useRef)(null);
                    let buttonRef = (0, import_react19.useRef)(null);
                    let optionsRef = (0, import_react19.useRef)(null);
                    let compare = useEvent(
                        // @ts-expect-error Eventually we'll want to tackle this, but for now this will do.
                        typeof by === "string" ? (a, z) => {
                            let property = by;
                            return (a == null ? void 0 : a[property]) === (z == null ? void 0 : z[property]);
                        } : by
                    );
                    let isSelected = (0, import_react19.useCallback)(
                        (compareValue) => match(data.mode, {
                            [1 /* Multi */ ]: () => value.some((option) => compare(option, compareValue)),
                            [0 /* Single */ ]: () => compare(value, compareValue)
                        }),
                        [value]
                    );
                    let data = (0, import_react19.useMemo)(
                        () => ({
                            ...state,
                            optionsPropsRef,
                            labelRef,
                            inputRef,
                            buttonRef,
                            optionsRef,
                            value,
                            defaultValue,
                            disabled,
                            mode: multiple ? 1 /* Multi */ : 0 /* Single */ ,
                            get activeOptionIndex() {
                                if (defaultToFirstOption.current && state.activeOptionIndex === null && state.options.length > 0) {
                                    let localActiveOptionIndex = state.options.findIndex(
                                        (option) => !option.dataRef.current.disabled
                                    );
                                    if (localActiveOptionIndex !== -1) {
                                        return localActiveOptionIndex;
                                    }
                                }
                                return state.activeOptionIndex;
                            },
                            compare,
                            isSelected,
                            nullable,
                            __demoMode
                        }),
                        [value, defaultValue, disabled, multiple, nullable, __demoMode, state]
                    );
                    let lastActiveOption = (0, import_react19.useRef)(
                        data.activeOptionIndex !== null ? data.options[data.activeOptionIndex] : null
                    );
                    (0, import_react19.useEffect)(() => {
                        let currentActiveOption = data.activeOptionIndex !== null ? data.options[data.activeOptionIndex] : null;
                        if (lastActiveOption.current !== currentActiveOption) {
                            lastActiveOption.current = currentActiveOption;
                        }
                    });
                    useIsoMorphicEffect(() => {
                        state.dataRef.current = data;
                    }, [data]);
                    useOutsideClick(
                        [data.buttonRef, data.inputRef, data.optionsRef],
                        () => actions.closeCombobox(),
                        data.comboboxState === 0 /* Open */
                    );
                    let slot = (0, import_react19.useMemo)(
                        () => ({
                            open: data.comboboxState === 0 /* Open */ ,
                            disabled,
                            activeIndex: data.activeOptionIndex,
                            activeOption: data.activeOptionIndex === null ? null : data.options[data.activeOptionIndex].dataRef.current.value,
                            value
                        }),
                        [data, disabled, value]
                    );
                    let selectOption = useEvent((id) => {
                        let option = data.options.find((item) => item.id === id);
                        if (!option)
                            return;
                        onChange(option.dataRef.current.value);
                    });
                    let selectActiveOption = useEvent(() => {
                        if (data.activeOptionIndex !== null) {
                            let {
                                dataRef,
                                id
                            } = data.options[data.activeOptionIndex];
                            onChange(dataRef.current.value);
                            actions.goToOption(4 /* Specific */ , id);
                        }
                    });
                    let openCombobox = useEvent(() => {
                        dispatch({
                            type: 0 /* OpenCombobox */
                        });
                        defaultToFirstOption.current = true;
                    });
                    let closeCombobox = useEvent(() => {
                        dispatch({
                            type: 1 /* CloseCombobox */
                        });
                        defaultToFirstOption.current = false;
                    });
                    let goToOption = useEvent((focus, id, trigger) => {
                        defaultToFirstOption.current = false;
                        if (focus === 4 /* Specific */ ) {
                            return dispatch({
                                type: 2 /* GoToOption */ ,
                                focus: 4 /* Specific */ ,
                                id,
                                trigger
                            });
                        }
                        return dispatch({
                            type: 2 /* GoToOption */ ,
                            focus,
                            trigger
                        });
                    });
                    let registerOption = useEvent((id, dataRef) => {
                        dispatch({
                            type: 3 /* RegisterOption */ ,
                            id,
                            dataRef
                        });
                        return () => {
                            var _a3;
                            if (((_a3 = lastActiveOption.current) == null ? void 0 : _a3.id) === id) {
                                defaultToFirstOption.current = true;
                            }
                            dispatch({
                                type: 4 /* UnregisterOption */ ,
                                id
                            });
                        };
                    });
                    let registerLabel = useEvent((id) => {
                        dispatch({
                            type: 5 /* RegisterLabel */ ,
                            id
                        });
                        return () => dispatch({
                            type: 5 /* RegisterLabel */ ,
                            id: null
                        });
                    });
                    let onChange = useEvent((value2) => {
                        return match(data.mode, {
                            [0 /* Single */ ]() {
                                return theirOnChange == null ? void 0 : theirOnChange(value2);
                            },
                            [1 /* Multi */ ]() {
                                let copy = data.value.slice();
                                let idx = copy.findIndex((item) => compare(item, value2));
                                if (idx === -1) {
                                    copy.push(value2);
                                } else {
                                    copy.splice(idx, 1);
                                }
                                return theirOnChange == null ? void 0 : theirOnChange(copy);
                            }
                        });
                    });
                    let actions = (0, import_react19.useMemo)(
                        () => ({
                            onChange,
                            registerOption,
                            registerLabel,
                            goToOption,
                            closeCombobox,
                            openCombobox,
                            selectActiveOption,
                            selectOption
                        }),
                        []
                    );
                    let ourProps = ref === null ? {} : {
                        ref
                    };
                    let form = (0, import_react19.useRef)(null);
                    let d = useDisposables();
                    (0, import_react19.useEffect)(() => {
                        if (!form.current)
                            return;
                        if (defaultValue === void 0)
                            return;
                        d.addEventListener(form.current, "reset", () => {
                            onChange(defaultValue);
                        });
                    }, [
                        form,
                        onChange
                        /* Explicitly ignoring `defaultValue` */
                    ]);
                    return /* @__PURE__ */ import_react19.default.createElement(ComboboxActionsContext.Provider, {
                        value: actions
                    }, /* @__PURE__ */ import_react19.default.createElement(ComboboxDataContext.Provider, {
                        value: data
                    }, /* @__PURE__ */ import_react19.default.createElement(
                        OpenClosedProvider, {
                            value: match(data.comboboxState, {
                                [0 /* Open */ ]: 1 /* Open */ ,
                                [1 /* Closed */ ]: 2 /* Closed */
                            })
                        },
                        name != null && value != null && objectToFormEntries({
                            [name]: value
                        }).map(([name2, value2], idx) => /* @__PURE__ */ import_react19.default.createElement(
                            Hidden, {
                                features: 4 /* Hidden */ ,
                                ref: idx === 0 ? (element) => {
                                    var _a3;
                                    form.current = (_a3 = element == null ? void 0 : element.closest("form")) != null ? _a3 : null;
                                } : void 0,
                                ...compact({
                                    key: name2,
                                    as: "input",
                                    type: "hidden",
                                    hidden: true,
                                    readOnly: true,
                                    form: formName,
                                    name: name2,
                                    value: value2
                                })
                            }
                        )),
                        render({
                            ourProps,
                            theirProps,
                            slot,
                            defaultTag: DEFAULT_COMBOBOX_TAG,
                            name: "Combobox"
                        })
                    )));
                }
                var DEFAULT_INPUT_TAG = "input";

                function InputFn(props, ref) {
                    var _a3, _b, _c, _d;
                    let internalId = useId();
                    let {
                        id = `headlessui-combobox-input-${internalId}`,
                            onChange,
                            displayValue,
                            // @ts-ignore: We know this MAY NOT exist for a given tag but we only care when it _does_ exist.
                            type = "text",
                            ...theirProps
                    } = props;
                    let data = useData("Combobox.Input");
                    let actions = useActions("Combobox.Input");
                    let inputRef = useSyncRefs(data.inputRef, ref);
                    let isTyping = (0, import_react19.useRef)(false);
                    let d = useDisposables();
                    let currentDisplayValue = function() {
                        var _a4;
                        if (typeof displayValue === "function" && data.value !== void 0) {
                            return (_a4 = displayValue(data.value)) != null ? _a4 : "";
                        } else if (typeof data.value === "string") {
                            return data.value;
                        } else {
                            return "";
                        }
                    }();
                    useWatch(
                        ([currentDisplayValue2, state], [oldCurrentDisplayValue, oldState]) => {
                            if (isTyping.current)
                                return;
                            if (!data.inputRef.current)
                                return;
                            if (oldState === 0 /* Open */ && state === 1 /* Closed */ ) {
                                data.inputRef.current.value = currentDisplayValue2;
                            } else if (currentDisplayValue2 !== oldCurrentDisplayValue) {
                                data.inputRef.current.value = currentDisplayValue2;
                            }
                        },
                        [currentDisplayValue, data.comboboxState]
                    );
                    useWatch(
                        ([newState], [oldState]) => {
                            if (newState === 0 /* Open */ && oldState === 1 /* Closed */ ) {
                                let input = data.inputRef.current;
                                if (!input)
                                    return;
                                let currentValue = input.value;
                                let {
                                    selectionStart,
                                    selectionEnd,
                                    selectionDirection
                                } = input;
                                input.value = "";
                                input.value = currentValue;
                                if (selectionDirection !== null) {
                                    input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
                                } else {
                                    input.setSelectionRange(selectionStart, selectionEnd);
                                }
                            }
                        },
                        [data.comboboxState]
                    );
                    let isComposing = (0, import_react19.useRef)(false);
                    let composedChangeEvent = (0, import_react19.useRef)(null);
                    let handleCompositionStart = useEvent(() => {
                        isComposing.current = true;
                    });
                    let handleCompositionEnd = useEvent(() => {
                        d.nextFrame(() => {
                            isComposing.current = false;
                            if (composedChangeEvent.current) {
                                actions.openCombobox();
                                onChange == null ? void 0 : onChange(composedChangeEvent.current);
                                composedChangeEvent.current = null;
                            }
                        });
                    });
                    let handleKeyDown = useEvent((event) => {
                        isTyping.current = true;
                        switch (event.key) {
                            case "Backspace" /* Backspace */ :
                            case "Delete" /* Delete */ :
                                if (data.mode !== 0 /* Single */ )
                                    return;
                                if (!data.nullable)
                                    return;
                                let input = event.currentTarget;
                                d.requestAnimationFrame(() => {
                                    if (input.value === "") {
                                        actions.onChange(null);
                                        if (data.optionsRef.current) {
                                            data.optionsRef.current.scrollTop = 0;
                                        }
                                        actions.goToOption(5 /* Nothing */ );
                                    }
                                });
                                break;
                            case "Enter" /* Enter */ :
                                isTyping.current = false;
                                if (data.comboboxState !== 0 /* Open */ )
                                    return;
                                if (isComposing.current)
                                    return;
                                event.preventDefault();
                                event.stopPropagation();
                                if (data.activeOptionIndex === null) {
                                    actions.closeCombobox();
                                    return;
                                }
                                actions.selectActiveOption();
                                if (data.mode === 0 /* Single */ ) {
                                    actions.closeCombobox();
                                }
                                break;
                            case "ArrowDown" /* ArrowDown */ :
                                isTyping.current = false;
                                event.preventDefault();
                                event.stopPropagation();
                                return match(data.comboboxState, {
                                    [0 /* Open */ ]: () => {
                                        actions.goToOption(2 /* Next */ );
                                    },
                                    [1 /* Closed */ ]: () => {
                                        actions.openCombobox();
                                    }
                                });
                            case "ArrowUp" /* ArrowUp */ :
                                isTyping.current = false;
                                event.preventDefault();
                                event.stopPropagation();
                                return match(data.comboboxState, {
                                    [0 /* Open */ ]: () => {
                                        actions.goToOption(1 /* Previous */ );
                                    },
                                    [1 /* Closed */ ]: () => {
                                        actions.openCombobox();
                                        d.nextFrame(() => {
                                            if (!data.value) {
                                                actions.goToOption(3 /* Last */ );
                                            }
                                        });
                                    }
                                });
                            case "Home" /* Home */ :
                                if (event.shiftKey) {
                                    break;
                                }
                                isTyping.current = false;
                                event.preventDefault();
                                event.stopPropagation();
                                return actions.goToOption(0 /* First */ );
                            case "PageUp" /* PageUp */ :
                                isTyping.current = false;
                                event.preventDefault();
                                event.stopPropagation();
                                return actions.goToOption(0 /* First */ );
                            case "End" /* End */ :
                                if (event.shiftKey) {
                                    break;
                                }
                                isTyping.current = false;
                                event.preventDefault();
                                event.stopPropagation();
                                return actions.goToOption(3 /* Last */ );
                            case "PageDown" /* PageDown */ :
                                isTyping.current = false;
                                event.preventDefault();
                                event.stopPropagation();
                                return actions.goToOption(3 /* Last */ );
                            case "Escape" /* Escape */ :
                                isTyping.current = false;
                                if (data.comboboxState !== 0 /* Open */ )
                                    return;
                                event.preventDefault();
                                if (data.optionsRef.current && !data.optionsPropsRef.current.static) {
                                    event.stopPropagation();
                                }
                                return actions.closeCombobox();
                            case "Tab" /* Tab */ :
                                isTyping.current = false;
                                if (data.comboboxState !== 0 /* Open */ )
                                    return;
                                if (data.mode === 0 /* Single */ )
                                    actions.selectActiveOption();
                                actions.closeCombobox();
                                break;
                        }
                    });
                    let handleChange = useEvent((event) => {
                        if (isComposing.current) {
                            composedChangeEvent.current = event;
                            return;
                        }
                        actions.openCombobox();
                        onChange == null ? void 0 : onChange(event);
                    });
                    let handleBlur = useEvent(() => {
                        isTyping.current = false;
                    });
                    let labelledby = useComputed(() => {
                        if (!data.labelId)
                            return void 0;
                        return [data.labelId].join(" ");
                    }, [data.labelId]);
                    let slot = (0, import_react19.useMemo)(
                        () => ({
                            open: data.comboboxState === 0 /* Open */ ,
                            disabled: data.disabled
                        }),
                        [data]
                    );
                    let ourProps = {
                        ref: inputRef,
                        id,
                        role: "combobox",
                        type,
                        "aria-controls": (_a3 = data.optionsRef.current) == null ? void 0 : _a3.id,
                        "aria-expanded": data.disabled ? void 0 : data.comboboxState === 0 /* Open */ ,
                        "aria-activedescendant": data.activeOptionIndex === null ? void 0 : (_b = data.options[data.activeOptionIndex]) == null ? void 0 : _b.id,
                        "aria-labelledby": labelledby,
                        "aria-autocomplete": "list",
                        defaultValue: (_d = (_c = props.defaultValue) != null ? _c : data.defaultValue !== void 0 ? displayValue == null ? void 0 : displayValue(data.defaultValue) : null) != null ? _d : data.defaultValue,
                        disabled: data.disabled,
                        onCompositionStart: handleCompositionStart,
                        onCompositionEnd: handleCompositionEnd,
                        onKeyDown: handleKeyDown,
                        onChange: handleChange,
                        onBlur: handleBlur
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_INPUT_TAG,
                        name: "Combobox.Input"
                    });
                }
                var DEFAULT_BUTTON_TAG = "button";

                function ButtonFn(props, ref) {
                    var _a3;
                    let data = useData("Combobox.Button");
                    let actions = useActions("Combobox.Button");
                    let buttonRef = useSyncRefs(data.buttonRef, ref);
                    let internalId = useId();
                    let {
                        id = `headlessui-combobox-button-${internalId}`, ...theirProps
                    } = props;
                    let d = useDisposables();
                    let handleKeyDown = useEvent((event) => {
                        switch (event.key) {
                            case "ArrowDown" /* ArrowDown */ :
                                event.preventDefault();
                                event.stopPropagation();
                                if (data.comboboxState === 1 /* Closed */ ) {
                                    actions.openCombobox();
                                }
                                return d.nextFrame(() => {
                                    var _a4;
                                    return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus({
                                        preventScroll: true
                                    });
                                });
                            case "ArrowUp" /* ArrowUp */ :
                                event.preventDefault();
                                event.stopPropagation();
                                if (data.comboboxState === 1 /* Closed */ ) {
                                    actions.openCombobox();
                                    d.nextFrame(() => {
                                        if (!data.value) {
                                            actions.goToOption(3 /* Last */ );
                                        }
                                    });
                                }
                                return d.nextFrame(() => {
                                    var _a4;
                                    return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus({
                                        preventScroll: true
                                    });
                                });
                            case "Escape" /* Escape */ :
                                if (data.comboboxState !== 0 /* Open */ )
                                    return;
                                event.preventDefault();
                                if (data.optionsRef.current && !data.optionsPropsRef.current.static) {
                                    event.stopPropagation();
                                }
                                actions.closeCombobox();
                                return d.nextFrame(() => {
                                    var _a4;
                                    return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus({
                                        preventScroll: true
                                    });
                                });
                            default:
                                return;
                        }
                    });
                    let handleClick = useEvent((event) => {
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return event.preventDefault();
                        if (data.comboboxState === 0 /* Open */ ) {
                            actions.closeCombobox();
                        } else {
                            event.preventDefault();
                            actions.openCombobox();
                        }
                        d.nextFrame(() => {
                            var _a4;
                            return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus({
                                preventScroll: true
                            });
                        });
                    });
                    let labelledby = useComputed(() => {
                        if (!data.labelId)
                            return void 0;
                        return [data.labelId, id].join(" ");
                    }, [data.labelId, id]);
                    let slot = (0, import_react19.useMemo)(
                        () => ({
                            open: data.comboboxState === 0 /* Open */ ,
                            disabled: data.disabled,
                            value: data.value
                        }),
                        [data]
                    );
                    let ourProps = {
                        ref: buttonRef,
                        id,
                        type: useResolveButtonType(props, data.buttonRef),
                        tabIndex: -1,
                        "aria-haspopup": "listbox",
                        "aria-controls": (_a3 = data.optionsRef.current) == null ? void 0 : _a3.id,
                        "aria-expanded": data.disabled ? void 0 : data.comboboxState === 0 /* Open */ ,
                        "aria-labelledby": labelledby,
                        disabled: data.disabled,
                        onClick: handleClick,
                        onKeyDown: handleKeyDown
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_BUTTON_TAG,
                        name: "Combobox.Button"
                    });
                }
                var DEFAULT_LABEL_TAG = "label";

                function LabelFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-combobox-label-${internalId}`, ...theirProps
                    } = props;
                    let data = useData("Combobox.Label");
                    let actions = useActions("Combobox.Label");
                    let labelRef = useSyncRefs(data.labelRef, ref);
                    useIsoMorphicEffect(() => actions.registerLabel(id), [id]);
                    let handleClick = useEvent(() => {
                        var _a3;
                        return (_a3 = data.inputRef.current) == null ? void 0 : _a3.focus({
                            preventScroll: true
                        });
                    });
                    let slot = (0, import_react19.useMemo)(
                        () => ({
                            open: data.comboboxState === 0 /* Open */ ,
                            disabled: data.disabled
                        }),
                        [data]
                    );
                    let ourProps = {
                        ref: labelRef,
                        id,
                        onClick: handleClick
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_LABEL_TAG,
                        name: "Combobox.Label"
                    });
                }
                var DEFAULT_OPTIONS_TAG = "ul";
                var OptionsRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */ ;

                function OptionsFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-combobox-options-${internalId}`, hold = false, ...theirProps
                    } = props;
                    let data = useData("Combobox.Options");
                    let optionsRef = useSyncRefs(data.optionsRef, ref);
                    let usesOpenClosedState = useOpenClosed();
                    let visible = (() => {
                        if (usesOpenClosedState !== null) {
                            return (usesOpenClosedState & 1 /* Open */ ) === 1 /* Open */ ;
                        }
                        return data.comboboxState === 0 /* Open */ ;
                    })();
                    useIsoMorphicEffect(() => {
                        var _a3;
                        data.optionsPropsRef.current.static = (_a3 = props.static) != null ? _a3 : false;
                    }, [data.optionsPropsRef, props.static]);
                    useIsoMorphicEffect(() => {
                        data.optionsPropsRef.current.hold = hold;
                    }, [data.optionsPropsRef, hold]);
                    useTreeWalker({
                        container: data.optionsRef.current,
                        enabled: data.comboboxState === 0 /* Open */ ,
                        accept(node) {
                            if (node.getAttribute("role") === "option")
                                return NodeFilter.FILTER_REJECT;
                            if (node.hasAttribute("role"))
                                return NodeFilter.FILTER_SKIP;
                            return NodeFilter.FILTER_ACCEPT;
                        },
                        walk(node) {
                            node.setAttribute("role", "none");
                        }
                    });
                    let labelledby = useComputed(
                        () => {
                            var _a3, _b;
                            return (_b = data.labelId) != null ? _b : (_a3 = data.buttonRef.current) == null ? void 0 : _a3.id;
                        },
                        [data.labelId, data.buttonRef.current]
                    );
                    let slot = (0, import_react19.useMemo)(
                        () => ({
                            open: data.comboboxState === 0 /* Open */
                        }),
                        [data]
                    );
                    let ourProps = {
                        "aria-labelledby": labelledby,
                        role: "listbox",
                        "aria-multiselectable": data.mode === 1 /* Multi */ ? true : void 0,
                        id,
                        ref: optionsRef
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_OPTIONS_TAG,
                        features: OptionsRenderFeatures,
                        visible,
                        name: "Combobox.Options"
                    });
                }
                var DEFAULT_OPTION_TAG = "li";

                function OptionFn(props, ref) {
                    var _a3, _b;
                    let internalId = useId();
                    let {
                        id = `headlessui-combobox-option-${internalId}`,
                            disabled = false,
                            value,
                            ...theirProps
                    } = props;
                    let data = useData("Combobox.Option");
                    let actions = useActions("Combobox.Option");
                    let active = data.activeOptionIndex !== null ? data.options[data.activeOptionIndex].id === id : false;
                    let selected = data.isSelected(value);
                    let internalOptionRef = (0, import_react19.useRef)(null);
                    let bag = useLatestValue({
                        disabled,
                        value,
                        domRef: internalOptionRef,
                        textValue: (_b = (_a3 = internalOptionRef.current) == null ? void 0 : _a3.textContent) == null ? void 0 : _b.toLowerCase()
                    });
                    let optionRef = useSyncRefs(ref, internalOptionRef);
                    let select = useEvent(() => actions.selectOption(id));
                    useIsoMorphicEffect(() => actions.registerOption(id, bag), [bag, id]);
                    let enableScrollIntoView = (0, import_react19.useRef)(data.__demoMode ? false : true);
                    useIsoMorphicEffect(() => {
                        if (!data.__demoMode)
                            return;
                        let d = disposables();
                        d.requestAnimationFrame(() => {
                            enableScrollIntoView.current = true;
                        });
                        return d.dispose;
                    }, []);
                    useIsoMorphicEffect(() => {
                        if (data.comboboxState !== 0 /* Open */ )
                            return;
                        if (!active)
                            return;
                        if (!enableScrollIntoView.current)
                            return;
                        if (data.activationTrigger === 0 /* Pointer */ )
                            return;
                        let d = disposables();
                        d.requestAnimationFrame(() => {
                            var _a4, _b2;
                            (_b2 = (_a4 = internalOptionRef.current) == null ? void 0 : _a4.scrollIntoView) == null ? void 0 : _b2.call(_a4, {
                                block: "nearest"
                            });
                        });
                        return d.dispose;
                    }, [
                        internalOptionRef,
                        active,
                        data.comboboxState,
                        data.activationTrigger,
                        /* We also want to trigger this when the position of the active item changes so that we can re-trigger the scrollIntoView */
                        data.activeOptionIndex
                    ]);
                    let handleClick = useEvent((event) => {
                        if (disabled)
                            return event.preventDefault();
                        select();
                        if (data.mode === 0 /* Single */ ) {
                            actions.closeCombobox();
                        }
                        if (!isMobile()) {
                            requestAnimationFrame(() => {
                                var _a4;
                                return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus();
                            });
                        }
                    });
                    let handleFocus = useEvent(() => {
                        if (disabled)
                            return actions.goToOption(5 /* Nothing */ );
                        actions.goToOption(4 /* Specific */ , id);
                    });
                    let pointer = useTrackedPointer();
                    let handleEnter = useEvent((evt) => pointer.update(evt));
                    let handleMove = useEvent((evt) => {
                        if (!pointer.wasMoved(evt))
                            return;
                        if (disabled)
                            return;
                        if (active)
                            return;
                        actions.goToOption(4 /* Specific */ , id, 0 /* Pointer */ );
                    });
                    let handleLeave = useEvent((evt) => {
                        if (!pointer.wasMoved(evt))
                            return;
                        if (disabled)
                            return;
                        if (!active)
                            return;
                        if (data.optionsPropsRef.current.hold)
                            return;
                        actions.goToOption(5 /* Nothing */ );
                    });
                    let slot = (0, import_react19.useMemo)(
                        () => ({
                            active,
                            selected,
                            disabled
                        }),
                        [active, selected, disabled]
                    );
                    let ourProps = {
                        id,
                        ref: optionRef,
                        role: "option",
                        tabIndex: disabled === true ? void 0 : -1,
                        "aria-disabled": disabled === true ? true : void 0,
                        // According to the WAI-ARIA best practices, we should use aria-checked for
                        // multi-select,but Voice-Over disagrees. So we use aria-checked instead for
                        // both single and multi-select.
                        "aria-selected": selected,
                        disabled: void 0,
                        // Never forward the `disabled` prop
                        onClick: handleClick,
                        onFocus: handleFocus,
                        onPointerEnter: handleEnter,
                        onMouseEnter: handleEnter,
                        onPointerMove: handleMove,
                        onMouseMove: handleMove,
                        onPointerLeave: handleLeave,
                        onMouseLeave: handleLeave
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_OPTION_TAG,
                        name: "Combobox.Option"
                    });
                }
                var ComboboxRoot = forwardRefWithAs(ComboboxFn);
                var Button = forwardRefWithAs(ButtonFn);
                var Input = forwardRefWithAs(InputFn);
                var Label = forwardRefWithAs(LabelFn);
                var Options = forwardRefWithAs(OptionsFn);
                var Option = forwardRefWithAs(OptionFn);
                var Combobox = Object.assign(ComboboxRoot, {
                    Input,
                    Button,
                    Label,
                    Options,
                    Option
                });

                // src/components/dialog/dialog.tsx
                var import_react31 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/components/focus-trap/focus-trap.tsx
                var import_react25 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/hooks/use-tab-direction.ts
                var import_react20 = __webpack_require__( /*! react */ "react");

                function useTabDirection() {
                    let direction = (0, import_react20.useRef)(0 /* Forwards */ );
                    useWindowEvent(
                        "keydown",
                        (event) => {
                            if (event.key === "Tab") {
                                direction.current = event.shiftKey ? 1 /* Backwards */ : 0 /* Forwards */ ;
                            }
                        },
                        true
                    );
                    return direction;
                }

                // src/hooks/use-is-mounted.ts
                var import_react21 = __webpack_require__( /*! react */ "react");

                function useIsMounted() {
                    let mounted = (0, import_react21.useRef)(false);
                    useIsoMorphicEffect(() => {
                        mounted.current = true;
                        return () => {
                            mounted.current = false;
                        };
                    }, []);
                    return mounted;
                }

                // src/hooks/use-owner.ts
                var import_react22 = __webpack_require__( /*! react */ "react");

                function useOwnerDocument(...args) {
                    return (0, import_react22.useMemo)(() => getOwnerDocument(...args), [...args]);
                }

                // src/hooks/use-event-listener.ts
                var import_react23 = __webpack_require__( /*! react */ "react");

                function useEventListener(element, type, listener, options) {
                    let listenerRef = useLatestValue(listener);
                    (0, import_react23.useEffect)(() => {
                        element = element != null ? element : window;

                        function handler(event) {
                            listenerRef.current(event);
                        }
                        element.addEventListener(type, handler, options);
                        return () => element.removeEventListener(type, handler, options);
                    }, [element, type, options]);
                }

                // src/utils/document-ready.ts
                function onDocumentReady(cb) {
                    function check() {
                        if (document.readyState === "loading")
                            return;
                        cb();
                        document.removeEventListener("DOMContentLoaded", check);
                    }
                    if (typeof window !== "undefined" && typeof document !== "undefined") {
                        document.addEventListener("DOMContentLoaded", check);
                        check();
                    }
                }

                // src/hooks/use-on-unmount.ts
                var import_react24 = __webpack_require__( /*! react */ "react");

                function useOnUnmount(cb) {
                    let stableCb = useEvent(cb);
                    let trulyUnmounted = (0, import_react24.useRef)(false);
                    (0, import_react24.useEffect)(() => {
                        trulyUnmounted.current = false;
                        return () => {
                            trulyUnmounted.current = true;
                            microTask(() => {
                                if (!trulyUnmounted.current)
                                    return;
                                stableCb();
                            });
                        };
                    }, [stableCb]);
                }

                // src/components/focus-trap/focus-trap.tsx
                function resolveContainers(containers) {
                    if (!containers)
                        return /* @__PURE__ */ new Set();
                    if (typeof containers === "function")
                        return new Set(containers());
                    let all = /* @__PURE__ */ new Set();
                    for (let container of containers.current) {
                        if (container.current instanceof HTMLElement) {
                            all.add(container.current);
                        }
                    }
                    return all;
                }
                var DEFAULT_FOCUS_TRAP_TAG = "div";
                var Features3 = /* @__PURE__ */ ((Features4) => {
                    Features4[Features4["None"] = 1] = "None";
                    Features4[Features4["InitialFocus"] = 2] = "InitialFocus";
                    Features4[Features4["TabLock"] = 4] = "TabLock";
                    Features4[Features4["FocusLock"] = 8] = "FocusLock";
                    Features4[Features4["RestoreFocus"] = 16] = "RestoreFocus";
                    Features4[Features4["All"] = 30] = "All";
                    return Features4;
                })(Features3 || {});

                function FocusTrapFn(props, ref) {
                    let container = (0, import_react25.useRef)(null);
                    let focusTrapRef = useSyncRefs(container, ref);
                    let {
                        initialFocus,
                        containers,
                        features = 30 /* All */ ,
                        ...theirProps
                    } = props;
                    if (!useServerHandoffComplete()) {
                        features = 1 /* None */ ;
                    }
                    let ownerDocument = useOwnerDocument(container);
                    useRestoreFocus({
                        ownerDocument
                    }, Boolean(features & 16 /* RestoreFocus */ ));
                    let previousActiveElement = useInitialFocus({
                            ownerDocument,
                            container,
                            initialFocus
                        },
                        Boolean(features & 2 /* InitialFocus */ )
                    );
                    useFocusLock({
                            ownerDocument,
                            container,
                            containers,
                            previousActiveElement
                        },
                        Boolean(features & 8 /* FocusLock */ )
                    );
                    let direction = useTabDirection();
                    let handleFocus = useEvent((e) => {
                        let el = container.current;
                        if (!el)
                            return;
                        let wrapper = false ? 0 : (cb) => cb();
                        wrapper(() => {
                            match(direction.current, {
                                [0 /* Forwards */ ]: () => {
                                    focusIn(el, 1 /* First */ , {
                                        skipElements: [e.relatedTarget]
                                    });
                                },
                                [1 /* Backwards */ ]: () => {
                                    focusIn(el, 8 /* Last */ , {
                                        skipElements: [e.relatedTarget]
                                    });
                                }
                            });
                        });
                    });
                    let d = useDisposables();
                    let recentlyUsedTabKey = (0, import_react25.useRef)(false);
                    let ourProps = {
                        ref: focusTrapRef,
                        onKeyDown(e) {
                            if (e.key == "Tab") {
                                recentlyUsedTabKey.current = true;
                                d.requestAnimationFrame(() => {
                                    recentlyUsedTabKey.current = false;
                                });
                            }
                        },
                        onBlur(e) {
                            let allContainers = resolveContainers(containers);
                            if (container.current instanceof HTMLElement)
                                allContainers.add(container.current);
                            let relatedTarget = e.relatedTarget;
                            if (!(relatedTarget instanceof HTMLElement))
                                return;
                            if (relatedTarget.dataset.headlessuiFocusGuard === "true") {
                                return;
                            }
                            if (!contains(allContainers, relatedTarget)) {
                                if (recentlyUsedTabKey.current) {
                                    focusIn(
                                        container.current,
                                        match(direction.current, {
                                            [0 /* Forwards */ ]: () => 4 /* Next */ ,
                                            [1 /* Backwards */ ]: () => 2 /* Previous */
                                        }) | 16 /* WrapAround */ , {
                                            relativeTo: e.target
                                        }
                                    );
                                } else if (e.target instanceof HTMLElement) {
                                    focusElement(e.target);
                                }
                            }
                        }
                    };
                    return /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, Boolean(features & 4 /* TabLock */ ) && /* @__PURE__ */ import_react25.default.createElement(
                        Hidden, {
                            as: "button",
                            type: "button",
                            "data-headlessui-focus-guard": true,
                            onFocus: handleFocus,
                            features: 2 /* Focusable */
                        }
                    ), render({
                        ourProps,
                        theirProps,
                        defaultTag: DEFAULT_FOCUS_TRAP_TAG,
                        name: "FocusTrap"
                    }), Boolean(features & 4 /* TabLock */ ) && /* @__PURE__ */ import_react25.default.createElement(
                        Hidden, {
                            as: "button",
                            type: "button",
                            "data-headlessui-focus-guard": true,
                            onFocus: handleFocus,
                            features: 2 /* Focusable */
                        }
                    ));
                }
                var FocusTrapRoot = forwardRefWithAs(FocusTrapFn);
                var FocusTrap = Object.assign(FocusTrapRoot, {
                    features: Features3
                });
                var history = [];
                onDocumentReady(() => {
                    function handle(e) {
                        if (!(e.target instanceof HTMLElement))
                            return;
                        if (e.target === document.body)
                            return;
                        if (history[0] === e.target)
                            return;
                        history.unshift(e.target);
                        history = history.filter((x) => x != null && x.isConnected);
                        history.splice(10);
                    }
                    window.addEventListener("click", handle, {
                        capture: true
                    });
                    window.addEventListener("mousedown", handle, {
                        capture: true
                    });
                    window.addEventListener("focus", handle, {
                        capture: true
                    });
                    document.body.addEventListener("click", handle, {
                        capture: true
                    });
                    document.body.addEventListener("mousedown", handle, {
                        capture: true
                    });
                    document.body.addEventListener("focus", handle, {
                        capture: true
                    });
                });

                function useRestoreElement(enabled = true) {
                    let localHistory = (0, import_react25.useRef)(history.slice());
                    useWatch(
                        ([newEnabled], [oldEnabled]) => {
                            if (oldEnabled === true && newEnabled === false) {
                                microTask(() => {
                                    localHistory.current.splice(0);
                                });
                            }
                            if (oldEnabled === false && newEnabled === true) {
                                localHistory.current = history.slice();
                            }
                        },
                        [enabled, history, localHistory]
                    );
                    return useEvent(() => {
                        var _a3;
                        return (_a3 = localHistory.current.find((x) => x != null && x.isConnected)) != null ? _a3 : null;
                    });
                }

                function useRestoreFocus({
                    ownerDocument
                }, enabled) {
                    let getRestoreElement = useRestoreElement(enabled);
                    useWatch(() => {
                        if (enabled)
                            return;
                        if ((ownerDocument == null ? void 0 : ownerDocument.activeElement) === (ownerDocument == null ? void 0 : ownerDocument.body)) {
                            focusElement(getRestoreElement());
                        }
                    }, [enabled]);
                    useOnUnmount(() => {
                        if (!enabled)
                            return;
                        focusElement(getRestoreElement());
                    });
                }

                function useInitialFocus({
                    ownerDocument,
                    container,
                    initialFocus
                }, enabled) {
                    let previousActiveElement = (0, import_react25.useRef)(null);
                    let mounted = useIsMounted();
                    useWatch(() => {
                        if (!enabled)
                            return;
                        let containerElement = container.current;
                        if (!containerElement)
                            return;
                        microTask(() => {
                            if (!mounted.current) {
                                return;
                            }
                            let activeElement = ownerDocument == null ? void 0 : ownerDocument.activeElement;
                            if (initialFocus == null ? void 0 : initialFocus.current) {
                                if ((initialFocus == null ? void 0 : initialFocus.current) === activeElement) {
                                    previousActiveElement.current = activeElement;
                                    return;
                                }
                            } else if (containerElement.contains(activeElement)) {
                                previousActiveElement.current = activeElement;
                                return;
                            }
                            if (initialFocus == null ? void 0 : initialFocus.current) {
                                focusElement(initialFocus.current);
                            } else {
                                if (focusIn(containerElement, 1 /* First */ ) === 0 /* Error */ ) {
                                    console.warn("There are no focusable elements inside the <FocusTrap />");
                                }
                            }
                            previousActiveElement.current = ownerDocument == null ? void 0 : ownerDocument.activeElement;
                        });
                    }, [enabled]);
                    return previousActiveElement;
                }

                function useFocusLock({
                    ownerDocument,
                    container,
                    containers,
                    previousActiveElement
                }, enabled) {
                    let mounted = useIsMounted();
                    useEventListener(
                        ownerDocument == null ? void 0 : ownerDocument.defaultView,
                        "focus",
                        (event) => {
                            if (!enabled)
                                return;
                            if (!mounted.current)
                                return;
                            let allContainers = resolveContainers(containers);
                            if (container.current instanceof HTMLElement)
                                allContainers.add(container.current);
                            let previous = previousActiveElement.current;
                            if (!previous)
                                return;
                            let toElement = event.target;
                            if (toElement && toElement instanceof HTMLElement) {
                                if (!contains(allContainers, toElement)) {
                                    event.preventDefault();
                                    event.stopPropagation();
                                    focusElement(previous);
                                } else {
                                    previousActiveElement.current = toElement;
                                    focusElement(toElement);
                                }
                            } else {
                                focusElement(previousActiveElement.current);
                            }
                        },
                        true
                    );
                }

                function contains(containers, element) {
                    for (let container of containers) {
                        if (container.contains(element))
                            return true;
                    }
                    return false;
                }

                // src/components/portal/portal.tsx
                var import_react27 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var import_react_dom = __webpack_require__( /*! react-dom */ "react-dom");

                // src/internal/portal-force-root.tsx
                var import_react26 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var ForcePortalRootContext = (0, import_react26.createContext)(false);

                function usePortalRoot() {
                    return (0, import_react26.useContext)(ForcePortalRootContext);
                }

                function ForcePortalRoot(props) {
                    return /* @__PURE__ */ import_react26.default.createElement(ForcePortalRootContext.Provider, {
                        value: props.force
                    }, props.children);
                }

                // src/components/portal/portal.tsx
                function usePortalTarget(ref) {
                    let forceInRoot = usePortalRoot();
                    let groupTarget = (0, import_react27.useContext)(PortalGroupContext);
                    let ownerDocument = useOwnerDocument(ref);
                    let [target, setTarget] = (0, import_react27.useState)(() => {
                        if (!forceInRoot && groupTarget !== null)
                            return null;
                        if (env.isServer)
                            return null;
                        let existingRoot = ownerDocument == null ? void 0 : ownerDocument.getElementById("headlessui-portal-root");
                        if (existingRoot)
                            return existingRoot;
                        if (ownerDocument === null)
                            return null;
                        let root = ownerDocument.createElement("div");
                        root.setAttribute("id", "headlessui-portal-root");
                        return ownerDocument.body.appendChild(root);
                    });
                    (0, import_react27.useEffect)(() => {
                        if (target === null)
                            return;
                        if (!(ownerDocument == null ? void 0 : ownerDocument.body.contains(target))) {
                            ownerDocument == null ? void 0 : ownerDocument.body.appendChild(target);
                        }
                    }, [target, ownerDocument]);
                    (0, import_react27.useEffect)(() => {
                        if (forceInRoot)
                            return;
                        if (groupTarget === null)
                            return;
                        setTarget(groupTarget.current);
                    }, [groupTarget, setTarget, forceInRoot]);
                    return target;
                }
                var DEFAULT_PORTAL_TAG = import_react27.Fragment;

                function PortalFn(props, ref) {
                    let theirProps = props;
                    let internalPortalRootRef = (0, import_react27.useRef)(null);
                    let portalRef = useSyncRefs(
                        optionalRef((ref2) => {
                            internalPortalRootRef.current = ref2;
                        }),
                        ref
                    );
                    let ownerDocument = useOwnerDocument(internalPortalRootRef);
                    let target = usePortalTarget(internalPortalRootRef);
                    let [element] = (0, import_react27.useState)(
                        () => {
                            var _a3;
                            return env.isServer ? null : (_a3 = ownerDocument == null ? void 0 : ownerDocument.createElement("div")) != null ? _a3 : null;
                        }
                    );
                    let parent = (0, import_react27.useContext)(PortalParentContext);
                    let ready = useServerHandoffComplete();
                    useIsoMorphicEffect(() => {
                        if (!target || !element)
                            return;
                        if (!target.contains(element)) {
                            element.setAttribute("data-headlessui-portal", "");
                            target.appendChild(element);
                        }
                    }, [target, element]);
                    useIsoMorphicEffect(() => {
                        if (!element)
                            return;
                        if (!parent)
                            return;
                        return parent.register(element);
                    }, [parent, element]);
                    useOnUnmount(() => {
                        var _a3;
                        if (!target || !element)
                            return;
                        if (element instanceof Node && target.contains(element)) {
                            target.removeChild(element);
                        }
                        if (target.childNodes.length <= 0) {
                            (_a3 = target.parentElement) == null ? void 0 : _a3.removeChild(target);
                        }
                    });
                    if (!ready)
                        return null;
                    let ourProps = {
                        ref: portalRef
                    };
                    return !target || !element ? null : (0, import_react_dom.createPortal)(
                        render({
                            ourProps,
                            theirProps,
                            defaultTag: DEFAULT_PORTAL_TAG,
                            name: "Portal"
                        }),
                        element
                    );
                }
                var DEFAULT_GROUP_TAG = import_react27.Fragment;
                var PortalGroupContext = (0, import_react27.createContext)(null);

                function GroupFn(props, ref) {
                    let {
                        target,
                        ...theirProps
                    } = props;
                    let groupRef = useSyncRefs(ref);
                    let ourProps = {
                        ref: groupRef
                    };
                    return /* @__PURE__ */ import_react27.default.createElement(PortalGroupContext.Provider, {
                        value: target
                    }, render({
                        ourProps,
                        theirProps,
                        defaultTag: DEFAULT_GROUP_TAG,
                        name: "Popover.Group"
                    }));
                }
                var PortalParentContext = (0, import_react27.createContext)(null);

                function useNestedPortals() {
                    let parent = (0, import_react27.useContext)(PortalParentContext);
                    let portals = (0, import_react27.useRef)([]);
                    let register = useEvent((portal) => {
                        portals.current.push(portal);
                        if (parent)
                            parent.register(portal);
                        return () => unregister(portal);
                    });
                    let unregister = useEvent((portal) => {
                        let idx = portals.current.indexOf(portal);
                        if (idx !== -1)
                            portals.current.splice(idx, 1);
                        if (parent)
                            parent.unregister(portal);
                    });
                    let api = (0, import_react27.useMemo)(
                        () => ({
                            register,
                            unregister,
                            portals
                        }),
                        [register, unregister, portals]
                    );
                    return [
                        portals,
                        (0, import_react27.useMemo)(() => {
                            return function PortalWrapper({
                                children
                            }) {
                                return /* @__PURE__ */ import_react27.default.createElement(PortalParentContext.Provider, {
                                    value: api
                                }, children);
                            };
                        }, [api])
                    ];
                }
                var PortalRoot = forwardRefWithAs(PortalFn);
                var Group = forwardRefWithAs(GroupFn);
                var Portal = Object.assign(PortalRoot, {
                    Group
                });

                // src/components/description/description.tsx
                var import_react28 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var DescriptionContext = (0, import_react28.createContext)(null);

                function useDescriptionContext() {
                    let context = (0, import_react28.useContext)(DescriptionContext);
                    if (context === null) {
                        let err = new Error(
                            "You used a <Description /> component, but it is not inside a relevant parent."
                        );
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useDescriptionContext);
                        throw err;
                    }
                    return context;
                }

                function useDescriptions() {
                    let [descriptionIds, setDescriptionIds] = (0, import_react28.useState)([]);
                    return [
                        // The actual id's as string or undefined
                        descriptionIds.length > 0 ? descriptionIds.join(" ") : void 0,
                        // The provider component
                        (0, import_react28.useMemo)(() => {
                            return function DescriptionProvider(props) {
                                let register = useEvent((value) => {
                                    setDescriptionIds((existing) => [...existing, value]);
                                    return () => setDescriptionIds((existing) => {
                                        let clone = existing.slice();
                                        let idx = clone.indexOf(value);
                                        if (idx !== -1)
                                            clone.splice(idx, 1);
                                        return clone;
                                    });
                                });
                                let contextBag = (0, import_react28.useMemo)(
                                    () => ({
                                        register,
                                        slot: props.slot,
                                        name: props.name,
                                        props: props.props
                                    }),
                                    [register, props.slot, props.name, props.props]
                                );
                                return /* @__PURE__ */ import_react28.default.createElement(DescriptionContext.Provider, {
                                    value: contextBag
                                }, props.children);
                            };
                        }, [setDescriptionIds])
                    ];
                }
                var DEFAULT_DESCRIPTION_TAG = "p";

                function DescriptionFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-description-${internalId}`, ...theirProps
                    } = props;
                    let context = useDescriptionContext();
                    let descriptionRef = useSyncRefs(ref);
                    useIsoMorphicEffect(() => context.register(id), [id, context.register]);
                    let ourProps = {
                        ref: descriptionRef,
                        ...context.props,
                        id
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot: context.slot || {},
                        defaultTag: DEFAULT_DESCRIPTION_TAG,
                        name: context.name || "Description"
                    });
                }
                var DescriptionRoot = forwardRefWithAs(DescriptionFn);
                var Description = Object.assign(DescriptionRoot, {
                    //
                });

                // src/internal/stack-context.tsx
                var import_react29 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var StackContext = (0, import_react29.createContext)(() => {});
                StackContext.displayName = "StackContext";

                function useStackContext() {
                    return (0, import_react29.useContext)(StackContext);
                }

                function StackProvider({
                    children,
                    onUpdate,
                    type,
                    element,
                    enabled
                }) {
                    let parentUpdate = useStackContext();
                    let notify = useEvent((...args) => {
                        onUpdate == null ? void 0 : onUpdate(...args);
                        parentUpdate(...args);
                    });
                    useIsoMorphicEffect(() => {
                        let shouldNotify = enabled === void 0 || enabled === true;
                        shouldNotify && notify(0 /* Add */ , type, element);
                        return () => {
                            shouldNotify && notify(1 /* Remove */ , type, element);
                        };
                    }, [notify, type, element, enabled]);
                    return /* @__PURE__ */ import_react29.default.createElement(StackContext.Provider, {
                        value: notify
                    }, children);
                }

                // src/use-sync-external-store-shim/index.ts
                var React11 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/use-sync-external-store-shim/useSyncExternalStoreShimClient.ts
                var React10 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                function isPolyfill(x, y) {
                    return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
                }
                var is = typeof Object.is === "function" ? Object.is : isPolyfill;
                var {
                    useState: useState8,
                    useEffect: useEffect14,
                    useLayoutEffect: useLayoutEffect2,
                    useDebugValue
                } = React10;
                var didWarnOld18Alpha = false;
                var didWarnUncachedGetSnapshot = false;

                function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
                    if (true) {
                        if (!didWarnOld18Alpha) {
                            if ("startTransition" in React10) {
                                didWarnOld18Alpha = true;
                                console.error(
                                    "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
                                );
                            }
                        }
                    }
                    const value = getSnapshot();
                    if (true) {
                        if (!didWarnUncachedGetSnapshot) {
                            const cachedValue = getSnapshot();
                            if (!is(value, cachedValue)) {
                                console.error("The result of getSnapshot should be cached to avoid an infinite loop");
                                didWarnUncachedGetSnapshot = true;
                            }
                        }
                    }
                    const [{
                        inst
                    }, forceUpdate] = useState8({
                        inst: {
                            value,
                            getSnapshot
                        }
                    });
                    useLayoutEffect2(() => {
                        inst.value = value;
                        inst.getSnapshot = getSnapshot;
                        if (checkIfSnapshotChanged(inst)) {
                            forceUpdate({
                                inst
                            });
                        }
                    }, [subscribe, value, getSnapshot]);
                    useEffect14(() => {
                        if (checkIfSnapshotChanged(inst)) {
                            forceUpdate({
                                inst
                            });
                        }
                        const handleStoreChange = () => {
                            if (checkIfSnapshotChanged(inst)) {
                                forceUpdate({
                                    inst
                                });
                            }
                        };
                        return subscribe(handleStoreChange);
                    }, [subscribe]);
                    useDebugValue(value);
                    return value;
                }

                function checkIfSnapshotChanged(inst) {
                    const latestGetSnapshot = inst.getSnapshot;
                    const prevValue = inst.value;
                    try {
                        const nextValue = latestGetSnapshot();
                        return !is(prevValue, nextValue);
                    } catch (error) {
                        return true;
                    }
                }

                // src/use-sync-external-store-shim/useSyncExternalStoreShimServer.ts
                function useSyncExternalStore2(subscribe, getSnapshot, getServerSnapshot) {
                    return getSnapshot();
                }

                // src/use-sync-external-store-shim/index.ts
                var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
                var isServerEnvironment = !canUseDOM;
                var shim = isServerEnvironment ? useSyncExternalStore2 : useSyncExternalStore;
                var useSyncExternalStore3 = "useSyncExternalStore" in React11 ? ((r) => r.useSyncExternalStore)(React11) : shim;

                // src/hooks/use-store.ts
                function useStore(store) {
                    return useSyncExternalStore3(store.subscribe, store.getSnapshot, store.getSnapshot);
                }

                // src/utils/store.ts
                function createStore(initial, actions) {
                    let state = initial();
                    let listeners = /* @__PURE__ */ new Set();
                    return {
                        getSnapshot() {
                            return state;
                        },
                        subscribe(onChange) {
                            listeners.add(onChange);
                            return () => listeners.delete(onChange);
                        },
                        dispatch(key, ...args) {
                            let newState = actions[key].call(state, ...args);
                            if (newState) {
                                state = newState;
                                listeners.forEach((listener) => listener());
                            }
                        }
                    };
                }

                // src/hooks/document-overflow/adjust-scrollbar-padding.ts
                function adjustScrollbarPadding() {
                    let scrollbarWidthBefore;
                    return {
                        before({
                            doc
                        }) {
                            var _a3;
                            let documentElement = doc.documentElement;
                            let ownerWindow = (_a3 = doc.defaultView) != null ? _a3 : window;
                            scrollbarWidthBefore = ownerWindow.innerWidth - documentElement.clientWidth;
                        },
                        after({
                            doc,
                            d
                        }) {
                            let documentElement = doc.documentElement;
                            let scrollbarWidthAfter = documentElement.clientWidth - documentElement.offsetWidth;
                            let scrollbarWidth = scrollbarWidthBefore - scrollbarWidthAfter;
                            d.style(documentElement, "paddingRight", `${scrollbarWidth}px`);
                        }
                    };
                }

                // src/hooks/document-overflow/handle-ios-locking.ts
                function handleIOSLocking() {
                    if (!isIOS()) {
                        return {};
                    }
                    let scrollPosition;
                    return {
                        before() {
                            scrollPosition = window.pageYOffset;
                        },
                        after({
                            doc,
                            d,
                            meta
                        }) {
                            function inAllowedContainer(el) {
                                return meta.containers.flatMap((resolve) => resolve()).some((container) => container.contains(el));
                            }
                            d.style(doc.body, "marginTop", `-${scrollPosition}px`);
                            window.scrollTo(0, 0);
                            let scrollToElement = null;
                            d.addEventListener(
                                doc,
                                "click",
                                (e) => {
                                    if (!(e.target instanceof HTMLElement)) {
                                        return;
                                    }
                                    try {
                                        let anchor = e.target.closest("a");
                                        if (!anchor)
                                            return;
                                        let {
                                            hash
                                        } = new URL(anchor.href);
                                        let el = doc.querySelector(hash);
                                        if (el && !inAllowedContainer(el)) {
                                            scrollToElement = el;
                                        }
                                    } catch (err) {}
                                },
                                true
                            );
                            d.addEventListener(
                                doc,
                                "touchmove",
                                (e) => {
                                    if (e.target instanceof HTMLElement && !inAllowedContainer(e.target)) {
                                        e.preventDefault();
                                    }
                                }, {
                                    passive: false
                                }
                            );
                            d.add(() => {
                                window.scrollTo(0, window.pageYOffset + scrollPosition);
                                if (scrollToElement && scrollToElement.isConnected) {
                                    scrollToElement.scrollIntoView({
                                        block: "nearest"
                                    });
                                    scrollToElement = null;
                                }
                            });
                        }
                    };
                }

                // src/hooks/document-overflow/prevent-scroll.ts
                function preventScroll() {
                    return {
                        before({
                            doc,
                            d
                        }) {
                            d.style(doc.documentElement, "overflow", "hidden");
                        }
                    };
                }

                // src/hooks/document-overflow/overflow-store.ts
                function buildMeta(fns) {
                    let tmp = {};
                    for (let fn of fns) {
                        Object.assign(tmp, fn(tmp));
                    }
                    return tmp;
                }
                var overflows = createStore(() => /* @__PURE__ */ new Map(), {
                    PUSH(doc, meta) {
                        var _a3;
                        let entry = (_a3 = this.get(doc)) != null ? _a3 : {
                            doc,
                            count: 0,
                            d: disposables(),
                            meta: /* @__PURE__ */ new Set()
                        };
                        entry.count++;
                        entry.meta.add(meta);
                        this.set(doc, entry);
                        return this;
                    },
                    POP(doc, meta) {
                        let entry = this.get(doc);
                        if (entry) {
                            entry.count--;
                            entry.meta.delete(meta);
                        }
                        return this;
                    },
                    SCROLL_PREVENT({
                        doc,
                        d,
                        meta
                    }) {
                        let ctx = {
                            doc,
                            d,
                            meta: buildMeta(meta)
                        };
                        let steps = [
                            handleIOSLocking(),
                            adjustScrollbarPadding(),
                            preventScroll()
                        ];
                        steps.forEach(({
                            before
                        }) => before == null ? void 0 : before(ctx));
                        steps.forEach(({
                            after
                        }) => after == null ? void 0 : after(ctx));
                    },
                    SCROLL_ALLOW({
                        d
                    }) {
                        d.dispose();
                    },
                    TEARDOWN({
                        doc
                    }) {
                        this.delete(doc);
                    }
                });
                overflows.subscribe(() => {
                    let docs = overflows.getSnapshot();
                    let styles = /* @__PURE__ */ new Map();
                    for (let [doc] of docs) {
                        styles.set(doc, doc.documentElement.style.overflow);
                    }
                    for (let entry of docs.values()) {
                        let isHidden = styles.get(entry.doc) === "hidden";
                        let isLocked = entry.count !== 0;
                        let willChange = isLocked && !isHidden || !isLocked && isHidden;
                        if (willChange) {
                            overflows.dispatch(entry.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", entry);
                        }
                        if (entry.count === 0) {
                            overflows.dispatch("TEARDOWN", entry);
                        }
                    }
                });

                // src/hooks/document-overflow/use-document-overflow.ts
                function useDocumentOverflowLockedEffect(doc, shouldBeLocked, meta) {
                    let store = useStore(overflows);
                    let entry = doc ? store.get(doc) : void 0;
                    let locked = entry ? entry.count > 0 : false;
                    useIsoMorphicEffect(() => {
                        if (!doc || !shouldBeLocked) {
                            return;
                        }
                        overflows.dispatch("PUSH", doc, meta);
                        return () => overflows.dispatch("POP", doc, meta);
                    }, [shouldBeLocked, doc]);
                    return locked;
                }

                // src/hooks/use-inert.tsx
                var originals = /* @__PURE__ */ new Map();
                var counts = /* @__PURE__ */ new Map();

                function useInert(node, enabled = true) {
                    useIsoMorphicEffect(() => {
                        var _a3;
                        if (!enabled)
                            return;
                        let element = typeof node === "function" ? node() : node.current;
                        if (!element)
                            return;

                        function cleanup() {
                            var _a4;
                            if (!element)
                                return;
                            let count2 = (_a4 = counts.get(element)) != null ? _a4 : 1;
                            if (count2 === 1)
                                counts.delete(element);
                            else
                                counts.set(element, count2 - 1);
                            if (count2 !== 1)
                                return;
                            let original = originals.get(element);
                            if (!original)
                                return;
                            if (original["aria-hidden"] === null)
                                element.removeAttribute("aria-hidden");
                            else
                                element.setAttribute("aria-hidden", original["aria-hidden"]);
                            element.inert = original.inert;
                            originals.delete(element);
                        }
                        let count = (_a3 = counts.get(element)) != null ? _a3 : 0;
                        counts.set(element, count + 1);
                        if (count !== 0)
                            return cleanup;
                        originals.set(element, {
                            "aria-hidden": element.getAttribute("aria-hidden"),
                            inert: element.inert
                        });
                        element.setAttribute("aria-hidden", "true");
                        element.inert = true;
                        return cleanup;
                    }, [node, enabled]);
                }

                // src/hooks/use-root-containers.tsx
                var import_react30 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                function useRootContainers({
                    defaultContainers = [],
                    portals
                } = {}) {
                    let mainTreeNodeRef = (0, import_react30.useRef)(null);
                    let ownerDocument = useOwnerDocument(mainTreeNodeRef);
                    let resolveContainers2 = useEvent(() => {
                        var _a3;
                        let containers = [];
                        for (let container of defaultContainers) {
                            if (container === null)
                                continue;
                            if (container instanceof HTMLElement) {
                                containers.push(container);
                            } else if ("current" in container && container.current instanceof HTMLElement) {
                                containers.push(container.current);
                            }
                        }
                        if (portals == null ? void 0 : portals.current) {
                            for (let portal of portals.current) {
                                containers.push(portal);
                            }
                        }
                        for (let container of (_a3 = ownerDocument == null ? void 0 : ownerDocument.querySelectorAll("html > *, body > *")) != null ? _a3 : []) {
                            if (container === document.body)
                                continue;
                            if (container === document.head)
                                continue;
                            if (!(container instanceof HTMLElement))
                                continue;
                            if (container.id === "headlessui-portal-root")
                                continue;
                            if (container.contains(mainTreeNodeRef.current))
                                continue;
                            if (containers.some((defaultContainer) => container.contains(defaultContainer)))
                                continue;
                            containers.push(container);
                        }
                        return containers;
                    });
                    return {
                        resolveContainers: resolveContainers2,
                        contains: useEvent(
                            (element) => resolveContainers2().some((container) => container.contains(element))
                        ),
                        mainTreeNodeRef,
                        MainTreeNode: (0, import_react30.useMemo)(() => {
                            return function MainTreeNode() {
                                return /* @__PURE__ */ import_react30.default.createElement(Hidden, {
                                    features: 4 /* Hidden */ ,
                                    ref: mainTreeNodeRef
                                });
                            };
                        }, [mainTreeNodeRef])
                    };
                }

                // src/components/dialog/dialog.tsx
                var reducers2 = {
                    [0 /* SetTitleId */ ](state, action) {
                        if (state.titleId === action.id)
                            return state;
                        return {
                            ...state,
                            titleId: action.id
                        };
                    }
                };
                var DialogContext = (0, import_react31.createContext)(null);
                DialogContext.displayName = "DialogContext";

                function useDialogContext(component) {
                    let context = (0, import_react31.useContext)(DialogContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Dialog /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useDialogContext);
                        throw err;
                    }
                    return context;
                }

                function useScrollLock(ownerDocument, enabled, resolveAllowedContainers = () => [document.body]) {
                    useDocumentOverflowLockedEffect(ownerDocument, enabled, (meta) => {
                        var _a3;
                        return {
                            containers: [...(_a3 = meta.containers) != null ? _a3 : [], resolveAllowedContainers]
                        };
                    });
                }

                function stateReducer2(state, action) {
                    return match(action.type, reducers2, state, action);
                }
                var DEFAULT_DIALOG_TAG = "div";
                var DialogRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */ ;

                function DialogFn(props, ref) {
                    var _a3;
                    let internalId = useId();
                    let {
                        id = `headlessui-dialog-${internalId}`,
                            open,
                            onClose,
                            initialFocus,
                            __demoMode = false,
                            ...theirProps
                    } = props;
                    let [nestedDialogCount, setNestedDialogCount] = (0, import_react31.useState)(0);
                    let usesOpenClosedState = useOpenClosed();
                    if (open === void 0 && usesOpenClosedState !== null) {
                        open = (usesOpenClosedState & 1 /* Open */ ) === 1 /* Open */ ;
                    }
                    let internalDialogRef = (0, import_react31.useRef)(null);
                    let dialogRef = useSyncRefs(internalDialogRef, ref);
                    let ownerDocument = useOwnerDocument(internalDialogRef);
                    let hasOpen = props.hasOwnProperty("open") || usesOpenClosedState !== null;
                    let hasOnClose = props.hasOwnProperty("onClose");
                    if (!hasOpen && !hasOnClose) {
                        throw new Error(
                            `You have to provide an \`open\` and an \`onClose\` prop to the \`Dialog\` component.`
                        );
                    }
                    if (!hasOpen) {
                        throw new Error(
                            `You provided an \`onClose\` prop to the \`Dialog\`, but forgot an \`open\` prop.`
                        );
                    }
                    if (!hasOnClose) {
                        throw new Error(
                            `You provided an \`open\` prop to the \`Dialog\`, but forgot an \`onClose\` prop.`
                        );
                    }
                    if (typeof open !== "boolean") {
                        throw new Error(
                            `You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${open}`
                        );
                    }
                    if (typeof onClose !== "function") {
                        throw new Error(
                            `You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${onClose}`
                        );
                    }
                    let dialogState = open ? 0 /* Open */ : 1 /* Closed */ ;
                    let [state, dispatch] = (0, import_react31.useReducer)(stateReducer2, {
                        titleId: null,
                        descriptionId: null,
                        panelRef: (0, import_react31.createRef)()
                    });
                    let close = useEvent(() => onClose(false));
                    let setTitleId = useEvent((id2) => dispatch({
                        type: 0 /* SetTitleId */ ,
                        id: id2
                    }));
                    let ready = useServerHandoffComplete();
                    let enabled = ready ? __demoMode ? false : dialogState === 0 /* Open */ : false;
                    let hasNestedDialogs = nestedDialogCount > 1;
                    let hasParentDialog = (0, import_react31.useContext)(DialogContext) !== null;
                    let [portals, PortalWrapper] = useNestedPortals();
                    let {
                        resolveContainers: resolveRootContainers,
                        mainTreeNodeRef,
                        MainTreeNode
                    } = useRootContainers({
                        portals,
                        defaultContainers: [(_a3 = state.panelRef.current) != null ? _a3 : internalDialogRef.current]
                    });
                    let position = !hasNestedDialogs ? "leaf" : "parent";
                    let isClosing = usesOpenClosedState !== null ? (usesOpenClosedState & 4 /* Closing */ ) === 4 /* Closing */ : false;
                    let inertOthersEnabled = (() => {
                        if (hasParentDialog)
                            return false;
                        if (isClosing)
                            return false;
                        return enabled;
                    })();
                    let resolveRootOfMainTreeNode = (0, import_react31.useCallback)(() => {
                        var _a4, _b;
                        return (_b = Array.from((_a4 = ownerDocument == null ? void 0 : ownerDocument.querySelectorAll("body > *")) != null ? _a4 : []).find((root) => {
                            if (root.id === "headlessui-portal-root")
                                return false;
                            return root.contains(mainTreeNodeRef.current) && root instanceof HTMLElement;
                        })) != null ? _b : null;
                    }, [mainTreeNodeRef]);
                    useInert(resolveRootOfMainTreeNode, inertOthersEnabled);
                    let inertParentDialogs = (() => {
                        if (hasNestedDialogs)
                            return true;
                        return enabled;
                    })();
                    let resolveRootOfParentDialog = (0, import_react31.useCallback)(() => {
                        var _a4, _b;
                        return (_b = Array.from((_a4 = ownerDocument == null ? void 0 : ownerDocument.querySelectorAll("[data-headlessui-portal]")) != null ? _a4 : []).find(
                            (root) => root.contains(mainTreeNodeRef.current) && root instanceof HTMLElement
                        )) != null ? _b : null;
                    }, [mainTreeNodeRef]);
                    useInert(resolveRootOfParentDialog, inertParentDialogs);
                    let outsideClickEnabled = (() => {
                        if (!enabled)
                            return false;
                        if (hasNestedDialogs)
                            return false;
                        return true;
                    })();
                    useOutsideClick(resolveRootContainers, close, outsideClickEnabled);
                    let escapeToCloseEnabled = (() => {
                        if (hasNestedDialogs)
                            return false;
                        if (dialogState !== 0 /* Open */ )
                            return false;
                        return true;
                    })();
                    useEventListener(ownerDocument == null ? void 0 : ownerDocument.defaultView, "keydown", (event) => {
                        if (!escapeToCloseEnabled)
                            return;
                        if (event.defaultPrevented)
                            return;
                        if (event.key !== "Escape" /* Escape */ )
                            return;
                        event.preventDefault();
                        event.stopPropagation();
                        close();
                    });
                    let scrollLockEnabled = (() => {
                        if (isClosing)
                            return false;
                        if (dialogState !== 0 /* Open */ )
                            return false;
                        if (hasParentDialog)
                            return false;
                        return true;
                    })();
                    useScrollLock(ownerDocument, scrollLockEnabled, resolveRootContainers);
                    (0, import_react31.useEffect)(() => {
                        if (dialogState !== 0 /* Open */ )
                            return;
                        if (!internalDialogRef.current)
                            return;
                        let observer = new ResizeObserver((entries) => {
                            for (let entry of entries) {
                                let rect = entry.target.getBoundingClientRect();
                                if (rect.x === 0 && rect.y === 0 && rect.width === 0 && rect.height === 0) {
                                    close();
                                }
                            }
                        });
                        observer.observe(internalDialogRef.current);
                        return () => observer.disconnect();
                    }, [dialogState, internalDialogRef, close]);
                    let [describedby, DescriptionProvider] = useDescriptions();
                    let contextBag = (0, import_react31.useMemo)(
                        () => [{
                            dialogState,
                            close,
                            setTitleId
                        }, state],
                        [dialogState, state, close, setTitleId]
                    );
                    let slot = (0, import_react31.useMemo)(
                        () => ({
                            open: dialogState === 0 /* Open */
                        }),
                        [dialogState]
                    );
                    let ourProps = {
                        ref: dialogRef,
                        id,
                        role: "dialog",
                        "aria-modal": dialogState === 0 /* Open */ ? true : void 0,
                        "aria-labelledby": state.titleId,
                        "aria-describedby": describedby
                    };
                    return /* @__PURE__ */ import_react31.default.createElement(
                        StackProvider, {
                            type: "Dialog",
                            enabled: dialogState === 0 /* Open */ ,
                            element: internalDialogRef,
                            onUpdate: useEvent((message, type) => {
                                if (type !== "Dialog")
                                    return;
                                match(message, {
                                    [0 /* Add */ ]: () => setNestedDialogCount((count) => count + 1),
                                    [1 /* Remove */ ]: () => setNestedDialogCount((count) => count - 1)
                                });
                            })
                        },
                        /* @__PURE__ */
                        import_react31.default.createElement(ForcePortalRoot, {
                            force: true
                        }, /* @__PURE__ */ import_react31.default.createElement(Portal, null, /* @__PURE__ */ import_react31.default.createElement(DialogContext.Provider, {
                            value: contextBag
                        }, /* @__PURE__ */ import_react31.default.createElement(Portal.Group, {
                            target: internalDialogRef
                        }, /* @__PURE__ */ import_react31.default.createElement(ForcePortalRoot, {
                            force: false
                        }, /* @__PURE__ */ import_react31.default.createElement(DescriptionProvider, {
                            slot,
                            name: "Dialog.Description"
                        }, /* @__PURE__ */ import_react31.default.createElement(
                            FocusTrap, {
                                initialFocus,
                                containers: resolveRootContainers,
                                features: enabled ? match(position, {
                                    parent: FocusTrap.features.RestoreFocus,
                                    leaf: FocusTrap.features.All & ~FocusTrap.features.FocusLock
                                }) : FocusTrap.features.None
                            },
                            /* @__PURE__ */
                            import_react31.default.createElement(PortalWrapper, null, render({
                                ourProps,
                                theirProps,
                                slot,
                                defaultTag: DEFAULT_DIALOG_TAG,
                                features: DialogRenderFeatures,
                                visible: dialogState === 0 /* Open */ ,
                                name: "Dialog"
                            }))
                        ))))))),
                        /* @__PURE__ */
                        import_react31.default.createElement(MainTreeNode, null)
                    );
                }
                var DEFAULT_OVERLAY_TAG = "div";

                function OverlayFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-dialog-overlay-${internalId}`, ...theirProps
                    } = props;
                    let [{
                        dialogState,
                        close
                    }] = useDialogContext("Dialog.Overlay");
                    let overlayRef = useSyncRefs(ref);
                    let handleClick = useEvent((event) => {
                        if (event.target !== event.currentTarget)
                            return;
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return event.preventDefault();
                        event.preventDefault();
                        event.stopPropagation();
                        close();
                    });
                    let slot = (0, import_react31.useMemo)(
                        () => ({
                            open: dialogState === 0 /* Open */
                        }),
                        [dialogState]
                    );
                    let ourProps = {
                        ref: overlayRef,
                        id,
                        "aria-hidden": true,
                        onClick: handleClick
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_OVERLAY_TAG,
                        name: "Dialog.Overlay"
                    });
                }
                var DEFAULT_BACKDROP_TAG = "div";

                function BackdropFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-dialog-backdrop-${internalId}`, ...theirProps
                    } = props;
                    let [{
                        dialogState
                    }, state] = useDialogContext("Dialog.Backdrop");
                    let backdropRef = useSyncRefs(ref);
                    (0, import_react31.useEffect)(() => {
                        if (state.panelRef.current === null) {
                            throw new Error(
                                `A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.`
                            );
                        }
                    }, [state.panelRef]);
                    let slot = (0, import_react31.useMemo)(
                        () => ({
                            open: dialogState === 0 /* Open */
                        }),
                        [dialogState]
                    );
                    let ourProps = {
                        ref: backdropRef,
                        id,
                        "aria-hidden": true
                    };
                    return /* @__PURE__ */ import_react31.default.createElement(ForcePortalRoot, {
                        force: true
                    }, /* @__PURE__ */ import_react31.default.createElement(Portal, null, render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_BACKDROP_TAG,
                        name: "Dialog.Backdrop"
                    })));
                }
                var DEFAULT_PANEL_TAG = "div";

                function PanelFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-dialog-panel-${internalId}`, ...theirProps
                    } = props;
                    let [{
                        dialogState
                    }, state] = useDialogContext("Dialog.Panel");
                    let panelRef = useSyncRefs(ref, state.panelRef);
                    let slot = (0, import_react31.useMemo)(
                        () => ({
                            open: dialogState === 0 /* Open */
                        }),
                        [dialogState]
                    );
                    let handleClick = useEvent((event) => {
                        event.stopPropagation();
                    });
                    let ourProps = {
                        ref: panelRef,
                        id,
                        onClick: handleClick
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_PANEL_TAG,
                        name: "Dialog.Panel"
                    });
                }
                var DEFAULT_TITLE_TAG = "h2";

                function TitleFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-dialog-title-${internalId}`, ...theirProps
                    } = props;
                    let [{
                        dialogState,
                        setTitleId
                    }] = useDialogContext("Dialog.Title");
                    let titleRef = useSyncRefs(ref);
                    (0, import_react31.useEffect)(() => {
                        setTitleId(id);
                        return () => setTitleId(null);
                    }, [id, setTitleId]);
                    let slot = (0, import_react31.useMemo)(
                        () => ({
                            open: dialogState === 0 /* Open */
                        }),
                        [dialogState]
                    );
                    let ourProps = {
                        ref: titleRef,
                        id
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_TITLE_TAG,
                        name: "Dialog.Title"
                    });
                }
                var DialogRoot = forwardRefWithAs(DialogFn);
                var Backdrop = forwardRefWithAs(BackdropFn);
                var Panel = forwardRefWithAs(PanelFn);
                var Overlay = forwardRefWithAs(OverlayFn);
                var Title = forwardRefWithAs(TitleFn);
                var Dialog = Object.assign(DialogRoot, {
                    Backdrop,
                    Panel,
                    Overlay,
                    Title,
                    Description
                });

                // src/components/disclosure/disclosure.tsx
                var import_react33 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/utils/start-transition.ts
                var import_react32 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var _a2;
                var startTransition = (
                    // Prefer React's `startTransition` if it's available.
                    // @ts-expect-error - `startTransition` doesn't exist in React < 18.
                    (_a2 = import_react32.default.startTransition) != null ? _a2 : function startTransition2(cb) {
                        cb();
                    }
                );

                // src/components/disclosure/disclosure.tsx
                var reducers3 = {
                    [0 /* ToggleDisclosure */ ]: (state) => ({
                        ...state,
                        disclosureState: match(state.disclosureState, {
                            [0 /* Open */ ]: 1 /* Closed */ ,
                            [1 /* Closed */ ]: 0 /* Open */
                        })
                    }),
                    [1 /* CloseDisclosure */ ]: (state) => {
                        if (state.disclosureState === 1 /* Closed */ )
                            return state;
                        return {
                            ...state,
                            disclosureState: 1 /* Closed */
                        };
                    },
                    [4 /* LinkPanel */ ](state) {
                        if (state.linkedPanel === true)
                            return state;
                        return {
                            ...state,
                            linkedPanel: true
                        };
                    },
                    [5 /* UnlinkPanel */ ](state) {
                        if (state.linkedPanel === false)
                            return state;
                        return {
                            ...state,
                            linkedPanel: false
                        };
                    },
                    [2 /* SetButtonId */ ](state, action) {
                        if (state.buttonId === action.buttonId)
                            return state;
                        return {
                            ...state,
                            buttonId: action.buttonId
                        };
                    },
                    [3 /* SetPanelId */ ](state, action) {
                        if (state.panelId === action.panelId)
                            return state;
                        return {
                            ...state,
                            panelId: action.panelId
                        };
                    }
                };
                var DisclosureContext = (0, import_react33.createContext)(null);
                DisclosureContext.displayName = "DisclosureContext";

                function useDisclosureContext(component) {
                    let context = (0, import_react33.useContext)(DisclosureContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Disclosure /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useDisclosureContext);
                        throw err;
                    }
                    return context;
                }
                var DisclosureAPIContext = (0, import_react33.createContext)(null);
                DisclosureAPIContext.displayName = "DisclosureAPIContext";

                function useDisclosureAPIContext(component) {
                    let context = (0, import_react33.useContext)(DisclosureAPIContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Disclosure /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useDisclosureAPIContext);
                        throw err;
                    }
                    return context;
                }
                var DisclosurePanelContext = (0, import_react33.createContext)(null);
                DisclosurePanelContext.displayName = "DisclosurePanelContext";

                function useDisclosurePanelContext() {
                    return (0, import_react33.useContext)(DisclosurePanelContext);
                }

                function stateReducer3(state, action) {
                    return match(action.type, reducers3, state, action);
                }
                var DEFAULT_DISCLOSURE_TAG = import_react33.Fragment;

                function DisclosureFn(props, ref) {
                    let {
                        defaultOpen = false, ...theirProps
                    } = props;
                    let internalDisclosureRef = (0, import_react33.useRef)(null);
                    let disclosureRef = useSyncRefs(
                        ref,
                        optionalRef(
                            (ref2) => {
                                internalDisclosureRef.current = ref2;
                            },
                            props.as === void 0 || // @ts-expect-error The `as` prop _can_ be a Fragment
                            props.as === import_react33.Fragment
                        )
                    );
                    let panelRef = (0, import_react33.useRef)(null);
                    let buttonRef = (0, import_react33.useRef)(null);
                    let reducerBag = (0, import_react33.useReducer)(stateReducer3, {
                        disclosureState: defaultOpen ? 0 /* Open */ : 1 /* Closed */ ,
                        linkedPanel: false,
                        buttonRef,
                        panelRef,
                        buttonId: null,
                        panelId: null
                    });
                    let [{
                        disclosureState,
                        buttonId
                    }, dispatch] = reducerBag;
                    let close = useEvent((focusableElement) => {
                        dispatch({
                            type: 1 /* CloseDisclosure */
                        });
                        let ownerDocument = getOwnerDocument(internalDisclosureRef);
                        if (!ownerDocument)
                            return;
                        if (!buttonId)
                            return;
                        let restoreElement = (() => {
                            if (!focusableElement)
                                return ownerDocument.getElementById(buttonId);
                            if (focusableElement instanceof HTMLElement)
                                return focusableElement;
                            if (focusableElement.current instanceof HTMLElement)
                                return focusableElement.current;
                            return ownerDocument.getElementById(buttonId);
                        })();
                        restoreElement == null ? void 0 : restoreElement.focus();
                    });
                    let api = (0, import_react33.useMemo)(() => ({
                        close
                    }), [close]);
                    let slot = (0, import_react33.useMemo)(
                        () => ({
                            open: disclosureState === 0 /* Open */ ,
                            close
                        }),
                        [disclosureState, close]
                    );
                    let ourProps = {
                        ref: disclosureRef
                    };
                    return /* @__PURE__ */ import_react33.default.createElement(DisclosureContext.Provider, {
                        value: reducerBag
                    }, /* @__PURE__ */ import_react33.default.createElement(DisclosureAPIContext.Provider, {
                        value: api
                    }, /* @__PURE__ */ import_react33.default.createElement(
                        OpenClosedProvider, {
                            value: match(disclosureState, {
                                [0 /* Open */ ]: 1 /* Open */ ,
                                [1 /* Closed */ ]: 2 /* Closed */
                            })
                        },
                        render({
                            ourProps,
                            theirProps,
                            slot,
                            defaultTag: DEFAULT_DISCLOSURE_TAG,
                            name: "Disclosure"
                        })
                    )));
                }
                var DEFAULT_BUTTON_TAG2 = "button";

                function ButtonFn2(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-disclosure-button-${internalId}`, ...theirProps
                    } = props;
                    let [state, dispatch] = useDisclosureContext("Disclosure.Button");
                    let panelContext = useDisclosurePanelContext();
                    let isWithinPanel = panelContext === null ? false : panelContext === state.panelId;
                    let internalButtonRef = (0, import_react33.useRef)(null);
                    let buttonRef = useSyncRefs(internalButtonRef, ref, !isWithinPanel ? state.buttonRef : null);
                    (0, import_react33.useEffect)(() => {
                        if (isWithinPanel)
                            return;
                        dispatch({
                            type: 2 /* SetButtonId */ ,
                            buttonId: id
                        });
                        return () => {
                            dispatch({
                                type: 2 /* SetButtonId */ ,
                                buttonId: null
                            });
                        };
                    }, [id, dispatch, isWithinPanel]);
                    let handleKeyDown = useEvent((event) => {
                        var _a3;
                        if (isWithinPanel) {
                            if (state.disclosureState === 1 /* Closed */ )
                                return;
                            switch (event.key) {
                                case " " /* Space */ :
                                case "Enter" /* Enter */ :
                                    event.preventDefault();
                                    event.stopPropagation();
                                    dispatch({
                                        type: 0 /* ToggleDisclosure */
                                    });
                                    (_a3 = state.buttonRef.current) == null ? void 0 : _a3.focus();
                                    break;
                            }
                        } else {
                            switch (event.key) {
                                case " " /* Space */ :
                                case "Enter" /* Enter */ :
                                    event.preventDefault();
                                    event.stopPropagation();
                                    dispatch({
                                        type: 0 /* ToggleDisclosure */
                                    });
                                    break;
                            }
                        }
                    });
                    let handleKeyUp = useEvent((event) => {
                        switch (event.key) {
                            case " " /* Space */ :
                                event.preventDefault();
                                break;
                        }
                    });
                    let handleClick = useEvent((event) => {
                        var _a3;
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return;
                        if (props.disabled)
                            return;
                        if (isWithinPanel) {
                            dispatch({
                                type: 0 /* ToggleDisclosure */
                            });
                            (_a3 = state.buttonRef.current) == null ? void 0 : _a3.focus();
                        } else {
                            dispatch({
                                type: 0 /* ToggleDisclosure */
                            });
                        }
                    });
                    let slot = (0, import_react33.useMemo)(
                        () => ({
                            open: state.disclosureState === 0 /* Open */
                        }),
                        [state]
                    );
                    let type = useResolveButtonType(props, internalButtonRef);
                    let ourProps = isWithinPanel ? {
                        ref: buttonRef,
                        type,
                        onKeyDown: handleKeyDown,
                        onClick: handleClick
                    } : {
                        ref: buttonRef,
                        id,
                        type,
                        "aria-expanded": props.disabled ? void 0 : state.disclosureState === 0 /* Open */ ,
                        "aria-controls": state.linkedPanel ? state.panelId : void 0,
                        onKeyDown: handleKeyDown,
                        onKeyUp: handleKeyUp,
                        onClick: handleClick
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_BUTTON_TAG2,
                        name: "Disclosure.Button"
                    });
                }
                var DEFAULT_PANEL_TAG2 = "div";
                var PanelRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */ ;

                function PanelFn2(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-disclosure-panel-${internalId}`, ...theirProps
                    } = props;
                    let [state, dispatch] = useDisclosureContext("Disclosure.Panel");
                    let {
                        close
                    } = useDisclosureAPIContext("Disclosure.Panel");
                    let panelRef = useSyncRefs(ref, state.panelRef, (el) => {
                        startTransition(() => dispatch({
                            type: el ? 4 /* LinkPanel */ : 5 /* UnlinkPanel */
                        }));
                    });
                    (0, import_react33.useEffect)(() => {
                        dispatch({
                            type: 3 /* SetPanelId */ ,
                            panelId: id
                        });
                        return () => {
                            dispatch({
                                type: 3 /* SetPanelId */ ,
                                panelId: null
                            });
                        };
                    }, [id, dispatch]);
                    let usesOpenClosedState = useOpenClosed();
                    let visible = (() => {
                        if (usesOpenClosedState !== null) {
                            return (usesOpenClosedState & 1 /* Open */ ) === 1 /* Open */ ;
                        }
                        return state.disclosureState === 0 /* Open */ ;
                    })();
                    let slot = (0, import_react33.useMemo)(
                        () => ({
                            open: state.disclosureState === 0 /* Open */ ,
                            close
                        }),
                        [state, close]
                    );
                    let ourProps = {
                        ref: panelRef,
                        id
                    };
                    return /* @__PURE__ */ import_react33.default.createElement(DisclosurePanelContext.Provider, {
                        value: state.panelId
                    }, render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_PANEL_TAG2,
                        features: PanelRenderFeatures,
                        visible,
                        name: "Disclosure.Panel"
                    }));
                }
                var DisclosureRoot = forwardRefWithAs(DisclosureFn);
                var Button2 = forwardRefWithAs(ButtonFn2);
                var Panel2 = forwardRefWithAs(PanelFn2);
                var Disclosure = Object.assign(DisclosureRoot, {
                    Button: Button2,
                    Panel: Panel2
                });

                // src/components/listbox/listbox.tsx
                var import_react35 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/hooks/use-text-value.ts
                var import_react34 = __webpack_require__( /*! react */ "react");

                // src/utils/get-text-value.ts
                var emojiRegex = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;

                function getTextContents(element) {
                    var _a3, _b;
                    let currentInnerText = (_a3 = element.innerText) != null ? _a3 : "";
                    let copy = element.cloneNode(true);
                    if (!(copy instanceof HTMLElement)) {
                        return currentInnerText;
                    }
                    let dropped = false;
                    for (let child of copy.querySelectorAll('[hidden],[aria-hidden],[role="img"]')) {
                        child.remove();
                        dropped = true;
                    }
                    let value = dropped ? (_b = copy.innerText) != null ? _b : "" : currentInnerText;
                    if (emojiRegex.test(value)) {
                        value = value.replace(emojiRegex, "");
                    }
                    return value;
                }

                function getTextValue(element) {
                    let label = element.getAttribute("aria-label");
                    if (typeof label === "string")
                        return label.trim();
                    let labelledby = element.getAttribute("aria-labelledby");
                    if (labelledby) {
                        let labels = labelledby.split(" ").map((labelledby2) => {
                            let labelEl = document.getElementById(labelledby2);
                            if (labelEl) {
                                let label2 = labelEl.getAttribute("aria-label");
                                if (typeof label2 === "string")
                                    return label2.trim();
                                return getTextContents(labelEl).trim();
                            }
                            return null;
                        }).filter(Boolean);
                        if (labels.length > 0)
                            return labels.join(", ");
                    }
                    return getTextContents(element).trim();
                }

                // src/hooks/use-text-value.ts
                function useTextValue(element) {
                    let cacheKey = (0, import_react34.useRef)("");
                    let cacheValue = (0, import_react34.useRef)("");
                    return useEvent(() => {
                        let el = element.current;
                        if (!el)
                            return "";
                        let currentKey = el.innerText;
                        if (cacheKey.current === currentKey) {
                            return cacheValue.current;
                        }
                        let value = getTextValue(el).trim().toLowerCase();
                        cacheKey.current = currentKey;
                        cacheValue.current = value;
                        return value;
                    });
                }

                // src/components/listbox/listbox.tsx
                function adjustOrderedState2(state, adjustment = (i) => i) {
                    let currentActiveOption = state.activeOptionIndex !== null ? state.options[state.activeOptionIndex] : null;
                    let sortedOptions = sortByDomNode(
                        adjustment(state.options.slice()),
                        (option) => option.dataRef.current.domRef.current
                    );
                    let adjustedActiveOptionIndex = currentActiveOption ? sortedOptions.indexOf(currentActiveOption) : null;
                    if (adjustedActiveOptionIndex === -1) {
                        adjustedActiveOptionIndex = null;
                    }
                    return {
                        options: sortedOptions,
                        activeOptionIndex: adjustedActiveOptionIndex
                    };
                }
                var reducers4 = {
                    [1 /* CloseListbox */ ](state) {
                        if (state.dataRef.current.disabled)
                            return state;
                        if (state.listboxState === 1 /* Closed */ )
                            return state;
                        return {
                            ...state,
                            activeOptionIndex: null,
                            listboxState: 1 /* Closed */
                        };
                    },
                    [0 /* OpenListbox */ ](state) {
                        if (state.dataRef.current.disabled)
                            return state;
                        if (state.listboxState === 0 /* Open */ )
                            return state;
                        let activeOptionIndex = state.activeOptionIndex;
                        let {
                            isSelected
                        } = state.dataRef.current;
                        let optionIdx = state.options.findIndex((option) => isSelected(option.dataRef.current.value));
                        if (optionIdx !== -1) {
                            activeOptionIndex = optionIdx;
                        }
                        return {
                            ...state,
                            listboxState: 0 /* Open */ ,
                            activeOptionIndex
                        };
                    },
                    [2 /* GoToOption */ ](state, action) {
                        var _a3;
                        if (state.dataRef.current.disabled)
                            return state;
                        if (state.listboxState === 1 /* Closed */ )
                            return state;
                        let adjustedState = adjustOrderedState2(state);
                        let activeOptionIndex = calculateActiveIndex(action, {
                            resolveItems: () => adjustedState.options,
                            resolveActiveIndex: () => adjustedState.activeOptionIndex,
                            resolveId: (option) => option.id,
                            resolveDisabled: (option) => option.dataRef.current.disabled
                        });
                        return {
                            ...state,
                            ...adjustedState,
                            searchQuery: "",
                            activeOptionIndex,
                            activationTrigger: (_a3 = action.trigger) != null ? _a3 : 1 /* Other */
                        };
                    },
                    [3 /* Search */ ]: (state, action) => {
                        if (state.dataRef.current.disabled)
                            return state;
                        if (state.listboxState === 1 /* Closed */ )
                            return state;
                        let wasAlreadySearching = state.searchQuery !== "";
                        let offset = wasAlreadySearching ? 0 : 1;
                        let searchQuery = state.searchQuery + action.value.toLowerCase();
                        let reOrderedOptions = state.activeOptionIndex !== null ? state.options.slice(state.activeOptionIndex + offset).concat(state.options.slice(0, state.activeOptionIndex + offset)) : state.options;
                        let matchingOption = reOrderedOptions.find(
                            (option) => {
                                var _a3;
                                return !option.dataRef.current.disabled && ((_a3 = option.dataRef.current.textValue) == null ? void 0 : _a3.startsWith(searchQuery));
                            }
                        );
                        let matchIdx = matchingOption ? state.options.indexOf(matchingOption) : -1;
                        if (matchIdx === -1 || matchIdx === state.activeOptionIndex)
                            return {
                                ...state,
                                searchQuery
                            };
                        return {
                            ...state,
                            searchQuery,
                            activeOptionIndex: matchIdx,
                            activationTrigger: 1 /* Other */
                        };
                    },
                    [4 /* ClearSearch */ ](state) {
                        if (state.dataRef.current.disabled)
                            return state;
                        if (state.listboxState === 1 /* Closed */ )
                            return state;
                        if (state.searchQuery === "")
                            return state;
                        return {
                            ...state,
                            searchQuery: ""
                        };
                    },
                    [5 /* RegisterOption */ ]: (state, action) => {
                        let option = {
                            id: action.id,
                            dataRef: action.dataRef
                        };
                        let adjustedState = adjustOrderedState2(state, (options) => [...options, option]);
                        if (state.activeOptionIndex === null) {
                            if (state.dataRef.current.isSelected(action.dataRef.current.value)) {
                                adjustedState.activeOptionIndex = adjustedState.options.indexOf(option);
                            }
                        }
                        return {
                            ...state,
                            ...adjustedState
                        };
                    },
                    [6 /* UnregisterOption */ ]: (state, action) => {
                        let adjustedState = adjustOrderedState2(state, (options) => {
                            let idx = options.findIndex((a) => a.id === action.id);
                            if (idx !== -1)
                                options.splice(idx, 1);
                            return options;
                        });
                        return {
                            ...state,
                            ...adjustedState,
                            activationTrigger: 1 /* Other */
                        };
                    },
                    [7 /* RegisterLabel */ ]: (state, action) => {
                        return {
                            ...state,
                            labelId: action.id
                        };
                    }
                };
                var ListboxActionsContext = (0, import_react35.createContext)(null);
                ListboxActionsContext.displayName = "ListboxActionsContext";

                function useActions2(component) {
                    let context = (0, import_react35.useContext)(ListboxActionsContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Listbox /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useActions2);
                        throw err;
                    }
                    return context;
                }
                var ListboxDataContext = (0, import_react35.createContext)(null);
                ListboxDataContext.displayName = "ListboxDataContext";

                function useData2(component) {
                    let context = (0, import_react35.useContext)(ListboxDataContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Listbox /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useData2);
                        throw err;
                    }
                    return context;
                }

                function stateReducer4(state, action) {
                    return match(action.type, reducers4, state, action);
                }
                var DEFAULT_LISTBOX_TAG = import_react35.Fragment;

                function ListboxFn(props, ref) {
                    let {
                        value: controlledValue,
                        defaultValue,
                        form: formName,
                        name,
                        onChange: controlledOnChange,
                        by = (a, z) => a === z,
                        disabled = false,
                        horizontal = false,
                        multiple = false,
                        ...theirProps
                    } = props;
                    const orientation = horizontal ? "horizontal" : "vertical";
                    let listboxRef = useSyncRefs(ref);
                    let [value = multiple ? [] : void 0, theirOnChange] = useControllable(
                        controlledValue,
                        controlledOnChange,
                        defaultValue
                    );
                    let [state, dispatch] = (0, import_react35.useReducer)(stateReducer4, {
                        dataRef: (0, import_react35.createRef)(),
                        listboxState: 1 /* Closed */ ,
                        options: [],
                        searchQuery: "",
                        labelId: null,
                        activeOptionIndex: null,
                        activationTrigger: 1 /* Other */
                    });
                    let optionsPropsRef = (0, import_react35.useRef)({
                        static: false,
                        hold: false
                    });
                    let labelRef = (0, import_react35.useRef)(null);
                    let buttonRef = (0, import_react35.useRef)(null);
                    let optionsRef = (0, import_react35.useRef)(null);
                    let compare = useEvent(
                        typeof by === "string" ? (a, z) => {
                            let property = by;
                            return (a == null ? void 0 : a[property]) === (z == null ? void 0 : z[property]);
                        } : by
                    );
                    let isSelected = (0, import_react35.useCallback)(
                        (compareValue) => match(data.mode, {
                            [1 /* Multi */ ]: () => value.some((option) => compare(option, compareValue)),
                            [0 /* Single */ ]: () => compare(value, compareValue)
                        }),
                        [value]
                    );
                    let data = (0, import_react35.useMemo)(
                        () => ({
                            ...state,
                            value,
                            disabled,
                            mode: multiple ? 1 /* Multi */ : 0 /* Single */ ,
                            orientation,
                            compare,
                            isSelected,
                            optionsPropsRef,
                            labelRef,
                            buttonRef,
                            optionsRef
                        }),
                        [value, disabled, multiple, state]
                    );
                    useIsoMorphicEffect(() => {
                        state.dataRef.current = data;
                    }, [data]);
                    useOutsideClick(
                        [data.buttonRef, data.optionsRef],
                        (event, target) => {
                            var _a3;
                            dispatch({
                                type: 1 /* CloseListbox */
                            });
                            if (!isFocusableElement(target, 1 /* Loose */ )) {
                                event.preventDefault();
                                (_a3 = data.buttonRef.current) == null ? void 0 : _a3.focus();
                            }
                        },
                        data.listboxState === 0 /* Open */
                    );
                    let slot = (0, import_react35.useMemo)(
                        () => ({
                            open: data.listboxState === 0 /* Open */ ,
                            disabled,
                            value
                        }),
                        [data, disabled, value]
                    );
                    let selectOption = useEvent((id) => {
                        let option = data.options.find((item) => item.id === id);
                        if (!option)
                            return;
                        onChange(option.dataRef.current.value);
                    });
                    let selectActiveOption = useEvent(() => {
                        if (data.activeOptionIndex !== null) {
                            let {
                                dataRef,
                                id
                            } = data.options[data.activeOptionIndex];
                            onChange(dataRef.current.value);
                            dispatch({
                                type: 2 /* GoToOption */ ,
                                focus: 4 /* Specific */ ,
                                id
                            });
                        }
                    });
                    let openListbox = useEvent(() => dispatch({
                        type: 0 /* OpenListbox */
                    }));
                    let closeListbox = useEvent(() => dispatch({
                        type: 1 /* CloseListbox */
                    }));
                    let goToOption = useEvent((focus, id, trigger) => {
                        if (focus === 4 /* Specific */ ) {
                            return dispatch({
                                type: 2 /* GoToOption */ ,
                                focus: 4 /* Specific */ ,
                                id,
                                trigger
                            });
                        }
                        return dispatch({
                            type: 2 /* GoToOption */ ,
                            focus,
                            trigger
                        });
                    });
                    let registerOption = useEvent((id, dataRef) => {
                        dispatch({
                            type: 5 /* RegisterOption */ ,
                            id,
                            dataRef
                        });
                        return () => dispatch({
                            type: 6 /* UnregisterOption */ ,
                            id
                        });
                    });
                    let registerLabel = useEvent((id) => {
                        dispatch({
                            type: 7 /* RegisterLabel */ ,
                            id
                        });
                        return () => dispatch({
                            type: 7 /* RegisterLabel */ ,
                            id: null
                        });
                    });
                    let onChange = useEvent((value2) => {
                        return match(data.mode, {
                            [0 /* Single */ ]() {
                                return theirOnChange == null ? void 0 : theirOnChange(value2);
                            },
                            [1 /* Multi */ ]() {
                                let copy = data.value.slice();
                                let idx = copy.findIndex((item) => compare(item, value2));
                                if (idx === -1) {
                                    copy.push(value2);
                                } else {
                                    copy.splice(idx, 1);
                                }
                                return theirOnChange == null ? void 0 : theirOnChange(copy);
                            }
                        });
                    });
                    let search = useEvent((value2) => dispatch({
                        type: 3 /* Search */ ,
                        value: value2
                    }));
                    let clearSearch = useEvent(() => dispatch({
                        type: 4 /* ClearSearch */
                    }));
                    let actions = (0, import_react35.useMemo)(
                        () => ({
                            onChange,
                            registerOption,
                            registerLabel,
                            goToOption,
                            closeListbox,
                            openListbox,
                            selectActiveOption,
                            selectOption,
                            search,
                            clearSearch
                        }),
                        []
                    );
                    let ourProps = {
                        ref: listboxRef
                    };
                    let form = (0, import_react35.useRef)(null);
                    let d = useDisposables();
                    (0, import_react35.useEffect)(() => {
                        if (!form.current)
                            return;
                        if (defaultValue === void 0)
                            return;
                        d.addEventListener(form.current, "reset", () => {
                            onChange(defaultValue);
                        });
                    }, [
                        form,
                        onChange
                        /* Explicitly ignoring `defaultValue` */
                    ]);
                    return /* @__PURE__ */ import_react35.default.createElement(ListboxActionsContext.Provider, {
                        value: actions
                    }, /* @__PURE__ */ import_react35.default.createElement(ListboxDataContext.Provider, {
                        value: data
                    }, /* @__PURE__ */ import_react35.default.createElement(
                        OpenClosedProvider, {
                            value: match(data.listboxState, {
                                [0 /* Open */ ]: 1 /* Open */ ,
                                [1 /* Closed */ ]: 2 /* Closed */
                            })
                        },
                        name != null && value != null && objectToFormEntries({
                            [name]: value
                        }).map(([name2, value2], idx) => /* @__PURE__ */ import_react35.default.createElement(
                            Hidden, {
                                features: 4 /* Hidden */ ,
                                ref: idx === 0 ? (element) => {
                                    var _a3;
                                    form.current = (_a3 = element == null ? void 0 : element.closest("form")) != null ? _a3 : null;
                                } : void 0,
                                ...compact({
                                    key: name2,
                                    as: "input",
                                    type: "hidden",
                                    hidden: true,
                                    readOnly: true,
                                    form: formName,
                                    name: name2,
                                    value: value2
                                })
                            }
                        )),
                        render({
                            ourProps,
                            theirProps,
                            slot,
                            defaultTag: DEFAULT_LISTBOX_TAG,
                            name: "Listbox"
                        })
                    )));
                }
                var DEFAULT_BUTTON_TAG3 = "button";

                function ButtonFn3(props, ref) {
                    var _a3;
                    let internalId = useId();
                    let {
                        id = `headlessui-listbox-button-${internalId}`, ...theirProps
                    } = props;
                    let data = useData2("Listbox.Button");
                    let actions = useActions2("Listbox.Button");
                    let buttonRef = useSyncRefs(data.buttonRef, ref);
                    let d = useDisposables();
                    let handleKeyDown = useEvent((event) => {
                        switch (event.key) {
                            case " " /* Space */ :
                            case "Enter" /* Enter */ :
                            case "ArrowDown" /* ArrowDown */ :
                                event.preventDefault();
                                actions.openListbox();
                                d.nextFrame(() => {
                                    if (!data.value)
                                        actions.goToOption(0 /* First */ );
                                });
                                break;
                            case "ArrowUp" /* ArrowUp */ :
                                event.preventDefault();
                                actions.openListbox();
                                d.nextFrame(() => {
                                    if (!data.value)
                                        actions.goToOption(3 /* Last */ );
                                });
                                break;
                        }
                    });
                    let handleKeyUp = useEvent((event) => {
                        switch (event.key) {
                            case " " /* Space */ :
                                event.preventDefault();
                                break;
                        }
                    });
                    let handleClick = useEvent((event) => {
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return event.preventDefault();
                        if (data.listboxState === 0 /* Open */ ) {
                            actions.closeListbox();
                            d.nextFrame(() => {
                                var _a4;
                                return (_a4 = data.buttonRef.current) == null ? void 0 : _a4.focus({
                                    preventScroll: true
                                });
                            });
                        } else {
                            event.preventDefault();
                            actions.openListbox();
                        }
                    });
                    let labelledby = useComputed(() => {
                        if (!data.labelId)
                            return void 0;
                        return [data.labelId, id].join(" ");
                    }, [data.labelId, id]);
                    let slot = (0, import_react35.useMemo)(
                        () => ({
                            open: data.listboxState === 0 /* Open */ ,
                            disabled: data.disabled,
                            value: data.value
                        }),
                        [data]
                    );
                    let ourProps = {
                        ref: buttonRef,
                        id,
                        type: useResolveButtonType(props, data.buttonRef),
                        "aria-haspopup": "listbox",
                        "aria-controls": (_a3 = data.optionsRef.current) == null ? void 0 : _a3.id,
                        "aria-expanded": data.disabled ? void 0 : data.listboxState === 0 /* Open */ ,
                        "aria-labelledby": labelledby,
                        disabled: data.disabled,
                        onKeyDown: handleKeyDown,
                        onKeyUp: handleKeyUp,
                        onClick: handleClick
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_BUTTON_TAG3,
                        name: "Listbox.Button"
                    });
                }
                var DEFAULT_LABEL_TAG2 = "label";

                function LabelFn2(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-listbox-label-${internalId}`, ...theirProps
                    } = props;
                    let data = useData2("Listbox.Label");
                    let actions = useActions2("Listbox.Label");
                    let labelRef = useSyncRefs(data.labelRef, ref);
                    useIsoMorphicEffect(() => actions.registerLabel(id), [id]);
                    let handleClick = useEvent(() => {
                        var _a3;
                        return (_a3 = data.buttonRef.current) == null ? void 0 : _a3.focus({
                            preventScroll: true
                        });
                    });
                    let slot = (0, import_react35.useMemo)(
                        () => ({
                            open: data.listboxState === 0 /* Open */ ,
                            disabled: data.disabled
                        }),
                        [data]
                    );
                    let ourProps = {
                        ref: labelRef,
                        id,
                        onClick: handleClick
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_LABEL_TAG2,
                        name: "Listbox.Label"
                    });
                }
                var DEFAULT_OPTIONS_TAG2 = "ul";
                var OptionsRenderFeatures2 = 1 /* RenderStrategy */ | 2 /* Static */ ;

                function OptionsFn2(props, ref) {
                    var _a3;
                    let internalId = useId();
                    let {
                        id = `headlessui-listbox-options-${internalId}`, ...theirProps
                    } = props;
                    let data = useData2("Listbox.Options");
                    let actions = useActions2("Listbox.Options");
                    let optionsRef = useSyncRefs(data.optionsRef, ref);
                    let d = useDisposables();
                    let searchDisposables = useDisposables();
                    let usesOpenClosedState = useOpenClosed();
                    let visible = (() => {
                        if (usesOpenClosedState !== null) {
                            return (usesOpenClosedState & 1 /* Open */ ) === 1 /* Open */ ;
                        }
                        return data.listboxState === 0 /* Open */ ;
                    })();
                    (0, import_react35.useEffect)(() => {
                        var _a4;
                        let container = data.optionsRef.current;
                        if (!container)
                            return;
                        if (data.listboxState !== 0 /* Open */ )
                            return;
                        if (container === ((_a4 = getOwnerDocument(container)) == null ? void 0 : _a4.activeElement))
                            return;
                        container.focus({
                            preventScroll: true
                        });
                    }, [data.listboxState, data.optionsRef]);
                    let handleKeyDown = useEvent((event) => {
                        searchDisposables.dispose();
                        switch (event.key) {
                            case " " /* Space */ :
                                if (data.searchQuery !== "") {
                                    event.preventDefault();
                                    event.stopPropagation();
                                    return actions.search(event.key);
                                }
                            case "Enter" /* Enter */ :
                                event.preventDefault();
                                event.stopPropagation();
                                if (data.activeOptionIndex !== null) {
                                    let {
                                        dataRef
                                    } = data.options[data.activeOptionIndex];
                                    actions.onChange(dataRef.current.value);
                                }
                                if (data.mode === 0 /* Single */ ) {
                                    actions.closeListbox();
                                    disposables().nextFrame(() => {
                                        var _a4;
                                        return (_a4 = data.buttonRef.current) == null ? void 0 : _a4.focus({
                                            preventScroll: true
                                        });
                                    });
                                }
                                break;
                            case match(data.orientation, {
                                vertical: "ArrowDown" /* ArrowDown */ ,
                                horizontal: "ArrowRight" /* ArrowRight */
                            }):
                                event.preventDefault();
                                event.stopPropagation();
                                return actions.goToOption(2 /* Next */ );
                            case match(data.orientation, {
                                vertical: "ArrowUp" /* ArrowUp */ ,
                                horizontal: "ArrowLeft" /* ArrowLeft */
                            }):
                                event.preventDefault();
                                event.stopPropagation();
                                return actions.goToOption(1 /* Previous */ );
                            case "Home" /* Home */ :
                            case "PageUp" /* PageUp */ :
                                event.preventDefault();
                                event.stopPropagation();
                                return actions.goToOption(0 /* First */ );
                            case "End" /* End */ :
                            case "PageDown" /* PageDown */ :
                                event.preventDefault();
                                event.stopPropagation();
                                return actions.goToOption(3 /* Last */ );
                            case "Escape" /* Escape */ :
                                event.preventDefault();
                                event.stopPropagation();
                                actions.closeListbox();
                                return d.nextFrame(() => {
                                    var _a4;
                                    return (_a4 = data.buttonRef.current) == null ? void 0 : _a4.focus({
                                        preventScroll: true
                                    });
                                });
                            case "Tab" /* Tab */ :
                                event.preventDefault();
                                event.stopPropagation();
                                break;
                            default:
                                if (event.key.length === 1) {
                                    actions.search(event.key);
                                    searchDisposables.setTimeout(() => actions.clearSearch(), 350);
                                }
                                break;
                        }
                    });
                    let labelledby = useComputed(
                        () => {
                            var _a4, _b, _c;
                            return (_c = (_a4 = data.labelRef.current) == null ? void 0 : _a4.id) != null ? _c : (_b = data.buttonRef.current) == null ? void 0 : _b.id;
                        },
                        [data.labelRef.current, data.buttonRef.current]
                    );
                    let slot = (0, import_react35.useMemo)(
                        () => ({
                            open: data.listboxState === 0 /* Open */
                        }),
                        [data]
                    );
                    let ourProps = {
                        "aria-activedescendant": data.activeOptionIndex === null ? void 0 : (_a3 = data.options[data.activeOptionIndex]) == null ? void 0 : _a3.id,
                        "aria-multiselectable": data.mode === 1 /* Multi */ ? true : void 0,
                        "aria-labelledby": labelledby,
                        "aria-orientation": data.orientation,
                        id,
                        onKeyDown: handleKeyDown,
                        role: "listbox",
                        tabIndex: 0,
                        ref: optionsRef
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_OPTIONS_TAG2,
                        features: OptionsRenderFeatures2,
                        visible,
                        name: "Listbox.Options"
                    });
                }
                var DEFAULT_OPTION_TAG2 = "li";

                function OptionFn2(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-listbox-option-${internalId}`,
                            disabled = false,
                            value,
                            ...theirProps
                    } = props;
                    let data = useData2("Listbox.Option");
                    let actions = useActions2("Listbox.Option");
                    let active = data.activeOptionIndex !== null ? data.options[data.activeOptionIndex].id === id : false;
                    let selected = data.isSelected(value);
                    let internalOptionRef = (0, import_react35.useRef)(null);
                    let getTextValue2 = useTextValue(internalOptionRef);
                    let bag = useLatestValue({
                        disabled,
                        value,
                        domRef: internalOptionRef,
                        get textValue() {
                            return getTextValue2();
                        }
                    });
                    let optionRef = useSyncRefs(ref, internalOptionRef);
                    useIsoMorphicEffect(() => {
                        if (data.listboxState !== 0 /* Open */ )
                            return;
                        if (!active)
                            return;
                        if (data.activationTrigger === 0 /* Pointer */ )
                            return;
                        let d = disposables();
                        d.requestAnimationFrame(() => {
                            var _a3, _b;
                            (_b = (_a3 = internalOptionRef.current) == null ? void 0 : _a3.scrollIntoView) == null ? void 0 : _b.call(_a3, {
                                block: "nearest"
                            });
                        });
                        return d.dispose;
                    }, [
                        internalOptionRef,
                        active,
                        data.listboxState,
                        data.activationTrigger,
                        /* We also want to trigger this when the position of the active item changes so that we can re-trigger the scrollIntoView */
                        data.activeOptionIndex
                    ]);
                    useIsoMorphicEffect(() => actions.registerOption(id, bag), [bag, id]);
                    let handleClick = useEvent((event) => {
                        if (disabled)
                            return event.preventDefault();
                        actions.onChange(value);
                        if (data.mode === 0 /* Single */ ) {
                            actions.closeListbox();
                            disposables().nextFrame(() => {
                                var _a3;
                                return (_a3 = data.buttonRef.current) == null ? void 0 : _a3.focus({
                                    preventScroll: true
                                });
                            });
                        }
                    });
                    let handleFocus = useEvent(() => {
                        if (disabled)
                            return actions.goToOption(5 /* Nothing */ );
                        actions.goToOption(4 /* Specific */ , id);
                    });
                    let pointer = useTrackedPointer();
                    let handleEnter = useEvent((evt) => pointer.update(evt));
                    let handleMove = useEvent((evt) => {
                        if (!pointer.wasMoved(evt))
                            return;
                        if (disabled)
                            return;
                        if (active)
                            return;
                        actions.goToOption(4 /* Specific */ , id, 0 /* Pointer */ );
                    });
                    let handleLeave = useEvent((evt) => {
                        if (!pointer.wasMoved(evt))
                            return;
                        if (disabled)
                            return;
                        if (!active)
                            return;
                        actions.goToOption(5 /* Nothing */ );
                    });
                    let slot = (0, import_react35.useMemo)(
                        () => ({
                            active,
                            selected,
                            disabled
                        }),
                        [active, selected, disabled]
                    );
                    let ourProps = {
                        id,
                        ref: optionRef,
                        role: "option",
                        tabIndex: disabled === true ? void 0 : -1,
                        "aria-disabled": disabled === true ? true : void 0,
                        // According to the WAI-ARIA best practices, we should use aria-checked for
                        // multi-select,but Voice-Over disagrees. So we use aria-checked instead for
                        // both single and multi-select.
                        "aria-selected": selected,
                        disabled: void 0,
                        // Never forward the `disabled` prop
                        onClick: handleClick,
                        onFocus: handleFocus,
                        onPointerEnter: handleEnter,
                        onMouseEnter: handleEnter,
                        onPointerMove: handleMove,
                        onMouseMove: handleMove,
                        onPointerLeave: handleLeave,
                        onMouseLeave: handleLeave
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_OPTION_TAG2,
                        name: "Listbox.Option"
                    });
                }
                var ListboxRoot = forwardRefWithAs(ListboxFn);
                var Button3 = forwardRefWithAs(ButtonFn3);
                var Label2 = forwardRefWithAs(LabelFn2);
                var Options2 = forwardRefWithAs(OptionsFn2);
                var Option2 = forwardRefWithAs(OptionFn2);
                var Listbox = Object.assign(ListboxRoot, {
                    Button: Button3,
                    Label: Label2,
                    Options: Options2,
                    Option: Option2
                });

                // src/components/menu/menu.tsx
                var import_react36 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                function adjustOrderedState3(state, adjustment = (i) => i) {
                    let currentActiveItem = state.activeItemIndex !== null ? state.items[state.activeItemIndex] : null;
                    let sortedItems = sortByDomNode(
                        adjustment(state.items.slice()),
                        (item) => item.dataRef.current.domRef.current
                    );
                    let adjustedActiveItemIndex = currentActiveItem ? sortedItems.indexOf(currentActiveItem) : null;
                    if (adjustedActiveItemIndex === -1) {
                        adjustedActiveItemIndex = null;
                    }
                    return {
                        items: sortedItems,
                        activeItemIndex: adjustedActiveItemIndex
                    };
                }
                var reducers5 = {
                    [1 /* CloseMenu */ ](state) {
                        if (state.menuState === 1 /* Closed */ )
                            return state;
                        return {
                            ...state,
                            activeItemIndex: null,
                            menuState: 1 /* Closed */
                        };
                    },
                    [0 /* OpenMenu */ ](state) {
                        if (state.menuState === 0 /* Open */ )
                            return state;
                        return {
                            ...state,
                            /* We can turn off demo mode once we re-open the `Menu` */
                            __demoMode: false,
                            menuState: 0 /* Open */
                        };
                    },
                    [2 /* GoToItem */ ]: (state, action) => {
                        var _a3;
                        let adjustedState = adjustOrderedState3(state);
                        let activeItemIndex = calculateActiveIndex(action, {
                            resolveItems: () => adjustedState.items,
                            resolveActiveIndex: () => adjustedState.activeItemIndex,
                            resolveId: (item) => item.id,
                            resolveDisabled: (item) => item.dataRef.current.disabled
                        });
                        return {
                            ...state,
                            ...adjustedState,
                            searchQuery: "",
                            activeItemIndex,
                            activationTrigger: (_a3 = action.trigger) != null ? _a3 : 1 /* Other */
                        };
                    },
                    [3 /* Search */ ]: (state, action) => {
                        let wasAlreadySearching = state.searchQuery !== "";
                        let offset = wasAlreadySearching ? 0 : 1;
                        let searchQuery = state.searchQuery + action.value.toLowerCase();
                        let reOrderedItems = state.activeItemIndex !== null ? state.items.slice(state.activeItemIndex + offset).concat(state.items.slice(0, state.activeItemIndex + offset)) : state.items;
                        let matchingItem = reOrderedItems.find(
                            (item) => {
                                var _a3;
                                return ((_a3 = item.dataRef.current.textValue) == null ? void 0 : _a3.startsWith(searchQuery)) && !item.dataRef.current.disabled;
                            }
                        );
                        let matchIdx = matchingItem ? state.items.indexOf(matchingItem) : -1;
                        if (matchIdx === -1 || matchIdx === state.activeItemIndex)
                            return {
                                ...state,
                                searchQuery
                            };
                        return {
                            ...state,
                            searchQuery,
                            activeItemIndex: matchIdx,
                            activationTrigger: 1 /* Other */
                        };
                    },
                    [4 /* ClearSearch */ ](state) {
                        if (state.searchQuery === "")
                            return state;
                        return {
                            ...state,
                            searchQuery: "",
                            searchActiveItemIndex: null
                        };
                    },
                    [5 /* RegisterItem */ ]: (state, action) => {
                        let adjustedState = adjustOrderedState3(state, (items) => [
                            ...items,
                            {
                                id: action.id,
                                dataRef: action.dataRef
                            }
                        ]);
                        return {
                            ...state,
                            ...adjustedState
                        };
                    },
                    [6 /* UnregisterItem */ ]: (state, action) => {
                        let adjustedState = adjustOrderedState3(state, (items) => {
                            let idx = items.findIndex((a) => a.id === action.id);
                            if (idx !== -1)
                                items.splice(idx, 1);
                            return items;
                        });
                        return {
                            ...state,
                            ...adjustedState,
                            activationTrigger: 1 /* Other */
                        };
                    }
                };
                var MenuContext = (0, import_react36.createContext)(null);
                MenuContext.displayName = "MenuContext";

                function useMenuContext(component) {
                    let context = (0, import_react36.useContext)(MenuContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Menu /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useMenuContext);
                        throw err;
                    }
                    return context;
                }

                function stateReducer5(state, action) {
                    return match(action.type, reducers5, state, action);
                }
                var DEFAULT_MENU_TAG = import_react36.Fragment;

                function MenuFn(props, ref) {
                    let {
                        __demoMode = false, ...theirProps
                    } = props;
                    let reducerBag = (0, import_react36.useReducer)(stateReducer5, {
                        __demoMode,
                        menuState: __demoMode ? 0 /* Open */ : 1 /* Closed */ ,
                        buttonRef: (0, import_react36.createRef)(),
                        itemsRef: (0, import_react36.createRef)(),
                        items: [],
                        searchQuery: "",
                        activeItemIndex: null,
                        activationTrigger: 1 /* Other */
                    });
                    let [{
                        menuState,
                        itemsRef,
                        buttonRef
                    }, dispatch] = reducerBag;
                    let menuRef = useSyncRefs(ref);
                    useOutsideClick(
                        [buttonRef, itemsRef],
                        (event, target) => {
                            var _a3;
                            dispatch({
                                type: 1 /* CloseMenu */
                            });
                            if (!isFocusableElement(target, 1 /* Loose */ )) {
                                event.preventDefault();
                                (_a3 = buttonRef.current) == null ? void 0 : _a3.focus();
                            }
                        },
                        menuState === 0 /* Open */
                    );
                    let close = useEvent(() => {
                        dispatch({
                            type: 1 /* CloseMenu */
                        });
                    });
                    let slot = (0, import_react36.useMemo)(
                        () => ({
                            open: menuState === 0 /* Open */ ,
                            close
                        }),
                        [menuState, close]
                    );
                    let ourProps = {
                        ref: menuRef
                    };
                    return /* @__PURE__ */ import_react36.default.createElement(MenuContext.Provider, {
                        value: reducerBag
                    }, /* @__PURE__ */ import_react36.default.createElement(
                        OpenClosedProvider, {
                            value: match(menuState, {
                                [0 /* Open */ ]: 1 /* Open */ ,
                                [1 /* Closed */ ]: 2 /* Closed */
                            })
                        },
                        render({
                            ourProps,
                            theirProps,
                            slot,
                            defaultTag: DEFAULT_MENU_TAG,
                            name: "Menu"
                        })
                    ));
                }
                var DEFAULT_BUTTON_TAG4 = "button";

                function ButtonFn4(props, ref) {
                    var _a3;
                    let internalId = useId();
                    let {
                        id = `headlessui-menu-button-${internalId}`, ...theirProps
                    } = props;
                    let [state, dispatch] = useMenuContext("Menu.Button");
                    let buttonRef = useSyncRefs(state.buttonRef, ref);
                    let d = useDisposables();
                    let handleKeyDown = useEvent((event) => {
                        switch (event.key) {
                            case " " /* Space */ :
                            case "Enter" /* Enter */ :
                            case "ArrowDown" /* ArrowDown */ :
                                event.preventDefault();
                                event.stopPropagation();
                                dispatch({
                                    type: 0 /* OpenMenu */
                                });
                                d.nextFrame(() => dispatch({
                                    type: 2 /* GoToItem */ ,
                                    focus: 0 /* First */
                                }));
                                break;
                            case "ArrowUp" /* ArrowUp */ :
                                event.preventDefault();
                                event.stopPropagation();
                                dispatch({
                                    type: 0 /* OpenMenu */
                                });
                                d.nextFrame(() => dispatch({
                                    type: 2 /* GoToItem */ ,
                                    focus: 3 /* Last */
                                }));
                                break;
                        }
                    });
                    let handleKeyUp = useEvent((event) => {
                        switch (event.key) {
                            case " " /* Space */ :
                                event.preventDefault();
                                break;
                        }
                    });
                    let handleClick = useEvent((event) => {
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return event.preventDefault();
                        if (props.disabled)
                            return;
                        if (state.menuState === 0 /* Open */ ) {
                            dispatch({
                                type: 1 /* CloseMenu */
                            });
                            d.nextFrame(() => {
                                var _a4;
                                return (_a4 = state.buttonRef.current) == null ? void 0 : _a4.focus({
                                    preventScroll: true
                                });
                            });
                        } else {
                            event.preventDefault();
                            dispatch({
                                type: 0 /* OpenMenu */
                            });
                        }
                    });
                    let slot = (0, import_react36.useMemo)(
                        () => ({
                            open: state.menuState === 0 /* Open */
                        }),
                        [state]
                    );
                    let ourProps = {
                        ref: buttonRef,
                        id,
                        type: useResolveButtonType(props, state.buttonRef),
                        "aria-haspopup": "menu",
                        "aria-controls": (_a3 = state.itemsRef.current) == null ? void 0 : _a3.id,
                        "aria-expanded": props.disabled ? void 0 : state.menuState === 0 /* Open */ ,
                        onKeyDown: handleKeyDown,
                        onKeyUp: handleKeyUp,
                        onClick: handleClick
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_BUTTON_TAG4,
                        name: "Menu.Button"
                    });
                }
                var DEFAULT_ITEMS_TAG = "div";
                var ItemsRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */ ;

                function ItemsFn(props, ref) {
                    var _a3, _b;
                    let internalId = useId();
                    let {
                        id = `headlessui-menu-items-${internalId}`, ...theirProps
                    } = props;
                    let [state, dispatch] = useMenuContext("Menu.Items");
                    let itemsRef = useSyncRefs(state.itemsRef, ref);
                    let ownerDocument = useOwnerDocument(state.itemsRef);
                    let searchDisposables = useDisposables();
                    let usesOpenClosedState = useOpenClosed();
                    let visible = (() => {
                        if (usesOpenClosedState !== null) {
                            return (usesOpenClosedState & 1 /* Open */ ) === 1 /* Open */ ;
                        }
                        return state.menuState === 0 /* Open */ ;
                    })();
                    (0, import_react36.useEffect)(() => {
                        let container = state.itemsRef.current;
                        if (!container)
                            return;
                        if (state.menuState !== 0 /* Open */ )
                            return;
                        if (container === (ownerDocument == null ? void 0 : ownerDocument.activeElement))
                            return;
                        container.focus({
                            preventScroll: true
                        });
                    }, [state.menuState, state.itemsRef, ownerDocument]);
                    useTreeWalker({
                        container: state.itemsRef.current,
                        enabled: state.menuState === 0 /* Open */ ,
                        accept(node) {
                            if (node.getAttribute("role") === "menuitem")
                                return NodeFilter.FILTER_REJECT;
                            if (node.hasAttribute("role"))
                                return NodeFilter.FILTER_SKIP;
                            return NodeFilter.FILTER_ACCEPT;
                        },
                        walk(node) {
                            node.setAttribute("role", "none");
                        }
                    });
                    let handleKeyDown = useEvent((event) => {
                        var _a4, _b2;
                        searchDisposables.dispose();
                        switch (event.key) {
                            case " " /* Space */ :
                                if (state.searchQuery !== "") {
                                    event.preventDefault();
                                    event.stopPropagation();
                                    return dispatch({
                                        type: 3 /* Search */ ,
                                        value: event.key
                                    });
                                }
                            case "Enter" /* Enter */ :
                                event.preventDefault();
                                event.stopPropagation();
                                dispatch({
                                    type: 1 /* CloseMenu */
                                });
                                if (state.activeItemIndex !== null) {
                                    let {
                                        dataRef
                                    } = state.items[state.activeItemIndex];
                                    (_b2 = (_a4 = dataRef.current) == null ? void 0 : _a4.domRef.current) == null ? void 0 : _b2.click();
                                }
                                restoreFocusIfNecessary(state.buttonRef.current);
                                break;
                            case "ArrowDown" /* ArrowDown */ :
                                event.preventDefault();
                                event.stopPropagation();
                                return dispatch({
                                    type: 2 /* GoToItem */ ,
                                    focus: 2 /* Next */
                                });
                            case "ArrowUp" /* ArrowUp */ :
                                event.preventDefault();
                                event.stopPropagation();
                                return dispatch({
                                    type: 2 /* GoToItem */ ,
                                    focus: 1 /* Previous */
                                });
                            case "Home" /* Home */ :
                            case "PageUp" /* PageUp */ :
                                event.preventDefault();
                                event.stopPropagation();
                                return dispatch({
                                    type: 2 /* GoToItem */ ,
                                    focus: 0 /* First */
                                });
                            case "End" /* End */ :
                            case "PageDown" /* PageDown */ :
                                event.preventDefault();
                                event.stopPropagation();
                                return dispatch({
                                    type: 2 /* GoToItem */ ,
                                    focus: 3 /* Last */
                                });
                            case "Escape" /* Escape */ :
                                event.preventDefault();
                                event.stopPropagation();
                                dispatch({
                                    type: 1 /* CloseMenu */
                                });
                                disposables().nextFrame(() => {
                                    var _a5;
                                    return (_a5 = state.buttonRef.current) == null ? void 0 : _a5.focus({
                                        preventScroll: true
                                    });
                                });
                                break;
                            case "Tab" /* Tab */ :
                                event.preventDefault();
                                event.stopPropagation();
                                dispatch({
                                    type: 1 /* CloseMenu */
                                });
                                disposables().nextFrame(() => {
                                    focusFrom(
                                        state.buttonRef.current,
                                        event.shiftKey ? 2 /* Previous */ : 4 /* Next */
                                    );
                                });
                                break;
                            default:
                                if (event.key.length === 1) {
                                    dispatch({
                                        type: 3 /* Search */ ,
                                        value: event.key
                                    });
                                    searchDisposables.setTimeout(() => dispatch({
                                        type: 4 /* ClearSearch */
                                    }), 350);
                                }
                                break;
                        }
                    });
                    let handleKeyUp = useEvent((event) => {
                        switch (event.key) {
                            case " " /* Space */ :
                                event.preventDefault();
                                break;
                        }
                    });
                    let slot = (0, import_react36.useMemo)(
                        () => ({
                            open: state.menuState === 0 /* Open */
                        }),
                        [state]
                    );
                    let ourProps = {
                        "aria-activedescendant": state.activeItemIndex === null ? void 0 : (_a3 = state.items[state.activeItemIndex]) == null ? void 0 : _a3.id,
                        "aria-labelledby": (_b = state.buttonRef.current) == null ? void 0 : _b.id,
                        id,
                        onKeyDown: handleKeyDown,
                        onKeyUp: handleKeyUp,
                        role: "menu",
                        tabIndex: 0,
                        ref: itemsRef
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_ITEMS_TAG,
                        features: ItemsRenderFeatures,
                        visible,
                        name: "Menu.Items"
                    });
                }
                var DEFAULT_ITEM_TAG = import_react36.Fragment;

                function ItemFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-menu-item-${internalId}`, disabled = false, ...theirProps
                    } = props;
                    let [state, dispatch] = useMenuContext("Menu.Item");
                    let active = state.activeItemIndex !== null ? state.items[state.activeItemIndex].id === id : false;
                    let internalItemRef = (0, import_react36.useRef)(null);
                    let itemRef = useSyncRefs(ref, internalItemRef);
                    useIsoMorphicEffect(() => {
                        if (state.__demoMode)
                            return;
                        if (state.menuState !== 0 /* Open */ )
                            return;
                        if (!active)
                            return;
                        if (state.activationTrigger === 0 /* Pointer */ )
                            return;
                        let d = disposables();
                        d.requestAnimationFrame(() => {
                            var _a3, _b;
                            (_b = (_a3 = internalItemRef.current) == null ? void 0 : _a3.scrollIntoView) == null ? void 0 : _b.call(_a3, {
                                block: "nearest"
                            });
                        });
                        return d.dispose;
                    }, [
                        state.__demoMode,
                        internalItemRef,
                        active,
                        state.menuState,
                        state.activationTrigger,
                        /* We also want to trigger this when the position of the active item changes so that we can re-trigger the scrollIntoView */
                        state.activeItemIndex
                    ]);
                    let getTextValue2 = useTextValue(internalItemRef);
                    let bag = (0, import_react36.useRef)({
                        disabled,
                        domRef: internalItemRef,
                        get textValue() {
                            return getTextValue2();
                        }
                    });
                    useIsoMorphicEffect(() => {
                        bag.current.disabled = disabled;
                    }, [bag, disabled]);
                    useIsoMorphicEffect(() => {
                        dispatch({
                            type: 5 /* RegisterItem */ ,
                            id,
                            dataRef: bag
                        });
                        return () => dispatch({
                            type: 6 /* UnregisterItem */ ,
                            id
                        });
                    }, [bag, id]);
                    let close = useEvent(() => {
                        dispatch({
                            type: 1 /* CloseMenu */
                        });
                    });
                    let handleClick = useEvent((event) => {
                        if (disabled)
                            return event.preventDefault();
                        dispatch({
                            type: 1 /* CloseMenu */
                        });
                        restoreFocusIfNecessary(state.buttonRef.current);
                    });
                    let handleFocus = useEvent(() => {
                        if (disabled)
                            return dispatch({
                                type: 2 /* GoToItem */ ,
                                focus: 5 /* Nothing */
                            });
                        dispatch({
                            type: 2 /* GoToItem */ ,
                            focus: 4 /* Specific */ ,
                            id
                        });
                    });
                    let pointer = useTrackedPointer();
                    let handleEnter = useEvent((evt) => pointer.update(evt));
                    let handleMove = useEvent((evt) => {
                        if (!pointer.wasMoved(evt))
                            return;
                        if (disabled)
                            return;
                        if (active)
                            return;
                        dispatch({
                            type: 2 /* GoToItem */ ,
                            focus: 4 /* Specific */ ,
                            id,
                            trigger: 0 /* Pointer */
                        });
                    });
                    let handleLeave = useEvent((evt) => {
                        if (!pointer.wasMoved(evt))
                            return;
                        if (disabled)
                            return;
                        if (!active)
                            return;
                        dispatch({
                            type: 2 /* GoToItem */ ,
                            focus: 5 /* Nothing */
                        });
                    });
                    let slot = (0, import_react36.useMemo)(
                        () => ({
                            active,
                            disabled,
                            close
                        }),
                        [active, disabled, close]
                    );
                    let ourProps = {
                        id,
                        ref: itemRef,
                        role: "menuitem",
                        tabIndex: disabled === true ? void 0 : -1,
                        "aria-disabled": disabled === true ? true : void 0,
                        disabled: void 0,
                        // Never forward the `disabled` prop
                        onClick: handleClick,
                        onFocus: handleFocus,
                        onPointerEnter: handleEnter,
                        onMouseEnter: handleEnter,
                        onPointerMove: handleMove,
                        onMouseMove: handleMove,
                        onPointerLeave: handleLeave,
                        onMouseLeave: handleLeave
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_ITEM_TAG,
                        name: "Menu.Item"
                    });
                }
                var MenuRoot = forwardRefWithAs(MenuFn);
                var Button4 = forwardRefWithAs(ButtonFn4);
                var Items = forwardRefWithAs(ItemsFn);
                var Item = forwardRefWithAs(ItemFn);
                var Menu = Object.assign(MenuRoot, {
                    Button: Button4,
                    Items,
                    Item
                });

                // src/components/popover/popover.tsx
                var import_react37 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var reducers6 = {
                    [0 /* TogglePopover */ ]: (state) => {
                        let nextState = {
                            ...state,
                            popoverState: match(state.popoverState, {
                                [0 /* Open */ ]: 1 /* Closed */ ,
                                [1 /* Closed */ ]: 0 /* Open */
                            })
                        };
                        if (nextState.popoverState === 0 /* Open */ ) {
                            nextState.__demoMode = false;
                        }
                        return nextState;
                    },
                    [1 /* ClosePopover */ ](state) {
                        if (state.popoverState === 1 /* Closed */ )
                            return state;
                        return {
                            ...state,
                            popoverState: 1 /* Closed */
                        };
                    },
                    [2 /* SetButton */ ](state, action) {
                        if (state.button === action.button)
                            return state;
                        return {
                            ...state,
                            button: action.button
                        };
                    },
                    [3 /* SetButtonId */ ](state, action) {
                        if (state.buttonId === action.buttonId)
                            return state;
                        return {
                            ...state,
                            buttonId: action.buttonId
                        };
                    },
                    [4 /* SetPanel */ ](state, action) {
                        if (state.panel === action.panel)
                            return state;
                        return {
                            ...state,
                            panel: action.panel
                        };
                    },
                    [5 /* SetPanelId */ ](state, action) {
                        if (state.panelId === action.panelId)
                            return state;
                        return {
                            ...state,
                            panelId: action.panelId
                        };
                    }
                };
                var PopoverContext = (0, import_react37.createContext)(null);
                PopoverContext.displayName = "PopoverContext";

                function usePopoverContext(component) {
                    let context = (0, import_react37.useContext)(PopoverContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Popover /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, usePopoverContext);
                        throw err;
                    }
                    return context;
                }
                var PopoverAPIContext = (0, import_react37.createContext)(null);
                PopoverAPIContext.displayName = "PopoverAPIContext";

                function usePopoverAPIContext(component) {
                    let context = (0, import_react37.useContext)(PopoverAPIContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Popover /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, usePopoverAPIContext);
                        throw err;
                    }
                    return context;
                }
                var PopoverGroupContext = (0, import_react37.createContext)(null);
                PopoverGroupContext.displayName = "PopoverGroupContext";

                function usePopoverGroupContext() {
                    return (0, import_react37.useContext)(PopoverGroupContext);
                }
                var PopoverPanelContext = (0, import_react37.createContext)(null);
                PopoverPanelContext.displayName = "PopoverPanelContext";

                function usePopoverPanelContext() {
                    return (0, import_react37.useContext)(PopoverPanelContext);
                }

                function stateReducer6(state, action) {
                    return match(action.type, reducers6, state, action);
                }
                var DEFAULT_POPOVER_TAG = "div";

                function PopoverFn(props, ref) {
                    var _a3;
                    let {
                        __demoMode = false, ...theirProps
                    } = props;
                    let internalPopoverRef = (0, import_react37.useRef)(null);
                    let popoverRef = useSyncRefs(
                        ref,
                        optionalRef((ref2) => {
                            internalPopoverRef.current = ref2;
                        })
                    );
                    let buttons = (0, import_react37.useRef)([]);
                    let reducerBag = (0, import_react37.useReducer)(stateReducer6, {
                        __demoMode,
                        popoverState: __demoMode ? 0 /* Open */ : 1 /* Closed */ ,
                        buttons,
                        button: null,
                        buttonId: null,
                        panel: null,
                        panelId: null,
                        beforePanelSentinel: (0, import_react37.createRef)(),
                        afterPanelSentinel: (0, import_react37.createRef)()
                    });
                    let [{
                            popoverState,
                            button,
                            buttonId,
                            panel,
                            panelId,
                            beforePanelSentinel,
                            afterPanelSentinel
                        },
                        dispatch
                    ] = reducerBag;
                    let ownerDocument = useOwnerDocument((_a3 = internalPopoverRef.current) != null ? _a3 : button);
                    let isPortalled = (0, import_react37.useMemo)(() => {
                        if (!button)
                            return false;
                        if (!panel)
                            return false;
                        for (let root2 of document.querySelectorAll("body > *")) {
                            if (Number(root2 == null ? void 0 : root2.contains(button)) ^ Number(root2 == null ? void 0 : root2.contains(panel))) {
                                return true;
                            }
                        }
                        let elements = getFocusableElements();
                        let buttonIdx = elements.indexOf(button);
                        let beforeIdx = (buttonIdx + elements.length - 1) % elements.length;
                        let afterIdx = (buttonIdx + 1) % elements.length;
                        let beforeElement = elements[beforeIdx];
                        let afterElement = elements[afterIdx];
                        if (!panel.contains(beforeElement) && !panel.contains(afterElement)) {
                            return true;
                        }
                        return false;
                    }, [button, panel]);
                    let buttonIdRef = useLatestValue(buttonId);
                    let panelIdRef = useLatestValue(panelId);
                    let registerBag = (0, import_react37.useMemo)(
                        () => ({
                            buttonId: buttonIdRef,
                            panelId: panelIdRef,
                            close: () => dispatch({
                                type: 1 /* ClosePopover */
                            })
                        }),
                        [buttonIdRef, panelIdRef, dispatch]
                    );
                    let groupContext = usePopoverGroupContext();
                    let registerPopover = groupContext == null ? void 0 : groupContext.registerPopover;
                    let isFocusWithinPopoverGroup = useEvent(() => {
                        var _a4;
                        return (_a4 = groupContext == null ? void 0 : groupContext.isFocusWithinPopoverGroup()) != null ? _a4 : (ownerDocument == null ? void 0 : ownerDocument.activeElement) && ((button == null ? void 0 : button.contains(ownerDocument.activeElement)) || (panel == null ? void 0 : panel.contains(ownerDocument.activeElement)));
                    });
                    (0, import_react37.useEffect)(() => registerPopover == null ? void 0 : registerPopover(registerBag), [registerPopover, registerBag]);
                    let [portals, PortalWrapper] = useNestedPortals();
                    let root = useRootContainers({
                        portals,
                        defaultContainers: [button, panel]
                    });
                    useEventListener(
                        ownerDocument == null ? void 0 : ownerDocument.defaultView,
                        "focus",
                        (event) => {
                            var _a4, _b, _c, _d;
                            if (event.target === window)
                                return;
                            if (!(event.target instanceof HTMLElement))
                                return;
                            if (popoverState !== 0 /* Open */ )
                                return;
                            if (isFocusWithinPopoverGroup())
                                return;
                            if (!button)
                                return;
                            if (!panel)
                                return;
                            if (root.contains(event.target))
                                return;
                            if ((_b = (_a4 = beforePanelSentinel.current) == null ? void 0 : _a4.contains) == null ? void 0 : _b.call(_a4, event.target))
                                return;
                            if ((_d = (_c = afterPanelSentinel.current) == null ? void 0 : _c.contains) == null ? void 0 : _d.call(_c, event.target))
                                return;
                            dispatch({
                                type: 1 /* ClosePopover */
                            });
                        },
                        true
                    );
                    useOutsideClick(
                        root.resolveContainers,
                        (event, target) => {
                            dispatch({
                                type: 1 /* ClosePopover */
                            });
                            if (!isFocusableElement(target, 1 /* Loose */ )) {
                                event.preventDefault();
                                button == null ? void 0 : button.focus();
                            }
                        },
                        popoverState === 0 /* Open */
                    );
                    let close = useEvent(
                        (focusableElement) => {
                            dispatch({
                                type: 1 /* ClosePopover */
                            });
                            let restoreElement = (() => {
                                if (!focusableElement)
                                    return button;
                                if (focusableElement instanceof HTMLElement)
                                    return focusableElement;
                                if ("current" in focusableElement && focusableElement.current instanceof HTMLElement)
                                    return focusableElement.current;
                                return button;
                            })();
                            restoreElement == null ? void 0 : restoreElement.focus();
                        }
                    );
                    let api = (0, import_react37.useMemo)(
                        () => ({
                            close,
                            isPortalled
                        }),
                        [close, isPortalled]
                    );
                    let slot = (0, import_react37.useMemo)(
                        () => ({
                            open: popoverState === 0 /* Open */ ,
                            close
                        }),
                        [popoverState, close]
                    );
                    let ourProps = {
                        ref: popoverRef
                    };
                    return /* @__PURE__ */ import_react37.default.createElement(PopoverPanelContext.Provider, {
                        value: null
                    }, /* @__PURE__ */ import_react37.default.createElement(PopoverContext.Provider, {
                        value: reducerBag
                    }, /* @__PURE__ */ import_react37.default.createElement(PopoverAPIContext.Provider, {
                        value: api
                    }, /* @__PURE__ */ import_react37.default.createElement(
                        OpenClosedProvider, {
                            value: match(popoverState, {
                                [0 /* Open */ ]: 1 /* Open */ ,
                                [1 /* Closed */ ]: 2 /* Closed */
                            })
                        },
                        /* @__PURE__ */
                        import_react37.default.createElement(PortalWrapper, null, render({
                            ourProps,
                            theirProps,
                            slot,
                            defaultTag: DEFAULT_POPOVER_TAG,
                            name: "Popover"
                        }), /* @__PURE__ */ import_react37.default.createElement(root.MainTreeNode, null))
                    ))));
                }
                var DEFAULT_BUTTON_TAG5 = "button";

                function ButtonFn5(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-popover-button-${internalId}`, ...theirProps
                    } = props;
                    let [state, dispatch] = usePopoverContext("Popover.Button");
                    let {
                        isPortalled
                    } = usePopoverAPIContext("Popover.Button");
                    let internalButtonRef = (0, import_react37.useRef)(null);
                    let sentinelId = `headlessui-focus-sentinel-${useId()}`;
                    let groupContext = usePopoverGroupContext();
                    let closeOthers = groupContext == null ? void 0 : groupContext.closeOthers;
                    let panelContext = usePopoverPanelContext();
                    let isWithinPanel = panelContext !== null;
                    (0, import_react37.useEffect)(() => {
                        if (isWithinPanel)
                            return;
                        dispatch({
                            type: 3 /* SetButtonId */ ,
                            buttonId: id
                        });
                        return () => {
                            dispatch({
                                type: 3 /* SetButtonId */ ,
                                buttonId: null
                            });
                        };
                    }, [isWithinPanel, id, dispatch]);
                    let [uniqueIdentifier] = (0, import_react37.useState)(() => Symbol());
                    let buttonRef = useSyncRefs(
                        internalButtonRef,
                        ref,
                        isWithinPanel ? null : (button) => {
                            if (button) {
                                state.buttons.current.push(uniqueIdentifier);
                            } else {
                                let idx = state.buttons.current.indexOf(uniqueIdentifier);
                                if (idx !== -1)
                                    state.buttons.current.splice(idx, 1);
                            }
                            if (state.buttons.current.length > 1) {
                                console.warn(
                                    "You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."
                                );
                            }
                            button && dispatch({
                                type: 2 /* SetButton */ ,
                                button
                            });
                        }
                    );
                    let withinPanelButtonRef = useSyncRefs(internalButtonRef, ref);
                    let ownerDocument = useOwnerDocument(internalButtonRef);
                    let handleKeyDown = useEvent((event) => {
                        var _a3, _b, _c;
                        if (isWithinPanel) {
                            if (state.popoverState === 1 /* Closed */ )
                                return;
                            switch (event.key) {
                                case " " /* Space */ :
                                case "Enter" /* Enter */ :
                                    event.preventDefault();
                                    (_b = (_a3 = event.target).click) == null ? void 0 : _b.call(_a3);
                                    dispatch({
                                        type: 1 /* ClosePopover */
                                    });
                                    (_c = state.button) == null ? void 0 : _c.focus();
                                    break;
                            }
                        } else {
                            switch (event.key) {
                                case " " /* Space */ :
                                case "Enter" /* Enter */ :
                                    event.preventDefault();
                                    event.stopPropagation();
                                    if (state.popoverState === 1 /* Closed */ )
                                        closeOthers == null ? void 0 : closeOthers(state.buttonId);
                                    dispatch({
                                        type: 0 /* TogglePopover */
                                    });
                                    break;
                                case "Escape" /* Escape */ :
                                    if (state.popoverState !== 0 /* Open */ )
                                        return closeOthers == null ? void 0 : closeOthers(state.buttonId);
                                    if (!internalButtonRef.current)
                                        return;
                                    if ((ownerDocument == null ? void 0 : ownerDocument.activeElement) && !internalButtonRef.current.contains(ownerDocument.activeElement)) {
                                        return;
                                    }
                                    event.preventDefault();
                                    event.stopPropagation();
                                    dispatch({
                                        type: 1 /* ClosePopover */
                                    });
                                    break;
                            }
                        }
                    });
                    let handleKeyUp = useEvent((event) => {
                        if (isWithinPanel)
                            return;
                        if (event.key === " " /* Space */ ) {
                            event.preventDefault();
                        }
                    });
                    let handleClick = useEvent((event) => {
                        var _a3, _b;
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return;
                        if (props.disabled)
                            return;
                        if (isWithinPanel) {
                            dispatch({
                                type: 1 /* ClosePopover */
                            });
                            (_a3 = state.button) == null ? void 0 : _a3.focus();
                        } else {
                            event.preventDefault();
                            event.stopPropagation();
                            if (state.popoverState === 1 /* Closed */ )
                                closeOthers == null ? void 0 : closeOthers(state.buttonId);
                            dispatch({
                                type: 0 /* TogglePopover */
                            });
                            (_b = state.button) == null ? void 0 : _b.focus();
                        }
                    });
                    let handleMouseDown = useEvent((event) => {
                        event.preventDefault();
                        event.stopPropagation();
                    });
                    let visible = state.popoverState === 0 /* Open */ ;
                    let slot = (0, import_react37.useMemo)(() => ({
                        open: visible
                    }), [visible]);
                    let type = useResolveButtonType(props, internalButtonRef);
                    let ourProps = isWithinPanel ? {
                        ref: withinPanelButtonRef,
                        type,
                        onKeyDown: handleKeyDown,
                        onClick: handleClick
                    } : {
                        ref: buttonRef,
                        id: state.buttonId,
                        type,
                        "aria-expanded": props.disabled ? void 0 : state.popoverState === 0 /* Open */ ,
                        "aria-controls": state.panel ? state.panelId : void 0,
                        onKeyDown: handleKeyDown,
                        onKeyUp: handleKeyUp,
                        onClick: handleClick,
                        onMouseDown: handleMouseDown
                    };
                    let direction = useTabDirection();
                    let handleFocus = useEvent(() => {
                        let el = state.panel;
                        if (!el)
                            return;

                        function run() {
                            let result = match(direction.current, {
                                [0 /* Forwards */ ]: () => focusIn(el, 1 /* First */ ),
                                [1 /* Backwards */ ]: () => focusIn(el, 8 /* Last */ )
                            });
                            if (result === 0 /* Error */ ) {
                                focusIn(
                                    getFocusableElements().filter((el2) => el2.dataset.headlessuiFocusGuard !== "true"),
                                    match(direction.current, {
                                        [0 /* Forwards */ ]: 4 /* Next */ ,
                                        [1 /* Backwards */ ]: 2 /* Previous */
                                    }), {
                                        relativeTo: state.button
                                    }
                                );
                            }
                        }
                        if (false) {} else {
                            run();
                        }
                    });
                    return /* @__PURE__ */ import_react37.default.createElement(import_react37.default.Fragment, null, render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_BUTTON_TAG5,
                        name: "Popover.Button"
                    }), visible && !isWithinPanel && isPortalled && /* @__PURE__ */ import_react37.default.createElement(
                        Hidden, {
                            id: sentinelId,
                            features: 2 /* Focusable */ ,
                            "data-headlessui-focus-guard": true,
                            as: "button",
                            type: "button",
                            onFocus: handleFocus
                        }
                    ));
                }
                var DEFAULT_OVERLAY_TAG2 = "div";
                var OverlayRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */ ;

                function OverlayFn2(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-popover-overlay-${internalId}`, ...theirProps
                    } = props;
                    let [{
                        popoverState
                    }, dispatch] = usePopoverContext("Popover.Overlay");
                    let overlayRef = useSyncRefs(ref);
                    let usesOpenClosedState = useOpenClosed();
                    let visible = (() => {
                        if (usesOpenClosedState !== null) {
                            return (usesOpenClosedState & 1 /* Open */ ) === 1 /* Open */ ;
                        }
                        return popoverState === 0 /* Open */ ;
                    })();
                    let handleClick = useEvent((event) => {
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return event.preventDefault();
                        dispatch({
                            type: 1 /* ClosePopover */
                        });
                    });
                    let slot = (0, import_react37.useMemo)(
                        () => ({
                            open: popoverState === 0 /* Open */
                        }),
                        [popoverState]
                    );
                    let ourProps = {
                        ref: overlayRef,
                        id,
                        "aria-hidden": true,
                        onClick: handleClick
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_OVERLAY_TAG2,
                        features: OverlayRenderFeatures,
                        visible,
                        name: "Popover.Overlay"
                    });
                }
                var DEFAULT_PANEL_TAG3 = "div";
                var PanelRenderFeatures2 = 1 /* RenderStrategy */ | 2 /* Static */ ;

                function PanelFn3(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-popover-panel-${internalId}`, focus = false, ...theirProps
                    } = props;
                    let [state, dispatch] = usePopoverContext("Popover.Panel");
                    let {
                        close,
                        isPortalled
                    } = usePopoverAPIContext("Popover.Panel");
                    let beforePanelSentinelId = `headlessui-focus-sentinel-before-${useId()}`;
                    let afterPanelSentinelId = `headlessui-focus-sentinel-after-${useId()}`;
                    let internalPanelRef = (0, import_react37.useRef)(null);
                    let panelRef = useSyncRefs(internalPanelRef, ref, (panel) => {
                        dispatch({
                            type: 4 /* SetPanel */ ,
                            panel
                        });
                    });
                    let ownerDocument = useOwnerDocument(internalPanelRef);
                    useIsoMorphicEffect(() => {
                        dispatch({
                            type: 5 /* SetPanelId */ ,
                            panelId: id
                        });
                        return () => {
                            dispatch({
                                type: 5 /* SetPanelId */ ,
                                panelId: null
                            });
                        };
                    }, [id, dispatch]);
                    let usesOpenClosedState = useOpenClosed();
                    let visible = (() => {
                        if (usesOpenClosedState !== null) {
                            return (usesOpenClosedState & 1 /* Open */ ) === 1 /* Open */ ;
                        }
                        return state.popoverState === 0 /* Open */ ;
                    })();
                    let handleKeyDown = useEvent((event) => {
                        var _a3;
                        switch (event.key) {
                            case "Escape" /* Escape */ :
                                if (state.popoverState !== 0 /* Open */ )
                                    return;
                                if (!internalPanelRef.current)
                                    return;
                                if ((ownerDocument == null ? void 0 : ownerDocument.activeElement) && !internalPanelRef.current.contains(ownerDocument.activeElement)) {
                                    return;
                                }
                                event.preventDefault();
                                event.stopPropagation();
                                dispatch({
                                    type: 1 /* ClosePopover */
                                });
                                (_a3 = state.button) == null ? void 0 : _a3.focus();
                                break;
                        }
                    });
                    (0, import_react37.useEffect)(() => {
                        var _a3;
                        if (props.static)
                            return;
                        if (state.popoverState === 1 /* Closed */ && ((_a3 = props.unmount) != null ? _a3 : true)) {
                            dispatch({
                                type: 4 /* SetPanel */ ,
                                panel: null
                            });
                        }
                    }, [state.popoverState, props.unmount, props.static, dispatch]);
                    (0, import_react37.useEffect)(() => {
                        if (state.__demoMode)
                            return;
                        if (!focus)
                            return;
                        if (state.popoverState !== 0 /* Open */ )
                            return;
                        if (!internalPanelRef.current)
                            return;
                        let activeElement = ownerDocument == null ? void 0 : ownerDocument.activeElement;
                        if (internalPanelRef.current.contains(activeElement))
                            return;
                        focusIn(internalPanelRef.current, 1 /* First */ );
                    }, [state.__demoMode, focus, internalPanelRef, state.popoverState]);
                    let slot = (0, import_react37.useMemo)(
                        () => ({
                            open: state.popoverState === 0 /* Open */ ,
                            close
                        }),
                        [state, close]
                    );
                    let ourProps = {
                        ref: panelRef,
                        id,
                        onKeyDown: handleKeyDown,
                        onBlur: focus && state.popoverState === 0 /* Open */ ? (event) => {
                            var _a3, _b, _c, _d, _e;
                            let el = event.relatedTarget;
                            if (!el)
                                return;
                            if (!internalPanelRef.current)
                                return;
                            if ((_a3 = internalPanelRef.current) == null ? void 0 : _a3.contains(el))
                                return;
                            dispatch({
                                type: 1 /* ClosePopover */
                            });
                            if (((_c = (_b = state.beforePanelSentinel.current) == null ? void 0 : _b.contains) == null ? void 0 : _c.call(_b, el)) || ((_e = (_d = state.afterPanelSentinel.current) == null ? void 0 : _d.contains) == null ? void 0 : _e.call(_d, el))) {
                                el.focus({
                                    preventScroll: true
                                });
                            }
                        } : void 0,
                        tabIndex: -1
                    };
                    let direction = useTabDirection();
                    let handleBeforeFocus = useEvent(() => {
                        let el = internalPanelRef.current;
                        if (!el)
                            return;

                        function run() {
                            match(direction.current, {
                                [0 /* Forwards */ ]: () => {
                                    var _a3;
                                    let result = focusIn(el, 1 /* First */ );
                                    if (result === 0 /* Error */ ) {
                                        (_a3 = state.afterPanelSentinel.current) == null ? void 0 : _a3.focus();
                                    }
                                },
                                [1 /* Backwards */ ]: () => {
                                    var _a3;
                                    (_a3 = state.button) == null ? void 0 : _a3.focus({
                                        preventScroll: true
                                    });
                                }
                            });
                        }
                        if (false) {} else {
                            run();
                        }
                    });
                    let handleAfterFocus = useEvent(() => {
                        let el = internalPanelRef.current;
                        if (!el)
                            return;

                        function run() {
                            match(direction.current, {
                                [0 /* Forwards */ ]: () => {
                                    var _a3;
                                    if (!state.button)
                                        return;
                                    let elements = getFocusableElements();
                                    let idx = elements.indexOf(state.button);
                                    let before = elements.slice(0, idx + 1);
                                    let after = elements.slice(idx + 1);
                                    let combined = [...after, ...before];
                                    for (let element of combined.slice()) {
                                        if (element.dataset.headlessuiFocusGuard === "true" || ((_a3 = state.panel) == null ? void 0 : _a3.contains(element))) {
                                            let idx2 = combined.indexOf(element);
                                            if (idx2 !== -1)
                                                combined.splice(idx2, 1);
                                        }
                                    }
                                    focusIn(combined, 1 /* First */ , {
                                        sorted: false
                                    });
                                },
                                [1 /* Backwards */ ]: () => {
                                    var _a3;
                                    let result = focusIn(el, 2 /* Previous */ );
                                    if (result === 0 /* Error */ ) {
                                        (_a3 = state.button) == null ? void 0 : _a3.focus();
                                    }
                                }
                            });
                        }
                        if (false) {} else {
                            run();
                        }
                    });
                    return /* @__PURE__ */ import_react37.default.createElement(PopoverPanelContext.Provider, {
                        value: id
                    }, visible && isPortalled && /* @__PURE__ */ import_react37.default.createElement(
                        Hidden, {
                            id: beforePanelSentinelId,
                            ref: state.beforePanelSentinel,
                            features: 2 /* Focusable */ ,
                            "data-headlessui-focus-guard": true,
                            as: "button",
                            type: "button",
                            onFocus: handleBeforeFocus
                        }
                    ), render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_PANEL_TAG3,
                        features: PanelRenderFeatures2,
                        visible,
                        name: "Popover.Panel"
                    }), visible && isPortalled && /* @__PURE__ */ import_react37.default.createElement(
                        Hidden, {
                            id: afterPanelSentinelId,
                            ref: state.afterPanelSentinel,
                            features: 2 /* Focusable */ ,
                            "data-headlessui-focus-guard": true,
                            as: "button",
                            type: "button",
                            onFocus: handleAfterFocus
                        }
                    ));
                }
                var DEFAULT_GROUP_TAG2 = "div";

                function GroupFn2(props, ref) {
                    let internalGroupRef = (0, import_react37.useRef)(null);
                    let groupRef = useSyncRefs(internalGroupRef, ref);
                    let [popovers, setPopovers] = (0, import_react37.useState)([]);
                    let unregisterPopover = useEvent((registerbag) => {
                        setPopovers((existing) => {
                            let idx = existing.indexOf(registerbag);
                            if (idx !== -1) {
                                let clone = existing.slice();
                                clone.splice(idx, 1);
                                return clone;
                            }
                            return existing;
                        });
                    });
                    let registerPopover = useEvent((registerbag) => {
                        setPopovers((existing) => [...existing, registerbag]);
                        return () => unregisterPopover(registerbag);
                    });
                    let isFocusWithinPopoverGroup = useEvent(() => {
                        var _a3;
                        let ownerDocument = getOwnerDocument(internalGroupRef);
                        if (!ownerDocument)
                            return false;
                        let element = ownerDocument.activeElement;
                        if ((_a3 = internalGroupRef.current) == null ? void 0 : _a3.contains(element))
                            return true;
                        return popovers.some((bag) => {
                            var _a4, _b;
                            return ((_a4 = ownerDocument.getElementById(bag.buttonId.current)) == null ? void 0 : _a4.contains(element)) || ((_b = ownerDocument.getElementById(bag.panelId.current)) == null ? void 0 : _b.contains(element));
                        });
                    });
                    let closeOthers = useEvent((buttonId) => {
                        for (let popover of popovers) {
                            if (popover.buttonId.current !== buttonId)
                                popover.close();
                        }
                    });
                    let contextBag = (0, import_react37.useMemo)(
                        () => ({
                            registerPopover,
                            unregisterPopover,
                            isFocusWithinPopoverGroup,
                            closeOthers
                        }),
                        [registerPopover, unregisterPopover, isFocusWithinPopoverGroup, closeOthers]
                    );
                    let slot = (0, import_react37.useMemo)(() => ({}), []);
                    let theirProps = props;
                    let ourProps = {
                        ref: groupRef
                    };
                    return /* @__PURE__ */ import_react37.default.createElement(PopoverGroupContext.Provider, {
                        value: contextBag
                    }, render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_GROUP_TAG2,
                        name: "Popover.Group"
                    }));
                }
                var PopoverRoot = forwardRefWithAs(PopoverFn);
                var Button5 = forwardRefWithAs(ButtonFn5);
                var Overlay2 = forwardRefWithAs(OverlayFn2);
                var Panel3 = forwardRefWithAs(PanelFn3);
                var Group2 = forwardRefWithAs(GroupFn2);
                var Popover = Object.assign(PopoverRoot, {
                    Button: Button5,
                    Overlay: Overlay2,
                    Panel: Panel3,
                    Group: Group2
                });

                // src/components/radio-group/radio-group.tsx
                var import_react40 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/hooks/use-flags.ts
                var import_react38 = __webpack_require__( /*! react */ "react");

                function useFlags(initialFlags = 0) {
                    let [flags, setFlags] = (0, import_react38.useState)(initialFlags);
                    let mounted = useIsMounted();
                    let addFlag = (0, import_react38.useCallback)(
                        (flag) => {
                            if (!mounted.current)
                                return;
                            setFlags((flags2) => flags2 | flag);
                        },
                        [flags, mounted]
                    );
                    let hasFlag = (0, import_react38.useCallback)((flag) => Boolean(flags & flag), [flags]);
                    let removeFlag = (0, import_react38.useCallback)(
                        (flag) => {
                            if (!mounted.current)
                                return;
                            setFlags((flags2) => flags2 & ~flag);
                        },
                        [setFlags, mounted]
                    );
                    let toggleFlag = (0, import_react38.useCallback)(
                        (flag) => {
                            if (!mounted.current)
                                return;
                            setFlags((flags2) => flags2 ^ flag);
                        },
                        [setFlags]
                    );
                    return {
                        flags,
                        addFlag,
                        hasFlag,
                        removeFlag,
                        toggleFlag
                    };
                }

                // src/components/label/label.tsx
                var import_react39 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var LabelContext = (0, import_react39.createContext)(
                    null
                );

                function useLabelContext() {
                    let context = (0, import_react39.useContext)(LabelContext);
                    if (context === null) {
                        let err = new Error("You used a <Label /> component, but it is not inside a relevant parent.");
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useLabelContext);
                        throw err;
                    }
                    return context;
                }

                function useLabels() {
                    let [labelIds, setLabelIds] = (0, import_react39.useState)([]);
                    return [
                        // The actual id's as string or undefined.
                        labelIds.length > 0 ? labelIds.join(" ") : void 0,
                        // The provider component
                        (0, import_react39.useMemo)(() => {
                            return function LabelProvider(props) {
                                let register = useEvent((value) => {
                                    setLabelIds((existing) => [...existing, value]);
                                    return () => setLabelIds((existing) => {
                                        let clone = existing.slice();
                                        let idx = clone.indexOf(value);
                                        if (idx !== -1)
                                            clone.splice(idx, 1);
                                        return clone;
                                    });
                                });
                                let contextBag = (0, import_react39.useMemo)(
                                    () => ({
                                        register,
                                        slot: props.slot,
                                        name: props.name,
                                        props: props.props
                                    }),
                                    [register, props.slot, props.name, props.props]
                                );
                                return /* @__PURE__ */ import_react39.default.createElement(LabelContext.Provider, {
                                    value: contextBag
                                }, props.children);
                            };
                        }, [setLabelIds])
                    ];
                }
                var DEFAULT_LABEL_TAG3 = "label";

                function LabelFn3(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-label-${internalId}`, passive = false, ...theirProps
                    } = props;
                    let context = useLabelContext();
                    let labelRef = useSyncRefs(ref);
                    useIsoMorphicEffect(() => context.register(id), [id, context.register]);
                    let ourProps = {
                        ref: labelRef,
                        ...context.props,
                        id
                    };
                    if (passive) {
                        if ("onClick" in ourProps) {
                            delete ourProps["htmlFor"];
                            delete ourProps["onClick"];
                        }
                        if ("onClick" in theirProps) {
                            delete theirProps["onClick"];
                        }
                    }
                    return render({
                        ourProps,
                        theirProps,
                        slot: context.slot || {},
                        defaultTag: DEFAULT_LABEL_TAG3,
                        name: context.name || "Label"
                    });
                }
                var LabelRoot = forwardRefWithAs(LabelFn3);
                var Label3 = Object.assign(LabelRoot, {
                    //
                });

                // src/components/radio-group/radio-group.tsx
                var reducers7 = {
                    [0 /* RegisterOption */ ](state, action) {
                        let nextOptions = [
                            ...state.options,
                            {
                                id: action.id,
                                element: action.element,
                                propsRef: action.propsRef
                            }
                        ];
                        return {
                            ...state,
                            options: sortByDomNode(nextOptions, (option) => option.element.current)
                        };
                    },
                    [1 /* UnregisterOption */ ](state, action) {
                        let options = state.options.slice();
                        let idx = state.options.findIndex((radio) => radio.id === action.id);
                        if (idx === -1)
                            return state;
                        options.splice(idx, 1);
                        return {
                            ...state,
                            options
                        };
                    }
                };
                var RadioGroupDataContext = (0, import_react40.createContext)(null);
                RadioGroupDataContext.displayName = "RadioGroupDataContext";

                function useData3(component) {
                    let context = (0, import_react40.useContext)(RadioGroupDataContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <RadioGroup /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useData3);
                        throw err;
                    }
                    return context;
                }
                var RadioGroupActionsContext = (0, import_react40.createContext)(null);
                RadioGroupActionsContext.displayName = "RadioGroupActionsContext";

                function useActions3(component) {
                    let context = (0, import_react40.useContext)(RadioGroupActionsContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <RadioGroup /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useActions3);
                        throw err;
                    }
                    return context;
                }

                function stateReducer7(state, action) {
                    return match(action.type, reducers7, state, action);
                }
                var DEFAULT_RADIO_GROUP_TAG = "div";

                function RadioGroupFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-radiogroup-${internalId}`,
                            value: controlledValue,
                            defaultValue,
                            form: formName,
                            name,
                            onChange: controlledOnChange,
                            by = (a, z) => a === z,
                            disabled = false,
                            ...theirProps
                    } = props;
                    let compare = useEvent(
                        typeof by === "string" ? (a, z) => {
                            let property = by;
                            return (a == null ? void 0 : a[property]) === (z == null ? void 0 : z[property]);
                        } : by
                    );
                    let [state, dispatch] = (0, import_react40.useReducer)(stateReducer7, {
                        options: []
                    });
                    let options = state.options;
                    let [labelledby, LabelProvider] = useLabels();
                    let [describedby, DescriptionProvider] = useDescriptions();
                    let internalRadioGroupRef = (0, import_react40.useRef)(null);
                    let radioGroupRef = useSyncRefs(internalRadioGroupRef, ref);
                    let [value, onChange] = useControllable(controlledValue, controlledOnChange, defaultValue);
                    let firstOption = (0, import_react40.useMemo)(
                        () => options.find((option) => {
                            if (option.propsRef.current.disabled)
                                return false;
                            return true;
                        }),
                        [options]
                    );
                    let containsCheckedOption = (0, import_react40.useMemo)(
                        () => options.some((option) => compare(option.propsRef.current.value, value)),
                        [options, value]
                    );
                    let triggerChange = useEvent((nextValue) => {
                        var _a3;
                        if (disabled)
                            return false;
                        if (compare(nextValue, value))
                            return false;
                        let nextOption = (_a3 = options.find(
                            (option) => compare(option.propsRef.current.value, nextValue)
                        )) == null ? void 0 : _a3.propsRef.current;
                        if (nextOption == null ? void 0 : nextOption.disabled)
                            return false;
                        onChange == null ? void 0 : onChange(nextValue);
                        return true;
                    });
                    useTreeWalker({
                        container: internalRadioGroupRef.current,
                        accept(node) {
                            if (node.getAttribute("role") === "radio")
                                return NodeFilter.FILTER_REJECT;
                            if (node.hasAttribute("role"))
                                return NodeFilter.FILTER_SKIP;
                            return NodeFilter.FILTER_ACCEPT;
                        },
                        walk(node) {
                            node.setAttribute("role", "none");
                        }
                    });
                    let handleKeyDown = useEvent((event) => {
                        let container = internalRadioGroupRef.current;
                        if (!container)
                            return;
                        let ownerDocument = getOwnerDocument(container);
                        let all = options.filter((option) => option.propsRef.current.disabled === false).map((radio) => radio.element.current);
                        switch (event.key) {
                            case "Enter" /* Enter */ :
                                attemptSubmit(event.currentTarget);
                                break;
                            case "ArrowLeft" /* ArrowLeft */ :
                            case "ArrowUp" /* ArrowUp */ : {
                                event.preventDefault();
                                event.stopPropagation();
                                let result = focusIn(all, 2 /* Previous */ | 16 /* WrapAround */ );
                                if (result === 2 /* Success */ ) {
                                    let activeOption = options.find(
                                        (option) => option.element.current === (ownerDocument == null ? void 0 : ownerDocument.activeElement)
                                    );
                                    if (activeOption)
                                        triggerChange(activeOption.propsRef.current.value);
                                }
                            }
                            break;
                            case "ArrowRight" /* ArrowRight */ :
                            case "ArrowDown" /* ArrowDown */ : {
                                event.preventDefault();
                                event.stopPropagation();
                                let result = focusIn(all, 4 /* Next */ | 16 /* WrapAround */ );
                                if (result === 2 /* Success */ ) {
                                    let activeOption = options.find(
                                        (option) => option.element.current === (ownerDocument == null ? void 0 : ownerDocument.activeElement)
                                    );
                                    if (activeOption)
                                        triggerChange(activeOption.propsRef.current.value);
                                }
                            }
                            break;
                            case " " /* Space */ : {
                                event.preventDefault();
                                event.stopPropagation();
                                let activeOption = options.find(
                                    (option) => option.element.current === (ownerDocument == null ? void 0 : ownerDocument.activeElement)
                                );
                                if (activeOption)
                                    triggerChange(activeOption.propsRef.current.value);
                            }
                            break;
                        }
                    });
                    let registerOption = useEvent((option) => {
                        dispatch({
                            type: 0 /* RegisterOption */ ,
                            ...option
                        });
                        return () => dispatch({
                            type: 1 /* UnregisterOption */ ,
                            id: option.id
                        });
                    });
                    let radioGroupData = (0, import_react40.useMemo)(
                        () => ({
                            value,
                            firstOption,
                            containsCheckedOption,
                            disabled,
                            compare,
                            ...state
                        }),
                        [value, firstOption, containsCheckedOption, disabled, compare, state]
                    );
                    let radioGroupActions = (0, import_react40.useMemo)(
                        () => ({
                            registerOption,
                            change: triggerChange
                        }),
                        [registerOption, triggerChange]
                    );
                    let ourProps = {
                        ref: radioGroupRef,
                        id,
                        role: "radiogroup",
                        "aria-labelledby": labelledby,
                        "aria-describedby": describedby,
                        onKeyDown: handleKeyDown
                    };
                    let slot = (0, import_react40.useMemo)(() => ({
                        value
                    }), [value]);
                    let form = (0, import_react40.useRef)(null);
                    let d = useDisposables();
                    (0, import_react40.useEffect)(() => {
                        if (!form.current)
                            return;
                        if (defaultValue === void 0)
                            return;
                        d.addEventListener(form.current, "reset", () => {
                            triggerChange(defaultValue);
                        });
                    }, [
                        form,
                        triggerChange
                        /* Explicitly ignoring `defaultValue` */
                    ]);
                    return /* @__PURE__ */ import_react40.default.createElement(DescriptionProvider, {
                        name: "RadioGroup.Description"
                    }, /* @__PURE__ */ import_react40.default.createElement(LabelProvider, {
                        name: "RadioGroup.Label"
                    }, /* @__PURE__ */ import_react40.default.createElement(RadioGroupActionsContext.Provider, {
                        value: radioGroupActions
                    }, /* @__PURE__ */ import_react40.default.createElement(RadioGroupDataContext.Provider, {
                        value: radioGroupData
                    }, name != null && value != null && objectToFormEntries({
                        [name]: value
                    }).map(([name2, value2], idx) => /* @__PURE__ */ import_react40.default.createElement(
                        Hidden, {
                            features: 4 /* Hidden */ ,
                            ref: idx === 0 ? (element) => {
                                var _a3;
                                form.current = (_a3 = element == null ? void 0 : element.closest("form")) != null ? _a3 : null;
                            } : void 0,
                            ...compact({
                                key: name2,
                                as: "input",
                                type: "radio",
                                checked: value2 != null,
                                hidden: true,
                                readOnly: true,
                                form: formName,
                                name: name2,
                                value: value2
                            })
                        }
                    )), render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_RADIO_GROUP_TAG,
                        name: "RadioGroup"
                    })))));
                }
                var DEFAULT_OPTION_TAG3 = "div";

                function OptionFn3(props, ref) {
                    var _a3;
                    let internalId = useId();
                    let {
                        id = `headlessui-radiogroup-option-${internalId}`,
                            value,
                            disabled = false,
                            ...theirProps
                    } = props;
                    let internalOptionRef = (0, import_react40.useRef)(null);
                    let optionRef = useSyncRefs(internalOptionRef, ref);
                    let [labelledby, LabelProvider] = useLabels();
                    let [describedby, DescriptionProvider] = useDescriptions();
                    let {
                        addFlag,
                        removeFlag,
                        hasFlag
                    } = useFlags(1 /* Empty */ );
                    let propsRef = useLatestValue({
                        value,
                        disabled
                    });
                    let data = useData3("RadioGroup.Option");
                    let actions = useActions3("RadioGroup.Option");
                    useIsoMorphicEffect(
                        () => actions.registerOption({
                            id,
                            element: internalOptionRef,
                            propsRef
                        }),
                        [id, actions, internalOptionRef, props]
                    );
                    let handleClick = useEvent((event) => {
                        var _a4;
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return event.preventDefault();
                        if (!actions.change(value))
                            return;
                        addFlag(2 /* Active */ );
                        (_a4 = internalOptionRef.current) == null ? void 0 : _a4.focus();
                    });
                    let handleFocus = useEvent((event) => {
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return event.preventDefault();
                        addFlag(2 /* Active */ );
                    });
                    let handleBlur = useEvent(() => removeFlag(2 /* Active */ ));
                    let isFirstOption = ((_a3 = data.firstOption) == null ? void 0 : _a3.id) === id;
                    let isDisabled = data.disabled || disabled;
                    let checked = data.compare(data.value, value);
                    let ourProps = {
                        ref: optionRef,
                        id,
                        role: "radio",
                        "aria-checked": checked ? "true" : "false",
                        "aria-labelledby": labelledby,
                        "aria-describedby": describedby,
                        "aria-disabled": isDisabled ? true : void 0,
                        tabIndex: (() => {
                            if (isDisabled)
                                return -1;
                            if (checked)
                                return 0;
                            if (!data.containsCheckedOption && isFirstOption)
                                return 0;
                            return -1;
                        })(),
                        onClick: isDisabled ? void 0 : handleClick,
                        onFocus: isDisabled ? void 0 : handleFocus,
                        onBlur: isDisabled ? void 0 : handleBlur
                    };
                    let slot = (0, import_react40.useMemo)(
                        () => ({
                            checked,
                            disabled: isDisabled,
                            active: hasFlag(2 /* Active */ )
                        }),
                        [checked, isDisabled, hasFlag]
                    );
                    return /* @__PURE__ */ import_react40.default.createElement(DescriptionProvider, {
                        name: "RadioGroup.Description"
                    }, /* @__PURE__ */ import_react40.default.createElement(LabelProvider, {
                        name: "RadioGroup.Label"
                    }, render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_OPTION_TAG3,
                        name: "RadioGroup.Option"
                    })));
                }
                var RadioGroupRoot = forwardRefWithAs(RadioGroupFn);
                var Option3 = forwardRefWithAs(OptionFn3);
                var RadioGroup = Object.assign(RadioGroupRoot, {
                    Option: Option3,
                    Label: Label3,
                    Description
                });

                // src/components/switch/switch.tsx
                var import_react41 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var GroupContext = (0, import_react41.createContext)(null);
                GroupContext.displayName = "GroupContext";
                var DEFAULT_GROUP_TAG3 = import_react41.Fragment;

                function GroupFn3(props) {
                    var _a3;
                    let [switchElement, setSwitchElement] = (0, import_react41.useState)(null);
                    let [labelledby, LabelProvider] = useLabels();
                    let [describedby, DescriptionProvider] = useDescriptions();
                    let context = (0, import_react41.useMemo)(
                        () => ({
                            switch: switchElement,
                            setSwitch: setSwitchElement,
                            labelledby,
                            describedby
                        }),
                        [switchElement, setSwitchElement, labelledby, describedby]
                    );
                    let ourProps = {};
                    let theirProps = props;
                    return /* @__PURE__ */ import_react41.default.createElement(DescriptionProvider, {
                        name: "Switch.Description"
                    }, /* @__PURE__ */ import_react41.default.createElement(
                        LabelProvider, {
                            name: "Switch.Label",
                            props: {
                                htmlFor: (_a3 = context.switch) == null ? void 0 : _a3.id,
                                onClick(event) {
                                    if (!switchElement)
                                        return;
                                    if (event.currentTarget.tagName === "LABEL") {
                                        event.preventDefault();
                                    }
                                    switchElement.click();
                                    switchElement.focus({
                                        preventScroll: true
                                    });
                                }
                            }
                        },
                        /* @__PURE__ */
                        import_react41.default.createElement(GroupContext.Provider, {
                            value: context
                        }, render({
                            ourProps,
                            theirProps,
                            defaultTag: DEFAULT_GROUP_TAG3,
                            name: "Switch.Group"
                        }))
                    ));
                }
                var DEFAULT_SWITCH_TAG = "button";

                function SwitchFn(props, ref) {
                    let internalId = useId();
                    let {
                        id = `headlessui-switch-${internalId}`,
                            checked: controlledChecked,
                            defaultChecked = false,
                            onChange: controlledOnChange,
                            name,
                            value,
                            form,
                            ...theirProps
                    } = props;
                    let groupContext = (0, import_react41.useContext)(GroupContext);
                    let internalSwitchRef = (0, import_react41.useRef)(null);
                    let switchRef = useSyncRefs(
                        internalSwitchRef,
                        ref,
                        groupContext === null ? null : groupContext.setSwitch
                    );
                    let [checked, onChange] = useControllable(controlledChecked, controlledOnChange, defaultChecked);
                    let toggle = useEvent(() => onChange == null ? void 0 : onChange(!checked));
                    let handleClick = useEvent((event) => {
                        if (isDisabledReactIssue7711(event.currentTarget))
                            return event.preventDefault();
                        event.preventDefault();
                        toggle();
                    });
                    let handleKeyUp = useEvent((event) => {
                        if (event.key === " " /* Space */ ) {
                            event.preventDefault();
                            toggle();
                        } else if (event.key === "Enter" /* Enter */ ) {
                            attemptSubmit(event.currentTarget);
                        }
                    });
                    let handleKeyPress = useEvent((event) => event.preventDefault());
                    let slot = (0, import_react41.useMemo)(() => ({
                        checked
                    }), [checked]);
                    let ourProps = {
                        id,
                        ref: switchRef,
                        role: "switch",
                        type: useResolveButtonType(props, internalSwitchRef),
                        tabIndex: 0,
                        "aria-checked": checked,
                        "aria-labelledby": groupContext == null ? void 0 : groupContext.labelledby,
                        "aria-describedby": groupContext == null ? void 0 : groupContext.describedby,
                        onClick: handleClick,
                        onKeyUp: handleKeyUp,
                        onKeyPress: handleKeyPress
                    };
                    let d = useDisposables();
                    (0, import_react41.useEffect)(() => {
                        var _a3;
                        let form2 = (_a3 = internalSwitchRef.current) == null ? void 0 : _a3.closest("form");
                        if (!form2)
                            return;
                        if (defaultChecked === void 0)
                            return;
                        d.addEventListener(form2, "reset", () => {
                            onChange(defaultChecked);
                        });
                    }, [
                        internalSwitchRef,
                        onChange
                        /* Explicitly ignoring `defaultValue` */
                    ]);
                    return /* @__PURE__ */ import_react41.default.createElement(import_react41.default.Fragment, null, name != null && checked && /* @__PURE__ */ import_react41.default.createElement(
                        Hidden, {
                            features: 4 /* Hidden */ ,
                            ...compact({
                                as: "input",
                                type: "checkbox",
                                hidden: true,
                                readOnly: true,
                                form,
                                checked,
                                name,
                                value
                            })
                        }
                    ), render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_SWITCH_TAG,
                        name: "Switch"
                    }));
                }
                var SwitchRoot = forwardRefWithAs(SwitchFn);
                var Group3 = GroupFn3;
                var Switch = Object.assign(SwitchRoot, {
                    Group: Group3,
                    Label: Label3,
                    Description
                });

                // src/components/tabs/tabs.tsx
                var import_react43 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/internal/focus-sentinel.tsx
                var import_react42 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                function FocusSentinel({
                    onFocus
                }) {
                    let [enabled, setEnabled] = (0, import_react42.useState)(true);
                    if (!enabled)
                        return null;
                    return /* @__PURE__ */ import_react42.default.createElement(
                        Hidden, {
                            as: "button",
                            type: "button",
                            features: 2 /* Focusable */ ,
                            onFocus: (event) => {
                                event.preventDefault();
                                let frame;
                                let tries = 50;

                                function forwardFocus() {
                                    if (tries-- <= 0) {
                                        if (frame)
                                            cancelAnimationFrame(frame);
                                        return;
                                    }
                                    if (onFocus()) {
                                        setEnabled(false);
                                        cancelAnimationFrame(frame);
                                        return;
                                    }
                                    frame = requestAnimationFrame(forwardFocus);
                                }
                                frame = requestAnimationFrame(forwardFocus);
                            }
                        }
                    );
                }

                // src/utils/stable-collection.tsx
                var React23 = __toESM(__webpack_require__( /*! react */ "react"), 1);
                var StableCollectionContext = React23.createContext(null);

                function createCollection() {
                    return {
                        /** @type {Map<string, Map<string, number>>} */
                        groups: /* @__PURE__ */ new Map(),
                        get(group, key) {
                            var _a3;
                            let list = this.groups.get(group);
                            if (!list) {
                                list = /* @__PURE__ */ new Map();
                                this.groups.set(group, list);
                            }
                            let renders = (_a3 = list.get(key)) != null ? _a3 : 0;
                            list.set(key, renders + 1);
                            let index = Array.from(list.keys()).indexOf(key);

                            function release() {
                                let renders2 = list.get(key);
                                if (renders2 > 1) {
                                    list.set(key, renders2 - 1);
                                } else {
                                    list.delete(key);
                                }
                            }
                            return [index, release];
                        }
                    };
                }

                function StableCollection({
                    children
                }) {
                    let collection = React23.useRef(createCollection());
                    return /* @__PURE__ */ React23.createElement(StableCollectionContext.Provider, {
                        value: collection
                    }, children);
                }

                function useStableCollectionIndex(group) {
                    let collection = React23.useContext(StableCollectionContext);
                    if (!collection)
                        throw new Error("You must wrap your component in a <StableCollection>");
                    let key = useStableCollectionKey();
                    let [idx, cleanupIdx] = collection.current.get(group, key);
                    React23.useEffect(() => cleanupIdx, []);
                    return idx;
                }

                function useStableCollectionKey() {
                    var _a3, _b, _c;
                    let owner = (
                        // @ts-ignore
                        (_c = (_b = (_a3 = React23.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) == null ? void 0 : _a3.ReactCurrentOwner) == null ? void 0 : _b.current) != null ? _c : null
                    );
                    if (!owner)
                        return Symbol();
                    let indexes = [];
                    let fiber = owner;
                    while (fiber) {
                        indexes.push(fiber.index);
                        fiber = fiber.return;
                    }
                    return "$." + indexes.join(".");
                }

                // src/components/tabs/tabs.tsx
                var reducers8 = {
                    [0 /* SetSelectedIndex */ ](state, action) {
                        var _a3;
                        let tabs = sortByDomNode(state.tabs, (tab) => tab.current);
                        let panels = sortByDomNode(state.panels, (panel) => panel.current);
                        let focusableTabs = tabs.filter((tab) => {
                            var _a4;
                            return !((_a4 = tab.current) == null ? void 0 : _a4.hasAttribute("disabled"));
                        });
                        let nextState = {
                            ...state,
                            tabs,
                            panels
                        };
                        if (
                            // Underflow
                            action.index < 0 || // Overflow
                            action.index > tabs.length - 1
                        ) {
                            let direction = match(Math.sign(action.index - state.selectedIndex), {
                                [-1 /* Less */ ]: () => 1 /* Backwards */ ,
                                [0 /* Equal */ ]: () => {
                                    return match(Math.sign(action.index), {
                                        [-1 /* Less */ ]: () => 0 /* Forwards */ ,
                                        [0 /* Equal */ ]: () => 0 /* Forwards */ ,
                                        [1 /* Greater */ ]: () => 1 /* Backwards */
                                    });
                                },
                                [1 /* Greater */ ]: () => 0 /* Forwards */
                            });
                            if (focusableTabs.length === 0) {
                                return nextState;
                            }
                            return {
                                ...nextState,
                                selectedIndex: match(direction, {
                                    [0 /* Forwards */ ]: () => tabs.indexOf(focusableTabs[0]),
                                    [1 /* Backwards */ ]: () => tabs.indexOf(focusableTabs[focusableTabs.length - 1])
                                })
                            };
                        }
                        let before = tabs.slice(0, action.index);
                        let after = tabs.slice(action.index);
                        let next = [...after, ...before].find((tab) => focusableTabs.includes(tab));
                        if (!next)
                            return nextState;
                        let selectedIndex = (_a3 = tabs.indexOf(next)) != null ? _a3 : state.selectedIndex;
                        if (selectedIndex === -1)
                            selectedIndex = state.selectedIndex;
                        return {
                            ...nextState,
                            selectedIndex
                        };
                    },
                    [1 /* RegisterTab */ ](state, action) {
                        var _a3;
                        if (state.tabs.includes(action.tab))
                            return state;
                        let activeTab = state.tabs[state.selectedIndex];
                        let adjustedTabs = sortByDomNode([...state.tabs, action.tab], (tab) => tab.current);
                        let selectedIndex = (_a3 = adjustedTabs.indexOf(activeTab)) != null ? _a3 : state.selectedIndex;
                        if (selectedIndex === -1)
                            selectedIndex = state.selectedIndex;
                        return {
                            ...state,
                            tabs: adjustedTabs,
                            selectedIndex
                        };
                    },
                    [2 /* UnregisterTab */ ](state, action) {
                        return {
                            ...state,
                            tabs: state.tabs.filter((tab) => tab !== action.tab)
                        };
                    },
                    [3 /* RegisterPanel */ ](state, action) {
                        if (state.panels.includes(action.panel))
                            return state;
                        return {
                            ...state,
                            panels: sortByDomNode([...state.panels, action.panel], (panel) => panel.current)
                        };
                    },
                    [4 /* UnregisterPanel */ ](state, action) {
                        return {
                            ...state,
                            panels: state.panels.filter((panel) => panel !== action.panel)
                        };
                    }
                };
                var TabsDataContext = (0, import_react43.createContext)(null);
                TabsDataContext.displayName = "TabsDataContext";

                function useData4(component) {
                    let context = (0, import_react43.useContext)(TabsDataContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Tab.Group /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useData4);
                        throw err;
                    }
                    return context;
                }
                var TabsActionsContext = (0, import_react43.createContext)(null);
                TabsActionsContext.displayName = "TabsActionsContext";

                function useActions4(component) {
                    let context = (0, import_react43.useContext)(TabsActionsContext);
                    if (context === null) {
                        let err = new Error(`<${component} /> is missing a parent <Tab.Group /> component.`);
                        if (Error.captureStackTrace)
                            Error.captureStackTrace(err, useActions4);
                        throw err;
                    }
                    return context;
                }

                function stateReducer8(state, action) {
                    return match(action.type, reducers8, state, action);
                }
                var DEFAULT_TABS_TAG = import_react43.Fragment;

                function GroupFn4(props, ref) {
                    let {
                        defaultIndex = 0,
                            vertical = false,
                            manual = false,
                            onChange,
                            selectedIndex = null,
                            ...theirProps
                    } = props;
                    const orientation = vertical ? "vertical" : "horizontal";
                    const activation = manual ? "manual" : "auto";
                    let isControlled = selectedIndex !== null;
                    let tabsRef = useSyncRefs(ref);
                    let [state, dispatch] = (0, import_react43.useReducer)(stateReducer8, {
                        selectedIndex: selectedIndex != null ? selectedIndex : defaultIndex,
                        tabs: [],
                        panels: []
                    });
                    let slot = (0, import_react43.useMemo)(() => ({
                        selectedIndex: state.selectedIndex
                    }), [state.selectedIndex]);
                    let onChangeRef = useLatestValue(onChange || (() => {}));
                    let stableTabsRef = useLatestValue(state.tabs);
                    let tabsData = (0, import_react43.useMemo)(
                        () => ({
                            orientation,
                            activation,
                            ...state
                        }),
                        [orientation, activation, state]
                    );
                    let registerTab = useEvent((tab) => {
                        dispatch({
                            type: 1 /* RegisterTab */ ,
                            tab
                        });
                        return () => dispatch({
                            type: 2 /* UnregisterTab */ ,
                            tab
                        });
                    });
                    let registerPanel = useEvent((panel) => {
                        dispatch({
                            type: 3 /* RegisterPanel */ ,
                            panel
                        });
                        return () => dispatch({
                            type: 4 /* UnregisterPanel */ ,
                            panel
                        });
                    });
                    let change = useEvent((index) => {
                        if (realSelectedIndex.current !== index) {
                            onChangeRef.current(index);
                        }
                        if (!isControlled) {
                            dispatch({
                                type: 0 /* SetSelectedIndex */ ,
                                index
                            });
                        }
                    });
                    let realSelectedIndex = useLatestValue(isControlled ? props.selectedIndex : state.selectedIndex);
                    let tabsActions = (0, import_react43.useMemo)(() => ({
                        registerTab,
                        registerPanel,
                        change
                    }), []);
                    useIsoMorphicEffect(() => {
                        dispatch({
                            type: 0 /* SetSelectedIndex */ ,
                            index: selectedIndex != null ? selectedIndex : defaultIndex
                        });
                    }, [
                        selectedIndex
                        /* Deliberately skipping defaultIndex */
                    ]);
                    useIsoMorphicEffect(() => {
                        if (realSelectedIndex.current === void 0)
                            return;
                        if (state.tabs.length <= 0)
                            return;
                        let sorted = sortByDomNode(state.tabs, (tab) => tab.current);
                        let didOrderChange = sorted.some((tab, i) => state.tabs[i] !== tab);
                        if (didOrderChange) {
                            change(sorted.indexOf(state.tabs[realSelectedIndex.current]));
                        }
                    });
                    let ourProps = {
                        ref: tabsRef
                    };
                    return /* @__PURE__ */ import_react43.default.createElement(StableCollection, null, /* @__PURE__ */ import_react43.default.createElement(TabsActionsContext.Provider, {
                        value: tabsActions
                    }, /* @__PURE__ */ import_react43.default.createElement(TabsDataContext.Provider, {
                        value: tabsData
                    }, tabsData.tabs.length <= 0 && /* @__PURE__ */ import_react43.default.createElement(
                        FocusSentinel, {
                            onFocus: () => {
                                var _a3, _b;
                                for (let tab of stableTabsRef.current) {
                                    if (((_a3 = tab.current) == null ? void 0 : _a3.tabIndex) === 0) {
                                        (_b = tab.current) == null ? void 0 : _b.focus();
                                        return true;
                                    }
                                }
                                return false;
                            }
                        }
                    ), render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_TABS_TAG,
                        name: "Tabs"
                    }))));
                }
                var DEFAULT_LIST_TAG = "div";

                function ListFn(props, ref) {
                    let {
                        orientation,
                        selectedIndex
                    } = useData4("Tab.List");
                    let listRef = useSyncRefs(ref);
                    let slot = {
                        selectedIndex
                    };
                    let theirProps = props;
                    let ourProps = {
                        ref: listRef,
                        role: "tablist",
                        "aria-orientation": orientation
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_LIST_TAG,
                        name: "Tabs.List"
                    });
                }
                var DEFAULT_TAB_TAG = "button";

                function TabFn(props, ref) {
                    var _a3, _b;
                    let internalId = useId();
                    let {
                        id = `headlessui-tabs-tab-${internalId}`, ...theirProps
                    } = props;
                    let {
                        orientation,
                        activation,
                        selectedIndex,
                        tabs,
                        panels
                    } = useData4("Tab");
                    let actions = useActions4("Tab");
                    let data = useData4("Tab");
                    let internalTabRef = (0, import_react43.useRef)(null);
                    let tabRef = useSyncRefs(internalTabRef, ref);
                    useIsoMorphicEffect(() => actions.registerTab(internalTabRef), [actions, internalTabRef]);
                    let mySSRIndex = useStableCollectionIndex("tabs");
                    let myIndex = tabs.indexOf(internalTabRef);
                    if (myIndex === -1)
                        myIndex = mySSRIndex;
                    let selected = myIndex === selectedIndex;
                    let activateUsing = useEvent((cb) => {
                        var _a4;
                        let result = cb();
                        if (result === 2 /* Success */ && activation === "auto") {
                            let newTab = (_a4 = getOwnerDocument(internalTabRef)) == null ? void 0 : _a4.activeElement;
                            let idx = data.tabs.findIndex((tab) => tab.current === newTab);
                            if (idx !== -1)
                                actions.change(idx);
                        }
                        return result;
                    });
                    let handleKeyDown = useEvent((event) => {
                        let list = tabs.map((tab) => tab.current).filter(Boolean);
                        if (event.key === " " /* Space */ || event.key === "Enter" /* Enter */ ) {
                            event.preventDefault();
                            event.stopPropagation();
                            actions.change(myIndex);
                            return;
                        }
                        switch (event.key) {
                            case "Home" /* Home */ :
                            case "PageUp" /* PageUp */ :
                                event.preventDefault();
                                event.stopPropagation();
                                return activateUsing(() => focusIn(list, 1 /* First */ ));
                            case "End" /* End */ :
                            case "PageDown" /* PageDown */ :
                                event.preventDefault();
                                event.stopPropagation();
                                return activateUsing(() => focusIn(list, 8 /* Last */ ));
                        }
                        let result = activateUsing(() => {
                            return match(orientation, {
                                vertical() {
                                    if (event.key === "ArrowUp" /* ArrowUp */ )
                                        return focusIn(list, 2 /* Previous */ | 16 /* WrapAround */ );
                                    if (event.key === "ArrowDown" /* ArrowDown */ )
                                        return focusIn(list, 4 /* Next */ | 16 /* WrapAround */ );
                                    return 0 /* Error */ ;
                                },
                                horizontal() {
                                    if (event.key === "ArrowLeft" /* ArrowLeft */ )
                                        return focusIn(list, 2 /* Previous */ | 16 /* WrapAround */ );
                                    if (event.key === "ArrowRight" /* ArrowRight */ )
                                        return focusIn(list, 4 /* Next */ | 16 /* WrapAround */ );
                                    return 0 /* Error */ ;
                                }
                            });
                        });
                        if (result === 2 /* Success */ ) {
                            return event.preventDefault();
                        }
                    });
                    let ready = (0, import_react43.useRef)(false);
                    let handleSelection = useEvent(() => {
                        var _a4;
                        if (ready.current)
                            return;
                        ready.current = true;
                        (_a4 = internalTabRef.current) == null ? void 0 : _a4.focus();
                        actions.change(myIndex);
                        microTask(() => {
                            ready.current = false;
                        });
                    });
                    let handleMouseDown = useEvent((event) => {
                        event.preventDefault();
                    });
                    let slot = (0, import_react43.useMemo)(() => ({
                        selected
                    }), [selected]);
                    let ourProps = {
                        ref: tabRef,
                        onKeyDown: handleKeyDown,
                        onMouseDown: handleMouseDown,
                        onClick: handleSelection,
                        id,
                        role: "tab",
                        type: useResolveButtonType(props, internalTabRef),
                        "aria-controls": (_b = (_a3 = panels[myIndex]) == null ? void 0 : _a3.current) == null ? void 0 : _b.id,
                        "aria-selected": selected,
                        tabIndex: selected ? 0 : -1
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_TAB_TAG,
                        name: "Tabs.Tab"
                    });
                }
                var DEFAULT_PANELS_TAG = "div";

                function PanelsFn(props, ref) {
                    let {
                        selectedIndex
                    } = useData4("Tab.Panels");
                    let panelsRef = useSyncRefs(ref);
                    let slot = (0, import_react43.useMemo)(() => ({
                        selectedIndex
                    }), [selectedIndex]);
                    let theirProps = props;
                    let ourProps = {
                        ref: panelsRef
                    };
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_PANELS_TAG,
                        name: "Tabs.Panels"
                    });
                }
                var DEFAULT_PANEL_TAG4 = "div";
                var PanelRenderFeatures3 = 1 /* RenderStrategy */ | 2 /* Static */ ;

                function PanelFn4(props, ref) {
                    var _a3, _b, _c, _d;
                    let internalId = useId();
                    let {
                        id = `headlessui-tabs-panel-${internalId}`, tabIndex = 0, ...theirProps
                    } = props;
                    let {
                        selectedIndex,
                        tabs,
                        panels
                    } = useData4("Tab.Panel");
                    let actions = useActions4("Tab.Panel");
                    let internalPanelRef = (0, import_react43.useRef)(null);
                    let panelRef = useSyncRefs(internalPanelRef, ref);
                    useIsoMorphicEffect(() => actions.registerPanel(internalPanelRef), [actions, internalPanelRef]);
                    let mySSRIndex = useStableCollectionIndex("panels");
                    let myIndex = panels.indexOf(internalPanelRef);
                    if (myIndex === -1)
                        myIndex = mySSRIndex;
                    let selected = myIndex === selectedIndex;
                    let slot = (0, import_react43.useMemo)(() => ({
                        selected
                    }), [selected]);
                    let ourProps = {
                        ref: panelRef,
                        id,
                        role: "tabpanel",
                        "aria-labelledby": (_b = (_a3 = tabs[myIndex]) == null ? void 0 : _a3.current) == null ? void 0 : _b.id,
                        tabIndex: selected ? tabIndex : -1
                    };
                    if (!selected && ((_c = theirProps.unmount) != null ? _c : true) && !((_d = theirProps.static) != null ? _d : false)) {
                        return /* @__PURE__ */ import_react43.default.createElement(Hidden, {
                            as: "span",
                            ...ourProps
                        });
                    }
                    return render({
                        ourProps,
                        theirProps,
                        slot,
                        defaultTag: DEFAULT_PANEL_TAG4,
                        features: PanelRenderFeatures3,
                        visible: selected,
                        name: "Tabs.Panel"
                    });
                }
                var TabRoot = forwardRefWithAs(TabFn);
                var Group4 = forwardRefWithAs(GroupFn4);
                var List = forwardRefWithAs(ListFn);
                var Panels = forwardRefWithAs(PanelsFn);
                var Panel4 = forwardRefWithAs(PanelFn4);
                var Tab = Object.assign(TabRoot, {
                    Group: Group4,
                    List,
                    Panels,
                    Panel: Panel4
                });

                // src/components/transitions/transition.tsx
                var import_react44 = __toESM(__webpack_require__( /*! react */ "react"), 1);

                // src/utils/once.ts
                function once(cb) {
                    let state = {
                        called: false
                    };
                    return (...args) => {
                        if (state.called)
                            return;
                        state.called = true;
                        return cb(...args);
                    };
                }

                // src/components/transitions/utils/transition.ts
                function addClasses(node, ...classes) {
                    node && classes.length > 0 && node.classList.add(...classes);
                }

                function removeClasses(node, ...classes) {
                    node && classes.length > 0 && node.classList.remove(...classes);
                }

                function waitForTransition(node, done) {
                    let d = disposables();
                    if (!node)
                        return d.dispose;
                    let {
                        transitionDuration,
                        transitionDelay
                    } = getComputedStyle(node);
                    let [durationMs, delayMs] = [transitionDuration, transitionDelay].map((value) => {
                        let [resolvedValue = 0] = value.split(",").filter(Boolean).map((v) => v.includes("ms") ? parseFloat(v) : parseFloat(v) * 1e3).sort((a, z) => z - a);
                        return resolvedValue;
                    });
                    let totalDuration = durationMs + delayMs;
                    if (totalDuration !== 0) {
                        if (false) {} else {
                            d.group((d2) => {
                                d2.setTimeout(() => {
                                    done();
                                    d2.dispose();
                                }, totalDuration);
                                d2.addEventListener(node, "transitionrun", (event) => {
                                    if (event.target !== event.currentTarget)
                                        return;
                                    d2.dispose();
                                });
                            });
                            let dispose = d.addEventListener(node, "transitionend", (event) => {
                                if (event.target !== event.currentTarget)
                                    return;
                                done();
                                dispose();
                            });
                        }
                    } else {
                        done();
                    }
                    d.add(() => done());
                    return d.dispose;
                }

                function transition(node, classes, show, done) {
                    let direction = show ? "enter" : "leave";
                    let d = disposables();
                    let _done = done !== void 0 ? once(done) : () => {};
                    if (direction === "enter") {
                        node.removeAttribute("hidden");
                        node.style.display = "";
                    }
                    let base = match(direction, {
                        enter: () => classes.enter,
                        leave: () => classes.leave
                    });
                    let to = match(direction, {
                        enter: () => classes.enterTo,
                        leave: () => classes.leaveTo
                    });
                    let from = match(direction, {
                        enter: () => classes.enterFrom,
                        leave: () => classes.leaveFrom
                    });
                    removeClasses(
                        node,
                        ...classes.enter,
                        ...classes.enterTo,
                        ...classes.enterFrom,
                        ...classes.leave,
                        ...classes.leaveFrom,
                        ...classes.leaveTo,
                        ...classes.entered
                    );
                    addClasses(node, ...base, ...from);
                    d.nextFrame(() => {
                        removeClasses(node, ...from);
                        addClasses(node, ...to);
                        waitForTransition(node, () => {
                            removeClasses(node, ...base);
                            addClasses(node, ...classes.entered);
                            return _done();
                        });
                    });
                    return d.dispose;
                }

                // src/hooks/use-transition.ts
                function useTransition({
                    container,
                    direction,
                    classes,
                    onStart,
                    onStop
                }) {
                    let mounted = useIsMounted();
                    let d = useDisposables();
                    let latestDirection = useLatestValue(direction);
                    useIsoMorphicEffect(() => {
                        let dd = disposables();
                        d.add(dd.dispose);
                        let node = container.current;
                        if (!node)
                            return;
                        if (latestDirection.current === "idle")
                            return;
                        if (!mounted.current)
                            return;
                        dd.dispose();
                        onStart.current(latestDirection.current);
                        dd.add(
                            transition(node, classes.current, latestDirection.current === "enter", () => {
                                dd.dispose();
                                onStop.current(latestDirection.current);
                            })
                        );
                        return dd.dispose;
                    }, [direction]);
                }

                // src/components/transitions/transition.tsx
                function splitClasses(classes = "") {
                    return classes.split(" ").filter((className) => className.trim().length > 1);
                }
                var TransitionContext = (0, import_react44.createContext)(null);
                TransitionContext.displayName = "TransitionContext";

                function useTransitionContext() {
                    let context = (0, import_react44.useContext)(TransitionContext);
                    if (context === null) {
                        throw new Error(
                            "A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />."
                        );
                    }
                    return context;
                }

                function useParentNesting() {
                    let context = (0, import_react44.useContext)(NestingContext);
                    if (context === null) {
                        throw new Error(
                            "A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />."
                        );
                    }
                    return context;
                }
                var NestingContext = (0, import_react44.createContext)(null);
                NestingContext.displayName = "NestingContext";

                function hasChildren(bag) {
                    if ("children" in bag)
                        return hasChildren(bag.children);
                    return bag.current.filter(({
                        el
                    }) => el.current !== null).filter(({
                        state
                    }) => state === "visible" /* Visible */ ).length > 0;
                }

                function useNesting(done, parent) {
                    let doneRef = useLatestValue(done);
                    let transitionableChildren = (0, import_react44.useRef)([]);
                    let mounted = useIsMounted();
                    let d = useDisposables();
                    let unregister = useEvent((container, strategy = 1 /* Hidden */ ) => {
                        let idx = transitionableChildren.current.findIndex(({
                            el
                        }) => el === container);
                        if (idx === -1)
                            return;
                        match(strategy, {
                            [0 /* Unmount */ ]() {
                                transitionableChildren.current.splice(idx, 1);
                            },
                            [1 /* Hidden */ ]() {
                                transitionableChildren.current[idx].state = "hidden" /* Hidden */ ;
                            }
                        });
                        d.microTask(() => {
                            var _a3;
                            if (!hasChildren(transitionableChildren) && mounted.current) {
                                (_a3 = doneRef.current) == null ? void 0 : _a3.call(doneRef);
                            }
                        });
                    });
                    let register = useEvent((container) => {
                        let child = transitionableChildren.current.find(({
                            el
                        }) => el === container);
                        if (!child) {
                            transitionableChildren.current.push({
                                el: container,
                                state: "visible" /* Visible */
                            });
                        } else if (child.state !== "visible" /* Visible */ ) {
                            child.state = "visible" /* Visible */ ;
                        }
                        return () => unregister(container, 0 /* Unmount */ );
                    });
                    let todos = (0, import_react44.useRef)([]);
                    let wait = (0, import_react44.useRef)(Promise.resolve());
                    let chains = (0, import_react44.useRef)({
                        enter: [],
                        leave: [],
                        idle: []
                    });
                    let onStart = useEvent(
                        (container, direction, cb) => {
                            todos.current.splice(0);
                            if (parent) {
                                parent.chains.current[direction] = parent.chains.current[direction].filter(
                                    ([containerInParent]) => containerInParent !== container
                                );
                            }
                            parent == null ? void 0 : parent.chains.current[direction].push([
                                container,
                                new Promise((resolve) => {
                                    todos.current.push(resolve);
                                })
                            ]);
                            parent == null ? void 0 : parent.chains.current[direction].push([
                                container,
                                new Promise((resolve) => {
                                    Promise.all(chains.current[direction].map(([_container, promise]) => promise)).then(
                                        () => resolve()
                                    );
                                })
                            ]);
                            if (direction === "enter") {
                                wait.current = wait.current.then(() => parent == null ? void 0 : parent.wait.current).then(() => cb(direction));
                            } else {
                                cb(direction);
                            }
                        }
                    );
                    let onStop = useEvent(
                        (_container, direction, cb) => {
                            Promise.all(chains.current[direction].splice(0).map(([_container2, promise]) => promise)).then(() => {
                                var _a3;
                                (_a3 = todos.current.shift()) == null ? void 0 : _a3();
                            }).then(() => cb(direction));
                        }
                    );
                    return (0, import_react44.useMemo)(
                        () => ({
                            children: transitionableChildren,
                            register,
                            unregister,
                            onStart,
                            onStop,
                            wait,
                            chains
                        }),
                        [register, unregister, transitionableChildren, onStart, onStop, chains, wait]
                    );
                }

                function noop() {}
                var eventNames = ["beforeEnter", "afterEnter", "beforeLeave", "afterLeave"];

                function ensureEventHooksExist(events) {
                    var _a3;
                    let result = {};
                    for (let name of eventNames) {
                        result[name] = (_a3 = events[name]) != null ? _a3 : noop;
                    }
                    return result;
                }

                function useEvents(events) {
                    let eventsRef = (0, import_react44.useRef)(ensureEventHooksExist(events));
                    (0, import_react44.useEffect)(() => {
                        eventsRef.current = ensureEventHooksExist(events);
                    }, [events]);
                    return eventsRef;
                }
                var DEFAULT_TRANSITION_CHILD_TAG = "div";
                var TransitionChildRenderFeatures = 1 /* RenderStrategy */ ;

                function TransitionChildFn(props, ref) {
                    let {
                        // Event "handlers"
                        beforeEnter,
                        afterEnter,
                        beforeLeave,
                        afterLeave,
                        // Class names
                        enter,
                        enterFrom,
                        enterTo,
                        entered,
                        leave,
                        leaveFrom,
                        leaveTo,
                        // @ts-expect-error
                        ...rest
                    } = props;
                    let container = (0, import_react44.useRef)(null);
                    let transitionRef = useSyncRefs(container, ref);
                    let strategy = rest.unmount ? 0 /* Unmount */ : 1 /* Hidden */ ;
                    let {
                        show,
                        appear,
                        initial
                    } = useTransitionContext();
                    let [state, setState] = (0, import_react44.useState)(show ? "visible" /* Visible */ : "hidden" /* Hidden */ );
                    let parentNesting = useParentNesting();
                    let {
                        register,
                        unregister
                    } = parentNesting;
                    let prevShow = (0, import_react44.useRef)(null);
                    (0, import_react44.useEffect)(() => register(container), [register, container]);
                    (0, import_react44.useEffect)(() => {
                        if (strategy !== 1 /* Hidden */ )
                            return;
                        if (!container.current)
                            return;
                        if (show && state !== "visible" /* Visible */ ) {
                            setState("visible" /* Visible */ );
                            return;
                        }
                        return match(state, {
                            ["hidden" /* Hidden */ ]: () => unregister(container),
                            ["visible" /* Visible */ ]: () => register(container)
                        });
                    }, [state, container, register, unregister, show, strategy]);
                    let classes = useLatestValue({
                        enter: splitClasses(enter),
                        enterFrom: splitClasses(enterFrom),
                        enterTo: splitClasses(enterTo),
                        entered: splitClasses(entered),
                        leave: splitClasses(leave),
                        leaveFrom: splitClasses(leaveFrom),
                        leaveTo: splitClasses(leaveTo)
                    });
                    let events = useEvents({
                        beforeEnter,
                        afterEnter,
                        beforeLeave,
                        afterLeave
                    });
                    let ready = useServerHandoffComplete();
                    (0, import_react44.useEffect)(() => {
                        if (ready && state === "visible" /* Visible */ && container.current === null) {
                            throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
                        }
                    }, [container, state, ready]);
                    let skip = initial && !appear;
                    let transitionDirection = (() => {
                        if (!ready)
                            return "idle";
                        if (skip)
                            return "idle";
                        if (prevShow.current === show)
                            return "idle";
                        return show ? "enter" : "leave";
                    })();
                    let transitionStateFlags = useFlags(0);
                    let beforeEvent = useEvent((direction) => {
                        return match(direction, {
                            enter: () => {
                                transitionStateFlags.addFlag(8 /* Opening */ );
                                events.current.beforeEnter();
                            },
                            leave: () => {
                                transitionStateFlags.addFlag(4 /* Closing */ );
                                events.current.beforeLeave();
                            },
                            idle: () => {}
                        });
                    });
                    let afterEvent = useEvent((direction) => {
                        return match(direction, {
                            enter: () => {
                                transitionStateFlags.removeFlag(8 /* Opening */ );
                                events.current.afterEnter();
                            },
                            leave: () => {
                                transitionStateFlags.removeFlag(4 /* Closing */ );
                                events.current.afterLeave();
                            },
                            idle: () => {}
                        });
                    });
                    let nesting = useNesting(() => {
                        setState("hidden" /* Hidden */ );
                        unregister(container);
                    }, parentNesting);
                    useTransition({
                        container,
                        classes,
                        direction: transitionDirection,
                        onStart: useLatestValue((direction) => {
                            nesting.onStart(container, direction, beforeEvent);
                        }),
                        onStop: useLatestValue((direction) => {
                            nesting.onStop(container, direction, afterEvent);
                            if (direction === "leave" && !hasChildren(nesting)) {
                                setState("hidden" /* Hidden */ );
                                unregister(container);
                            }
                        })
                    });
                    (0, import_react44.useEffect)(() => {
                        if (!skip)
                            return;
                        if (strategy === 1 /* Hidden */ ) {
                            prevShow.current = null;
                        } else {
                            prevShow.current = show;
                        }
                    }, [show, skip, state]);
                    let theirProps = rest;
                    let ourProps = {
                        ref: transitionRef
                    };
                    if (appear && show && initial) {
                        theirProps = {
                            ...theirProps,
                            // Already apply the `enter` and `enterFrom` on the server if required
                            className: classNames(rest.className, ...classes.current.enter, ...classes.current.enterFrom)
                        };
                    }
                    return /* @__PURE__ */ import_react44.default.createElement(NestingContext.Provider, {
                        value: nesting
                    }, /* @__PURE__ */ import_react44.default.createElement(
                        OpenClosedProvider, {
                            value: match(state, {
                                ["visible" /* Visible */ ]: 1 /* Open */ ,
                                ["hidden" /* Hidden */ ]: 2 /* Closed */
                            }) | transitionStateFlags.flags
                        },
                        render({
                            ourProps,
                            theirProps,
                            defaultTag: DEFAULT_TRANSITION_CHILD_TAG,
                            features: TransitionChildRenderFeatures,
                            visible: state === "visible" /* Visible */ ,
                            name: "Transition.Child"
                        })
                    ));
                }

                function TransitionRootFn(props, ref) {
                    let {
                        show,
                        appear = false,
                        unmount,
                        ...theirProps
                    } = props;
                    let internalTransitionRef = (0, import_react44.useRef)(null);
                    let transitionRef = useSyncRefs(internalTransitionRef, ref);
                    useServerHandoffComplete();
                    let usesOpenClosedState = useOpenClosed();
                    if (show === void 0 && usesOpenClosedState !== null) {
                        show = (usesOpenClosedState & 1 /* Open */ ) === 1 /* Open */ ;
                    }
                    if (![true, false].includes(show)) {
                        throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
                    }
                    let [state, setState] = (0, import_react44.useState)(show ? "visible" /* Visible */ : "hidden" /* Hidden */ );
                    let nestingBag = useNesting(() => {
                        setState("hidden" /* Hidden */ );
                    });
                    let [initial, setInitial] = (0, import_react44.useState)(true);
                    let changes = (0, import_react44.useRef)([show]);
                    useIsoMorphicEffect(() => {
                        if (initial === false) {
                            return;
                        }
                        if (changes.current[changes.current.length - 1] !== show) {
                            changes.current.push(show);
                            setInitial(false);
                        }
                    }, [changes, show]);
                    let transitionBag = (0, import_react44.useMemo)(
                        () => ({
                            show,
                            appear,
                            initial
                        }),
                        [show, appear, initial]
                    );
                    (0, import_react44.useEffect)(() => {
                        if (show) {
                            setState("visible" /* Visible */ );
                        } else if (!hasChildren(nestingBag)) {
                            setState("hidden" /* Hidden */ );
                        } else if (true) {
                            let node = internalTransitionRef.current;
                            if (!node)
                                return;
                            let rect = node.getBoundingClientRect();
                            if (rect.x === 0 && rect.y === 0 && rect.width === 0 && rect.height === 0) {
                                setState("hidden" /* Hidden */ );
                            }
                        }
                    }, [show, nestingBag]);
                    let sharedProps = {
                        unmount
                    };
                    let beforeEnter = useEvent(() => {
                        var _a3;
                        if (initial)
                            setInitial(false);
                        (_a3 = props.beforeEnter) == null ? void 0 : _a3.call(props);
                    });
                    let beforeLeave = useEvent(() => {
                        var _a3;
                        if (initial)
                            setInitial(false);
                        (_a3 = props.beforeLeave) == null ? void 0 : _a3.call(props);
                    });
                    return /* @__PURE__ */ import_react44.default.createElement(NestingContext.Provider, {
                        value: nestingBag
                    }, /* @__PURE__ */ import_react44.default.createElement(TransitionContext.Provider, {
                        value: transitionBag
                    }, render({
                        ourProps: {
                            ...sharedProps,
                            as: import_react44.Fragment,
                            children: /* @__PURE__ */ import_react44.default.createElement(
                                TransitionChild, {
                                    ref: transitionRef,
                                    ...sharedProps,
                                    ...theirProps,
                                    beforeEnter,
                                    beforeLeave
                                }
                            )
                        },
                        theirProps: {},
                        defaultTag: import_react44.Fragment,
                        features: TransitionChildRenderFeatures,
                        visible: state === "visible" /* Visible */ ,
                        name: "Transition"
                    })));
                }

                function ChildFn(props, ref) {
                    let hasTransitionContext = (0, import_react44.useContext)(TransitionContext) !== null;
                    let hasOpenClosedContext = useOpenClosed() !== null;
                    return /* @__PURE__ */ import_react44.default.createElement(import_react44.default.Fragment, null, !hasTransitionContext && hasOpenClosedContext ? (
                        // @ts-expect-error This is an object
                        /* @__PURE__ */
                        import_react44.default.createElement(TransitionRoot, {
                            ref,
                            ...props
                        })
                    ) : (
                        // @ts-expect-error This is an object
                        /* @__PURE__ */
                        import_react44.default.createElement(TransitionChild, {
                            ref,
                            ...props
                        })
                    ));
                }
                var TransitionRoot = forwardRefWithAs(TransitionRootFn);
                var TransitionChild = forwardRefWithAs(TransitionChildFn);
                var Child = forwardRefWithAs(ChildFn);
                var Transition = Object.assign(TransitionRoot, {
                    Child,
                    Root: TransitionRoot
                });


                /***/
            }),

        /***/
        "../../../node_modules/@headlessui/react/dist/index.cjs":
            /*!**************************************************************!*\
              !*** ../../../node_modules/@headlessui/react/dist/index.cjs ***!
              \**************************************************************/
            /***/
            (function(module, __unused_webpack_exports, __webpack_require__) {

                "use strict";


                if (false) {} else {
                    module.exports = __webpack_require__( /*! ./headlessui.dev.cjs */ "../../../node_modules/@headlessui/react/dist/headlessui.dev.cjs")
                }


                /***/
            }),

        /***/
        "../../../node_modules/@babel/runtime/helpers/extends.js":
            /*!***************************************************************!*\
              !*** ../../../node_modules/@babel/runtime/helpers/extends.js ***!
              \***************************************************************/
            /***/
            (function(module) {

                "use strict";


                function _extends() {
                    module.exports = _extends = Object.assign ? Object.assign.bind() : function(target) {
                        for (var i = 1; i < arguments.length; i++) {
                            var source = arguments[i];
                            for (var key in source) {
                                if (Object.prototype.hasOwnProperty.call(source, key)) {
                                    target[key] = source[key];
                                }
                            }
                        }
                        return target;
                    }, module.exports.__esModule = true, module.exports["default"] = module.exports;
                    return _extends.apply(this, arguments);
                }
                module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;

                /***/
            })

        /******/
    });
    /************************************************************************/
    /******/ // The module cache
    /******/
    var __webpack_module_cache__ = {};
    /******/
    /******/ // The require function
    /******/
    function __webpack_require__(moduleId) {
        /******/ // Check if module is in cache
        /******/
        var cachedModule = __webpack_module_cache__[moduleId];
        /******/
        if (cachedModule !== undefined) {
            /******/
            return cachedModule.exports;
            /******/
        }
        /******/ // Create a new module (and put it into the cache)
        /******/
        var module = __webpack_module_cache__[moduleId] = {
            /******/ // no module.id needed
            /******/ // no module.loaded needed
            /******/
            exports: {}
            /******/
        };
        /******/
        /******/ // Execute the module function
        /******/
        __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
        /******/
        /******/ // Return the exports of the module
        /******/
        return module.exports;
        /******/
    }
    /******/
    /************************************************************************/
    /******/
    /* webpack/runtime/global */
    /******/
    ! function() {
        /******/
        __webpack_require__.g = (function() {
            /******/
            if (typeof globalThis === 'object') return globalThis;
            /******/
            try {
                /******/
                return this || new Function('return this')();
                /******/
            } catch (e) {
                /******/
                if (typeof window === 'object') return window;
                /******/
            }
            /******/
        })();
        /******/
    }();
    /******/
    /******/
    /* webpack/runtime/make namespace object */
    /******/
    ! function() {
        /******/ // define __esModule on exports
        /******/
        __webpack_require__.r = function(exports) {
            /******/
            if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
                /******/
                Object.defineProperty(exports, Symbol.toStringTag, {
                    value: 'Module'
                });
                /******/
            }
            /******/
            Object.defineProperty(exports, '__esModule', {
                value: true
            });
            /******/
        };
        /******/
    }();
    /******/
    /******/
    /* webpack/runtime/nonce */
    /******/
    ! function() {
        /******/
        __webpack_require__.nc = undefined;
        /******/
    }();
    /******/
    /************************************************************************/
    var __webpack_exports__ = {};
    // This entry need to be wrapped in an IIFE because it need to be in strict mode.
    ! function() {
        "use strict";
        var exports = __webpack_exports__;
        /*!****************!*\
          !*** ./cdn.ts ***!
          \****************/


        Object.defineProperty(exports, "__esModule", ({
            value: true
        }));
        exports["default"] = void 0;
        var GraphiQLReact = _interopRequireWildcard(__webpack_require__( /*! @graphiql/react */ "../../graphiql-react/dist/index.js"));
        var _toolkit = __webpack_require__( /*! @graphiql/toolkit */ "../../graphiql-toolkit/dist/esm/index.js");
        var GraphQL = _interopRequireWildcard(__webpack_require__( /*! graphql */ "../../../node_modules/graphql/index.mjs"));
        var _GraphiQL = __webpack_require__( /*! ./GraphiQL */ "./GraphiQL.tsx");
        __webpack_require__( /*! @graphiql/react/font/roboto.css */ "../../graphiql-react/font/roboto.css");
        __webpack_require__( /*! @graphiql/react/font/fira-code.css */ "../../graphiql-react/font/fira-code.css");
        __webpack_require__( /*! @graphiql/react/dist/style.css */ "../../graphiql-react/dist/style.css");
        __webpack_require__( /*! ./style.css */ "./style.css");

        function _getRequireWildcardCache(e) {
            if ("function" != typeof WeakMap) return null;
            var r = new WeakMap(),
                t = new WeakMap();
            return (_getRequireWildcardCache = function(e) {
                return e ? t : r;
            })(e);
        }

        function _interopRequireWildcard(e, r) {
            if (!r && e && e.__esModule) return e;
            if (null === e || "object" != typeof e && "function" != typeof e) return {
                default: e
            };
            var t = _getRequireWildcardCache(r);
            if (t && t.has(e)) return t.get(e);
            var n = {
                    __proto__: null
                },
                a = Object.defineProperty && Object.getOwnPropertyDescriptor;
            for (var u in e)
                if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
                    var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
                    i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
                } return n.default = e, t && t.set(e, n), n;
        }
        /**
         *  Copyright (c) 2021 GraphQL Contributors.
         *
         *  This source code is licensed under the MIT license found in the
         *  LICENSE file in the root directory of this source tree.
         */

        /**
         * For the CDN bundle we add some static properties to the component function
         * so that they can be accessed in the inline-script in the HTML file.
         */

        /**
         * This function is needed in order to easily create a fetcher function.
         */
        // @ts-expect-error
        _GraphiQL.GraphiQL.createFetcher = _toolkit.createGraphiQLFetcher;

        /**
         * This function is needed in order to easily generate a custom storage namespace
         */
        // @ts-expect-error
        _GraphiQL.GraphiQL.createLocalStorage = _toolkit.createLocalStorage;

        /**
         * We also add the complete `graphiql-js` exports so that this instance of
         * `graphiql-js` can be reused from plugin CDN bundles.
         */
        // @ts-expect-error
        _GraphiQL.GraphiQL.GraphQL = GraphQL;

        /**
         * We also add the complete `@graphiql/react` exports. These will be included
         * in the bundle anyway since they make up the `GraphiQL` component, so by
         * doing this we can reuse them from plugin CDN bundles.
         */
        // @ts-expect-error
        _GraphiQL.GraphiQL.React = GraphiQLReact;
        var _default = exports["default"] = _GraphiQL.GraphiQL;
    }();
    window.GraphiQL = __webpack_exports__["default"];
    /******/
})();
//# sourceMappingURL=graphiql.min.js.map