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* Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/fullcalendar-scheduler@7.1.5/all/global.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*!\nFullCalendar Scheduler (Vanilla JS) v7.1.5\nDocs & License: https://fullcalendar.io/docs/premium\n(c) 2026 Adam Shaw\n*/\n(function (protectedApi, dayGridPlugin, jsxRuntime, publicApi, classNames, compat, timeGridPlugin) {\n    'use strict';\n\n    function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\n    var dayGridPlugin__default = /*#__PURE__*/_interopDefaultLegacy(dayGridPlugin);\n    var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);\n    var timeGridPlugin__default = /*#__PURE__*/_interopDefaultLegacy(timeGridPlugin);\n\n    function identity(raw) {\n        return raw;\n    }\n\n    const PRIVATE_ID_PREFIX = '_fc:';\n    const RESOURCE_REFINERS = {\n        id: String,\n        parentId: String,\n        children: identity,\n        title: String,\n        businessHours: identity,\n        extendedProps: identity,\n        // event-ui\n        eventEditable: Boolean,\n        eventStartEditable: Boolean,\n        eventDurationEditable: Boolean,\n        eventConstraint: identity,\n        eventOverlap: Boolean, // can NOT be a func, different from OptionsInput\n        eventAllow: identity,\n        eventClass: protectedApi.refineClassName,\n        eventColor: String,\n        eventContrastColor: String,\n    };\n    /*\n    needs a full store so that it can populate children too\n    */\n    function parseResource(raw, parentId = '', store, context) {\n        let { refined, extra } = protectedApi.refineProps(raw, RESOURCE_REFINERS);\n        let resource = {\n            id: refined.id || (PRIVATE_ID_PREFIX + protectedApi.guid()),\n            parentId: refined.parentId || parentId,\n            title: refined.title || '',\n            businessHours: refined.businessHours ? protectedApi.parseBusinessHours(refined.businessHours, context) : null,\n            ui: protectedApi.createEventUi({\n                editable: refined.eventEditable,\n                startEditable: refined.eventStartEditable,\n                durationEditable: refined.eventDurationEditable,\n                constraint: refined.eventConstraint,\n                overlap: refined.eventOverlap,\n                allow: refined.eventAllow,\n                className: refined.eventClass,\n                color: refined.eventColor,\n                contrastColor: refined.eventContrastColor,\n            }, context),\n            extendedProps: {\n                ...extra,\n                ...refined.extendedProps,\n            },\n        };\n        // help out ResourceApi from having user modify props\n        Object.freeze(resource.ui.className); // might be simple string, but freeze still works\n        Object.freeze(resource.extendedProps);\n        if (!store[resource.id]) { // no duplicate resource ID?\n            store[resource.id] = resource;\n            if (refined.children) {\n                for (let childInput of refined.children) {\n                    parseResource(childInput, resource.id, store, context);\n                }\n            }\n        }\n        return resource;\n    }\n    /*\n    TODO: use this in more places\n    */\n    function getPublicId(id) {\n        if (id.indexOf(PRIVATE_ID_PREFIX) === 0) {\n            return '';\n        }\n        return id;\n    }\n\n    class ResourceApi {\n        constructor(_context, _resource) {\n            this._context = _context;\n            this._resource = _resource;\n        }\n        setProp(name, value) {\n            let oldResource = this._resource;\n            this._context.dispatch({\n                type: 'SET_RESOURCE_PROP',\n                resourceId: oldResource.id,\n                propName: name,\n                propValue: value,\n            });\n            this.sync(oldResource);\n        }\n        setExtendedProp(name, value) {\n            let oldResource = this._resource;\n            this._context.dispatch({\n                type: 'SET_RESOURCE_EXTENDED_PROP',\n                resourceId: oldResource.id,\n                propName: name,\n                propValue: value,\n            });\n            this.sync(oldResource);\n        }\n        sync(oldResource) {\n            let context = this._context;\n            let resourceId = oldResource.id;\n            // TODO: what if dispatch didn't complete synchronously?\n            this._resource = context.getCurrentData().resourceStore[resourceId];\n            context.emitter.trigger('resourceChange', {\n                oldResource: new ResourceApi(context, oldResource),\n                resource: this,\n                revert() {\n                    context.dispatch({\n                        type: 'ADD_RESOURCE', // function as a merge. TODO: rename\n                        resourceHash: {\n                            [resourceId]: oldResource,\n                        },\n                    });\n                },\n            });\n        }\n        remove() {\n            let context = this._context;\n            let internalResource = this._resource;\n            let resourceId = internalResource.id;\n            context.dispatch({\n                type: 'REMOVE_RESOURCE',\n                resourceId,\n            });\n            context.emitter.trigger('resourceRemove', {\n                resource: this,\n                revert() {\n                    context.dispatch({\n                        type: 'ADD_RESOURCE', // function as a merge. TODO: rename\n                        resourceHash: {\n                            [resourceId]: internalResource,\n                        },\n                    });\n                },\n            });\n        }\n        getParent() {\n            let context = this._context;\n            let parentId = this._resource.parentId;\n            if (parentId) {\n                return new ResourceApi(context, context.getCurrentData().resourceStore[parentId]);\n            }\n            return null;\n        }\n        getChildren() {\n            let thisResourceId = this._resource.id;\n            let context = this._context;\n            let { resourceStore } = context.getCurrentData();\n            let childApis = [];\n            for (let resourceId in resourceStore) {\n                if (resourceStore[resourceId].parentId === thisResourceId) {\n                    childApis.push(new ResourceApi(context, resourceStore[resourceId]));\n                }\n            }\n            return childApis;\n        }\n        /*\n        this is really inefficient!\n        TODO: make EventApi::resourceIds a hash or keep an index in the Calendar's state\n        */\n        getEvents() {\n            let thisResourceId = this._resource.id;\n            let context = this._context;\n            let { defs, instances } = context.getCurrentData().eventStore;\n            let eventApis = [];\n            for (let instanceId in instances) {\n                let instance = instances[instanceId];\n                let def = defs[instance.defId];\n                if (def.resourceIds.indexOf(thisResourceId) !== -1) { // inefficient!!!\n                    eventApis.push(new protectedApi.EventImpl(context, def, instance));\n                }\n            }\n            return eventApis;\n        }\n        get id() { return getPublicId(this._resource.id); }\n        get title() { return this._resource.title; }\n        get eventConstraint() { return this._resource.ui.constraints[0] || null; } // TODO: better type\n        get eventOverlap() { return this._resource.ui.overlap; }\n        get eventAllow() { return this._resource.ui.allows[0] || null; } // TODO: better type\n        get eventColor() { return this._resource.ui.color; }\n        get eventContrastColor() { return this._resource.ui.contrastColor; }\n        // NOTE: user can't modify these because Object.freeze was called in event-def parsing\n        get eventClass() { return this._resource.ui.className; }\n        get extendedProps() { return this._resource.extendedProps; }\n        toPlainObject(settings = {}) {\n            let internal = this._resource;\n            let { ui } = internal;\n            let publicId = this.id;\n            let res = {};\n            if (publicId) {\n                res.id = publicId;\n            }\n            if (internal.title) {\n                res.title = internal.title;\n            }\n            if (ui.color) {\n                res.eventColor = ui.color;\n            }\n            if (ui.contrastColor) {\n                res.eventContrastColor = ui.contrastColor;\n            }\n            if (ui.className) {\n                res.eventClass = ui.className;\n            }\n            if (Object.keys(internal.extendedProps).length) {\n                if (settings.collapseExtendedProps) {\n                    Object.assign(res, internal.extendedProps);\n                }\n                else {\n                    res.extendedProps = internal.extendedProps;\n                }\n            }\n            return res;\n        }\n        toJSON() {\n            return this.toPlainObject();\n        }\n    }\n    function buildResourceApis(resourceStore, context) {\n        let resourceApis = [];\n        for (let resourceId in resourceStore) {\n            resourceApis.push(new ResourceApi(context, resourceStore[resourceId]));\n        }\n        return resourceApis;\n    }\n\n    const EVENT_REFINERS = {\n        resourceId: String,\n        resourceIds: protectedApi.identity,\n        resourceEditable: Boolean,\n    };\n    function generateEventDefResourceMembers(refined) {\n        return {\n            resourceIds: ensureStringArray(refined.resourceIds)\n                .concat(refined.resourceId ? [refined.resourceId] : []),\n            resourceEditable: refined.resourceEditable,\n        };\n    }\n    function ensureStringArray(items) {\n        return (items || []).map((item) => String(item));\n    }\n\n    protectedApi.EventImpl.prototype.getResources = function () {\n        let { calendarApi } = this._context;\n        // leaves out ids of resources that don't exist, or haven't been fetched yet\n        return this._def.resourceIds\n            .map((resourceId) => calendarApi.getResourceById(resourceId))\n            .filter(Boolean);\n    };\n    protectedApi.EventImpl.prototype.setResources = function (resources) {\n        let resourceIds = [];\n        // massage resources -> resourceIds\n        for (let resource of resources) {\n            let resourceId = null;\n            if (typeof resource === 'string') {\n                resourceId = resource;\n            }\n            else if (typeof resource === 'number') {\n                resourceId = String(resource);\n            }\n            else if (resource instanceof ResourceApi) {\n                resourceId = resource.id; // guaranteed to always have an ID. hmmm\n            }\n            else {\n                protectedApi.warn(`Invalid resource value \\`${resource}\\`. Expected a resource ID or ResourceApi object.`);\n            }\n            if (resourceId) {\n                resourceIds.push(resourceId);\n            }\n        }\n        this.mutate({\n            standardProps: {\n                resourceIds,\n            },\n        });\n    };\n    // core's setProp doesn't know about the scheduler's event props (#5166)\n    const origSetProp = protectedApi.EventImpl.prototype.setProp;\n    protectedApi.EventImpl.prototype.setProp = function (name, val) {\n        if (name === 'resourceEditable') {\n            this.mutate({\n                standardProps: {\n                    resourceEditable: EVENT_REFINERS.resourceEditable(val),\n                },\n            });\n        }\n        else {\n            origSetProp.call(this, name, val);\n        }\n    };\n\n    protectedApi.CalendarApiImpl.prototype.addResource = function (input, scrollTo = true) {\n        let currentState = this.getCurrentData();\n        let resourceHash;\n        let resource;\n        if (input instanceof ResourceApi) {\n            resource = input._resource;\n            resourceHash = { [resource.id]: resource };\n        }\n        else {\n            resourceHash = {};\n            resource = parseResource(input, '', resourceHash, currentState);\n        }\n        this.dispatch({\n            type: 'ADD_RESOURCE',\n            resourceHash,\n        });\n        if (scrollTo) {\n            // TODO: wait til dispatch completes somehow\n            this.trigger('_resourceScrollRequest', resource.id);\n        }\n        let resourceApi = new ResourceApi(currentState, resource);\n        currentState.emitter.trigger('resourceAdd', {\n            resource: resourceApi,\n            revert: () => {\n                this.dispatch({\n                    type: 'REMOVE_RESOURCE',\n                    resourceId: resource.id,\n                });\n            },\n        });\n        return resourceApi;\n    };\n    protectedApi.CalendarApiImpl.prototype.getResourceById = function (id) {\n        id = String(id);\n        let currentState = this.getCurrentData(); // eslint-disable-line react/no-this-in-sfc\n        if (currentState.resourceStore) { // guard against calendar with no resource functionality\n            let rawResource = currentState.resourceStore[id];\n            if (rawResource) {\n                return new ResourceApi(currentState, rawResource);\n            }\n        }\n        return null;\n    };\n    protectedApi.CalendarApiImpl.prototype.getResources = function () {\n        let currentState = this.getCurrentData();\n        let { resourceStore } = currentState;\n        let resourceApis = [];\n        if (resourceStore) { // guard against calendar with no resource functionality\n            for (let resourceId in resourceStore) {\n                resourceApis.push(new ResourceApi(currentState, resourceStore[resourceId]));\n            }\n        }\n        return resourceApis;\n    };\n    protectedApi.CalendarApiImpl.prototype.getTopLevelResources = function () {\n        let currentState = this.getCurrentData();\n        let { resourceStore } = currentState;\n        let resourceApis = [];\n        if (resourceStore) { // guard against calendar with no resource functionality\n            for (let resourceId in resourceStore) {\n                if (!resourceStore[resourceId].parentId) {\n                    resourceApis.push(new ResourceApi(currentState, resourceStore[resourceId]));\n                }\n            }\n        }\n        return resourceApis;\n    };\n    protectedApi.CalendarApiImpl.prototype.refetchResources = function () {\n        this.dispatch({\n            type: 'REFETCH_RESOURCES',\n        });\n    };\n    function transformDatePoint(dateSpan, context) {\n        return dateSpan.resourceId ?\n            { resource: context.calendarApi.getResourceById(dateSpan.resourceId) } :\n            {};\n    }\n    function transformDateSpan(dateSpan, context) {\n        return dateSpan.resourceId ?\n            { resource: context.calendarApi.getResourceById(dateSpan.resourceId) } :\n            {};\n    }\n\n    const UPGRADE_WINDOW = 365 + 7; // days. 1 week leeway, for tz shift reasons too\n    const INVALID_LICENSE_URL = 'https://fullcalendar.io/docs/schedulerLicenseKey#invalid';\n    const OUTDATED_LICENSE_URL = 'https://fullcalendar.io/docs/schedulerLicenseKey#outdated';\n    const PRESET_LICENSE_KEYS = [\n        'AGPL-My-Frontend-And-Backend-Are-Open-Source',\n        'CC-Attribution-NonCommercial-NoDerivatives',\n    ];\n    function buildLicenseWarning(context) {\n        const { options, pluginHooks } = context;\n        const key = options.schedulerLicenseKey;\n        const currentUrl = typeof window !== 'undefined' ? window.location.href : '';\n        if (!isImmuneUrl(currentUrl)) {\n            const status = processLicenseKey(key, pluginHooks.premiumReleaseDate);\n            let statusText;\n            let statusUrl;\n            if (status === 'outdated') {\n                statusText = 'Your license key is too old to work with this version.';\n                statusUrl = OUTDATED_LICENSE_URL;\n            }\n            else {\n                statusText = 'Your license key is invalid.';\n                statusUrl = INVALID_LICENSE_URL;\n            }\n            if (status !== 'valid') {\n                /*\n                Deliberately styled with `popoverClass` and given no class option of its own.\n                Anyone styling popovers has to style this banner too, so the class system can't be used to\n                hide it without also hiding real popovers.\n                */\n                return (jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(options.popoverClass, classNames__default[\"default\"].popoverZ, classNames__default[\"default\"].abs, classNames__default[\"default\"].noPadding), style: {\n                        bottom: 0,\n                        left: 0, // TODO: use direction-aware start\n                        minWidth: 'auto',\n                    }, children: jsxRuntime.jsxs(\"div\", { style: {\n                            padding: '5px',\n                            fontSize: '12px',\n                            lineHeight: '1em',\n                        }, children: [statusText, ' ', jsxRuntime.jsx(\"a\", { href: statusUrl, target: '_blank', style: {\n                                    textDecoration: 'underline',\n                                }, children: \"More info\" })] }) }));\n            }\n        }\n        return null;\n    }\n    /*\n    This decryption is not meant to be bulletproof. Just a way to remind about an upgrade.\n    */\n    function processLicenseKey(key, premiumReleaseDate) {\n        if (PRESET_LICENSE_KEYS.indexOf(key) !== -1) {\n            return 'valid';\n        }\n        const parts = (key || '').match(/^(\\d+)-fcs-(\\d+)$/);\n        if (parts && (parts[1].length === 10)) {\n            const purchaseDate = new Date(parseInt(parts[2], 10) * 1000);\n            const releaseDate = protectedApi.config.mockSchedulerReleaseDate || premiumReleaseDate;\n            if (protectedApi.isValidDate(releaseDate)) { // token won't be replaced in dev mode\n                const minPurchaseDate = protectedApi.addDays(releaseDate, -UPGRADE_WINDOW);\n                if (minPurchaseDate < purchaseDate) {\n                    return 'valid';\n                }\n                return 'outdated';\n            }\n        }\n        return 'invalid';\n    }\n    function isImmuneUrl(url) {\n        return /\\w+:\\/\\/fullcalendar\\.io\\/|\\/examples\\/[\\w-]+\\.html$/.test(url);\n    }\n\n    const OPTION_REFINERS = {\n        // Premium Common\n        // --------------\n        /**\n         * The license key that unlocks premium features. Without a valid key, premium views display a\n         * license warning.\n         * @see https://fullcalendar.io/docs/schedulerLicenseKey\n         */\n        schedulerLicenseKey: String,\n        /**\n         * Whether to render only the rows and columns visible in the scroll viewport, which speeds up\n         * calendars with many resources. Currently applies to resource timeline views.\n         * @see https://fullcalendar.io/docs/virtualization\n         */\n        virtualization: Boolean,\n        // Resource\n        // --------\n        /**\n         * Resources to load when the calendar initializes, in any form `resources` accepts. Unlike\n         * `resources`, later changes to this value are ignored, so resources can then be managed through\n         * the API.\n         * @see https://fullcalendar.io/docs/initialResources\n         */\n        initialResources: protectedApi.identity,\n        /**\n         * The calendar's resources: an array of resource objects, a JSON feed URL, a function that supplies\n         * resources, or a resource source object.\n         * @see https://fullcalendar.io/docs/resource-data\n         */\n        resources: protectedApi.identity,\n        /**\n         * Whether the user can drag events from one resource to another. Defaults to the value of\n         * `editable`; requires the interaction plugin.\n         * @see https://fullcalendar.io/docs/eventResourceEditable\n         */\n        eventResourceEditable: Boolean,\n        /**\n         * Whether to refetch resources whenever the date range or view changes. When `true`, resource feeds\n         * and functions receive the start, end, and time zone of the range.\n         * @see https://fullcalendar.io/docs/refetchResourcesOnNavigate\n         */\n        refetchResourcesOnNavigate: Boolean,\n        /**\n         * The sort order of resources: resource field names (prefix with `-` for descending) as a\n         * comma-separated string or array, or a comparison function. Defaults to `'id,title'`.\n         * @see https://fullcalendar.io/docs/resourceOrder\n         */\n        resourceOrder: protectedApi.parseFieldSpecs,\n        /**\n         * Whether to display only resources that have events in the current date range. No resources\n         * appear until events have loaded.\n         * @see https://fullcalendar.io/docs/filterResourcesWithEvents\n         */\n        filterResourcesWithEvents: Boolean,\n        /**\n         * In resource timeline views, groups resources by the value of this resource field, with a\n         * header row above each group. Ignored if any `resourceColumns` entry has `group: true`.\n         * @see https://fullcalendar.io/docs/resourceGroupField\n         */\n        resourceGroupField: String,\n        /**\n         * Whether child resources start out expanded in resource timeline views. When `false`, they are\n         * collapsed until the user expands their parent.\n         * @see https://fullcalendar.io/docs/resourcesInitiallyExpanded\n         */\n        resourcesInitiallyExpanded: Boolean,\n        /**\n         * Whether vertical resource views put the date headers above the resource headers, instead of\n         * resources above dates.\n         * @see https://fullcalendar.io/docs/datesAboveResources\n         */\n        datesAboveResources: Boolean,\n        needsResourceData: Boolean, // internal-only\n        // Resource DayGrid\n        // ----------------\n        /**\n         * Class names for a header cell naming one resource, above its column(s) in resource time grid and\n         * day grid views. A string, or a function that receives `ResourceDayHeaderInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-day-header-render-hooks\n         */\n        resourceDayHeaderClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Class names for the text wrapper inside a resource header cell. A string, or a function that\n         * receives `ResourceDayHeaderInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-day-header-render-hooks\n         */\n        resourceDayHeaderInnerClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Custom content for each `resourceDayHeader` part, injected inside it in place of its default\n         * content.\n         * @see https://fullcalendar.io/docs/resource-day-header-render-hooks\n         */\n        resourceDayHeaderContent: protectedApi.identity,\n        /**\n         * Called right after each `resourceDayHeader` part's element is added to the DOM.\n         * @see https://fullcalendar.io/docs/resource-day-header-render-hooks\n         */\n        resourceDayHeaderDidMount: protectedApi.identity,\n        /**\n         * Called right before each `resourceDayHeader` part's element is removed from the DOM.\n         * @see https://fullcalendar.io/docs/resource-day-header-render-hooks\n         */\n        resourceDayHeaderWillUnmount: protectedApi.identity,\n        /**\n         * The horizontal alignment of resource header text: `'start'`, `'center'`, or `'end'`, or a\n         * function of the header's `level` that returns one. Themes set their own default.\n         * @see https://fullcalendar.io/docs/resource-day-header-render-hooks\n         */\n        resourceDayHeaderAlign: protectedApi.identity,\n        // stickiness for cell-inner-contents laterally. experimental settings\n        _resourceDayHeaderSticky: protectedApi.identity,\n        // Resource Timeline\n        // -----------------\n        /**\n         * The maximum number of resource rows rendered when printing a resource timeline view. Printing\n         * requires the premium adaptive plugin.\n         * @see https://fullcalendar.io/docs/printMaxRows\n         */\n        printMaxRows: Number,\n        /**\n         * The width of the resource area in resource timeline views, as a number of pixels or a string\n         * ending in `px` or `%`. Defaults to `'30%'`.\n         * @see https://fullcalendar.io/docs/resourceColumnsWidth\n         */\n        resourceColumnsWidth: protectedApi.identity,\n        /**\n         * Turns the resource area of resource timeline views into a grid of data columns. An array of\n         * column objects, each typically with a `field` from the resource, and optionally a\n         * `headerContent`, `width`, or `group: true`.\n         * @see https://fullcalendar.io/docs/resourceColumns\n         */\n        resourceColumns: protectedApi.identity,\n        /**\n         * Class names for the line between the resource area and the timeline. A string only; functions are\n         * not accepted.\n         * @see https://fullcalendar.io/docs/resource-column-divider-render-hooks\n         */\n        resourceColumnDividerClass: protectedApi.refineClassName,\n        // datagrid super-header & normal column headers\n        /**\n         * Class names for the header of one resource area column (\"Resources\" by default). A string, or a\n         * function that receives `ResourceColumnHeaderInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-column-header-render-hooks\n         */\n        resourceColumnHeaderClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Class names for the text wrapper inside a resource column header. A string, or a function that\n         * receives `ResourceColumnHeaderInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-column-header-render-hooks\n         */\n        resourceColumnHeaderInnerClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Class names for the drag handle for resizing a resource area column. A string, or a function that\n         * receives `ResourceColumnHeaderInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-column-header-render-hooks\n         */\n        resourceColumnResizerClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Custom content for each `resourceColumnHeader` part, injected inside it in place of its default\n         * content.\n         * @see https://fullcalendar.io/docs/resource-column-header-render-hooks\n         */\n        resourceColumnHeaderContent: protectedApi.identity,\n        /**\n         * Called right after each `resourceColumnHeader` part's element is added to the DOM.\n         * @see https://fullcalendar.io/docs/resource-column-header-render-hooks\n         */\n        resourceColumnHeaderDidMount: protectedApi.identity,\n        /**\n         * Called right before each `resourceColumnHeader` part's element is removed from the DOM.\n         * @see https://fullcalendar.io/docs/resource-column-header-render-hooks\n         */\n        resourceColumnHeaderWillUnmount: protectedApi.identity,\n        /**\n         * Class names for a header row of the resource area, on the left of resource timeline views. A string\n         * only; functions are not accepted.\n         * @see https://fullcalendar.io/docs/resource-header-row-render-hooks\n         */\n        resourceHeaderRowClass: protectedApi.refineClassName,\n        // For both resources & resource groups\n        /**\n         * Class names for a row in the resource area, for a resource or a resource group. A string only;\n         * functions are not accepted.\n         * @see https://fullcalendar.io/docs/resource-row-render-hooks\n         */\n        resourceRowClass: protectedApi.refineClassName,\n        // datagrid cells, for both resources & resource-GROUP\n        /**\n         * Class names for one cell of a resource row: the resource's title or another column's field. A\n         * string, or a function that receives `ResourceCellInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-cell-render-hooks\n         */\n        resourceCellClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Class names for the content wrapper inside a resource cell. A string, or a function that receives\n         * `ResourceCellInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-cell-render-hooks\n         */\n        resourceCellInnerClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Custom content for each `resourceCell` part, injected inside it in place of its default content.\n         * @see https://fullcalendar.io/docs/resource-cell-render-hooks\n         */\n        resourceCellContent: protectedApi.identity,\n        /**\n         * Called right after each `resourceCell` part's element is added to the DOM.\n         * @see https://fullcalendar.io/docs/resource-cell-render-hooks\n         */\n        resourceCellDidMount: protectedApi.identity,\n        /**\n         * Called right before each `resourceCell` part's element is removed from the DOM.\n         * @see https://fullcalendar.io/docs/resource-cell-render-hooks\n         */\n        resourceCellWillUnmount: protectedApi.identity,\n        // datagrid, for resource-GROUP entire row\n        /**\n         * Class names for the name of a resource group, at the top of its rows in the resource area. A\n         * string, or a function that receives `ResourceGroupHeaderInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-group-header-render-hooks\n         */\n        resourceGroupHeaderClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Class names for the text wrapper inside a resource group header. A string, or a function that\n         * receives `ResourceGroupHeaderInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-group-header-render-hooks\n         */\n        resourceGroupHeaderInnerClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Custom content for each `resourceGroupHeader` part, injected inside it in place of its default\n         * content.\n         * @see https://fullcalendar.io/docs/resource-group-header-render-hooks\n         */\n        resourceGroupHeaderContent: protectedApi.identity,\n        /**\n         * Called right after each `resourceGroupHeader` part's element is added to the DOM.\n         * @see https://fullcalendar.io/docs/resource-group-header-render-hooks\n         */\n        resourceGroupHeaderDidMount: protectedApi.identity,\n        /**\n         * Called right before each `resourceGroupHeader` part's element is removed from the DOM.\n         * @see https://fullcalendar.io/docs/resource-group-header-render-hooks\n         */\n        resourceGroupHeaderWillUnmount: protectedApi.identity,\n        // timeline lane, for resource-GROUP\n        /**\n         * Class names for a resource group's lane across the timeline, beside its header. A string, or a\n         * function that receives `ResourceGroupLaneInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-group-lane-render-hooks\n         */\n        resourceGroupLaneClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Class names for the wrapper inside a resource group lane. A string, or a function that receives\n         * `ResourceGroupLaneInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-group-lane-render-hooks\n         */\n        resourceGroupLaneInnerClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Content rendered inside each `resourceGroupLane` part, which is otherwise empty.\n         * @see https://fullcalendar.io/docs/resource-group-lane-render-hooks\n         */\n        resourceGroupLaneContent: protectedApi.identity,\n        /**\n         * Called right after each `resourceGroupLane` part's element is added to the DOM.\n         * @see https://fullcalendar.io/docs/resource-group-lane-render-hooks\n         */\n        resourceGroupLaneDidMount: protectedApi.identity,\n        /**\n         * Called right before each `resourceGroupLane` part's element is removed from the DOM.\n         * @see https://fullcalendar.io/docs/resource-group-lane-render-hooks\n         */\n        resourceGroupLaneWillUnmount: protectedApi.identity,\n        // timeline, lane, for resource\n        /**\n         * Class names for one resource's horizontal lane across the timeline, where its events appear. A\n         * string, or a function that receives `ResourceLaneInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-lane-render-hooks\n         */\n        resourceLaneClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Called right after each `resourceLane` part's element is added to the DOM.\n         * @see https://fullcalendar.io/docs/resource-lane-render-hooks\n         */\n        resourceLaneDidMount: protectedApi.identity,\n        /**\n         * Called right before each `resourceLane` part's element is removed from the DOM.\n         * @see https://fullcalendar.io/docs/resource-lane-render-hooks\n         */\n        resourceLaneWillUnmount: protectedApi.identity,\n        /**\n         * Class names for the space above the events in a resource lane. A string, or a function that\n         * receives `ResourceLaneInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-lane-render-hooks\n         */\n        resourceLaneTopClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Content rendered inside each resource lane's `resourceLaneTop` element, above its events, which\n         * is otherwise empty.\n         * @see https://fullcalendar.io/docs/resource-lane-render-hooks\n         */\n        resourceLaneTopContent: protectedApi.identity,\n        /**\n         * Class names for the space below the events in a resource lane. A string, or a function that\n         * receives `ResourceLaneInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-lane-render-hooks\n         */\n        resourceLaneBottomClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Content rendered inside each resource lane's `resourceLaneBottom` element, below its events,\n         * which is otherwise empty.\n         * @see https://fullcalendar.io/docs/resource-lane-render-hooks\n         */\n        resourceLaneBottomContent: protectedApi.identity,\n        /**\n         * Class names for the indentation before a nested resource, holding the expander. A string only;\n         * functions are not accepted.\n         * @see https://fullcalendar.io/docs/resource-expander-render-hooks\n         */\n        resourceIndentClass: protectedApi.refineClassName,\n        /**\n         * Class names for the toggle that expands or collapses a resource's children or a group. A string,\n         * or a function that receives `ResourceExpanderInfo` and returns one.\n         * @see https://fullcalendar.io/docs/resource-expander-render-hooks\n         */\n        resourceExpanderClass: protectedApi.refineClassNameGenerator,\n        /**\n         * Custom content for each `resourceExpander` part, injected inside it in place of its default\n         * content.\n         * @see https://fullcalendar.io/docs/resource-expander-render-hooks\n         */\n        resourceExpanderContent: protectedApi.identity,\n        // Timeline\n        // --------\n        /**\n         * Class names for the space above the events in a timeline without resources. A string only;\n         * functions are not accepted.\n         * @see https://fullcalendar.io/docs/timeline-render-hooks\n         */\n        timelineTopClass: protectedApi.refineClassName,\n        /**\n         * Class names for the space below the events in a timeline without resources. A string only;\n         * functions are not accepted.\n         * @see https://fullcalendar.io/docs/timeline-render-hooks\n         */\n        timelineBottomClass: protectedApi.refineClassName,\n    };\n    const OPTION_DEFAULTS = {\n        // Resource Timeline\n        // -----------------\n        printMaxRows: 1000,\n        // Resource DayGrid\n        // ----------------\n        // resourceDayHeaderAlign: 'start' as const, --- this default was inlined due to plugin ordering problems\n        _resourceDayHeaderSticky: true,\n    };\n    const LISTENER_REFINERS = {\n        // Resource\n        // --------\n        /**\n         * Called after the calendar's resources are first loaded or change in any way, with an array of all\n         * resources (the same as `getResources()`).\n         * @see https://fullcalendar.io/docs/resourcesSet\n         */\n        resourcesSet: protectedApi.identity,\n        /**\n         * Called after a resource is added to the calendar via `addResource`. The info includes the\n         * resource and `revert` to undo the addition.\n         * @see https://fullcalendar.io/docs/resourceAdd\n         */\n        resourceAdd: protectedApi.identity,\n        /**\n         * Called after a resource is modified via its setter methods. The info includes the updated\n         * resource, the previous `oldResource`, and `revert` to undo the change.\n         * @see https://fullcalendar.io/docs/resourceChange\n         */\n        resourceChange: protectedApi.identity,\n        /**\n         * Called after a resource is removed from the calendar via `remove()`. The info includes the\n         * resource and `revert` to undo the removal.\n         * @see https://fullcalendar.io/docs/resourceRemove\n         */\n        resourceRemove: protectedApi.identity,\n        // internal\n        _resourceScrollRequest: protectedApi.identity,\n    };\n\n    var premiumCommonPlugin = {\n        name: 'common',\n        premiumReleaseDate: '2026-11-12',\n        optionRefiners: OPTION_REFINERS,\n        optionDefaults: OPTION_DEFAULTS,\n        listenerRefiners: LISTENER_REFINERS,\n        viewContainerAppends: [buildLicenseWarning],\n    };\n\n    function massageEventDragMutation(eventMutation, hit0, hit1) {\n        let resource0 = hit0.dateSpan.resourceId;\n        let resource1 = hit1.dateSpan.resourceId;\n        if (resource0 && resource1 &&\n            resource0 !== resource1) {\n            eventMutation.resourceMutation = {\n                matchResourceId: resource0,\n                setResourceId: resource1,\n            };\n        }\n    }\n    /*\n    TODO: all this would be much easier if we were using a hash!\n    */\n    function applyEventDefMutation(eventDef, mutation, context) {\n        let resourceMutation = mutation.resourceMutation;\n        if (resourceMutation && computeResourceEditable(eventDef, context)) {\n            let index = eventDef.resourceIds.indexOf(resourceMutation.matchResourceId);\n            if (index !== -1) {\n                let resourceIds = eventDef.resourceIds.slice(); // copy\n                resourceIds.splice(index, 1); // remove\n                if (resourceIds.indexOf(resourceMutation.setResourceId) === -1) { // not already in there\n                    resourceIds.push(resourceMutation.setResourceId); // add\n                }\n                eventDef.resourceIds = resourceIds;\n            }\n        }\n    }\n    /*\n    HACK\n    TODO: use EventUi system instead of this\n    */\n    function computeResourceEditable(eventDef, context) {\n        let { resourceEditable } = eventDef;\n        if (resourceEditable == null) {\n            let source = eventDef.sourceId && context.getCurrentData().eventSources[eventDef.sourceId];\n            if (source) {\n                resourceEditable = source.extendedProps.resourceEditable; // used the Source::extendedProps hack\n            }\n            if (resourceEditable == null) {\n                resourceEditable = context.options.eventResourceEditable;\n                if (resourceEditable == null) {\n                    resourceEditable = context.options.editable; // TODO: use defaults system instead\n                }\n            }\n        }\n        return resourceEditable;\n    }\n    function transformEventDrop(mutation, context, eventDef) {\n        let { resourceMutation } = mutation;\n        // like applyEventDefMutation, ignore the resource change when not resource-editable (#4943)\n        if (resourceMutation && computeResourceEditable(eventDef, context)) {\n            let { calendarApi } = context;\n            return {\n                oldResource: calendarApi.getResourceById(resourceMutation.matchResourceId),\n                newResource: calendarApi.getResourceById(resourceMutation.setResourceId),\n            };\n        }\n        return {\n            oldResource: null,\n            newResource: null,\n        };\n    }\n\n    /*\n    Passes resource data through untouched. filterResourcesWithEvents is applied by each view\n    via resource/common/resource-filtering, so a view's whole visibility policy — view-wide and,\n    for the vertical views, per-date — lives in one place instead of straddling this transformer.\n    Views filter against rawEventStore so resources don't vanish while an event is being dragged.\n\n    CONSEQUENCE: declaring `needsResourceData` no longer buys a view filtering for free. A new\n    resource view must call filterResourceStore itself or filterResourcesWithEvents silently\n    does nothing for it.\n    */\n    class ResourceDataAdder {\n        transform(viewProps, calendarProps) {\n            if (calendarProps.viewSpec.optionDefaults.needsResourceData) {\n                return {\n                    resourceStore: calendarProps.resourceStore,\n                    rawEventStore: calendarProps.eventStore,\n                    resourceEntityExpansions: calendarProps.resourceEntityExpansions,\n                };\n            }\n            return null;\n        }\n    }\n    /*\n    for making sure events that have editable resources are always draggable in resource views\n    */\n    function transformIsDraggable(val, eventDef, eventUi, context) {\n        if (!val) {\n            let state = context.getCurrentData();\n            let viewSpec = state.viewSpecs[state.currentViewType];\n            if (viewSpec.optionDefaults.needsResourceData) {\n                if (computeResourceEditable(eventDef, context)) {\n                    return true;\n                }\n            }\n        }\n        return val;\n    }\n\n    /*\n    For views without resources: each event gets its resources' UI (coloring, constraints, etc.).\n    Views with resources get a resource's UI per section instead, from the splitter.\n    */\n    class ResourceEventConfigAdder {\n        constructor() {\n            this.buildResourceEventUis = protectedApi.memoize(buildResourceEventUis, protectedApi.isPropsEqualShallow);\n            this.buildGetResourcesEventUi = protectedApi.memoize(buildGetResourcesEventUi); // changes only when a resource's UI does\n            this.addGetExtraUi = protectedApi.memoize(addGetExtraUi);\n        }\n        transform(viewProps, calendarProps) {\n            if (!calendarProps.viewSpec.optionDefaults.needsResourceData) {\n                return {\n                    eventUiBases: this.addGetExtraUi(viewProps.eventUiBases, this.buildGetResourcesEventUi(this.buildResourceEventUis(calendarProps.resourceStore))),\n                };\n            }\n            return null;\n        }\n    }\n    function buildResourceEventUis(resourceStore) {\n        return protectedApi.mapHash(resourceStore, (resource) => resource.ui);\n    }\n    function buildGetResourcesEventUi(resourceEventUis) {\n        return (eventDef) => {\n            let { resourceIds } = eventDef;\n            if (resourceIds.length === 1) {\n                return resourceEventUis[resourceIds[0]];\n            }\n            let parts = [];\n            // first resource takes precedence, which fights with the ordering of combineEventUis, thus the unshifts\n            for (let resourceId of resourceIds) {\n                if (resourceEventUis[resourceId]) {\n                    parts.unshift(resourceEventUis[resourceId]);\n                }\n            }\n            return parts.length ? protectedApi.combineEventUis(parts) : undefined;\n        };\n    }\n    function addGetExtraUi(eventUiBases, getExtraUi) {\n        return { ...eventUiBases, getExtraUi };\n    }\n\n    const arrayResourceSource = {\n        ignoreRange: true,\n        parseMeta(refined) {\n            if (Array.isArray(refined.resources)) {\n                return refined.resources;\n            }\n            return null;\n        },\n        fetch(arg, successCallback) {\n            successCallback({\n                rawResources: arg.resourceSource.meta,\n            });\n        },\n    };\n\n    const jsonFeedResourceSource = {\n        parseMeta(refined) {\n            if (refined.url) {\n                return {\n                    url: refined.url,\n                    method: (refined.method || 'GET').toUpperCase(),\n                    extraParams: refined.extraParams,\n                };\n            }\n            return null;\n        },\n        fetch(arg, successCallback, errorCallback) {\n            const meta = arg.resourceSource.meta;\n            const requestParams = buildRequestParams(meta, arg.range, arg.context);\n            protectedApi.requestJson(meta.method, meta.url, requestParams).then(([rawResources, response]) => {\n                successCallback({ rawResources, response });\n            }, errorCallback);\n        },\n    };\n    // TODO: somehow consolidate with event json feed\n    function buildRequestParams(meta, range, context) {\n        let { dateEnv, options } = context;\n        let startParam;\n        let endParam;\n        let timeZoneParam;\n        let customRequestParams;\n        let params = {};\n        if (range) {\n            startParam = meta.startParam;\n            if (startParam == null) {\n                startParam = options.startParam;\n            }\n            endParam = meta.endParam;\n            if (endParam == null) {\n                endParam = options.endParam;\n            }\n            timeZoneParam = meta.timeZoneParam;\n            if (timeZoneParam == null) {\n                timeZoneParam = options.timeZoneParam;\n            }\n            params[startParam] = dateEnv.formatIso(range.start);\n            params[endParam] = dateEnv.formatIso(range.end);\n            if (dateEnv.timeZone !== 'local') {\n                params[timeZoneParam] = dateEnv.timeZone;\n            }\n        }\n        // retrieve any outbound GET/POST data from the options\n        if (typeof meta.extraParams === 'function') {\n            // supplied as a function that returns a key/value object\n            customRequestParams = meta.extraParams();\n        }\n        else {\n            // probably supplied as a straight key/value object\n            customRequestParams = meta.extraParams || {};\n        }\n        Object.assign(params, customRequestParams);\n        return params;\n    }\n\n    const funcResourceSource = {\n        parseMeta(refined) {\n            if (typeof refined.resources === 'function') {\n                return refined.resources;\n            }\n            return null;\n        },\n        fetch(info, successCallback, errorCallback) {\n            const dateEnv = info.context.dateEnv;\n            const func = info.resourceSource.meta;\n            const publicData = info.range ? {\n                start: dateEnv.toDate(info.range.start),\n                end: dateEnv.toDate(info.range.end),\n                startStr: dateEnv.formatIso(info.range.start),\n                endStr: dateEnv.formatIso(info.range.end),\n                timeZone: dateEnv.timeZone,\n            } : {};\n            protectedApi.unpromisify(func.bind(null, publicData), (rawResources) => successCallback({ rawResources }), errorCallback);\n        },\n    };\n\n    let defs = [\n        arrayResourceSource,\n        jsonFeedResourceSource,\n        funcResourceSource,\n    ];\n    function getResourceSourceDef(id) {\n        return defs[id];\n    }\n    function getResourceSourceDefs() {\n        return defs;\n    }\n\n    // TODO: make this a plugin-able parser\n    // TODO: success/failure\n    const RESOURCE_SOURCE_REFINERS = {\n        id: String,\n        // for array. TODO: move to resource-array\n        resources: protectedApi.identity,\n        // for json feed. TODO: move to resource-json-feed\n        url: String,\n        method: String,\n        startParam: String,\n        endParam: String,\n        timeZoneParam: String,\n        extraParams: protectedApi.identity,\n    };\n    function parseResourceSource(input) {\n        let inputObj;\n        if (typeof input === 'string') {\n            inputObj = { url: input };\n        }\n        else if (typeof input === 'function' || Array.isArray(input)) {\n            inputObj = { resources: input };\n        }\n        else if (typeof input === 'object' && input) { // non-null object\n            inputObj = input;\n        }\n        if (inputObj) {\n            let { refined, extra } = protectedApi.refineProps(inputObj, RESOURCE_SOURCE_REFINERS);\n            warnUnknownProps(extra);\n            let metaRes = buildResourceSourceMeta(refined);\n            if (metaRes) {\n                return {\n                    _raw: input,\n                    sourceId: protectedApi.guid(),\n                    sourceDefId: metaRes.sourceDefId,\n                    meta: metaRes.meta,\n                    publicId: refined.id || '',\n                    isFetching: false,\n                    latestFetchId: '',\n                    fetchRange: null,\n                };\n            }\n        }\n        return null;\n    }\n    function buildResourceSourceMeta(refined) {\n        let defs = getResourceSourceDefs();\n        for (let i = defs.length - 1; i >= 0; i -= 1) { // later-added plugins take precedence\n            let def = defs[i];\n            let meta = def.parseMeta(refined);\n            if (meta) {\n                return { meta, sourceDefId: i };\n            }\n        }\n        return null;\n    }\n    function warnUnknownProps(props) {\n        for (let propName in props) {\n            protectedApi.warn(`Unknown resource-source property \\`${propName}\\`.`);\n        }\n    }\n\n    function reduceResourceSource(source, action, context) {\n        let { options, dateProfile } = context;\n        if (!source || !action) {\n            return createSource(options.initialResources || options.resources, dateProfile.activeRange, options.refetchResourcesOnNavigate, context);\n        }\n        switch (action.type) {\n            case 'RESET_RESOURCE_SOURCE':\n                return createSource(action.resourceSourceInput, dateProfile.activeRange, options.refetchResourcesOnNavigate, context);\n            case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n            case 'NEXT':\n            case 'CHANGE_DATE':\n            case 'CHANGE_VIEW_TYPE':\n                return handleRangeChange(source, dateProfile.activeRange, options.refetchResourcesOnNavigate, context);\n            case 'RECEIVE_RESOURCES':\n            case 'RECEIVE_RESOURCE_ERROR':\n                return receiveResponse(source, action.fetchId, action.fetchRange);\n            case 'REFETCH_RESOURCES':\n                return fetchSource(source, dateProfile.activeRange, context);\n            default:\n                return source;\n        }\n    }\n    function createSource(input, activeRange, refetchResourcesOnNavigate, context) {\n        if (input) {\n            let source = parseResourceSource(input);\n            source = fetchSource(source, refetchResourcesOnNavigate ? activeRange : null, context);\n            return source;\n        }\n        return null;\n    }\n    function handleRangeChange(source, activeRange, refetchResourcesOnNavigate, context) {\n        if (refetchResourcesOnNavigate &&\n            !doesSourceIgnoreRange(source) &&\n            (!source.fetchRange || !protectedApi.rangesEqual(source.fetchRange, activeRange))) {\n            return fetchSource(source, activeRange, context);\n        }\n        return source;\n    }\n    function doesSourceIgnoreRange(source) {\n        return Boolean(getResourceSourceDef(source.sourceDefId).ignoreRange);\n    }\n    function fetchSource(source, fetchRange, context) {\n        let sourceDef = getResourceSourceDef(source.sourceDefId);\n        let fetchId = protectedApi.guid();\n        sourceDef.fetch({\n            resourceSource: source,\n            range: fetchRange,\n            context,\n        }, (res) => {\n            context.dispatch({\n                type: 'RECEIVE_RESOURCES',\n                fetchId,\n                fetchRange,\n                rawResources: res.rawResources,\n            });\n        }, (error) => {\n            context.dispatch({\n                type: 'RECEIVE_RESOURCE_ERROR',\n                fetchId,\n                fetchRange,\n                error,\n            });\n        });\n        return {\n            ...source,\n            isFetching: true,\n            latestFetchId: fetchId,\n        };\n    }\n    function receiveResponse(source, fetchId, fetchRange) {\n        if (fetchId === source.latestFetchId) {\n            return {\n                ...source,\n                isFetching: false,\n                fetchRange,\n            };\n        }\n        return source;\n    }\n\n    function reduceResourceStore(store, action, source, context) {\n        if (!store || !action) {\n            return {};\n        }\n        switch (action.type) {\n            case 'RECEIVE_RESOURCES':\n                return receiveRawResources(store, action.rawResources, action.fetchId, source, context);\n            case 'ADD_RESOURCE':\n                return addResource(store, action.resourceHash);\n            case 'REMOVE_RESOURCE':\n                return removeResource(store, action.resourceId);\n            case 'SET_RESOURCE_PROP':\n                return setResourceProp(store, action.resourceId, action.propName, action.propValue);\n            case 'SET_RESOURCE_EXTENDED_PROP':\n                return setResourceExtendedProp(store, action.resourceId, action.propName, action.propValue);\n            default:\n                return store;\n        }\n    }\n    function receiveRawResources(existingStore, inputs, fetchId, source, context) {\n        if (source.latestFetchId === fetchId) {\n            let nextStore = {};\n            for (let input of inputs) {\n                parseResource(input, '', nextStore, context);\n            }\n            return nextStore;\n        }\n        return existingStore;\n    }\n    function addResource(existingStore, additions) {\n        // TODO: warn about duplicate IDs\n        return { ...existingStore, ...additions };\n    }\n    function removeResource(existingStore, resourceId) {\n        let newStore = { ...existingStore };\n        delete newStore[resourceId];\n        // promote children\n        for (let childResourceId in newStore) { // a child, *maybe* but probably not\n            if (newStore[childResourceId].parentId === resourceId) {\n                newStore[childResourceId] = {\n                    ...newStore[childResourceId],\n                    parentId: '',\n                };\n            }\n        }\n        return newStore;\n    }\n    function setResourceProp(existingStore, resourceId, name, value) {\n        let existingResource = existingStore[resourceId];\n        // TODO: sanitization\n        if (existingResource) {\n            return {\n                ...existingStore,\n                [resourceId]: {\n                    ...existingResource,\n                    [name]: value,\n                },\n            };\n        }\n        return existingStore;\n    }\n    function setResourceExtendedProp(existingStore, resourceId, name, value) {\n        let existingResource = existingStore[resourceId];\n        if (existingResource) {\n            return {\n                ...existingStore,\n                [resourceId]: {\n                    ...existingResource,\n                    extendedProps: {\n                        ...existingResource.extendedProps,\n                        [name]: value,\n                    },\n                },\n            };\n        }\n        return existingStore;\n    }\n\n    function reduceResourceEntityExpansions(expansions, action) {\n        if (!expansions || !action) {\n            return {};\n        }\n        switch (action.type) {\n            case 'SET_RESOURCE_ENTITY_EXPANDED':\n                return {\n                    ...expansions,\n                    [action.id]: action.isExpanded,\n                };\n            default:\n                return expansions;\n        }\n    }\n\n    function reduceResources(state, action, context) {\n        let resourceSource = reduceResourceSource(state && state.resourceSource, action, context);\n        let resourceStore = reduceResourceStore(state && state.resourceStore, action, resourceSource, context);\n        let resourceEntityExpansions = reduceResourceEntityExpansions(state && state.resourceEntityExpansions, action);\n        return {\n            resourceSource,\n            resourceStore,\n            resourceEntityExpansions,\n        };\n    }\n\n    function transformDateSelectionJoin(hit0, hit1) {\n        let resourceId0 = hit0.dateSpan.resourceId;\n        let resourceId1 = hit1.dateSpan.resourceId;\n        if (resourceId0 && resourceId1) {\n            return { resourceId: resourceId0 };\n        }\n        return null;\n    }\n\n    /*\n    splits things BASED OFF OF which resources they are associated with.\n    creates a '' entry which is when something has NO resource.\n    */\n    class ResourceSplitter extends protectedApi.Splitter {\n        getKeyInfo(props) {\n            return {\n                '': {}, // needed for non-resource\n                ...props.resourceStore, // already has `ui` and `businessHours` keys!\n            };\n        }\n        getKeysForDateSpan(dateSpan) {\n            return [dateSpan.resourceId || ''];\n        }\n        getKeysForEventDef(eventDef) {\n            let resourceIds = eventDef.resourceIds;\n            if (!resourceIds.length) {\n                return [''];\n            }\n            return resourceIds;\n        }\n    }\n\n    function isPropsValidWithResources(combinedProps, context) {\n        let splitter = new ResourceSplitter();\n        let sets = splitter.splitProps({\n            ...combinedProps,\n            resourceStore: context.getCurrentData().resourceStore,\n        });\n        for (let resourceId in sets) {\n            let props = sets[resourceId];\n            // merge in event data from the non-resource segment\n            if (resourceId && sets['']) { // current segment is not the non-resource one, and there IS a non-resource one\n                props = {\n                    ...props,\n                    eventStore: protectedApi.mergeEventStores(sets[''].eventStore, props.eventStore),\n                };\n            }\n            if (!protectedApi.isPropsValid(props, context, { resourceId }, filterConfig.bind(null, resourceId))) {\n                return false;\n            }\n        }\n        return true;\n    }\n    function filterConfig(resourceId, config) {\n        return {\n            ...config,\n            constraints: filterConstraints(resourceId, config.constraints),\n        };\n    }\n    function filterConstraints(resourceId, constraints) {\n        return constraints.map((constraint) => {\n            let defs = constraint.defs;\n            if (defs) { // we are dealing with an EventStore\n                // if any of the events define constraints to resources that are NOT this resource,\n                // then this resource is unconditionally prohibited, which is what a `false` value does.\n                for (let defId in defs) {\n                    let resourceIds = defs[defId].resourceIds;\n                    if (resourceIds.length && resourceIds.indexOf(resourceId) === -1) { // TODO: use a hash?!!! (for other reasons too)\n                        return false;\n                    }\n                }\n            }\n            return constraint;\n        });\n    }\n\n    function transformExternalDef(dateSpan) {\n        return dateSpan.resourceId ?\n            { resourceId: dateSpan.resourceId } :\n            {};\n    }\n\n    const optionChangeHandlers = {\n        resources: handleResources,\n    };\n    function handleResources(newSourceInput, context) {\n        let oldSourceInput = context.getCurrentData().resourceSource._raw;\n        if (oldSourceInput !== newSourceInput) {\n            context.dispatch({\n                type: 'RESET_RESOURCE_SOURCE',\n                resourceSourceInput: newSourceInput,\n            });\n        }\n    }\n\n    const DEFAULT_RESOURCE_ORDER = protectedApi.parseFieldSpecs('id,title');\n    function handleResourceStore(resourceStore, calendarData) {\n        let { emitter } = calendarData;\n        if (emitter.hasHandlers('resourcesSet')) {\n            emitter.trigger('resourcesSet', buildResourceApis(resourceStore, calendarData));\n        }\n    }\n\n    var resourcePlugin = {\n        name: 'resource',\n        premiumReleaseDate: '2026-11-12',\n        deps: [premiumCommonPlugin],\n        reducers: [reduceResources],\n        isLoadingFuncs: [\n            (state) => state.resourceSource && state.resourceSource.isFetching,\n        ],\n        eventRefiners: EVENT_REFINERS,\n        eventDefMemberAdders: [generateEventDefResourceMembers],\n        isDraggableTransformers: [transformIsDraggable],\n        eventDragMutationMassagers: [massageEventDragMutation],\n        eventDefMutationAppliers: [applyEventDefMutation],\n        dateSelectionTransformers: [transformDateSelectionJoin],\n        datePointTransforms: [transformDatePoint],\n        dateSpanTransforms: [transformDateSpan],\n        viewPropsTransformers: [ResourceDataAdder, ResourceEventConfigAdder],\n        isPropsValid: isPropsValidWithResources,\n        externalDefTransforms: [transformExternalDef],\n        eventDropTransformers: [transformEventDrop],\n        optionChangeHandlers,\n        propSetHandlers: { resourceStore: handleResourceStore },\n    };\n\n    /*\n    Utilities for filterResourcesWithEvents.\n\n    View-wide (filterResourceStore, applied by each view for itself): a resource is shown when\n    any of its events intersect the view's activeRange — ONE contiguous span.\n\n    That coarseness is deliberate, not an oversight. The rule does not care whether an event\n    lands on an invisible period INSIDE the span — an interior hidden day, or a gap outside\n    slotMinTime/slotMaxTime — so such a resource is still shown, with a visibly empty column or\n    row. Tightening this to \"must fall on something actually rendered\" was built and then\n    reverted: every view family renders its span differently (timeline slots can be coarser than\n    a day and paint the hidden days inside them; a whole-day timeline axis ignores slot times\n    entirely), so a per-day rule silently deleted events that really did render. Treat the empty\n    column as the accepted cost and leave the rule alone.\n\n    Per-date (computeHasEventsByDate): the same intersection test asked once per rendered\n    column, so multi-day vertical views can give a (date, resource) pair its own column. Being\n    per-column makes it strictly finer than the view-wide pass, so a resource can survive\n    view-wide and match no column at all; buildResourceTableModel falls back to day-only columns\n    when that happens for every resource.\n\n    KNOWN LIMITATION, predating this code and intentionally left alone: an event counts via its\n    raw range even when it renders something else. Chiefly display:'inverse-background', which\n    paints the COMPLEMENT of its range. Mirroring the inverse would mark every date the event\n    does NOT cover, which effectively disables filtering for any resource carrying availability\n    shading — worse than the current wart. A real fix excludes inverse-background and\n    display:'none' outright, resolving display through compileEventUis (event/source/global\n    levels), not def.ui alone.\n    */\n    function filterResourceStore(resourceStore, doFilterResourcesWithEvents, eventStore, activeRange) {\n        if (!doFilterResourcesWithEvents) {\n            return resourceStore;\n        }\n        let instancesInRange = filterEventInstancesInRange(eventStore.instances, activeRange);\n        let hasEvents = computeHasEvents(instancesInRange, eventStore.defs);\n        Object.assign(hasEvents, computeAncestorHasEvents(hasEvents, resourceStore));\n        return protectedApi.filterHash(resourceStore, (resource, resourceId) => hasEvents[resourceId]);\n    }\n    function filterEventInstancesInRange(eventInstances, activeRange) {\n        return protectedApi.filterHash(eventInstances, (eventInstance) => protectedApi.rangesIntersect(eventInstance.range, activeRange));\n    }\n    function computeHasEvents(eventInstances, eventDefs) {\n        let hasEvents = {};\n        for (let instanceId in eventInstances) {\n            let instance = eventInstances[instanceId];\n            for (let resourceId of eventDefs[instance.defId].resourceIds) {\n                hasEvents[resourceId] = true;\n            }\n        }\n        return hasEvents;\n    }\n    /*\n    mark resources as having events if any of their ancestors have them\n    NOTE: resourceStore might not have all the resources that hasEvents{} has keyed\n    */\n    function computeAncestorHasEvents(hasEvents, resourceStore) {\n        let res = {};\n        for (let resourceId in hasEvents) {\n            let resource;\n            while ((resource = resourceStore[resourceId])) {\n                resourceId = resource.parentId; // now functioning as the parentId\n                if (resourceId) {\n                    res[resourceId] = true;\n                }\n                else {\n                    break;\n                }\n            }\n        }\n        return res;\n    }\n    /*\n    An event earns a column when it intersects that column's range — the same test as above,\n    just asked per column instead of once.\n\n    Two wrinkles, both about WHICH column an event renders in rather than about narrowing the\n    window. All-day events render in the all-day row, on civil days, not inside a column's slot\n    range; those coincide until slotMaxTime runs past midnight (or slotMinTime goes negative),\n    at which point a column overlaps its neighbour's day and an all-day event there would earn a\n    column that renders nothing. And daygrid slices timed events with nextDayThreshold, so\n    matching must too.\n\n    Column ranges are used as-is, NOT clipped to activeRange. A date disabled by validRange can\n    therefore take a column for a resource that has events elsewhere in the view. Accepted: that\n    column renders (disabled, empty) in an unfiltered view too, so filtering isn't inventing it.\n    */\n    function computeHasEventsByDate(eventStore, resourceStore, dayCols, nextDayThreshold = null) {\n        let hasEventsByDate = dayCols.map(() => ({}));\n        let civilDayRanges = dayCols.map((dayCol) => ({\n            start: dayCol.date,\n            end: protectedApi.addDays(dayCol.date, 1),\n        }));\n        for (let instanceId in eventStore.instances) {\n            let instance = eventStore.instances[instanceId];\n            let { allDay, resourceIds } = eventStore.defs[instance.defId];\n            let range = (!allDay && nextDayThreshold)\n                ? protectedApi.computeVisibleDayRange(instance.range, nextDayThreshold)\n                : instance.range;\n            for (let dateI = 0; dateI < dayCols.length; dateI += 1) {\n                if (protectedApi.rangesIntersect(range, allDay ? civilDayRanges[dateI] : dayCols[dateI].range)) {\n                    let hasEvents = hasEventsByDate[dateI];\n                    for (let resourceId of resourceIds) {\n                        hasEvents[resourceId] = true;\n                    }\n                }\n            }\n        }\n        for (let hasEvents of hasEventsByDate) {\n            Object.assign(hasEvents, computeAncestorHasEvents(hasEvents, resourceStore));\n        }\n        return hasEventsByDate;\n    }\n\n    /*\n    TODO: move away from pooledHeight. simply create child-parent relationships w/ groups+resource\n    The groups that are row-groups VS col-groups can be determined by colGroupDepth\n    */\n    function buildResourceHierarchy(resourceStore, orderSpecs, // why accepted when resourceNodeHash already ordered?\n    groupSpecs = [], groupRowDepth = 0) {\n        const resourceNodeHash = buildResourceNodeHash(resourceStore, orderSpecs);\n        const resNodes = [];\n        for (let resourceId in resourceNodeHash) {\n            let resourceNode = resourceNodeHash[resourceId];\n            if (!resourceNode.entity.parentId) {\n                insertResourceNode(resourceNode, orderSpecs, groupSpecs, groupRowDepth, resNodes);\n            }\n        }\n        return resNodes;\n    }\n    /*\n    Builds a hash-by-id that contains ALL resources,\n    but .children[] array is wired up as well\n    */\n    function buildResourceNodeHash(resourceStore, orderSpecs) {\n        let nodeHash = {};\n        for (let resourceId in resourceStore) {\n            let resource = resourceStore[resourceId];\n            nodeHash[resourceId] = {\n                entity: resource,\n                resourceFields: buildResourceFields(resource),\n                children: [],\n            };\n        }\n        for (let resourceId in resourceStore) {\n            let resource = resourceStore[resourceId];\n            if (resource.parentId) {\n                let parentNode = nodeHash[resource.parentId];\n                if (parentNode) {\n                    insertResourceNodeInSiblings(nodeHash[resourceId], orderSpecs, parentNode.children);\n                }\n            }\n        }\n        return nodeHash;\n    }\n    function insertResourceNode(resourceNode, orderSpecs, groupSpecs, groupRowDepth, resNodes, groupIdPath = []) {\n        if (groupSpecs.length) {\n            const groupSpec = groupSpecs[0];\n            const nextGroupIdPath = buildGroupIdPath(groupIdPath, groupSpec.field, resourceNode.resourceFields[groupSpec.field]);\n            let groupNode = ensureGroupNodes(resourceNode, groupSpec, groupRowDepth <= 0, resNodes, nextGroupIdPath);\n            insertResourceNode(resourceNode, orderSpecs, groupSpecs.slice(1), groupRowDepth - 1, groupNode.children, nextGroupIdPath);\n        }\n        else {\n            insertResourceNodeInSiblings(resourceNode, orderSpecs, resNodes);\n        }\n    }\n    function ensureGroupNodes(resourceNode, groupSpec, pooledHeight, resNodes, groupIdPath) {\n        let groupValue = resourceNode.resourceFields[groupSpec.field];\n        let groupNode;\n        let newGroupIndex;\n        // find an existing group that matches, or determine the position for a new group\n        if (groupSpec.order) {\n            for (newGroupIndex = 0; newGroupIndex < resNodes.length; newGroupIndex += 1) {\n                let node = resNodes[newGroupIndex];\n                let group = node.entity;\n                let cmp = protectedApi.flexibleCompare(groupValue, group.value) * groupSpec.order;\n                if (cmp === 0) {\n                    groupNode = node;\n                    break;\n                }\n                else if (cmp < 0) {\n                    break;\n                }\n            }\n        }\n        else { // the groups are unordered\n            for (newGroupIndex = 0; newGroupIndex < resNodes.length; newGroupIndex += 1) {\n                let node = resNodes[newGroupIndex];\n                let group = node.entity;\n                if (group && groupValue === group.value) {\n                    groupNode = node;\n                    break;\n                }\n            }\n        }\n        if (!groupNode) {\n            groupNode = {\n                entity: {\n                    id: buildGroupId(groupIdPath),\n                    value: groupValue,\n                    spec: groupSpec,\n                },\n                pooledHeight,\n                children: [],\n            };\n            resNodes.splice(newGroupIndex, 0, groupNode);\n        }\n        return groupNode;\n    }\n    function insertResourceNodeInSiblings(resourceNode, orderSpecs, siblings) {\n        let i;\n        for (i = 0; i < siblings.length; i += 1) {\n            let cmp = protectedApi.compareByFieldSpecs(// TODO: pass in ResourceApi?\n            siblings[i].resourceFields, resourceNode.resourceFields, orderSpecs);\n            if (cmp > 0) { // went 1 past. insert at i\n                break;\n            }\n        }\n        siblings.splice(i, 0, resourceNode);\n    }\n    function buildResourceFields(resource) {\n        let obj = { ...resource.extendedProps, ...resource.ui, ...resource };\n        delete obj.ui;\n        delete obj.extendedProps;\n        return obj;\n    }\n    // Hierarchy + Flattening\n    // -------------------------------------------------------------------------------------------------\n    function flattenResources(resourceStore, orderSpecs) {\n        const hierarchy = buildResourceHierarchy(resourceStore, orderSpecs);\n        const resResources = [];\n        flattenResourceHierarchy(hierarchy, resResources);\n        return resResources;\n    }\n    function flattenResourceHierarchy(resourceNodes, resResources) {\n        for (const node of resourceNodes) {\n            resResources.push(node.entity);\n            flattenResourceHierarchy(node.children, resResources);\n        }\n    }\n    // Utils\n    // -------------------------------------------------------------------------------------------------\n    function createEntityId(entity) {\n        return isEntityGroup(entity) ? createGroupId(entity) : entity.id;\n    }\n    function createGroupId(group) {\n        return group.id || buildGroupId(buildGroupIdPath([], group.spec.field, group.value));\n    }\n    function isEntityGroup(entity) {\n        return Boolean(entity.spec);\n    }\n    function isGroupsEqual(group0, group1) {\n        return createGroupId(group0) === createGroupId(group1);\n    }\n    function buildGroupIdPath(parentPath, field, value) {\n        return parentPath.concat([[field, value]]);\n    }\n    function buildGroupId(path) {\n        return JSON.stringify(path);\n    }\n\n    class ResourceIndex {\n        constructor(resources) {\n            let indicesById = {};\n            let ids = [];\n            for (let i = 0; i < resources.length; i += 1) {\n                let id = resources[i].id;\n                ids.push(id);\n                indicesById[id] = i;\n            }\n            this.ids = ids;\n            this.indicesById = indicesById;\n            this.length = resources.length;\n        }\n    }\n\n    /*\n    TODO: move this so @fullcalendar/resource-daygrid\n    */\n    class AbstractResourceDayTableModel {\n        constructor(dayCols, \n        // null for timegrid, which is a flat row of columns. daygrid passes one because its\n        // columns can repeat across week rows, and only it needs the 2D `cells` projection.\n        // residual seam: `cells` and `cols` describe the same columns at different dimensions\n        dayTableModel, resources, groups, datesAboveResources, context) {\n            this.dayCols = dayCols;\n            this.dayTableModel = dayTableModel;\n            this.resources = resources;\n            this.groups = groups;\n            this.datesAboveResources = datesAboveResources;\n            let cols = [];\n            let colLookup = {};\n            let dateFirstCols = [];\n            let colGroupIndices = [];\n            let resourceColCount = 0;\n            for (let groupI = 0; groupI < groups.length; groupI += 1) {\n                for (let col of groups[groupI].cols) {\n                    let colI = cols.length;\n                    cols.push(col);\n                    colLookup[buildColKey(col.dateI, col.resourceI)] = colI;\n                    colGroupIndices.push(groupI);\n                    if (col.resource) {\n                        resourceColCount += 1;\n                    }\n                    if (dateFirstCols[col.dateI] == null) {\n                        dateFirstCols[col.dateI] = colI;\n                    }\n                }\n            }\n            this.resourceIndex = new ResourceIndex(resources);\n            this.colCount = cols.length;\n            this.resourceColCount = resourceColCount;\n            this.cols = cols;\n            this.colLookup = colLookup;\n            this.dateFirstCols = dateFirstCols;\n            this.colGroupIndices = colGroupIndices;\n            this.cells = !dayTableModel || dayTableModel.rowCount === 1\n                ? [cols]\n                : buildResourceCells(dayTableModel, cols, context);\n        }\n        /*\n        -1 means the pair has no column, because per-date filtering dropped it. Callers must handle\n        that — a seg aimed at a missing pair is discarded, which is how filtered layouts avoid\n        rendering events into columns that don't exist.\n        */\n        computeCol(dateI, resourceI) {\n            // the resourceless model keys every column under -1, so lookups succeed no matter which\n            // resource index a splitter happens to pass in. placeholder columns for dates with no\n            // resources are also keyed under -1, reachable by passing -1 explicitly\n            let key = buildColKey(dateI, this.resources.length ? resourceI : -1);\n            let col = this.colLookup[key];\n            return col == null ? -1 : col;\n        }\n        computeColRanges(dateStartI, dateEndI, resourceI) {\n            let ranges = [];\n            let currentRange = null;\n            let currentGroupI = -1;\n            for (let dateI = dateStartI; dateI < dateEndI; dateI += 1) {\n                let col = this.computeCol(dateI, resourceI);\n                if (col !== -1) {\n                    let groupI = this.colGroupIndices[col];\n                    // adjacency alone isn't enough to merge: with dates above resources, one resource's\n                    // columns for consecutive dates ARE adjacent but belong to different date groups, and\n                    // a seg spanning them must break so each date renders its own segment\n                    if (currentRange && currentRange.end === col && currentGroupI === groupI) {\n                        currentRange.end = col + 1;\n                        currentRange.isEnd = dateI === dateEndI - 1;\n                    }\n                    else {\n                        currentRange = {\n                            start: col,\n                            end: col + 1,\n                            isStart: dateI === dateStartI,\n                            isEnd: dateI === dateEndI - 1,\n                        };\n                        currentGroupI = groupI;\n                        ranges.push(currentRange);\n                    }\n                }\n                else {\n                    currentRange = null;\n                    currentGroupI = -1;\n                }\n            }\n            return ranges;\n        }\n        /*\n        dates missing this resource's column (filtered-out) don't break the span.\n        the highlight simply skips them while the reported range stays continuous, like a hidden day\n        */\n        isHitComboAllowed(hit0, hit1, allowAcrossResources) {\n            return allowAcrossResources || hit0.dateSpan.resourceId === hit1.dateSpan.resourceId;\n        }\n    }\n    function buildResourceCells(dayTableModel, cols, context) {\n        let rows = [];\n        for (let row = 0; row < dayTableModel.rowCount; row += 1) {\n            rows.push(cols.map((col) => {\n                let sourceCell = dayTableModel.cellRows[row][col.dateI];\n                let { date, isDisabled } = sourceCell;\n                let { resource } = col;\n                if (!resource) {\n                    return {\n                        key: date.toISOString(),\n                        date,\n                        isMajor: col.isMajor,\n                        isDisabled,\n                        isInert: true,\n                        attrs: { 'aria-disabled': true },\n                    };\n                }\n                return {\n                    ...buildResourceCellFields(resource, date, context),\n                    date,\n                    isMajor: col.isMajor,\n                    isDisabled,\n                };\n            }));\n        }\n        return rows;\n    }\n    function buildResourceDayCol(dayCol, dateI, resource, resourceI, isMajor, context) {\n        if (!resource) {\n            return {\n                ...dayCol,\n                dateI,\n                isInert: true,\n                attrs: { 'aria-disabled': true },\n                resource: null,\n                resourceI,\n                isMajor,\n            };\n        }\n        return {\n            ...dayCol,\n            ...buildResourceCellFields(resource, dayCol.date, context),\n            dateI,\n            resource,\n            resourceI,\n            isMajor,\n        };\n    }\n    /*\n    What makes a day cell resource-specific. A fresh ResourceApi per cell is deliberate: in\n    multi-row daygrid the same column is rebuilt for each week row.\n    */\n    function buildResourceCellFields(resource, date, context) {\n        return {\n            key: resource.id + ':' + date.toISOString(),\n            renderProps: { resource: new ResourceApi(context, resource) },\n            attrs: { 'data-resource-id': resource.id },\n            className: '',\n            dateSpanProps: { resourceId: resource.id },\n        };\n    }\n    function buildColKey(dateI, resourceI) {\n        return dateI + ':' + resourceI;\n    }\n\n    /*\n    dates over resources\n    */\n    function buildDayResourceTableModel(dayTableModel, dayCols, resources, context, hasEventsByDate = null) {\n        // Day boundaries remain major even when filtering leaves only one resource.\n        let hasMajor = dayCols.length > 1;\n        let groups = [];\n        for (let dateI = 0; dateI < dayCols.length; dateI += 1) {\n            let dayCol = dayCols[dateI];\n            let cols = [];\n            for (let resourceI = 0; resourceI < resources.length; resourceI += 1) {\n                let resource = resources[resourceI];\n                if (!hasEventsByDate || hasEventsByDate[dateI][resource.id]) {\n                    cols.push(buildResourceDayCol(dayCol, dateI, resource, resourceI, hasMajor && cols.length === 0, context));\n                }\n            }\n            if (!cols.length) {\n                cols.push(buildResourceDayCol(dayCol, dateI, null, -1, hasMajor, context));\n            }\n            groups.push({ date: dayCol.date, cols });\n        }\n        return new AbstractResourceDayTableModel(dayCols, dayTableModel, resources, groups, true, context);\n    }\n\n    /*\n    resources over dates\n    */\n    function buildResourceDayTableModel(dayTableModel, dayCols, resources, context, hasEventsByDate = null) {\n        let hasMajor = resources.length > 1 && dayCols.length > 1;\n        let groups = [];\n        for (let resourceI = 0; resourceI < resources.length; resourceI += 1) {\n            let resource = resources[resourceI];\n            let cols = [];\n            for (let dateI = 0; dateI < dayCols.length; dateI += 1) {\n                if (!hasEventsByDate || hasEventsByDate[dateI][resource.id]) {\n                    cols.push(buildResourceDayCol(dayCols[dateI], dateI, resource, resourceI, hasMajor && cols.length === 0, context));\n                }\n            }\n            // a resource with no surviving date drops out of the header AND the body entirely.\n            // intentional: a filtered view never shows a resource heading spanning zero columns\n            if (cols.length) {\n                groups.push({ resource, cols });\n            }\n        }\n        return new AbstractResourceDayTableModel(dayCols, dayTableModel, resources, groups, false, context);\n    }\n\n    /*\n    TODO: move this so @fullcalendar/resource-daygrid\n    */\n    function buildResourcelessDayTableModel(dayTableModel, dayCols, context) {\n        let cols = dayCols.map((dayCol, dateI) => (buildResourceDayCol(dayCol, dateI, null, -1, dayCol.isMajor, context)));\n        return new AbstractResourceDayTableModel(dayCols, dayTableModel, [], [{ cols }], false, context);\n    }\n\n    /*\n    TODO: kill this and DayResourceTableModel/ResourceDayTableModel/ResourcelessDayTableModel,\n    which differ only in column ordering and presence\n    */\n    function buildResourceTableModel(dayTableModel, // only for multi-row daygrid\n    dayCols, resources, datesAboveResources, hasEventsByDate, context) {\n        if (!resources.length) {\n            return buildResourcelessDayTableModel(dayTableModel, dayCols, context);\n        }\n        let model = datesAboveResources ?\n            buildDayResourceTableModel(dayTableModel, dayCols, resources, context, hasEventsByDate) :\n            buildResourceDayTableModel(dayTableModel, dayCols, resources, context, hasEventsByDate);\n        // per-date filtering asks a per-column question, so it's strictly finer than the view-wide\n        // pass that produced `resources`. a resource can clear that and still match no column — its\n        // only events fall on a hidden day, or outside every column's rendered range. if that's true\n        // of every resource, every column is a placeholder (or there are none), so render plain day\n        // columns instead\n        if (hasEventsByDate && !model.resourceColCount) {\n            return buildResourcelessDayTableModel(dayTableModel, dayCols, context);\n        }\n        return model;\n    }\n\n    /*\n    TODO: just use ResourceHash somehow? could then use the generic ResourceSplitter\n    */\n    class VResourceSplitter extends protectedApi.Splitter {\n        getKeyInfo(props) {\n            let { resourceDayTableModel } = props;\n            let hash = protectedApi.mapHash(resourceDayTableModel.resourceIndex.indicesById, (i) => resourceDayTableModel.resources[i]); // :(\n            hash[''] = {};\n            return hash;\n        }\n        getKeysForDateSpan(dateSpan) {\n            return [dateSpan.resourceId || ''];\n        }\n        getKeysForEventDef(eventDef) {\n            let resourceIds = eventDef.resourceIds;\n            if (!resourceIds.length) {\n                return [''];\n            }\n            return resourceIds;\n        }\n    }\n\n    const NO_SEGS = []; // for memoizing\n    class VResourceJoiner {\n        constructor() {\n            this.joinDateSelection = protectedApi.memoize(this.joinSegs);\n            this.joinBusinessHours = protectedApi.memoize(this.joinBusinessHourSegs);\n            this.joinFgEvents = protectedApi.memoize(this.joinSegs);\n            this.joinBgEvents = protectedApi.memoize(this.joinSegs);\n            this.joinEventDrags = protectedApi.memoize(this.joinInteractions);\n            this.joinEventResizes = protectedApi.memoize(this.joinInteractions);\n        }\n        /*\n        propSets also has a '' key for things with no resource\n        */\n        joinProps(propSets, resourceDayTable) {\n            let dateSelectionSets = [];\n            let businessHoursSets = [];\n            let fgEventSets = [];\n            let bgEventSets = [];\n            let eventDrags = [];\n            let eventResizes = [];\n            let eventSelection = '';\n            let keys = resourceDayTable.resourceIndex.ids.concat(['']); // add in the all-resource key\n            for (let key of keys) {\n                let props = propSets[key];\n                dateSelectionSets.push(props.dateSelectionSegs);\n                businessHoursSets.push(props.businessHourSegs);\n                fgEventSets.push(key ? props.fgEventSegs : NO_SEGS); // don't include fg all-resource segs\n                bgEventSets.push(props.bgEventSegs);\n                eventDrags.push(props.eventDrag);\n                eventResizes.push(props.eventResize);\n                eventSelection = eventSelection || props.eventSelection;\n            }\n            return {\n                dateSelectionSegs: this.joinDateSelection(resourceDayTable, ...dateSelectionSets),\n                businessHourSegs: this.joinBusinessHours(resourceDayTable, ...businessHoursSets),\n                fgEventSegs: this.joinFgEvents(resourceDayTable, ...fgEventSets),\n                bgEventSegs: this.joinBgEvents(resourceDayTable, ...bgEventSets),\n                eventDrag: this.joinEventDrags(resourceDayTable, ...eventDrags),\n                eventResize: this.joinEventResizes(resourceDayTable, ...eventResizes),\n                eventSelection,\n            };\n        }\n        /*\n        Placeholder columns (resourceI -1) belong to no resource, so they take only the\n        all-resource segs, like a resource timeline's non-resource background spanning every row\n        */\n        joinSegs(resourceDayTable, ...segGroups) {\n            let resourceCnt = resourceDayTable.resources.length;\n            let transformedSegs = [];\n            for (let i = 0; i < resourceCnt; i += 1) {\n                for (let seg of segGroups[i]) {\n                    transformedSegs.push(...this.transformSeg(seg, resourceDayTable, i));\n                }\n                for (let seg of segGroups[resourceCnt]) { // one beyond. the all-resource\n                    transformedSegs.push(...this.transformSeg(seg, resourceDayTable, i));\n                }\n            }\n            for (let seg of segGroups[resourceCnt]) {\n                transformedSegs.push(...this.transformSeg(seg, resourceDayTable, -1));\n            }\n            return transformedSegs;\n        }\n        /*\n        Like joinSegs, but the splitter already gives every resource its own business hours (falling\n        back to the calendar's), so the all-resource business hours go to placeholder columns only\n        */\n        joinBusinessHourSegs(resourceDayTable, ...segGroups) {\n            let resourceCnt = resourceDayTable.resources.length;\n            let transformedSegs = [];\n            for (let i = 0; i < resourceCnt; i += 1) {\n                for (let seg of segGroups[i]) {\n                    transformedSegs.push(...this.transformSeg(seg, resourceDayTable, i));\n                }\n            }\n            for (let seg of segGroups[resourceCnt]) {\n                transformedSegs.push(...this.transformSeg(seg, resourceDayTable, -1));\n            }\n            return transformedSegs;\n        }\n        /*\n        for expanding non-resource segs to all resources, and to placeholder columns.\n        only for public use.\n        no memoizing.\n        */\n        expandSegs(resourceDayTable, segs) {\n            return this.joinSegs(resourceDayTable, ...resourceDayTable.resources.map(() => NO_SEGS), segs);\n        }\n        joinInteractions(resourceDayTable, ...interactions) {\n            let resourceCnt = resourceDayTable.resources.length;\n            let affectedInstances = {};\n            let transformedSegs = [];\n            let anyInteractions = false;\n            let isEvent = false;\n            for (let i = 0; i < resourceCnt; i += 1) {\n                let interaction = interactions[i];\n                if (interaction) {\n                    anyInteractions = true;\n                    for (let seg of interaction.segs) {\n                        transformedSegs.push(...this.transformSeg(seg, resourceDayTable, i));\n                    }\n                    Object.assign(affectedInstances, interaction.affectedInstances);\n                    isEvent = isEvent || interaction.isEvent;\n                }\n                if (interactions[resourceCnt]) { // one beyond. the all-resource\n                    for (let seg of interactions[resourceCnt].segs) {\n                        transformedSegs.push(...this.transformSeg(seg, resourceDayTable, i));\n                    }\n                }\n            }\n            // note `anyInteractions` tracks REAL-resource interactions only. an interaction with no\n            // resource at all produces segs above but doesn't activate rendering — matches\n            // pre-existing behavior, so don't \"fix\" it by folding the all-resource branch in\n            if (anyInteractions) {\n                return {\n                    affectedInstances,\n                    segs: transformedSegs,\n                    isEvent,\n                };\n            }\n            return null;\n        }\n    }\n\n    class ResourceDayTableJoiner extends VResourceJoiner {\n        transformSeg(seg, resourceDayTableModel, resourceI) {\n            let dateStartI = seg.start;\n            let dateEndI = seg.end;\n            let colRanges = resourceDayTableModel.computeColRanges(dateStartI, dateEndI, resourceI);\n            return colRanges.map((colRange) => ({\n                ...seg,\n                ...colRange,\n                isStart: seg.isStart && colRange.isStart,\n                isEnd: seg.isEnd && colRange.isEnd,\n            }));\n        }\n    }\n\n    function buildResourceRowConfigs(resourceDayTableModel, datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, // TODO: rename to dateHeaderFormat?\n    context, blankClassNameGenerator, blankRenderProps) {\n        let { cols, groups, resources } = resourceDayTableModel;\n        if (!resources.length) {\n            return [\n                protectedApi.buildDateRowConfig(cols.map((col) => col.date), datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, context)\n            ];\n        }\n        if (resourceDayTableModel.dayCols.length === 1) {\n            return [\n                buildResourceRowConfig(cols.map((col) => col.resource), cols[0]?.date, dateProfile, todayRange, context)\n            ];\n        }\n        if (resourceDayTableModel.datesAboveResources) {\n            const resourceDataConfigsPerDate = groups.map((group) => {\n                const col = group.cols[0];\n                if (!col.resource) {\n                    return [{\n                            key: col.key + ':blank',\n                            dateMarker: col.date,\n                            blank: {\n                                classNameGenerator: blankClassNameGenerator,\n                            },\n                            renderProps: {\n                                ...protectedApi.getDateMeta(col.date, context.dateEnv, dateProfile, todayRange),\n                                isMajor: col.isMajor,\n                                isNarrow: false, // overridden by the header cell\n                                view: context.viewApi,\n                                ...blankRenderProps,\n                            },\n                            attrs: {\n                                'data-date': protectedApi.formatDayString(col.date),\n                            },\n                            colSpan: 1,\n                        }];\n                }\n                return buildResourceDataConfigs(group.cols.map((col) => col.resource), group.date, dateProfile, todayRange, context, \n                /* colSpan = */ 1, \n                /* isMajorMod = */ group.cols.length);\n            });\n            const dateRowConfig = protectedApi.buildDateRowConfig(groups.map((group) => group.date), datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, context, \n            /* colSpan = */ 1, \n            /* isMajorMod = */ 1, // each cell is major, mod%1 always yields 0 (yes)\n            // Keep navigation based on the full date range.\n            /* totalDateCnt = */ resourceDayTableModel.dayCols.length);\n            for (let i = 0; i < groups.length; i += 1) {\n                dateRowConfig.dataConfigs[i].colSpan = groups[i].cols.length;\n            }\n            return [\n                // date row\n                dateRowConfig,\n                // resource row\n                {\n                    isDateRow: false,\n                    renderConfig: buildResourceRenderConfig(context),\n                    dataConfigs: [].concat(...resourceDataConfigsPerDate), // flatten\n                }\n            ];\n        }\n        else { // resources above dates\n            const dateDataConfigsPerResource = groups.map((group) => {\n                const resource = group.resource;\n                const resourceApi = new ResourceApi(context, resource);\n                const resourceApiId = resourceApi.id;\n                return protectedApi.buildDateDataConfigs(group.cols.map((col) => col.date), datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, context, 1, // rowSpan\n                resourceApiId + ':', {\n                    resource: resourceApi,\n                }, {\n                    'data-resource-id': resourceApiId,\n                }, \n                /* className = */ undefined, // TODO: remove\n                /* isMajorMod = */ group.cols.length, \n                /* totalDateCnt = */ resourceDayTableModel.dayCols.length);\n            });\n            const resourceDataConfigs = groups.map((group) => {\n                return buildResourceDataConfigs([group.resource], group.date, dateProfile, todayRange, context, \n                /* colSpan = */ group.cols.length, \n                /* isMajorMod = */ 1)[0];\n            });\n            return [\n                // resource row\n                {\n                    isDateRow: false,\n                    renderConfig: buildResourceRenderConfig(context),\n                    dataConfigs: resourceDataConfigs,\n                },\n                // date row\n                {\n                    isDateRow: true,\n                    renderConfig: protectedApi.buildDateRenderConfig(dayHeaderFormat, datesRepDistinctDays, context),\n                    dataConfigs: [].concat(...dateDataConfigsPerResource), // flatten\n                }\n            ];\n        }\n    }\n    /*\n    Single row, just resources (might be under dates, might not)\n    */\n    function buildResourceRowConfig(resources, dateMarker, dateProfile, todayRange, context, colSpan, isMajorMod) {\n        return {\n            isDateRow: false,\n            renderConfig: buildResourceRenderConfig(context),\n            dataConfigs: buildResourceDataConfigs(resources, dateMarker, dateProfile, todayRange, context, colSpan, isMajorMod),\n        };\n    }\n    function buildResourceRenderConfig(context) {\n        const { options } = context;\n        return {\n            generatorName: 'resourceDayHeaderContent',\n            customGenerator: options.resourceDayHeaderContent,\n            innerClassNameGenerator: options.resourceDayHeaderInnerClass,\n            classNameGenerator: options.resourceDayHeaderClass,\n            didMount: options.resourceDayHeaderDidMount,\n            willUnmount: options.resourceDayHeaderWillUnmount,\n            align: options.resourceDayHeaderAlign,\n            sticky: options._resourceDayHeaderSticky,\n        };\n    }\n    function buildResourceDataConfigs(resources, dateMarker, dateProfile, todayRange, context, colSpan = 1, isMajorMod) {\n        const dateMeta = dateMarker\n            ? protectedApi.getDateMeta(dateMarker, context.dateEnv, dateProfile, todayRange)\n            : {};\n        return resources.map((resource, i) => {\n            const resourceApi = new ResourceApi(context, resource);\n            const resourceApiId = resourceApi.id;\n            return {\n                key: (dateMarker ? dateMarker.toUTCString() + ':' : '') + resource.id,\n                dateMarker,\n                renderProps: {\n                    isDisabled: false,\n                    ...dateMeta,\n                    resource: resourceApi,\n                    isMajor: isMajorMod != null && !(i % isMajorMod),\n                    isNarrow: false, // HACK. gets overridden later\n                    level: 0, // HACK. gets overridden later\n                    text: resource.title || resourceApiId || '',\n                    view: context.viewApi,\n                },\n                attrs: {\n                    'data-resource-id': resourceApiId,\n                    'data-date': dateMarker ? protectedApi.formatDayString(dateMarker) : undefined,\n                },\n                colSpan,\n                className: '', // TODO: remove this prop\n            };\n        });\n    }\n\n    class ResourceDayGridView extends protectedApi.DateComponent {\n        constructor() {\n            super(...arguments);\n            // memo\n            this.filterResourceStore = protectedApi.memoize(filterResourceStore);\n            this.flattenResources = protectedApi.memoize(flattenResources);\n            this.buildDayTableModel = protectedApi.memoize(protectedApi.buildDayTableModel);\n            this.buildDayCols = protectedApi.memoize(buildDayGridCols);\n            this.computeHasEventsByDate = protectedApi.memoize(computeHasEventsByDate);\n            this.buildResourceTableModel = protectedApi.memoize(buildResourceTableModel);\n            this.createDayHeaderFormatter = protectedApi.memoize(protectedApi.createDayHeaderFormatter);\n            this.buildResourceRowConfigs = protectedApi.memoize(buildResourceRowConfigs);\n            this.buildBlankRenderProps = protectedApi.memoize(buildBlankDayCellProps);\n            this.splitter = new VResourceSplitter();\n            this.slicers = {};\n            this.joiner = new ResourceDayTableJoiner();\n            this.isHitComboAllowed = (hit0, hit1) => {\n                let allowAcrossResources = this.dayTableModel.colCount === 1;\n                return this.resourceDayTableModel.isHitComboAllowed(hit0, hit1, allowAcrossResources);\n            };\n        }\n        render() {\n            let { props, context } = this;\n            let { options } = context;\n            let resourceStore = this.filterResourceStore(props.resourceStore, options.filterResourcesWithEvents, props.rawEventStore, props.dateProfile.activeRange);\n            let resourceOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER;\n            let resources = this.flattenResources(resourceStore, resourceOrderSpecs);\n            let dayTable = this.dayTableModel = this.buildDayTableModel(props.dateProfile, context.dateProfileGenerator, context.dateEnv);\n            let dayCols = this.buildDayCols(dayTable);\n            // a multi-row column represents one weekday across many dates, so it has no single date\n            // to filter by — those views keep view-wide filtering only. nextDayThreshold matches how\n            // the renderer decides which day a timed event's tail belongs to\n            let hasEventsByDate = options.filterResourcesWithEvents && dayTable.colCount > 1 && dayTable.rowCount === 1\n                ? this.computeHasEventsByDate(props.rawEventStore, resourceStore, dayCols, options.nextDayThreshold)\n                : null;\n            let resourceDayTableModel = this.resourceDayTableModel = this.buildResourceTableModel(dayTable, dayCols, resources, options.datesAboveResources, hasEventsByDate, context);\n            let splitProps = this.splitter.splitProps({\n                resourceDayTableModel,\n                businessHours: props.businessHours,\n                dateSelection: props.dateSelection,\n                eventStore: props.eventStore,\n                eventUiBases: props.eventUiBases,\n                eventSelection: props.eventSelection,\n                eventDrag: props.eventDrag,\n                eventResize: props.eventResize,\n            });\n            this.slicers = protectedApi.mapHash(splitProps, (split, resourceId) => this.slicers[resourceId] || new protectedApi.DayTableSlicer());\n            let slicedProps = protectedApi.mapHash(this.slicers, (slicer, resourceId) => slicer.sliceProps(splitProps[resourceId], props.dateProfile, options.nextDayThreshold, context, dayTable));\n            let joinedSlicedProps = this.joiner.joinProps(slicedProps, resourceDayTableModel);\n            let datesRepDistinctDays = dayTable.rowCount === 1;\n            let dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, resourceDayTableModel.colCount);\n            return (jsxRuntime.jsx(protectedApi.NowTimer, { unit: \"day\", children: (nowDate, todayRange) => {\n                    const headerTiers = this.buildResourceRowConfigs(resourceDayTableModel, datesRepDistinctDays, props.dateProfile, todayRange, dayHeaderFormat, context, options.dayCellClass, this.buildBlankRenderProps(Boolean(options.businessHours)));\n                    return (jsxRuntime.jsx(protectedApi.DayGridLayout, { labelId: props.labelId, labelStr: props.labelStr, dateProfile: props.dateProfile, todayRange: todayRange, cellRows: resourceDayTableModel.cells, forPrint: props.forPrint, isHitComboAllowed: this.isHitComboAllowed, className: props.className, \n                        // header content\n                        headerTiers: headerTiers, \n                        // body content\n                        fgEventSegs: joinedSlicedProps.fgEventSegs, bgEventSegs: joinedSlicedProps.bgEventSegs, businessHourSegs: joinedSlicedProps.businessHourSegs, dateSelectionSegs: joinedSlicedProps.dateSelectionSegs, eventDrag: joinedSlicedProps.eventDrag, eventResize: joinedSlicedProps.eventResize, eventSelection: joinedSlicedProps.eventSelection }));\n                } }));\n        }\n    }\n    // Extra DayCellInfo props for the blank header's dayCellClass hook.\n    // buildResourceRowConfigs supplies the shared date props.\n    function buildBlankDayCellProps(businessHours) {\n        return {\n            inPopover: false,\n            hasNavLink: false,\n            text: '',\n            textParts: [],\n            weekdayText: '',\n            dayNumberText: '',\n            monthText: '',\n            options: { businessHours },\n        };\n    }\n    // Resource daygrid columns repeat across rows, so their date-level descriptors use the first row.\n    function buildDayGridCols(dayTable) {\n        return dayTable.cellRows[0].map((cell) => ({\n            ...cell,\n            range: {\n                start: cell.date,\n                end: protectedApi.addDays(cell.date, 1),\n            },\n        }));\n    }\n\n    var resourceDayGridPlugin = {\n        name: 'resource-daygrid',\n        premiumReleaseDate: '2026-11-12',\n        deps: [\n            premiumCommonPlugin,\n            resourcePlugin,\n            dayGridPlugin__default[\"default\"],\n        ],\n        initialView: 'resourceDayGridDay',\n        views: {\n            resourceDayGrid: {\n                type: 'dayGrid', // will inherit this configuration\n                component: ResourceDayGridView,\n                needsResourceData: true,\n            },\n            resourceDayGridDay: {\n                type: 'resourceDayGrid',\n                duration: { days: 1 },\n            },\n            resourceDayGridWeek: {\n                type: 'resourceDayGrid',\n                duration: { weeks: 1 },\n            },\n            resourceDayGridMonth: {\n                type: 'resourceDayGrid',\n                duration: { months: 1 },\n                fixedWeekCount: true,\n            },\n        },\n    };\n\n    function joinDateTimeFormatParts(parts) {\n        let s = '';\n        for (const part of parts) {\n            s += part.value;\n        }\n        return s;\n    }\n\n    /*\n    TODO: detangle and use from @full-ui/headless-grid\n    */\n    class ScrollerSyncer {\n        constructor(isHorizontal = false) {\n            this.isHorizontal = isHorizontal;\n            this.emitter = new protectedApi.Emitter();\n            this.scrollers = [];\n            this.destroyFuncs = [];\n            this.isPaused = false;\n        }\n        handleChildren(scrollers) {\n            if (!protectedApi.isArraysEqual(this.scrollers, scrollers)) {\n                this.destroy();\n                for (const scroller of scrollers) {\n                    if (scroller) { // could be null\n                        this.destroyFuncs.push(this.bindScroller(scroller));\n                        this.scrollers.push(scroller);\n                    }\n                }\n            }\n        }\n        destroy() {\n            for (let destroyFunc of this.destroyFuncs) {\n                destroyFunc();\n            }\n            this.destroyFuncs = [];\n            this.scrollers = [];\n        }\n        get x() {\n            const { scrollers, masterScroller } = this;\n            return (masterScroller || scrollers[0]).x;\n        }\n        get y() {\n            const { scrollers, masterScroller } = this;\n            return (masterScroller || scrollers[0]).y;\n        }\n        scrollTo(scrollArg) {\n            this.isPaused = true; // Not sure how this works, given that scroll handlers fire asynchronously\n            const { scrollers } = this;\n            for (let scroller of scrollers) {\n                scroller.scrollTo(scrollArg);\n            }\n            this.isPaused = false;\n        }\n        addScrollListener(handler) {\n            this.emitter.on('scroll', handler);\n        }\n        removeScrollListener(handler) {\n            this.emitter.off('scroll', handler);\n        }\n        addScrollStartListener(handler) {\n            this.emitter.on('scrollStart', handler);\n        }\n        removeScrollStartListener(handler) {\n            this.emitter.off('scrollStart', handler);\n        }\n        addScrollEndListener(handler) {\n            this.emitter.on('scrollEnd', handler);\n        }\n        removeScrollEndListener(handler) {\n            this.emitter.off('scrollEnd', handler);\n        }\n        bindScroller(scroller) {\n            let { isHorizontal } = this;\n            const onScroll = (isDevice) => {\n                if (!this.isPaused) {\n                    if (!this.masterScroller) {\n                        this.emitter.trigger('scrollStart', isDevice);\n                    }\n                    if (!this.masterScroller || (this.masterScroller !== scroller && isDevice)) {\n                        this.assignMaster(scroller);\n                    }\n                    if (this.masterScroller === scroller) { // dealing with current\n                        for (let otherScroller of this.scrollers) {\n                            if (otherScroller !== scroller) {\n                                if (isHorizontal) {\n                                    // TODO: user raw scrollLeft for better performance. No normalization necessary\n                                    otherScroller.scrollTo({ x: scroller.x });\n                                }\n                                else {\n                                    otherScroller.scrollTo({ y: scroller.y });\n                                }\n                            }\n                        }\n                        this.emitter.trigger('scroll', isDevice, isHorizontal ? scroller.x : scroller.y);\n                    }\n                }\n            };\n            const onScrollEnd = (isDevice) => {\n                if (this.masterScroller === scroller) {\n                    this.masterScroller = null;\n                    // Always pair with scrollStart, even if the scroll ended where it started, such as when\n                    // the browser clamps it after content shrinks. Listeners track scrolling state\n                    this.emitter.trigger('scrollEnd', isDevice);\n                }\n            };\n            scroller.listener.emitter.on('scroll', onScroll);\n            scroller.listener.emitter.on('scrollEnd', onScrollEnd);\n            return () => {\n                scroller.listener.emitter.off('scroll', onScroll);\n                scroller.listener.emitter.off('scrollEnd', onScrollEnd);\n            };\n        }\n        assignMaster(masterScroller) {\n            this.masterScroller = masterScroller;\n            for (let scroller of this.scrollers) {\n                if (scroller !== masterScroller) {\n                    scroller.endScroll(); // to prevent residual scrolls from reclaiming master\n                }\n            }\n        }\n    }\n\n    function buildTimelineTimeAxis(args) {\n        const { dateEnv, isDateVisible } = args;\n        const slots = [];\n        const snapStepMs = protectedApi.asRoughMs(args.snapDuration);\n        const { normalizedRange } = args;\n        const maxWindowMs = Math.min(args.timeWindowMs, 86400000);\n        for (let windowStart = normalizedRange.start; windowStart < normalizedRange.end; windowStart = protectedApi.addDays(windowStart, 1)) {\n            const windowEnd = new Date(Math.min(windowStart.valueOf() + maxWindowMs, normalizedRange.end.valueOf()));\n            const windowStartMs = dateEnv.toDate(windowStart).valueOf();\n            const windowEndMs = dateEnv.toDate(windowEnd).valueOf();\n            if (windowStartMs >= windowEndMs) {\n                continue;\n            }\n            const boundaries = [];\n            const windowStartOffsetMs = dateEnv.timestampToMarker(windowStartMs).valueOf() - windowStartMs;\n            const windowEndOffsetMs = dateEnv.timestampToMarker(windowEndMs).valueOf() - windowEndMs;\n            const resolveOccurrences = windowStartOffsetMs === windowEndOffsetMs\n                ? (marker) => [marker.valueOf() - windowStartOffsetMs]\n                : (marker) => resolveMarkerOccurrences(marker, dateEnv);\n            for (let date = windowStart; date < windowEnd; date = dateEnv.add(date, args.slotDuration)) {\n                for (const startMs of resolveOccurrences(date)) {\n                    if (startMs >= windowStartMs && startMs < windowEndMs) {\n                        boundaries.push({ date, startMs });\n                    }\n                }\n            }\n            boundaries.sort((a, b) => a.startMs - b.startMs);\n            // A nonexistent civil window start has no grid occurrence. Preserve the real interval\n            // before the first surviving grid boundary instead of silently clipping it from the axis.\n            if (!boundaries.length || boundaries[0].startMs > windowStartMs) {\n                boundaries.unshift({\n                    date: dateEnv.timestampToMarker(windowStartMs),\n                    startMs: windowStartMs,\n                });\n            }\n            boundaries.push({ date: windowEnd, startMs: windowEndMs });\n            for (let i = 0; i < boundaries.length - 1; i += 1) {\n                const boundary = boundaries[i];\n                const endMs = boundaries[i + 1].startMs;\n                if (boundary.startMs < endMs && isDateVisible(boundary.date)) {\n                    slots.push({\n                        date: boundary.date,\n                        key: buildTimelineAxisKey(boundary.date, boundary.startMs),\n                        startMs: boundary.startMs,\n                        endMs,\n                    });\n                }\n            }\n        }\n        return {\n            slots,\n            snapStepMs,\n        };\n    }\n    /*\n    Returns every real occurrence of a civil marker in a window whose endpoint offsets differ.\n    Offset guesses sampled on both sides of the marker find both sides of a fold; round-tripping\n    rejects guesses inside a spring-forward gap. Constant-offset windows use direct arithmetic\n    in buildTimelineTimeAxis and avoid these projections for every grid marker.\n    */\n    function resolveMarkerOccurrences(marker, dateEnv) {\n        const resolvedMs = dateEnv.toDate(marker).valueOf();\n        const occurrences = new Set();\n        for (const dayOffset of [-2, -1, 0, 1, 2]) {\n            const sampleMs = resolvedMs + dayOffset * 86400000;\n            const offsetMs = dateEnv.timestampToMarker(sampleMs).valueOf() - sampleMs;\n            const candidateMs = marker.valueOf() - offsetMs;\n            if (dateEnv.timestampToMarker(candidateMs).valueOf() === marker.valueOf()) {\n                occurrences.add(candidateMs);\n            }\n        }\n        return Array.from(occurrences).sort((a, b) => a - b);\n    }\n    /*\n    The offset must be derived from the marker/instant pair. Asking DateEnv for a marker's offset\n    would resolve ambiguous fall-back civil times to their first occurrence, giving both\n    occurrences identical keys.\n    */\n    function buildTimelineAxisKey(marker, instantMs) {\n        const offsetMinutes = Math.round((marker.valueOf() - instantMs) / 60000);\n        return `${marker.toISOString()}:${offsetMinutes}`;\n    }\n    /*\n    Re-derives a slot's civil-marker-based DateMeta from its exact instant. startMs is present\n    only on timed axes (null for whole-day axes, which keep the civil meta untouched). Needed\n    because the civil marker alone is ambiguous during a DST fall-back: both 01:00 slots share\n    a marker, so the render-prop date and past/future must come from real instants. Used by\n    header cells and slot lanes — keep them consistent.\n    */\n    function applyExactSlotMeta(dateMeta, startMs, nowMs) {\n        if (startMs == null) {\n            return dateMeta;\n        }\n        return {\n            ...dateMeta,\n            date: new Date(startMs),\n            isPast: !dateMeta.isDisabled && startMs < nowMs,\n            isFuture: !dateMeta.isDisabled && startMs > nowMs,\n        };\n    }\n    function getTimelineAxisStartMs(timeAxis) {\n        return timeAxis.slots.length ? timeAxis.slots[0].startMs : null;\n    }\n    function getTimelineAxisEndMs(timeAxis) {\n        return timeAxis.slots.length ? timeAxis.slots[timeAxis.slots.length - 1].endMs : null;\n    }\n\n    const MIN_AUTO_LABELS = 18; // more than `12` months but less that `24` hours\n    const MAX_AUTO_SLOTS_PER_LABEL = 6; // allows 6 10-min slots in an hour\n    const MAX_AUTO_CELLS = 200; // allows 4-days to have a :30 slot duration\n    protectedApi.config.MAX_TIMELINE_SLOTS = 1000;\n    // potential nice values for slot-duration and interval-duration\n    const STOCK_SUB_DURATIONS = [\n        { years: 1 },\n        { months: 1 },\n        { days: 1 },\n        { hours: 1 },\n        { minutes: 30 },\n        { minutes: 15 },\n        { minutes: 10 },\n        { minutes: 5 },\n        { minutes: 1 },\n        { seconds: 30 },\n        { seconds: 15 },\n        { seconds: 10 },\n        { seconds: 5 },\n        { seconds: 1 },\n        { milliseconds: 500 },\n        { milliseconds: 100 },\n        { milliseconds: 10 },\n        { milliseconds: 1 },\n    ];\n    function buildTimelineDateProfile(dateProfile, dateEnv, allOptions, dateProfileGenerator) {\n        let tDateProfile = {\n            labelInterval: allOptions.slotHeaderInterval,\n            slotDuration: allOptions.slotDuration,\n        };\n        validateLabelAndSlot(tDateProfile, dateProfile, dateEnv); // validate after computed grid duration\n        ensureLabelInterval(tDateProfile, dateProfile, dateEnv);\n        ensureSlotDuration(tDateProfile, dateProfile, dateEnv);\n        let input = allOptions.slotHeaderFormat;\n        let rawFormats;\n        let headerFormatUnits;\n        if (Array.isArray(input)) {\n            rawFormats = input;\n            headerFormatUnits = input.map(inferHeaderFormatUnit);\n        }\n        else if (input != null) {\n            rawFormats = [input];\n            headerFormatUnits = [inferHeaderFormatUnit(input)];\n        }\n        else {\n            const computed = computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions);\n            rawFormats = computed.formats;\n            headerFormatUnits = computed.units;\n        }\n        tDateProfile.headerFormats = rawFormats.map((rawFormat) => protectedApi.createFormatter(rawFormat));\n        tDateProfile.headerFormatUnits = headerFormatUnits;\n        tDateProfile.isTimeScale = Boolean(tDateProfile.slotDuration.milliseconds);\n        let largeUnit = null;\n        if (!tDateProfile.isTimeScale) {\n            const slotUnit = protectedApi.greatestDurationDenominator(tDateProfile.slotDuration).unit;\n            if (/year|month|week/.test(slotUnit)) {\n                largeUnit = slotUnit;\n            }\n        }\n        tDateProfile.largeUnit = largeUnit;\n        /*\n        console.log('label interval =', timelineView.labelInterval.humanize())\n        console.log('slot duration =', timelineView.slotDuration.humanize())\n        console.log('header formats =', timelineView.headerFormats)\n        console.log('isTimeScale', timelineView.isTimeScale)\n        console.log('largeUnit', timelineView.largeUnit)\n        */\n        let rawSnapDuration = allOptions.snapDuration;\n        let snapDuration;\n        let snapsPerSlot;\n        if (rawSnapDuration) {\n            snapDuration = protectedApi.createDuration(rawSnapDuration);\n            snapsPerSlot = protectedApi.wholeDivideDurations(tDateProfile.slotDuration, snapDuration);\n            // ^ TODO: warning if not whole?\n        }\n        if (snapsPerSlot == null) {\n            snapDuration = tDateProfile.slotDuration;\n            snapsPerSlot = 1;\n        }\n        tDateProfile.snapDuration = snapDuration;\n        tDateProfile.snapsPerSlot = snapsPerSlot;\n        // more...\n        let timeWindowMs = protectedApi.asRoughMs(dateProfile.slotMaxTime) - protectedApi.asRoughMs(dateProfile.slotMinTime);\n        // TODO: why not use normalizeRange!?\n        let normalizedStart = normalizeDate(dateProfile.renderRange.start, tDateProfile, dateEnv);\n        let normalizedEnd = normalizeDate(dateProfile.renderRange.end, tDateProfile, dateEnv);\n        // apply slotMinTime/slotMaxTime\n        // TODO: View should be responsible.\n        if (tDateProfile.isTimeScale) {\n            normalizedStart = dateEnv.add(normalizedStart, dateProfile.slotMinTime);\n            normalizedEnd = dateEnv.add(protectedApi.addDays(normalizedEnd, -1), dateProfile.slotMaxTime);\n        }\n        tDateProfile.timeWindowMs = timeWindowMs;\n        tDateProfile.normalizedRange = { start: normalizedStart, end: normalizedEnd };\n        // Timed axes slice/position in instant (epoch-ms) space and are sourced from a canonical\n        // epoch-driven builder. Whole-day axes stay in civil space and keep the\n        // dateEnv.add/dateEnv.countDurationsBetween arithmetic below.\n        tDateProfile.timeAxis = tDateProfile.isTimeScale\n            ? buildTimelineTimeAxis({\n                normalizedRange: tDateProfile.normalizedRange,\n                slotDuration: tDateProfile.slotDuration,\n                snapDuration: tDateProfile.snapDuration,\n                timeWindowMs,\n                dateEnv,\n                isDateVisible: (date) => isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator),\n            })\n            : null;\n        let slotDates = [];\n        let slotKeys;\n        let majorUnit = protectedApi.computeMajorUnit(dateProfile, dateEnv);\n        if (tDateProfile.timeAxis) {\n            slotDates = tDateProfile.timeAxis.slots.map((slot) => slot.date);\n            slotKeys = tDateProfile.timeAxis.slots.map((slot) => slot.key);\n        }\n        else {\n            let date = normalizedStart;\n            while (date < normalizedEnd) {\n                if (isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator)) {\n                    slotDates.push(date);\n                }\n                date = dateEnv.add(date, tDateProfile.slotDuration);\n            }\n            slotKeys = slotDates.map((slotDate) => slotDate.toISOString());\n        }\n        tDateProfile.slotDates = slotDates;\n        tDateProfile.slotKeys = slotKeys;\n        tDateProfile.slotDatesMajor = slotDates.map((slotDate) => protectedApi.isMajorUnit(slotDate, majorUnit, dateEnv));\n        if (tDateProfile.timeAxis) {\n            // visible slots are the authority for timed-axis geometry. a DST-transition day is not\n            // necessarily divisible by slotDuration, so slotCnt must NOT be derived from snap counts\n            tDateProfile.snapDiffToIndex = []; // only consulted by the civil day-axis coverage path\n            tDateProfile.snapCnt = tDateProfile.timeAxis.slots.length * tDateProfile.snapsPerSlot;\n            tDateProfile.slotCnt = tDateProfile.timeAxis.slots.length;\n        }\n        else {\n            let snapIndex = -1;\n            const snapDiffToIndex = [];\n            let date = normalizedStart;\n            while (date < normalizedEnd) {\n                if (isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator)) {\n                    snapIndex += 1;\n                    snapDiffToIndex.push(snapIndex);\n                }\n                else {\n                    snapDiffToIndex.push(snapIndex + 0.5);\n                }\n                date = dateEnv.add(date, tDateProfile.snapDuration);\n            }\n            tDateProfile.snapDiffToIndex = snapDiffToIndex;\n            tDateProfile.snapCnt = snapIndex + 1; // is always one behind\n            tDateProfile.slotCnt = tDateProfile.snapCnt / tDateProfile.snapsPerSlot;\n        }\n        // more...\n        tDateProfile.cellRows = buildCellRows(tDateProfile, dateEnv, majorUnit);\n        tDateProfile.slotsPerLabel = protectedApi.wholeDivideDurations(tDateProfile.labelInterval, tDateProfile.slotDuration);\n        return tDateProfile;\n    }\n    /*\n    snaps to appropriate unit\n    */\n    function normalizeDate(date, tDateProfile, dateEnv) {\n        let normalDate = date;\n        if (!tDateProfile.isTimeScale) {\n            normalDate = protectedApi.startOfDay(normalDate);\n            if (tDateProfile.largeUnit) {\n                normalDate = dateEnv.startOf(normalDate, tDateProfile.largeUnit);\n            }\n        }\n        return normalDate;\n    }\n    /*\n    snaps to appropriate unit\n    */\n    /*\n    Time-scale axes include hours past midnight when slotMaxTime is beyond a day (#6394).\n    Day-or-coarser axes ignore slotMinTime/slotMaxTime, so only check the current range for them.\n    */\n    function isNowInTimelineRange(nowDate, dateProfile, tDateProfile) {\n        return protectedApi.rangeContainsMarker(dateProfile.currentRange, nowDate) || (tDateProfile.isTimeScale &&\n            protectedApi.rangeContainsMarker(tDateProfile.normalizedRange, nowDate));\n    }\n    function normalizeRange(range, tDateProfile, dateEnv) {\n        if (!tDateProfile.isTimeScale) {\n            range = protectedApi.computeVisibleDayRange(range);\n            if (tDateProfile.largeUnit) {\n                let dayRange = range; // preserve original result\n                range = {\n                    start: dateEnv.startOf(range.start, tDateProfile.largeUnit),\n                    end: dateEnv.startOf(range.end, tDateProfile.largeUnit),\n                };\n                // if date is partially through the interval, or is in the same interval as the start,\n                // make the exclusive end be the *next* interval\n                if (range.end.valueOf() !== dayRange.end.valueOf() || range.end <= range.start) {\n                    range = {\n                        start: range.start,\n                        end: dateEnv.add(range.end, tDateProfile.slotDuration),\n                    };\n                }\n            }\n        }\n        return range;\n    }\n    function isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator) {\n        if (dateProfileGenerator.isHiddenDay(date)) {\n            return false;\n        }\n        if (tDateProfile.isTimeScale) {\n            // determine if the time is within slotMinTime/slotMaxTime, which may have wacky values\n            let day = protectedApi.startOfDay(date);\n            let timeMs = date.valueOf() - day.valueOf();\n            let ms = timeMs - protectedApi.asRoughMs(dateProfile.slotMinTime); // milliseconds since slotMinTime\n            ms = ((ms % 86400000) + 86400000) % 86400000; // make negative values wrap to 24hr clock\n            return ms < tDateProfile.timeWindowMs; // before the slotMaxTime?\n        }\n        return true;\n    }\n    function validateLabelAndSlot(tDateProfile, dateProfile, dateEnv) {\n        const { currentRange } = dateProfile;\n        // make sure labelInterval doesn't exceed the max number of cells\n        if (tDateProfile.labelInterval) {\n            const labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.labelInterval);\n            if (labelCnt > protectedApi.config.MAX_TIMELINE_SLOTS) {\n                protectedApi.warn('Invalid option `slotHeaderInterval`: too many timeline cells.');\n                tDateProfile.labelInterval = null;\n            }\n        }\n        // make sure slotDuration doesn't exceed the maximum number of cells\n        if (tDateProfile.slotDuration) {\n            const slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.slotDuration);\n            if (slotCnt > protectedApi.config.MAX_TIMELINE_SLOTS) {\n                protectedApi.warn('Invalid option `slotDuration`: too many timeline cells.');\n                tDateProfile.slotDuration = null;\n            }\n        }\n        // make sure labelInterval is a multiple of slotDuration\n        if (tDateProfile.labelInterval && tDateProfile.slotDuration) {\n            const slotsPerLabel = protectedApi.wholeDivideDurations(tDateProfile.labelInterval, tDateProfile.slotDuration);\n            if (slotsPerLabel === null || slotsPerLabel < 1) {\n                protectedApi.warn('Invalid option `slotHeaderInterval`: must be a multiple of `slotDuration`.');\n                tDateProfile.slotDuration = null;\n            }\n        }\n    }\n    function ensureLabelInterval(tDateProfile, dateProfile, dateEnv) {\n        const { currentRange } = dateProfile;\n        let { labelInterval } = tDateProfile;\n        if (!labelInterval) {\n            // compute based off the slot duration\n            // find the largest label interval with an acceptable slots-per-label\n            let input;\n            if (tDateProfile.slotDuration) {\n                for (input of STOCK_SUB_DURATIONS) {\n                    const tryLabelInterval = protectedApi.createDuration(input);\n                    const slotsPerLabel = protectedApi.wholeDivideDurations(tryLabelInterval, tDateProfile.slotDuration);\n                    if (slotsPerLabel !== null && slotsPerLabel <= MAX_AUTO_SLOTS_PER_LABEL) {\n                        labelInterval = tryLabelInterval;\n                        break;\n                    }\n                }\n                // use the slot duration as a last resort\n                if (!labelInterval) {\n                    labelInterval = tDateProfile.slotDuration;\n                }\n                // compute based off the view's duration\n                // find the largest label interval that yields the minimum number of labels\n            }\n            else {\n                for (input of STOCK_SUB_DURATIONS) {\n                    labelInterval = protectedApi.createDuration(input);\n                    const labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, labelInterval);\n                    if (labelCnt >= MIN_AUTO_LABELS) {\n                        break;\n                    }\n                }\n            }\n            tDateProfile.labelInterval = labelInterval;\n        }\n        return labelInterval;\n    }\n    function ensureSlotDuration(tDateProfile, dateProfile, dateEnv) {\n        const { currentRange } = dateProfile;\n        let { slotDuration } = tDateProfile;\n        if (!slotDuration) {\n            const labelInterval = ensureLabelInterval(tDateProfile, dateProfile, dateEnv); // will compute if necessary\n            // compute based off the label interval\n            // find the largest slot duration that is different from labelInterval, but still acceptable\n            for (let input of STOCK_SUB_DURATIONS) {\n                const trySlotDuration = protectedApi.createDuration(input);\n                const slotsPerLabel = protectedApi.wholeDivideDurations(labelInterval, trySlotDuration);\n                if (slotsPerLabel !== null && slotsPerLabel > 1 && slotsPerLabel <= MAX_AUTO_SLOTS_PER_LABEL) {\n                    slotDuration = trySlotDuration;\n                    break;\n                }\n            }\n            // only allow the value if it won't exceed the view's # of slots limit\n            if (slotDuration) {\n                const slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, slotDuration);\n                if (slotCnt > MAX_AUTO_CELLS) {\n                    slotDuration = null;\n                }\n            }\n            // use the label interval as a last resort\n            if (!slotDuration) {\n                slotDuration = labelInterval;\n            }\n            tDateProfile.slotDuration = slotDuration;\n        }\n        return slotDuration;\n    }\n    function computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions) {\n        let format1;\n        let format2;\n        let unit1 = null;\n        let unit2 = null;\n        const { labelInterval } = tDateProfile;\n        const { currentRange } = dateProfile;\n        let unit = protectedApi.greatestDurationDenominator(labelInterval).unit;\n        const weekNumbersVisible = allOptions.weekNumbers;\n        let format0 = (format1 = (format2 = null));\n        let unit0 = null;\n        // NOTE: weekNumber computation function wont work\n        if ((unit === 'week') && !weekNumbersVisible) {\n            unit = 'day';\n        }\n        switch (unit) {\n            case 'year':\n                format0 = { year: 'numeric' }; // '2015'\n                unit0 = 'year';\n                break;\n            case 'month':\n                if (dateEnv.diffWholeYears(currentRange.start, currentRange.end) > 1) {\n                    format0 = { year: 'numeric' }; // '2015'\n                    unit0 = 'year';\n                }\n                format1 = { month: 'short' }; // 'Jan'\n                unit1 = 'month';\n                break;\n            case 'week':\n                if (dateEnv.diffWholeYears(currentRange.start, currentRange.end) > 1) {\n                    format0 = { year: 'numeric' }; // '2015'\n                    unit0 = 'year';\n                }\n                format1 = { week: 'narrow' }; // 'Wk4'\n                unit1 = 'week';\n                break;\n            case 'day':\n                if (dateEnv.diffWholeYears(currentRange.start, currentRange.end) > 1) {\n                    format0 = { year: 'numeric', month: 'long' }; // 'January 2014'\n                    unit0 = 'month';\n                }\n                else if (dateEnv.diffWholeMonths(currentRange.start, currentRange.end) > 1) {\n                    format0 = { month: 'long' }; // 'January'\n                    unit0 = 'month';\n                }\n                if (weekNumbersVisible) {\n                    format1 = { week: 'short' }; // 'Wk 4'\n                    unit1 = 'week';\n                }\n                format2 = { weekday: 'narrow', day: 'numeric' }; // 'Su 9'\n                unit2 = 'day';\n                break;\n            case 'hour':\n                if (weekNumbersVisible) {\n                    format0 = { week: 'short' }; // 'Wk 4'\n                    unit0 = 'week';\n                }\n                if (protectedApi.diffWholeDays(currentRange.start, currentRange.end) > 1) {\n                    format1 = { weekday: 'short', day: 'numeric', month: 'numeric', omitCommas: true }; // Sat 4/7\n                    unit1 = 'day';\n                }\n                format2 = {\n                    hour: 'numeric',\n                    minute: '2-digit',\n                    omitZeroMinute: true,\n                    meridiem: 'short',\n                };\n                unit2 = null;\n                break;\n            case 'minute':\n                // sufficiently large number of different minute cells?\n                if ((protectedApi.asRoughMinutes(labelInterval) / 60) >= MAX_AUTO_SLOTS_PER_LABEL) {\n                    format0 = {\n                        hour: 'numeric',\n                        meridiem: 'short',\n                    };\n                    format1 = (params) => (':' + protectedApi.padStart(params.date.minute, 2) // ':30'\n                    );\n                }\n                else {\n                    format0 = {\n                        hour: 'numeric',\n                        minute: 'numeric',\n                        meridiem: 'short',\n                    };\n                }\n                break;\n            case 'second':\n                // sufficiently large number of different second cells?\n                if ((protectedApi.asRoughSeconds(labelInterval) / 60) >= MAX_AUTO_SLOTS_PER_LABEL) {\n                    format0 = { hour: 'numeric', minute: '2-digit', meridiem: 'lowercase' }; // '8:30 PM'\n                    format1 = (params) => (':' + protectedApi.padStart(params.date.second, 2) // ':30'\n                    );\n                }\n                else {\n                    format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' }; // '8:30:45 PM'\n                }\n                break;\n            case 'millisecond':\n                format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' }; // '8:30:45 PM'\n                format1 = (params) => ('.' + protectedApi.padStart(params.millisecond, 3));\n                break;\n        }\n        return {\n            formats: [].concat(format0 || [], format1 || [], format2 || []),\n            units: [].concat(format0 ? [unit0] : [], format1 ? [unit1] : [], format2 ? [unit2] : []),\n        };\n    }\n    function inferHeaderFormatUnit(rawFormat) {\n        if (typeof rawFormat === 'object' && rawFormat) {\n            if (rawFormat.fractionalSecondDigits ||\n                rawFormat.second ||\n                rawFormat.minute ||\n                rawFormat.hour ||\n                rawFormat.timeZoneName) {\n                return 'time';\n            }\n            if (rawFormat.day || rawFormat.weekday) {\n                return 'day';\n            }\n            if (rawFormat.week) {\n                return 'week';\n            }\n            if (rawFormat.month) {\n                return 'month';\n            }\n            if (rawFormat.year) {\n                return 'year';\n            }\n        }\n        return null;\n    }\n    function buildCellRows(tDateProfile, dateEnv, majorUnit) {\n        let slotDates = tDateProfile.slotDates;\n        const timeSlots = tDateProfile.timeAxis?.slots;\n        let formats = tDateProfile.headerFormats;\n        let cellRows = formats.map(() => []); // indexed by row,col\n        let slotAsDays = protectedApi.asCleanDays(tDateProfile.slotDuration);\n        let guessedSlotUnit = slotAsDays === 7 ? 'week' :\n            slotAsDays === 1 ? 'day' :\n                null;\n        // specifically for navclicks\n        let rowUnitsFromFormats = tDateProfile.headerFormatUnits;\n        // builds cellRows and slotCells\n        for (let i = 0; i < (timeSlots?.length ?? slotDates.length); i += 1) {\n            const timeSlot = timeSlots?.[i];\n            let date = timeSlot?.date ?? slotDates[i];\n            const startMs = timeSlot?.startMs ?? null;\n            for (let row = 0; row < formats.length; row += 1) {\n                let format = formats[row];\n                let rowCells = cellRows[row];\n                let leadingCell = rowCells[rowCells.length - 1];\n                let isLastRow = row === formats.length - 1;\n                let isSuperRow = formats.length > 1 && !isLastRow; // more than one row and not the last\n                let isMajor = protectedApi.isMajorUnit(date, majorUnit, dateEnv);\n                let newCell = null;\n                let rowUnit = rowUnitsFromFormats[row] || (isLastRow ? guessedSlotUnit : null);\n                const key = rowUnit + ':' + (timeSlot?.key ?? tDateProfile.slotKeys[i]);\n                if (isSuperRow) {\n                    let textParts = formatCell(date, startMs, format, dateEnv);\n                    if (!leadingCell || (leadingCell.text !== joinDateTimeFormatParts(textParts))) {\n                        newCell = buildCellObject(key, date, startMs, isMajor, textParts, rowUnit);\n                    }\n                    else {\n                        leadingCell.colspan += 1;\n                    }\n                }\n                else if (!leadingCell ||\n                    protectedApi.isInt(dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, date, tDateProfile.labelInterval))) {\n                    let textParts = formatCell(date, startMs, format, dateEnv);\n                    newCell = buildCellObject(key, date, startMs, isMajor, textParts, rowUnit);\n                }\n                else {\n                    leadingCell.colspan += 1;\n                }\n                if (newCell) {\n                    rowCells.push(newCell);\n                }\n            }\n        }\n        return cellRows;\n    }\n    /*\n    startMs is null for every cell of a non-timed timeline (slot unit of day or coarser),\n    where cells are civil dates without an exact instant. Timed-axis cells always carry one,\n    keeping their labels fold-correct during DST. Passing undefined lets DateEnv resolve the\n    marker first-occurrence — the occurrence choice can't affect a date-only label.\n    */\n    function formatCell(date, startMs, format, dateEnv) {\n        return dateEnv.formatToParts(date, format, {\n            instantMs: startMs ?? undefined,\n        });\n    }\n    function buildCellObject(key, date, startMs, isMajor, textParts, rowUnit) {\n        const text = joinDateTimeFormatParts(textParts);\n        return { key, date, startMs, isMajor, text, textParts, rowUnit, colspan: 1 }; // colspan mutated later\n    }\n\n    /*\n    TODO: rename this file!\n    */\n    /*\n    For WHOLE-DAY axes only. Timed axes use computeMsSlotCoverage instead.\n    Returned value is between 0 and the number of snaps.\n    */\n    function computeDateSnapCoverage(date, tDateProfile, dateEnv) {\n        let snapDiff = dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, date, tDateProfile.snapDuration);\n        if (snapDiff < 0) {\n            return 0;\n        }\n        if (snapDiff >= tDateProfile.snapDiffToIndex.length) {\n            return tDateProfile.snapCnt;\n        }\n        let snapDiffInt = Math.floor(snapDiff);\n        let snapCoverage = tDateProfile.snapDiffToIndex[snapDiffInt];\n        if (protectedApi.isInt(snapCoverage)) { // not an in-between value\n            snapCoverage += snapDiff - snapDiffInt; // add the remainder\n        }\n        else {\n            // a fractional value, meaning the date is not visible\n            // always round up in this case. works for start AND end dates in a range.\n            snapCoverage = Math.ceil(snapCoverage);\n        }\n        return snapCoverage;\n    }\n    /*\n    For TIMED axes only (tDateProfile.timeAxis must be populated).\n    Returned value is in SLOT units, between 0 and the number of visible slots.\n    Interpolates within each slot's real instant span, so slots keep their rendered width even\n    when a DST transition makes their real spans unequal. Instants between visible slots\n    (hidden times) collapse to the boundary coordinate.\n    */\n    function computeMsSlotCoverage(dateMs, tDateProfile) {\n        const { slots } = tDateProfile.timeAxis;\n        if (!slots.length || dateMs <= slots[0].startMs) {\n            return 0;\n        }\n        if (dateMs >= slots[slots.length - 1].endMs) {\n            return slots.length;\n        }\n        const slotIndex = findLastSlotIndex(slots, dateMs);\n        const slot = slots[slotIndex];\n        const clampedMs = Math.min(dateMs, slot.endMs);\n        return slotIndex + (clampedMs - slot.startMs) / (slot.endMs - slot.startMs);\n    }\n    /*\n    Binary search for the largest index whose slot starts at-or-before dateMs.\n    Caller must ensure dateMs is within (slots[0].startMs, axis end).\n    */\n    function findLastSlotIndex(slots, dateMs) {\n        let lo = 0;\n        let hi = slots.length - 1;\n        while (lo < hi) {\n            const mid = (lo + hi + 1) >> 1;\n            if (slots[mid].startMs <= dateMs) {\n                lo = mid;\n            }\n            else {\n                hi = mid - 1;\n            }\n        }\n        return lo;\n    }\n\n    // Timeline-specific\n    // -------------------------------------------------------------------------------------------------\n    /*\n    TODO: DRY with computeSlatHeight?\n    */\n    function computeSlotWidth(slatCnt, slatsPerLabel, slatMinWidth, labelInnerWidth, viewportWidth) {\n        if (labelInnerWidth == null || viewportWidth == null) {\n            return [undefined, undefined, false];\n        }\n        if (slatMinWidth == null) {\n            slatMinWidth = Math.ceil((labelInnerWidth + 1) / slatsPerLabel);\n        }\n        const slatTryWidth = viewportWidth / slatCnt;\n        let slotLiquid;\n        let slatWidth;\n        if (slatTryWidth >= slatMinWidth) {\n            slotLiquid = true;\n            slatWidth = slatTryWidth;\n        }\n        else {\n            slotLiquid = false;\n            slatWidth = Math.max(slatMinWidth, slatTryWidth);\n        }\n        return [slatWidth * slatCnt, slatWidth, slotLiquid];\n    }\n    /*\n    `time` has wall-clock semantics (scrollTime: '06:00' targets civil 06:00, even on DST days\n    where that's not 6 elapsed hours from midnight), hence the civil dateEnv.add.\n    */\n    function timeToCoord(// pixels\n    time, dateEnv, dateProfile, tDateProfile, slotWidth) {\n        let date = dateEnv.add(dateProfile.activeRange.start, time);\n        if (!tDateProfile.isTimeScale) {\n            date = protectedApi.startOfDay(date);\n        }\n        return dateToCoord(date, dateEnv, tDateProfile, slotWidth);\n    }\n    function dateToCoord(// pixels\n    date, dateEnv, tDateProfile, slotWidth) {\n        if (tDateProfile.timeAxis) {\n            return msToCoord(dateEnv.toDate(date).valueOf(), tDateProfile, slotWidth);\n        }\n        let snapCoverage = computeDateSnapCoverage(date, tDateProfile, dateEnv);\n        let slotCoverage = snapCoverage / tDateProfile.snapsPerSlot;\n        return slotCoverage * slotWidth;\n    }\n    // for TIMED axes only (tDateProfile.timeAxis must be populated)\n    function msToCoord(// pixels\n    dateMs, tDateProfile, slotWidth) {\n        return computeMsSlotCoverage(dateMs, tDateProfile) * slotWidth;\n    }\n    /**\n     * Projects one seg onto the slot axis, as a range rather than a span.\n     *\n     * Both endpoints come from the projection. That matters because placement\n     * compares one seg's `end` against the next seg's `start` with no tolerance,\n     * and deriving an end as `start + size` does not agree bit-for-bit with a\n     * projected one: `(s - c) + (e - s)` can land an ulp above `e - c` even though\n     * they are algebraically equal. That is enough to read two abutting events as\n     * overlapping and spend a whole extra level on them — measurably, for roughly\n     * one adjacency in 250 at ordinary liquid slot widths.\n     *\n     * A projected end is trustworthy because projection is deterministic: the same\n     * instant through `msToCoord` twice is bit-identical, so an end taken from it\n     * equals the neighbor's start exactly. Returning no `size` is deliberate — it\n     * leaves nothing to rebuild an end from. Callers wanting a CSS width take\n     * `end - start`, where an ulp cannot render anyway.\n     *\n     * The one derived endpoint is a seg stretched to `segMinWidth`, which has no\n     * projected end to keep.\n     */\n    function computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth, clipStart = 0, // uses it as a new origin!\n    clipEnd = Infinity) {\n        // segs on timed axes always carry exact instants; whole-day axes position by civil marker\n        let startCoord = seg.startMs != null\n            ? msToCoord(seg.startMs, tDateProfile, slotWidth)\n            : dateToCoord(seg.startDate, dateEnv, tDateProfile, slotWidth);\n        let endCoord = seg.endMs != null\n            ? msToCoord(seg.endMs, tDateProfile, slotWidth)\n            : dateToCoord(seg.endDate, dateEnv, tDateProfile, slotWidth);\n        startCoord = Math.max(startCoord, clipStart);\n        endCoord = Math.min(endCoord, clipEnd);\n        if (startCoord < endCoord) {\n            const start = startCoord - clipStart;\n            let end = endCoord - clipStart;\n            if (segMinWidth && end - start < segMinWidth) {\n                end = start + segMinWidth;\n            }\n            return { start, end };\n        }\n    }\n    /*\n    Builds the horizontal geometry and exact date span shared by both timeline hit systems.\n    */\n    function computeTimelineHitData(positionLeft, canvasWidth, slotWidth, isRtl, tDateProfile, dateEnv) {\n        const x = isRtl ? canvasWidth - positionLeft : positionLeft;\n        const slatIndex = Math.floor(x / slotWidth);\n        const slatLeft = slatIndex * slotWidth;\n        const partial = (x - slatLeft) / slotWidth;\n        const localSnapIndex = Math.floor(partial * tDateProfile.snapsPerSlot);\n        const snap = computeSnapRange(slatIndex, localSnapIndex, tDateProfile, dateEnv);\n        if (!snap) {\n            return null;\n        }\n        const snapWidth = slotWidth / tDateProfile.snapsPerSlot;\n        const startCoord = slatIndex * slotWidth + (snapWidth * localSnapIndex);\n        const endCoord = startCoord + snapWidth;\n        const left = isRtl ? canvasWidth - endCoord : startCoord;\n        const right = isRtl ? canvasWidth - startCoord : endCoord;\n        return {\n            slatIndex,\n            dateSpan: {\n                range: { start: snap.start, end: snap.end },\n                allDay: !tDateProfile.isTimeScale,\n                ...(snap.startMs != null ? {\n                    instantStartMs: snap.startMs,\n                    instantEndMs: snap.endMs,\n                } : {}),\n            },\n            rect: { left, right },\n        };\n    }\n    /*\n    The date range of a single snap-cell, for hit-detection.\n    Timed axes read the canonical instant-based axis; whole-day axes use civil-marker arithmetic.\n    Returns null when the snap has no real span (e.g. the tail of a slot truncated by a DST\n    transition, which renders at full width but represents a shorter real duration).\n    */\n    function computeSnapRange(slatIndex, localSnapIndex, // the snap # relative to start of slat\n    tDateProfile, dateEnv) {\n        const { timeAxis } = tDateProfile;\n        if (timeAxis) {\n            if (slatIndex >= timeAxis.slots.length) {\n                return null;\n            }\n            const slot = timeAxis.slots[slatIndex];\n            const startMs = slot.startMs + (localSnapIndex * timeAxis.snapStepMs);\n            const endMs = Math.min(startMs + timeAxis.snapStepMs, slot.endMs);\n            if (startMs >= endMs) {\n                return null;\n            }\n            return {\n                start: dateEnv.timestampToMarker(startMs),\n                end: dateEnv.timestampToMarker(endMs),\n                startMs,\n                endMs,\n            };\n        }\n        if (slatIndex >= tDateProfile.slotDates.length) {\n            return null;\n        }\n        const start = dateEnv.add(tDateProfile.slotDates[slatIndex], protectedApi.multiplyDuration(tDateProfile.snapDuration, localSnapIndex));\n        return {\n            start,\n            end: dateEnv.add(start, tDateProfile.snapDuration),\n            startMs: null,\n            endMs: null,\n        };\n    }\n\n    /*\n    Timed axes (tDateProfile.timeAxis) slice in instant (epoch-ms) space so DST gaps/folds\n    position correctly. Whole-day axes slice in civil-marker space.\n    */\n    class TimelineLaneSlicer extends protectedApi.Slicer {\n        intersectDateSpan(dateSpan, activeRange, dateProfile, dateProfileGenerator, tDateProfile, dateEnv) {\n            if (!tDateProfile.timeAxis) {\n                return super.intersectDateSpan(dateSpan, activeRange, dateProfile, dateProfileGenerator, tDateProfile, dateEnv);\n            }\n            const startMs = Math.max(protectedApi.getDateSpanInstantStartMs(dateSpan, dateEnv), dateEnv.toDate(activeRange.start).valueOf());\n            const endMs = Math.min(protectedApi.getDateSpanInstantEndMs(dateSpan, dateEnv), dateEnv.toDate(activeRange.end).valueOf());\n            if (startMs < endMs) {\n                const range = protectedApi.buildValidInstanceRange({ marker: dateEnv.timestampToMarker(startMs), instantMs: startMs }, { marker: dateEnv.timestampToMarker(endMs), instantMs: endMs }, dateEnv);\n                if (!range) {\n                    return null;\n                }\n                return {\n                    ...dateSpan,\n                    range: { start: range.start, end: range.end },\n                    instantStartMs: startMs,\n                    instantEndMs: endMs,\n                };\n            }\n            return null;\n        }\n        sliceDateSpan(dateSpan, dateProfile, dateProfileGenerator, tDateProfile, dateEnv) {\n            if (!tDateProfile.timeAxis) {\n                return super.sliceDateSpan(dateSpan, dateProfile, dateProfileGenerator, tDateProfile, dateEnv);\n            }\n            return sliceInstantSpan(protectedApi.getDateSpanInstantStartMs(dateSpan, dateEnv), protectedApi.getDateSpanInstantEndMs(dateSpan, dateEnv), dateProfile, dateProfileGenerator, tDateProfile, dateEnv);\n        }\n        sliceRange(origRange, dateProfile, dateProfileGenerator, tDateProfile, dateEnv) {\n            if (tDateProfile.timeAxis) {\n                return sliceInstantSpan(protectedApi.getRangeInstantStartMs(origRange, dateEnv), protectedApi.getRangeInstantEndMs(origRange, dateEnv), dateProfile, dateProfileGenerator, tDateProfile, dateEnv);\n            }\n            let normalRange = normalizeRange(origRange, tDateProfile, dateEnv);\n            let segs = [];\n            // protect against when the span is entirely in an invalid date region\n            if (computeDateSnapCoverage(normalRange.start, tDateProfile, dateEnv)\n                < computeDateSnapCoverage(normalRange.end, tDateProfile, dateEnv)) {\n                // intersect the footprint's range with the grid's range\n                let slicedRange = protectedApi.intersectRanges(normalRange, tDateProfile.normalizedRange);\n                if (slicedRange) {\n                    segs.push({\n                        startDate: slicedRange.start,\n                        endDate: slicedRange.end,\n                        isStart: slicedRange.start.valueOf() === normalRange.start.valueOf()\n                            && isValidDate(slicedRange.start, tDateProfile, dateProfile, dateProfileGenerator),\n                        isEnd: slicedRange.end.valueOf() === normalRange.end.valueOf()\n                            && isValidDate(protectedApi.addMs(slicedRange.end, -1), tDateProfile, dateProfile, dateProfileGenerator),\n                    });\n                }\n            }\n            return segs;\n        }\n    }\n    function sliceInstantSpan(origStartMs, origEndMs, dateProfile, dateProfileGenerator, tDateProfile, dateEnv) {\n        const axisStartMs = getTimelineAxisStartMs(tDateProfile.timeAxis);\n        const axisEndMs = getTimelineAxisEndMs(tDateProfile.timeAxis);\n        if (axisStartMs == null) { // axis has no visible slots\n            return [];\n        }\n        // intersect the footprint's range with the grid's range\n        const startMs = Math.max(origStartMs, axisStartMs);\n        const endMs = Math.min(origEndMs, axisEndMs);\n        if (startMs < endMs &&\n            // protect against when the span is entirely in an invalid date region\n            computeMsSlotCoverage(startMs, tDateProfile) < computeMsSlotCoverage(endMs, tDateProfile)) {\n            const startDate = dateEnv.timestampToMarker(startMs);\n            const endDate = dateEnv.timestampToMarker(endMs);\n            return [{\n                    startDate,\n                    endDate,\n                    startMs,\n                    endMs,\n                    isStart: startMs === origStartMs\n                        && isValidDate(startDate, tDateProfile, dateProfile, dateProfileGenerator),\n                    isEnd: endMs === origEndMs\n                        && isValidDate(dateEnv.timestampToMarker(endMs - 1), tDateProfile, dateProfile, dateProfileGenerator),\n                }];\n        }\n        return [];\n    }\n\n    /**\n     * Slot width assumed on the first render, before the real one is measured.\n     * Shared by standalone Timeline and Resource Timeline.\n     *\n     * Without it, `computeSegHorizontals` projects every seg to zero width and\n     * drops it, so the lane paints a frame containing no events at all and the\n     * calendar looks empty until measurement lands. Projecting against an assumed\n     * width instead means events are present in that very first paint.\n     *\n     * A flat constant is enough, and deliberately so. Placement compares segs\n     * against each other and never against the axis length, so in exact arithmetic\n     * scaling every coordinate by the same factor preserves the lateral collision\n     * graph and the unit-thickness candidate plan among the segs that project. That\n     * is why callers withhold `eventMinWidth` while assuming — a pixel floor applied\n     * at the wrong scale would stretch the wrong segs, and stretching is what\n     * creates collisions.\n     *\n     * That is a much weaker promise than \"the layout comes out the same\", and\n     * deliberately so. Four things can still differ once the width is real:\n     *\n     * - `eventMinWidth` comes back on, and stretching a sub-minimum seg can make it\n     *   collide with a neighbor it previously cleared, changing level assignment\n     *   and admission under `eventMaxStack`.\n     * - Wrapper heights are measured at the rendered width, and a narrower bar\n     *   wraps its content taller; that thickness feeds level fitting.\n     * - The virtualized clip window can settle on a different slot range, changing\n     *   which segs project at all.\n     * - Scale invariance is exact only in real arithmetic, so an adjacency sitting\n     *   on the last bit may still resolve one way when assumed and the other way\n     *   when measured. Both endpoints now come straight from the projection, which\n     *   removes the systematic source of this, but does not make float arithmetic\n     *   scale-invariant in general.\n     *\n     * So the assumed pass is a good-faith first draft, not a guarantee about the\n     * measured one. Anything latched from it upward — a reported height, say —\n     * needs to wait for a measured width instead.\n     */\n    const ESTIMATED_SLOT_WIDTH = 50;\n    /** Resolves event projection dimensions before and after slot measurement. */\n    function resolveTimelineEventProjectionSizing(slotWidth, eventMinWidth) {\n        return {\n            slotWidth: slotWidth ?? ESTIMATED_SLOT_WIDTH,\n            eventMinWidth: slotWidth != null ? eventMinWidth : undefined,\n        };\n    }\n\n    class TimelineBg extends protectedApi.BaseComponent {\n        render() {\n            let { props } = this;\n            let highlightSeg = [].concat(props.eventResizeSegs || [], props.dateSelectionSegs || []);\n            return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [this.renderSegs(props.businessHourSegs || [], 'non-business'), this.renderSegs(props.bgEventSegs || [], 'bg-event'), this.renderSegs(highlightSeg, 'highlight')] }));\n        }\n        renderSegs(segs, fillType) {\n            const { props, context } = this;\n            const { dateEnv, options } = context;\n            const { tDateProfile, todayRange, nowDate } = props;\n            const clipStart = props.clipStart ?? 0;\n            const clipEnd = props.clipEnd ?? Infinity;\n            // fills follow the same assumed-then-measured path as events, so the first\n            // paint isn't missing its background while the foreground is present\n            const slotWidth = props.slotWidth ?? ESTIMATED_SLOT_WIDTH;\n            return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: segs.map((seg) => {\n                    const horizontal = computeSegHorizontals(seg, undefined, dateEnv, tDateProfile, slotWidth);\n                    if (horizontal) {\n                        let { start, end } = horizontal;\n                        start = Math.max(start, clipStart);\n                        end = Math.min(end, clipEnd);\n                        if (start < end) {\n                            return (jsxRuntime.jsx(\"div\", { \"aria-hidden\": true, className: classNames__default[\"default\"].fillY, style: {\n                                    insetInlineStart: start - clipStart,\n                                    width: end - start,\n                                }, children: fillType === 'bg-event' ? (jsxRuntime.jsx(protectedApi.BgEvent, { eventRange: seg.eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isVertical: false, renderProps: props.renderProps, ...protectedApi.getEventRangeMeta(seg.eventRange, todayRange, nowDate, props.nowMs) })) : (protectedApi.renderFill(fillType, options)) }, protectedApi.buildEventRangeKey(seg.eventRange)));\n                        }\n                    }\n                }) }));\n        }\n    }\n\n    class TimelineHeaderCell extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // memo\n            this.getDateMeta = protectedApi.memoize(protectedApi.getDateMeta);\n            this.applyExactSlotMeta = protectedApi.memoize(applyExactSlotMeta);\n            // ref\n            this.innerWrapperElRef = compat.createRef();\n        }\n        render() {\n            let { props, state, context } = this;\n            let { dateEnv, options } = context;\n            let { cell, dateProfile, tDateProfile } = props;\n            // the cell.rowUnit is f'd\n            // giving 'month' for a 3-day view\n            // workaround: to infer day, do NOT time\n            let dateMeta = this.applyExactSlotMeta(this.getDateMeta(cell.date, dateEnv, dateProfile, props.todayRange, props.nowDate), cell.startMs, props.nowMs);\n            let hasNavLink = options.navLinks && !dateMeta.isDisabled && (cell.rowUnit && cell.rowUnit !== 'time');\n            let isTime = tDateProfile.isTimeScale && !props.rowLevel; // HACK: faulty way of determining this\n            let { textParts } = cell;\n            let renderProps = {\n                ...dateMeta,\n                level: props.rowLevel,\n                isMajor: cell.isMajor,\n                isMinor: false,\n                isNarrow: false,\n                isTime,\n                hasNavLink,\n                text: cell.text,\n                textParts,\n                get weekdayText() { return protectedApi.findWeekdayText(textParts); },\n                get dayNumberText() { return protectedApi.findDayNumberText(textParts); },\n                get monthText() { return protectedApi.findMonthText(textParts); },\n                isFirst: props.isFirst,\n                view: context.viewApi,\n            };\n            const { slotHeaderAlign } = options;\n            const align = this.align =\n                typeof slotHeaderAlign === 'function'\n                    ? slotHeaderAlign({ level: props.rowLevel, isTime })\n                    : slotHeaderAlign;\n            const isSticky = this.isSticky =\n                props.rowLevel && options.slotHeaderSticky !== false;\n            let edgeCoord;\n            if (isSticky) {\n                if (align === 'center') {\n                    if (state.innerWidth != null) {\n                        edgeCoord = `calc(50% - ${state.innerWidth / 2}px)`;\n                    }\n                }\n                else {\n                    edgeCoord = (typeof options.slotHeaderSticky === 'number' ||\n                        typeof options.slotHeaderSticky === 'string') ? options.slotHeaderSticky : 0;\n                }\n            }\n            return (jsxRuntime.jsx(protectedApi.ContentContainer, { tag: \"div\", className: publicApi.joinClassNames(classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, classNames__default[\"default\"].flexCol, classNames__default[\"default\"].borderlessY, classNames__default[\"default\"].borderlessEnd, props.isFirst && classNames__default[\"default\"].borderlessStart, align === 'center' ? classNames__default[\"default\"].alignCenter :\n                    align === 'end' ? classNames__default[\"default\"].alignEnd :\n                        classNames__default[\"default\"].alignStart, classNames__default[\"default\"].internalTimelineSlot), attrs: {\n                    'data-date': dateEnv.formatIso(cell.date, {\n                        omitTime: !tDateProfile.isTimeScale,\n                        omitTimeZoneOffset: true,\n                    }),\n                    ...(dateMeta.isToday ? { 'aria-current': 'date' } : {}),\n                }, style: {\n                    width: props.slotWidth != null\n                        ? props.slotWidth * cell.colspan\n                        : undefined,\n                }, renderProps: renderProps, generatorName: \"slotHeaderContent\", customGenerator: options.slotHeaderContent, defaultGenerator: renderInnerContent, classNameGenerator: options.slotHeaderClass, didMount: options.slotHeaderDidMount, willUnmount: options.slotHeaderWillUnmount, children: (InnerContent) => (jsxRuntime.jsx(\"div\", { ref: this.innerWrapperElRef, className: publicApi.joinClassNames(classNames__default[\"default\"].flexCol, classNames__default[\"default\"].noShrink, classNames__default[\"default\"].whiteSpaceNoWrap, isSticky && classNames__default[\"default\"].sticky), style: {\n                        left: edgeCoord,\n                        right: edgeCoord,\n                    }, children: jsxRuntime.jsx(InnerContent, { tag: \"div\", attrs: hasNavLink\n                            // not tabbable because parent is aria-hidden\n                            ? protectedApi.buildNavLinkAttrs(context, cell.date, cell.rowUnit, undefined, \n                            /* isTabbable = */ false)\n                            : {} // don't bother with aria-hidden because parent already hidden\n                        , className: protectedApi.generateClassName(options.slotHeaderInnerClass, renderProps) }) })) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            const { props } = this;\n            const innerWrapperEl = this.innerWrapperElRef.current; // TODO: make dynamic with useEffect\n            this.disconnectSize = protectedApi.watchSize(innerWrapperEl, (width, height) => {\n                if (this._isUnmounting)\n                    return;\n                protectedApi.setRef(props.innerWidthRef, width);\n                protectedApi.setRef(props.innerHeightRef, height);\n                if (this.align === 'center' && this.isSticky) {\n                    this.setState({ innerWidth: width });\n                }\n            });\n        }\n        componentWillUnmount() {\n            const { props } = this;\n            this._isUnmounting = true;\n            this.disconnectSize();\n            protectedApi.setRef(props.innerWidthRef, null);\n            protectedApi.setRef(props.innerHeightRef, null);\n        }\n    }\n    // Utils\n    // -------------------------------------------------------------------------------------------------\n    function renderInnerContent(renderProps) {\n        return renderProps.text;\n    }\n\n    class TimelineHeaderRow extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // refs\n            // Remembers the widths of labels that virtualization has unmounted, so they still count toward\n            // the slot width. Otherwise, slot width would depend on which labels are mounted, while which\n            // labels are mounted depends on slot width. A widest label that only fits within the virtualized\n            // window at narrower slots would widen the slots, unmount, narrow them, and mount again, forever.\n            // A remembered width goes stale if the label's content changes while it's unmounted, such as with\n            // a locale change, and slots stay too wide until it scrolls back into view.\n            this.innerWidthRefMap = new protectedApi.RefMap(() => {\n                protectedApi.afterSize(this.handleInnerWidths);\n            }, /* ignoreDeletes = */ true);\n            this.innerHeightRefMap = new protectedApi.RefMap(() => {\n                protectedApi.afterSize(this.handleInnerHeights);\n            });\n            this.handleInnerWidths = () => {\n                if (this._isUnmounting) {\n                    return;\n                }\n                const innerWidthMap = this.innerWidthRefMap.current;\n                let max = null;\n                // Not all of the map's values. See innerWidthRefMap: it also retains labels of prior date ranges\n                for (const cell of this.props.cells) {\n                    const innerWidth = innerWidthMap.get(cell.key);\n                    if (innerWidth != null) {\n                        max = Math.max(max || 0, innerWidth);\n                    }\n                }\n                // TODO: ensure not equal?\n                protectedApi.setRef(this.props.innerWidthRef, max);\n            };\n            this.handleInnerHeights = () => {\n                if (this._isUnmounting)\n                    return;\n                const innerHeightMap = this.innerHeightRefMap.current;\n                let max = null;\n                for (const innerHeight of innerHeightMap.values()) {\n                    max = Math.max(max || 0, innerHeight);\n                }\n                // TODO: ensure not equal?\n                protectedApi.setRef(this.props.innerHeighRef, max);\n                this.setState({ innerHeight: max });\n            };\n        }\n        render() {\n            const { props, innerWidthRefMap, innerHeightRefMap, state, context } = this;\n            const { options } = context;\n            let { cells, cellStartIndex, cellCount } = props;\n            cellStartIndex = cellStartIndex || 0;\n            if (cellStartIndex || cellCount !== undefined) {\n                cells = cells.slice(cellStartIndex, cellStartIndex + cellCount);\n            }\n            return (jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(props.className, options.slotHeaderRowClass, classNames__default[\"default\"].flexRow, classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessTop, !props.rowLevel && classNames__default[\"default\"].borderlessBottom), style: {\n                    insetInlineStart: props.insetInlineStart,\n                    width: props.width,\n                    // we assign height because we allow cells to have distorted heights for visual effect\n                    // but we still want to keep the overall extrenal mass\n                    height: state.innerHeight,\n                }, children: cells.map((cell, cellI) => {\n                    // TODO: make this part of the cell obj?\n                    // TODO: rowUnit seems wrong sometimes. says 'month' when it should be day\n                    // TODO: rowUnit is relevant to whole row. put it on a row object, not the cells\n                    // TODO: use rowUnit to key the Row itself?\n                    const key = cell.key;\n                    return (jsxRuntime.jsx(TimelineHeaderCell, { cell: cell, rowLevel: props.rowLevel, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, todayRange: props.todayRange, nowDate: props.nowDate, nowMs: props.nowMs, isFirst: cellStartIndex + cellI === 0, \n                        // refs\n                        innerWidthRef: innerWidthRefMap.createRef(key), innerHeightRef: innerHeightRefMap.createRef(key), \n                        // dimensions\n                        slotWidth: props.slotWidth }, key));\n                }) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            protectedApi.setRef(this.props.innerWidthRef, null);\n            protectedApi.setRef(this.props.innerHeighRef, null);\n        }\n    }\n\n    /**\n     * Builds shared-engine sources from production's already-projected spans.\n     *\n     * `orderIndex` is the index in the caller's resolved event-order array, even\n     * when clipping removes an earlier seg.\n     *\n     * Coordinates go in exactly as projected, with no rounding or tolerance, which\n     * is how this worked before the shared engine existed. Placement therefore\n     * reacts to whatever the projection produces, down to the last bit: an overlap\n     * of any width costs a whole level.\n     *\n     * That precision is only safe because the endpoints come from the projection\n     * rather than being rebuilt from each other — see `TimelineSegHorizontals.end`,\n     * which also covers the one case that is derived, a seg stretched to\n     * `eventMinWidth`. Deriving the end as `start + size` would reintroduce\n     * ulp-level disagreements between abutting events, which is exactly what a\n     * quantizer would then have to hide.\n     */\n    function buildTimelineSegSources(segs, segMinWidth, dateEnv, tDateProfile, slotWidth, clipStart = 0, clipEnd = Infinity) {\n        const sourceSegs = [];\n        for (let orderIndex = 0; orderIndex < segs.length; orderIndex += 1) {\n            const seg = segs[orderIndex];\n            const horizontal = computeSegHorizontals(seg, segMinWidth, dateEnv, tDateProfile, slotWidth, clipStart, clipEnd);\n            if (horizontal) {\n                sourceSegs.push({\n                    ...seg,\n                    key: seg.eventRange.instance.instanceId,\n                    start: horizontal.start,\n                    end: horizontal.end,\n                    orderIndex,\n                });\n            }\n        }\n        return sourceSegs;\n    }\n    /**\n     * Mounts every admitted event for measurement, but positions only events whose\n     * wrappers have reported an exact height. Link heights affect only content\n     * height, never placement.\n     */\n    function buildTimelineSegPlacements(sourceSegs, eventOrderStrict, eventMaxStack, sliceHeights, moreLinkHeights) {\n        const layout = protectedApi.buildLevelLimitedLayout(sourceSegs, eventOrderStrict, \n        /* eventSlicing = */ false, eventMaxStack, \n        /* moreLinkTakesLevel = */ false, sliceHeights);\n        const renderSlices = protectedApi.sortByAxisOrder(layout.renderSlices);\n        const hiddenGroups = protectedApi.groupLaterallyIntersecting(layout.hiddenSlices);\n        const moreLinks = hiddenGroups.map((group) => ({\n            key: group.key,\n            start: group.start,\n            end: group.end,\n            top: protectedApi.computeLateralSpanBottom(layout.sliceLevels, group, layout.sliceCoords, sliceHeights),\n            segs: group.hiddenSlices.map((slice) => slice.sourceSeg),\n        }));\n        return {\n            renderSlices,\n            sliceCoords: layout.sliceCoords,\n            moreLinks,\n            contentHeight: calculateTimelineContentHeight(renderSlices, layout.sliceCoords, sliceHeights, moreLinks, moreLinkHeights),\n            isSettled: layout.isSettled,\n        };\n    }\n    /** Visible bottoms plus each link's independently measured occupied space. */\n    function calculateTimelineContentHeight(renderSlices, sliceCoords, sliceHeights, moreLinks, moreLinkHeights) {\n        let contentHeight = 0;\n        for (const slice of renderSlices) {\n            const key = protectedApi.getSliceKey(slice);\n            const sliceTop = sliceCoords.get(key);\n            const sliceHeight = sliceHeights.get(key);\n            if (sliceTop != null && sliceHeight != null) {\n                contentHeight = Math.max(contentHeight, sliceTop + sliceHeight);\n            }\n        }\n        for (const moreLink of moreLinks) {\n            contentHeight = Math.max(contentHeight, moreLink.top + (moreLinkHeights.get(moreLink.key) ?? 0));\n        }\n        return contentHeight;\n    }\n\n    /** Projects complete Timeline geometry and plans print-only DOM candidates. */\n    function buildTimelinePrintPlan(segs, dateEnv, tDateProfile, slotWidth, eventMinWidth, eventOrderStrict = false) {\n        const sourceSegs = buildTimelineSegSources(segs, eventMinWidth, dateEnv, tDateProfile, slotWidth);\n        return protectedApi.planPrintDomCandidates(sourceSegs, eventOrderStrict, false);\n    }\n    /** Builds normal-flow event bands and Timeline's one final more-link band. */\n    function buildTimelinePrintLayout(plan, printSegHeights, printMoreLinkHeights) {\n        return {\n            eventBands: protectedApi.buildPrintEventBands(plan.sliceLevels, printSegHeights),\n            moreLinkBand: protectedApi.buildPrintMoreLinkBand(protectedApi.groupLaterallyIntersecting(plan.hiddenSlices), printMoreLinkHeights),\n        };\n    }\n    /**\n     * The measurement half of Timeline print, shared by the standalone lane and\n     * the resource row.\n     *\n     * Both renderers mount the same wrappers against the same two maps, so the\n     * ownership rules live here once. Event wrappers ignore deletes because a\n     * source can change bands when `slotWidth` changes, and a departing wrapper's\n     * removal must not clobber the arriving wrapper's live entry.\n     */\n    class TimelinePrintHeights {\n        /** `onSettled` must be a stable reference, since `afterSize` dedupes by it. */\n        constructor(onSettled) {\n            const handleChange = () => {\n                protectedApi.afterSize(onSettled);\n            };\n            this.segHeightRefMap = new protectedApi.RefMap(handleChange, true);\n            this.moreLinkHeightRefMap = new protectedApi.RefMap(handleChange);\n        }\n        buildLayout(plan) {\n            return buildTimelinePrintLayout(plan, this.segHeightRefMap.current, this.moreLinkHeightRefMap.current);\n        }\n    }\n    /**\n     * Base for the two Timeline print renderers (standalone lane and resource\n     * row). Owns the whole shared pipeline — sort → projection sizing → plan →\n     * measured band layout — plus the measurement/settle lifecycle, so the two\n     * renderers cannot silently diverge.\n     */\n    class TimelinePrintRenderer extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            // memo\n            this.sortSegs = protectedApi.memoize(protectedApi.sortEventSegs);\n            this.buildPlan = protectedApi.memoize(buildTimelinePrintPlan);\n            // refs\n            this.printHeights = new TimelinePrintHeights(() => {\n                if (!this._isUnmounting) {\n                    this.forceUpdate();\n                }\n            });\n        }\n        buildPrintBands(fgEventSegs, tDateProfile, slotWidth) {\n            const { options, dateEnv } = this.context;\n            const fgSegs = this.sortSegs(fgEventSegs, options.eventOrder);\n            const projectionSizing = resolveTimelineEventProjectionSizing(slotWidth, options.eventMinWidth);\n            const plan = this.buildPlan(fgSegs, dateEnv, tDateProfile, projectionSizing.slotWidth, projectionSizing.eventMinWidth, options.eventOrderStrict);\n            return this.printHeights.buildLayout(plan);\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n        }\n    }\n\n    const DEFAULT_TIME_FORMAT = protectedApi.createFormatter({\n        hour: 'numeric',\n        minute: '2-digit',\n        omitZeroMinute: true,\n        meridiem: 'narrow',\n    });\n    class TimelineEvent extends protectedApi.BaseComponent {\n        render() {\n            let { props } = this;\n            return (jsxRuntime.jsx(protectedApi.StandardEvent, { ...props, display: 'row', defaultTimeFormat: DEFAULT_TIME_FORMAT, defaultDisplayEventTime: !props.isTimeScale }));\n        }\n    }\n\n    class TimelineLaneMoreLink extends protectedApi.BaseComponent {\n        render() {\n            let { props } = this;\n            let { hiddenSegs } = props;\n            return (jsxRuntime.jsx(protectedApi.MoreLinkContainer, { display: 'row', allDayDate: null, segs: hiddenSegs, hiddenSegs: hiddenSegs, dateProfile: props.dateProfile, todayRange: props.todayRange, dateSpanProps: props.dateSpanProps, renderProps: props.renderProps, isNarrow: false, isMicro: false, popoverContent: () => (jsxRuntime.jsx(jsxRuntime.Fragment, { children: hiddenSegs.map((seg) => {\n                        let { eventRange } = seg;\n                        let { instanceId } = eventRange.instance;\n                        let isDragging = Boolean(props.eventDrag && props.eventDrag.affectedInstances[instanceId]);\n                        let isResizing = Boolean(props.eventResize && props.eventResize.affectedInstances[instanceId]);\n                        let isInvisible = isDragging || isResizing;\n                        return (jsxRuntime.jsx(\"div\", { role: 'listitem', style: { visibility: isInvisible ? 'hidden' : undefined }, children: jsxRuntime.jsx(TimelineEvent, { isTimeScale: props.isTimeScale, eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: isDragging, isResizing: isResizing, isMirror: false, isSelected: instanceId === props.eventSelection, renderProps: props.renderProps, ...protectedApi.getEventRangeMeta(eventRange, props.todayRange, props.nowDate, props.nowMs) }) }, instanceId));\n                    }) })) }));\n        }\n    }\n\n    class TimelinePrintFg extends TimelinePrintRenderer {\n        render() {\n            const { props } = this;\n            const { eventBands, moreLinkBand } = this.buildPrintBands(props.fgEventSegs, props.tDateProfile, props.slotWidth);\n            return (jsxRuntime.jsxs(\"div\", { className: classNames__default[\"default\"].noShrink, children: [eventBands.map((band) => (jsxRuntime.jsx(TimelinePrintEventBand, { band: band, heightRefMap: this.printHeights.segHeightRefMap, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, eventSelection: props.eventSelection, dateSpanProps: props.dateSpanProps, renderProps: props.renderProps, timeCanvasClipStart: props.timeCanvasClipStart }, band.levelIndex))), moreLinkBand && (jsxRuntime.jsx(TimelinePrintMoreLinkBand, { band: moreLinkBand, heightRefMap: this.printHeights.moreLinkHeightRefMap, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, eventSelection: props.eventSelection, dateSpanProps: props.dateSpanProps, renderProps: props.renderProps, timeCanvasClipStart: props.timeCanvasClipStart }))] }));\n        }\n    }\n    /** Renders one independently page-breakable Timeline print event band. */\n    function TimelinePrintEventBand(props) {\n        const { band } = props;\n        return (jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].rel, classNames__default[\"default\"].crop, classNames__default[\"default\"].breakInsideAvoid), style: { height: band.thickness }, children: band.slices.map((slice) => {\n                const { sourceSeg } = slice;\n                const seg = sourceSeg;\n                const { eventRange } = seg;\n                const { instanceId } = eventRange.instance;\n                const isSelected = instanceId === props.eventSelection;\n                return (jsxRuntime.jsx(protectedApi.MeasuredHeightHarness, { className: publicApi.joinClassNames(classNames__default[\"default\"].abs, isSelected ? classNames__default[\"default\"].z1000 : classNames__default[\"default\"].z1), style: {\n                        top: 0,\n                        insetInlineStart: slice.start - (props.timeCanvasClipStart ?? 0),\n                        width: slice.end - slice.start,\n                    }, heightRef: props.heightRefMap.createRef(sourceSeg.key), children: jsxRuntime.jsx(TimelineEvent, { isTimeScale: props.tDateProfile.isTimeScale, eventRange: eventRange, isStart: slice.isStart, isEnd: slice.isEnd, isDragging: false, isResizing: false, isMirror: false, isSelected: isSelected, renderProps: props.renderProps, ...protectedApi.getEventRangeMeta(eventRange, props.todayRange, props.nowDate, props.nowMs) }) }, sourceSeg.key));\n            }) }));\n    }\n    /** Renders Timeline's final independently page-breakable print more-link band. */\n    function TimelinePrintMoreLinkBand(props) {\n        const { band } = props;\n        return (jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].rel, classNames__default[\"default\"].crop, classNames__default[\"default\"].breakInsideAvoid), style: { height: band.thickness }, children: band.moreLinkGroups.map((group) => (jsxRuntime.jsx(protectedApi.MeasuredHeightHarness, { className: classNames__default[\"default\"].abs, style: {\n                    top: 0,\n                    insetInlineStart: group.start - (props.timeCanvasClipStart ?? 0),\n                    width: group.end - group.start,\n                }, heightRef: props.heightRefMap.createRef(group.key), children: jsxRuntime.jsx(TimelineLaneMoreLink, { hiddenSegs: group.hiddenSlices.map((slice) => slice.sourceSeg), dateProfile: props.dateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, isTimeScale: props.tDateProfile.isTimeScale, eventDrag: null, eventResize: null, eventSelection: props.eventSelection, dateSpanProps: props.dateSpanProps, renderProps: props.renderProps }) }, group.key))) }));\n    }\n\n    class TimelineSlatCell extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            // memo\n            this.getDateMeta = protectedApi.memoize(protectedApi.getDateMeta);\n            this.applyExactSlotMeta = protectedApi.memoize(applyExactSlotMeta);\n        }\n        render() {\n            let { props, context } = this;\n            let { dateEnv, options } = context;\n            let { date, tDateProfile, isMajor } = props;\n            let dateMeta = this.applyExactSlotMeta(this.getDateMeta(props.date, dateEnv, props.dateProfile, props.todayRange, props.nowDate), props.startMs, props.nowMs);\n            let isMinor = tDateProfile.isTimeScale &&\n                !protectedApi.isInt(dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, props.date, tDateProfile.labelInterval));\n            let renderProps = {\n                ...dateMeta,\n                isMajor,\n                isMinor,\n                view: context.viewApi,\n            };\n            return (jsxRuntime.jsx(protectedApi.ContentContainer, { tag: \"div\", className: publicApi.joinClassNames(classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, classNames__default[\"default\"].alignStart, // shrinks width of InnerContent\n                classNames__default[\"default\"].borderlessY, classNames__default[\"default\"].borderlessEnd, !props.borderStart && classNames__default[\"default\"].borderlessStart, classNames__default[\"default\"].internalTimelineSlot), attrs: {\n                    'data-date': dateEnv.formatIso(date, {\n                        omitTimeZoneOffset: true,\n                        omitTime: !tDateProfile.isTimeScale,\n                    }),\n                    ...(dateMeta.isToday ? { 'aria-current': 'date' } : {}),\n                }, style: {\n                    width: props.width,\n                }, renderProps: renderProps, generatorName: undefined, classNameGenerator: options.slotLaneClass, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount }));\n        }\n    }\n\n    class TimelineSlats extends protectedApi.BaseComponent {\n        render() {\n            let { props } = this;\n            let { tDateProfile, slotWidth, slatStartIndex, slatCount } = props;\n            const { timeAxis, slotDatesMajor } = tDateProfile;\n            let slots = timeAxis?.slots ?? tDateProfile.slotDates.map((date, i) => ({\n                date,\n                key: tDateProfile.slotKeys[i],\n                startMs: null,\n            }));\n            slatStartIndex = props.slatStartIndex || 0;\n            if (slatStartIndex || slatCount !== undefined) {\n                slots = slots.slice(slatStartIndex, slatStartIndex + slatCount);\n            }\n            return (jsxRuntime.jsx(\"div\", { \"aria-hidden\": true, className: publicApi.joinClassNames(classNames__default[\"default\"].flexRow, classNames__default[\"default\"].fillY), style: {\n                    height: props.height,\n                    width: (props.slotWidth ?? 0) * slots.length,\n                    insetInlineStart: -(props.clipStart ?? 0),\n                }, children: slots.map((slot, i) => {\n                    const slatIndex = slatStartIndex + i;\n                    return (jsxRuntime.jsx(TimelineSlatCell, { date: slot.date, startMs: slot.startMs, dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, isMajor: slotDatesMajor[slatIndex], borderStart: Boolean(slatIndex), \n                        // dimensions\n                        width: slotWidth }, slot.key));\n                }) }));\n        }\n    }\n\n    class TimelineLayoutPrint extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // refs\n            this.headerElRef = compat.createRef();\n        }\n        render() {\n            const { props, context } = this;\n            const { options, viewSpec } = context;\n            const { borderlessX, borderlessTop, borderlessBottom } = protectedApi.computeViewBorderless(options);\n            const { tDateProfile, nowDate, todayRange, slicedProps } = props;\n            const { cellRows } = tDateProfile;\n            const tableDisplayInfo = {\n                borderlessX,\n                borderlessTop,\n                borderlessBottom,\n                multiMonthColumns: 0,\n            };\n            const headerDividerClassName = protectedApi.generateClassName(options.slotHeaderDividerClass, {\n                inTableHeader: true,\n                options: { dayMinWidth: options.dayMinWidth },\n            });\n            return (jsxRuntime.jsxs(protectedApi.ViewContainer, { viewSpec: viewSpec, className: publicApi.joinClassNames(props.className, classNames__default[\"default\"].rel, classNames__default[\"default\"].crop, classNames__default[\"default\"].isolate), children: [jsxRuntime.jsxs(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].abs, classNames__default[\"default\"].start0, classNames__default[\"default\"].end0, classNames__default[\"default\"].pointerEventsNone, classNames__default[\"default\"].z0), style: {\n                            top: this.state.headerHeight ?? 0,\n                            // Compensates for Firefox miscomputing absolute height with repeated print headers.\n                            bottom: '-5%',\n                        }, children: [jsxRuntime.jsx(TimelineSlats, { dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, slotWidth: props.slotWidth, clipStart: props.timeCanvasClipStart }), jsxRuntime.jsx(TimelineBg, { tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, bgEventSegs: slicedProps.bgEventSegs, businessHourSegs: slicedProps.businessHourSegs, dateSelectionSegs: null, eventResizeSegs: null, slotWidth: props.slotWidth, clipStart: props.timeCanvasClipStart })] }), jsxRuntime.jsxs(\"table\", { className: publicApi.joinClassNames(protectedApi.generateClassName(options.tableClass, tableDisplayInfo), classNames__default[\"default\"].printTable, classNames__default[\"default\"].rel, classNames__default[\"default\"].z1), children: [jsxRuntime.jsxs(\"thead\", { ref: this.headerElRef, className: protectedApi.generateClassName(options.tableHeaderClass, {\n                                    ...tableDisplayInfo,\n                                    isSticky: false,\n                                }), children: [jsxRuntime.jsx(\"tr\", { children: jsxRuntime.jsx(\"th\", { className: publicApi.joinClassNames(classNames__default[\"default\"].noPadding, classNames__default[\"default\"].borderless, classNames__default[\"default\"].crop), children: jsxRuntime.jsx(\"div\", { className: classNames__default[\"default\"].rel, style: {\n                                                    width: props.canvasWidth,\n                                                    insetInlineStart: -props.timeCanvasClipStart,\n                                                }, children: cellRows.map((cells, rowIndex) => {\n                                                    const rowLevel = cellRows.length - rowIndex - 1;\n                                                    return (jsxRuntime.jsx(TimelineHeaderRow, { dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, rowLevel: rowLevel, cells: cells, slotWidth: props.slotWidth }, rowLevel));\n                                                }) }) }) }), jsxRuntime.jsx(\"tr\", { children: jsxRuntime.jsx(\"th\", { className: publicApi.joinClassNames(classNames__default[\"default\"].noPadding, headerDividerClassName) }) })] }), jsxRuntime.jsx(\"tbody\", { className: protectedApi.generateClassName(options.tableBodyClass, tableDisplayInfo), children: jsxRuntime.jsx(\"tr\", { children: jsxRuntime.jsxs(\"td\", { className: publicApi.joinClassNames(classNames__default[\"default\"].noPadding, classNames__default[\"default\"].borderless), children: [jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(options.timelineTopClass) }), jsxRuntime.jsx(TimelinePrintFg, { dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, fgEventSegs: slicedProps.fgEventSegs, eventSelection: slicedProps.eventSelection, slotWidth: props.slotWidth, timeCanvasClipStart: props.timeCanvasClipStart }), jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(options.timelineBottomClass) })] }) }) })] })] }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            this.disconnectHeaderHeight = protectedApi.watchHeight(this.headerElRef.current, (headerHeight) => {\n                if (!this._isUnmounting && headerHeight !== this.state.headerHeight) {\n                    this.setState({ headerHeight });\n                }\n            });\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.disconnectHeaderHeight?.();\n        }\n    }\n\n    class TimelineFg extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // memo\n            this.sortEventSegs = protectedApi.memoize(protectedApi.sortEventSegs);\n            this.buildSegSources = protectedApi.memoize(buildTimelineSegSources);\n            // refs\n            this.sliceHeightRefMap = new protectedApi.RefMap(() => {\n                protectedApi.afterSize(this.handleSegHeights);\n            });\n            this.moreLinkHeightRefMap = new protectedApi.RefMap(() => {\n                protectedApi.afterSize(this.handleMoreLinkHeights);\n            });\n            this.handleMoreLinkHeights = () => {\n                if (this._isUnmounting)\n                    return;\n                this.setState({ moreLinkHeightRev: this.moreLinkHeightRefMap.rev }); // will trigger rerender\n            };\n            this.handleSegHeights = () => {\n                if (this._isUnmounting)\n                    return;\n                this.setState({ segHeightRev: this.sliceHeightRefMap.rev });\n            };\n        }\n        render() {\n            let { props, context, sliceHeightRefMap, moreLinkHeightRefMap } = this;\n            let { options } = context;\n            let { tDateProfile } = props;\n            let mirrorSegs = (props.eventDrag ? props.eventDrag.segs : null) ||\n                (props.eventResize ? props.eventResize.segs : null) ||\n                [];\n            let fgSegs = this.sortEventSegs(props.fgEventSegs, options.eventOrder);\n            const projectionSizing = resolveTimelineEventProjectionSizing(props.slotWidth, options.eventMinWidth);\n            let sourceSegs = this.buildSegSources(fgSegs, projectionSizing.eventMinWidth, context.dateEnv, tDateProfile, projectionSizing.slotWidth, props.clipStart, props.clipEnd);\n            let placementResult = buildTimelineSegPlacements(sourceSegs, options.eventOrderStrict, options.eventMaxStack, sliceHeightRefMap.current, moreLinkHeightRefMap.current);\n            this.totalHeight = placementResult.contentHeight;\n            /*\n            An assumed slot width may paint, but it may not report a height upward. It would be wrong\n            until the width is measured. An empty lane waits for the width too, which stops it from\n            latching 0 before its events arrive.\n        \n            With virtualization, sourceSegs are only those within the horizontal clip, and the height is\n            reported from them. A resource row fits the events on screen, and shrinks after scrolling\n            past a tall stack, unlike without virtualization.\n            */\n            this.totalHeightSettled = props.slotWidth != null &&\n                placementResult.isSettled;\n            const hasListItems = Boolean(placementResult.renderSlices.length || placementResult.moreLinks.length);\n            return (jsxRuntime.jsxs(\"div\", { ...(hasListItems ? { role: 'list', 'aria-label': props.label } : {}), className: publicApi.joinClassNames(classNames__default[\"default\"].rel, classNames__default[\"default\"].noShrink), style: {\n                    height: placementResult.contentHeight,\n                }, children: [this.renderEventSlices(placementResult.renderSlices, placementResult.sliceCoords), this.renderMirrorSegs(mirrorSegs, placementResult.sliceCoords), this.renderMoreLinks(placementResult.moreLinks)] }));\n        }\n        renderEventSlices(renderSlices, sliceCoords) {\n            const { props } = this;\n            return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderSlices.map((slice) => {\n                    const key = protectedApi.getSliceKey(slice);\n                    const seg = slice.sourceSeg;\n                    const top = sliceCoords.get(key);\n                    const { eventRange } = seg;\n                    const { instanceId } = eventRange.instance;\n                    const isDragging = Boolean(props.eventDrag && props.eventDrag.affectedInstances[instanceId]);\n                    const isResizing = Boolean(props.eventResize && props.eventResize.affectedInstances[instanceId]);\n                    const isInvisible = isDragging || isResizing || top == null;\n                    const isSelected = instanceId === props.eventSelection;\n                    return (jsxRuntime.jsx(protectedApi.MeasuredHeightHarness, { attrs: { role: 'listitem' }, className: publicApi.joinClassNames(classNames__default[\"default\"].abs, isSelected ? classNames__default[\"default\"].z1000 : classNames__default[\"default\"].z1), style: {\n                            visibility: isInvisible ? 'hidden' : undefined,\n                            top,\n                            insetInlineStart: slice.start,\n                            width: slice.end - slice.start,\n                        }, heightRef: this.sliceHeightRefMap.createRef(key), children: jsxRuntime.jsx(TimelineEvent, { isTimeScale: props.tDateProfile.isTimeScale, eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: isDragging, isResizing: isResizing, isMirror: false, isSelected: isSelected, renderProps: props.renderProps, ...protectedApi.getEventRangeMeta(eventRange, props.todayRange, props.nowDate, props.nowMs) }) }, key));\n                }) }));\n        }\n        // Mirrors bypass normal-event admission so limits cannot hide them or create more links.\n        renderMirrorSegs(segs, fgSegTops) {\n            const { props, context } = this;\n            const projectionSizing = resolveTimelineEventProjectionSizing(props.slotWidth, context.options.eventMinWidth);\n            return segs.map((seg) => {\n                const { eventRange } = seg;\n                const { instanceId } = eventRange.instance;\n                const horizontal = computeSegHorizontals(seg, projectionSizing.eventMinWidth, context.dateEnv, props.tDateProfile, projectionSizing.slotWidth, props.clipStart, props.clipEnd);\n                const isDragging = Boolean(props.eventDrag && props.eventDrag.affectedInstances[instanceId]);\n                const isResizing = Boolean(props.eventResize && props.eventResize.affectedInstances[instanceId]);\n                const isSelected = instanceId === props.eventSelection;\n                return (jsxRuntime.jsx(protectedApi.MeasuredHeightHarness, { attrs: { 'aria-hidden': true }, className: publicApi.joinClassNames(classNames__default[\"default\"].abs, isSelected ? classNames__default[\"default\"].z1000 : classNames__default[\"default\"].z1), style: {\n                        top: fgSegTops.get(instanceId) ?? 0,\n                        insetInlineStart: horizontal?.start,\n                        width: horizontal && horizontal.end - horizontal.start,\n                    }, children: jsxRuntime.jsx(TimelineEvent, { isTimeScale: props.tDateProfile.isTimeScale, eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: isDragging, isResizing: isResizing, isMirror: true, isSelected: isSelected, renderProps: props.renderProps, ...protectedApi.getEventRangeMeta(eventRange, props.todayRange, props.nowDate, props.nowMs) }) }, instanceId));\n            });\n        }\n        renderMoreLinks(moreLinks) {\n            const { props, moreLinkHeightRefMap } = this;\n            return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: moreLinks.map((moreLink) => (jsxRuntime.jsx(protectedApi.MeasuredHeightHarness, { attrs: { role: 'listitem' }, className: classNames__default[\"default\"].abs, style: {\n                        top: moreLink.top,\n                        insetInlineStart: moreLink.start,\n                        width: moreLink.end - moreLink.start,\n                    }, heightRef: moreLinkHeightRefMap.createRef(moreLink.key), children: jsxRuntime.jsx(TimelineLaneMoreLink, { hiddenSegs: moreLink.segs, dateProfile: props.dateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, isTimeScale: props.tDateProfile.isTimeScale, eventDrag: props.eventDrag, eventResize: props.eventResize, eventSelection: props.eventSelection, dateSpanProps: props.dateSpanProps, renderProps: props.renderProps }) }, moreLink.key))) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            this.fireHeight(); // could be ready to fire if zero events and zero height\n        }\n        componentDidUpdate() {\n            this.fireHeight();\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.firedTotalHeight = undefined;\n            protectedApi.setRef(this.props.heightRef, null);\n        }\n        fireHeight() {\n            if (this.totalHeightSettled &&\n                this.totalHeight !== this.firedTotalHeight) {\n                this.firedTotalHeight = this.totalHeight;\n                protectedApi.setRef(this.props.heightRef, this.totalHeight);\n            }\n        }\n    }\n\n    /*\n    TODO: DRY with other NowIndicator components\n    */\n    class TimelineNowIndicatorArrow extends protectedApi.BaseComponent {\n        render() {\n            const { props, context } = this;\n            const nowDate = context.dateEnv.timestampToMarker(props.nowMs);\n            const xStyle = props.slotWidth == null\n                ? {}\n                : {\n                    insetInlineStart: props.tDateProfile.timeAxis\n                        ? msToCoord(props.nowMs, props.tDateProfile, props.slotWidth)\n                        : dateToCoord(nowDate, context.dateEnv, props.tDateProfile, props.slotWidth)\n                };\n            return (jsxRuntime.jsx(\"div\", { \n                // crop any overflow that the arrow/line might cause\n                // TODO: just do this on the entire canvas within the scroller\n                className: publicApi.joinClassNames(classNames__default[\"default\"].fill, classNames__default[\"default\"].crop, classNames__default[\"default\"].pointerEventsNone, classNames__default[\"default\"].z2), children: jsxRuntime.jsx(protectedApi.NowIndicatorHeaderContainer, { className: classNames__default[\"default\"].abs, style: xStyle, date: nowDate }) }));\n        }\n    }\n\n    class TimelineNowIndicatorLine extends protectedApi.BaseComponent {\n        render() {\n            const { props, context } = this;\n            const clipStart = props.clipStart ?? 0;\n            const nowDate = context.dateEnv.timestampToMarker(props.nowMs);\n            const xStyle = props.slotWidth == null\n                ? {}\n                : {\n                    insetInlineStart: (props.tDateProfile.timeAxis\n                        ? msToCoord(props.nowMs, props.tDateProfile, props.slotWidth)\n                        : dateToCoord(nowDate, context.dateEnv, props.tDateProfile, props.slotWidth)) - clipStart\n                };\n            return (jsxRuntime.jsxs(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].fill, classNames__default[\"default\"].pointerEventsNone, classNames__default[\"default\"].z2), children: [jsxRuntime.jsx(protectedApi.NowIndicatorLineContainer, { className: publicApi.joinClassNames(classNames__default[\"default\"].fillY, classNames__default[\"default\"].noMarginY, classNames__default[\"default\"].borderlessY), style: xStyle, date: nowDate }), jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].flexCol, // better for negative margins\n                        classNames__default[\"default\"].fillY), style: xStyle, children: jsxRuntime.jsx(\"div\", { \n                            // stickiness on NowIndicatorDot misbehaves b/c of negative marginss\n                            className: classNames__default[\"default\"].stickyT, children: jsxRuntime.jsx(protectedApi.NowIndicatorDot, {}) }) })] }));\n        }\n    }\n\n    function getTimelineSlotEl(parentEl, index) {\n        return parentEl.querySelectorAll(`.${classNames__default[\"default\"].internalTimelineSlot}`)[index];\n    }\n\n    class TimelineLayoutNormal extends protectedApi.DateComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // refs\n            this.headerScrollerRef = compat.createRef();\n            this.bodyScrollerRef = compat.createRef();\n            this.footerScrollerRef = compat.createRef();\n            this.headerRowInnerWidthMap = new protectedApi.RefMap(() => {\n                protectedApi.afterSize(this.handleSlotInnerWidths);\n            });\n            this.scroll = {};\n            this.handleSlotInnerWidths = () => {\n                if (this._isUnmounting)\n                    return;\n                const headerSlotInnerWidth = this.headerRowInnerWidthMap.current.get(this.props.tDateProfile.cellRows.length - 1);\n                if (headerSlotInnerWidth != null) {\n                    protectedApi.setRef(this.props.slotInnerWidthRef, headerSlotInnerWidth);\n                }\n            };\n            this.handleTotalWidth = (totalWidth) => {\n                if (this._isUnmounting)\n                    return;\n                this.setState({ totalWidth });\n            };\n            this.handleTimeScrollRequest = (scrollTime) => {\n                this.scroll.time = scrollTime;\n                this.scroll.x = undefined;\n                this.applyTimeScroll();\n            };\n            this.handleTimeScrollStart = (isDevice) => {\n                if (isDevice) {\n                    this.scroll.x = undefined;\n                    this.scroll.time = undefined;\n                }\n            };\n            this.handleTimeScrollEnd = (isDevice) => {\n                if (isDevice) {\n                    this.scroll.x = this.syncedScroller.x;\n                    this.scroll.time = undefined;\n                }\n                protectedApi.setRef(this.props.scrollRef, this.scroll);\n            };\n            this.handleBodyEl = (el) => {\n                this.bodyEl = el;\n                if (el) {\n                    this.context.registerInteractiveComponent(this, { el });\n                }\n                else {\n                    this.context.unregisterInteractiveComponent(this);\n                }\n            };\n        }\n        render() {\n            const { props, state, context } = this;\n            const { options } = context;\n            const { borderlessX, borderlessTop, borderlessBottom } = protectedApi.computeViewBorderless(options);\n            const { tDateProfile, nowDate, todayRange, slicedProps, slotWidth, canvasWidth } = props;\n            const { cellRows } = tDateProfile;\n            const verticalScrolling = !protectedApi.getIsHeightAuto(options);\n            const tableHeaderSticky = protectedApi.getTableHeaderSticky(options);\n            const footerScrollbarSticky = protectedApi.getFooterScrollbarSticky(options);\n            const endScrollbarWidth = (state.totalWidth != null && props.clientWidth != null)\n                ? state.totalWidth - props.clientWidth\n                : undefined;\n            // When the canvas fits without scrolling, scrollTo() is a no-op that fires no scroll event,\n            // so an uncapped time-based scroll would linger in scrollRef and print would clip the\n            // leading slots (#8093)\n            this.maxHScroll = (canvasWidth != null && props.clientWidth != null)\n                ? Math.max(0, canvasWidth - props.clientWidth)\n                : undefined;\n            const enableNowIndicator = options.nowIndicator &&\n                slotWidth != null &&\n                isNowInTimelineRange(nowDate, props.dateProfile, tDateProfile);\n            return (jsxRuntime.jsxs(protectedApi.ViewContainer, { viewSpec: context.viewSpec, className: publicApi.joinClassNames(classNames__default[\"default\"].flexCol, props.className, protectedApi.generateClassName(options.tableClass, {\n                    borderlessX,\n                    borderlessTop,\n                    borderlessBottom,\n                    multiMonthColumns: 0,\n                }), classNames__default[\"default\"].isolate), children: [jsxRuntime.jsxs(\"div\", { className: publicApi.joinClassNames(protectedApi.generateClassName(options.tableHeaderClass, {\n                            isSticky: tableHeaderSticky,\n                            borderlessX,\n                            borderlessTop,\n                            borderlessBottom,\n                            multiMonthColumns: 0,\n                        }), classNames__default[\"default\"].flexCol, tableHeaderSticky && classNames__default[\"default\"].tableHeaderSticky, classNames__default[\"default\"].z1), children: [jsxRuntime.jsxs(protectedApi.Scroller, { horizontal: true, hideScrollbars: true, className: classNames__default[\"default\"].flexRow, ref: this.headerScrollerRef, children: [jsxRuntime.jsxs(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].rel, canvasWidth == null && classNames__default[\"default\"].liquid), style: { width: canvasWidth }, children: [cellRows.map((cells, rowIndex) => {\n                                                const rowLevel = cellRows.length - rowIndex - 1;\n                                                return (jsxRuntime.jsx(TimelineHeaderRow, { dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, rowLevel: rowLevel, cells: cells, slotWidth: slotWidth, innerWidthRef: this.headerRowInnerWidthMap.createRef(rowIndex) }, rowIndex));\n                                            }), enableNowIndicator && (jsxRuntime.jsx(TimelineNowIndicatorArrow, { tDateProfile: tDateProfile, nowMs: props.nowMs, slotWidth: slotWidth }))] }), Boolean(endScrollbarWidth) && (jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(protectedApi.generateClassName(options.fillerClass, { inTableHeader: true }), classNames__default[\"default\"].borderlessY, classNames__default[\"default\"].borderlessEnd), style: { minWidth: endScrollbarWidth } }))] }), jsxRuntime.jsx(\"div\", { className: protectedApi.generateClassName(options.slotHeaderDividerClass, {\n                                    inTableHeader: true,\n                                    options: { dayMinWidth: options.dayMinWidth },\n                                }) })] }), jsxRuntime.jsx(protectedApi.Scroller, { vertical: verticalScrolling, horizontal: true, hideScrollbars: footerScrollbarSticky, className: publicApi.joinClassNames(protectedApi.generateClassName(options.tableBodyClass, {\n                            borderlessX,\n                            borderlessTop,\n                            borderlessBottom,\n                            multiMonthColumns: 0,\n                        }), classNames__default[\"default\"].flexCol, verticalScrolling && classNames__default[\"default\"].liquid, classNames__default[\"default\"].z0), ref: this.bodyScrollerRef, clientWidthRef: props.clientWidthRef, children: jsxRuntime.jsxs(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].rel, classNames__default[\"default\"].grow), style: { width: canvasWidth }, ref: this.handleBodyEl, children: [jsxRuntime.jsx(TimelineSlats, { dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, slotWidth: slotWidth }), jsxRuntime.jsx(TimelineBg, { tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, bgEventSegs: slicedProps.bgEventSegs, businessHourSegs: slicedProps.businessHourSegs, dateSelectionSegs: slicedProps.dateSelectionSegs, eventResizeSegs: slicedProps.eventResize ? slicedProps.eventResize.segs : null, slotWidth: slotWidth }), jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(options.timelineTopClass) }), jsxRuntime.jsx(TimelineFg, { dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, fgEventSegs: slicedProps.fgEventSegs, eventDrag: slicedProps.eventDrag, eventResize: slicedProps.eventResize, eventSelection: slicedProps.eventSelection, label: options.eventsHint, slotWidth: slotWidth }), jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(options.timelineBottomClass) }), enableNowIndicator && (jsxRuntime.jsx(TimelineNowIndicatorLine, { tDateProfile: tDateProfile, nowMs: props.nowMs, slotWidth: slotWidth }))] }) }), Boolean(footerScrollbarSticky) && (jsxRuntime.jsx(protectedApi.FooterScrollbar, { isSticky: true, canvasWidth: canvasWidth, scrollerRef: this.footerScrollerRef })), jsxRuntime.jsx(protectedApi.Ruler, { widthRef: this.handleTotalWidth })] }));\n        }\n        componentDidMount() {\n            const { props, context } = this;\n            this._isUnmounting = false;\n            this.syncedScroller = new ScrollerSyncer(true); // horizontal=true\n            this.updateSyncedScroller();\n            if (props.initialScroll) {\n                this.scroll = { ...props.initialScroll };\n                this.applyTimeScroll();\n            }\n            else {\n                this.resetScroll();\n            }\n            context.emitter.on('_timeScrollRequest', this.handleTimeScrollRequest);\n            this.syncedScroller.addScrollStartListener(this.handleTimeScrollStart);\n            this.syncedScroller.addScrollEndListener(this.handleTimeScrollEnd);\n        }\n        componentDidUpdate(prevProps) {\n            const { props } = this;\n            const { options } = this.context;\n            this.updateSyncedScroller();\n            const dateProfileChange = prevProps.dateProfile !== props.dateProfile;\n            const slotWidthChange = prevProps.slotWidth !== props.slotWidth;\n            const clientWidthChange = prevProps.clientWidth !== props.clientWidth;\n            if (dateProfileChange || slotWidthChange || clientWidthChange) {\n                if (dateProfileChange && options.scrollTimeReset) {\n                    this.resetScroll();\n                }\n                else {\n                    this.applyTimeScroll();\n                }\n            }\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.syncedScroller.destroy();\n            this.context.emitter.off('_timeScrollRequest', this.handleTimeScrollRequest);\n            this.syncedScroller.removeScrollStartListener(this.handleTimeScrollStart);\n            this.syncedScroller.removeScrollEndListener(this.handleTimeScrollEnd);\n        }\n        updateSyncedScroller() {\n            this.syncedScroller.handleChildren([\n                this.headerScrollerRef.current,\n                this.bodyScrollerRef.current,\n                this.footerScrollerRef.current,\n            ]);\n        }\n        resetScroll() {\n            this.handleTimeScrollRequest(this.context.options.scrollTime);\n        }\n        applyTimeScroll() {\n            const x = this.computeTimeScroll();\n            if (x != null) {\n                this.syncedScroller.scrollTo({ x });\n                if (this.scroll.x !== x) {\n                    this.scroll.x = x;\n                    protectedApi.setRef(this.props.scrollRef, this.scroll);\n                }\n            }\n        }\n        computeTimeScroll() {\n            const { props, context, scroll } = this;\n            let { x } = scroll;\n            if (x == null && scroll.time != null && props.slotWidth != null) {\n                x = timeToCoord(scroll.time, context.dateEnv, props.dateProfile, props.tDateProfile, props.slotWidth);\n                if (x) {\n                    x += 1; // overcome border. TODO: DRY this up\n                }\n            }\n            if (x !== undefined && this.maxHScroll !== undefined) {\n                x = Math.min(this.maxHScroll, x);\n            }\n            return x;\n        }\n        queryHit(isRtl, positionLeft, positionTop, elWidth, elHeight) {\n            const { props, context } = this;\n            if (props.slotWidth) {\n                const hitData = computeTimelineHitData(positionLeft, elWidth, props.slotWidth, isRtl, props.tDateProfile, context.dateEnv);\n                if (!hitData) {\n                    return null;\n                }\n                return {\n                    dateProfile: props.dateProfile,\n                    dateSpan: hitData.dateSpan,\n                    rect: {\n                        ...hitData.rect,\n                        top: 0,\n                        bottom: elHeight,\n                    },\n                    getDayEl: () => getTimelineSlotEl(this.bodyEl, hitData.slatIndex),\n                    layer: 0,\n                };\n            }\n            return null;\n        }\n    }\n\n    class TimelineView extends protectedApi.DateComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // memoized\n            this.buildTimelineDateProfile = protectedApi.memoize(buildTimelineDateProfile);\n            this.computeSlotWidth = protectedApi.memoize(computeSlotWidth);\n            // ref\n            this.scrollRef = compat.createRef();\n            this.slicer = new TimelineLaneSlicer();\n            // Sizing\n            // -----------------------------------------------------------------------------------------------\n            this.handleSlotInnerWidth = (slotInnerWidth) => {\n                if (this._isUnmounting)\n                    return;\n                if (slotInnerWidth != null && slotInnerWidth !== this.state.slotInnerWidth) {\n                    this.setState({ slotInnerWidth });\n                }\n            };\n            this.handleClientWidth = (clientWidth) => {\n                if (this._isUnmounting)\n                    return;\n                if (clientWidth != null && clientWidth !== this.state.clientWidth) {\n                    this.setState({ clientWidth });\n                }\n            };\n        }\n        render() {\n            const { props, state, context } = this;\n            const { options } = context;\n            const { clientWidth } = state;\n            /* date */\n            const tDateProfile = this.buildTimelineDateProfile(props.dateProfile, context.dateEnv, options, context.dateProfileGenerator);\n            let { unit: timerUnit, value: timerUnitValue } = protectedApi.greatestDurationDenominator(tDateProfile.slotDuration);\n            /* table positions */\n            const [canvasWidth, slotWidth] = this.computeSlotWidth(tDateProfile.slotCnt, tDateProfile.slotsPerLabel, options.slotMinWidth, state.slotInnerWidth, // is ACTUALLY the label width. rename?\n            clientWidth);\n            /* sliced */\n            let slicedProps = this.slicer.sliceProps(props, props.dateProfile, tDateProfile.isTimeScale ? null : options.nextDayThreshold, context, // wish we didn't have to pass in the rest of the args...\n            props.dateProfile, context.dateProfileGenerator, tDateProfile, context.dateEnv);\n            return (jsxRuntime.jsx(protectedApi.NowTimer, { unit: timerUnit, unitValue: timerUnitValue, children: (nowDate, todayRange, nowMs) => {\n                    const baseProps = {\n                        className: props.className,\n                        dateProfile: props.dateProfile,\n                        tDateProfile,\n                        nowDate,\n                        nowMs,\n                        todayRange,\n                        slicedProps,\n                        canvasWidth,\n                        slotWidth,\n                    };\n                    return props.forPrint ? (jsxRuntime.jsx(TimelineLayoutPrint, { ...baseProps, timeCanvasClipStart: this.scrollRef.current?.x ?? 0 })) : (jsxRuntime.jsx(TimelineLayoutNormal, { ...baseProps, clientWidth: clientWidth, clientWidthRef: this.handleClientWidth, slotInnerWidthRef: this.handleSlotInnerWidth, initialScroll: this.scrollRef.current ?? undefined, scrollRef: this.scrollRef }));\n                } }));\n        }\n        // Lifecycle\n        // -----------------------------------------------------------------------------------------------\n        componentDidMount() {\n            this._isUnmounting = false;\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n        }\n    }\n\n    var timelinePlugin = {\n        name: 'timeline',\n        premiumReleaseDate: '2026-11-12',\n        deps: [premiumCommonPlugin],\n        initialView: 'timelineDay',\n        views: {\n            timeline: {\n                component: TimelineView,\n                usesMinMaxTime: true,\n                eventResizableFromStart: true, // how is this consumed for TimelineView tho?\n            },\n            timelineDay: {\n                type: 'timeline',\n                duration: { days: 1 },\n            },\n            timelineWeek: {\n                type: 'timeline',\n                duration: { weeks: 1 },\n            },\n            timelineMonth: {\n                type: 'timeline',\n                duration: { months: 1 },\n            },\n            timelineYear: {\n                type: 'timeline',\n                duration: { years: 1 },\n            },\n        },\n    };\n\n    class ResourceDayTimeColsJoiner extends VResourceJoiner {\n        transformSeg(seg, resourceDayTable, resourceI) {\n            let dateI = seg.col;\n            let col = resourceDayTable.computeCol(dateI, resourceI);\n            if (col === -1) {\n                return [];\n            }\n            return [\n                {\n                    ...seg,\n                    col,\n                },\n            ];\n        }\n    }\n\n    class ResourceTimeGridView extends protectedApi.DateComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // memo\n            this.filterResourceStore = protectedApi.memoize(filterResourceStore);\n            this.flattenResources = protectedApi.memoize(flattenResources);\n            this.buildDaySeries = protectedApi.memoize((dateProfile, dateProfileGenerator) => (new protectedApi.DaySeriesModel(dateProfile.renderRange, dateProfileGenerator)));\n            this.buildDayCols = protectedApi.memoize(protectedApi.buildDayColsFromSeries);\n            this.extractDayRanges = protectedApi.memoize((dayCols) => dayCols.map((dayCol) => dayCol.range));\n            this.computeHasEventsByDate = protectedApi.memoize(computeHasEventsByDate);\n            this.buildResourceTableModel = protectedApi.memoize(buildResourceTableModel);\n            this.buildResourceRowConfigs = protectedApi.memoize(buildResourceRowConfigs);\n            this.buildBlankRenderProps = protectedApi.memoize(buildBlankDayLaneProps);\n            this.createDayHeaderFormatter = protectedApi.memoize(protectedApi.createDayHeaderFormatter);\n            // internal\n            this.allDaySplitter = new protectedApi.AllDaySplitter();\n            // for all-day-resource props\n            this.allDayResourceSplitter = new VResourceSplitter();\n            this.allDayResourceSlicers = {};\n            this.allDayResourceJoiner = new ResourceDayTableJoiner();\n            this.timedResourceSplitter = new VResourceSplitter();\n            this.timedResourceSlicers = {};\n            this.timedResourceJoiner = new ResourceDayTimeColsJoiner();\n            // timed-only column splitting\n            this.splitFgEventSegs = protectedApi.memoize(protectedApi.organizeSegsByCol);\n            this.splitBgEventSegs = protectedApi.memoize(protectedApi.organizeSegsByCol);\n            this.splitBusinessHourSegs = protectedApi.memoize(protectedApi.organizeSegsByCol);\n            this.splitNowIndicatorSegs = protectedApi.memoize(protectedApi.organizeSegsByCol);\n            this.splitDateSelectionSegs = protectedApi.memoize(protectedApi.organizeSegsByCol);\n            this.splitEventDrag = protectedApi.memoize(protectedApi.splitInteractionByCol);\n            this.splitEventResize = protectedApi.memoize(protectedApi.splitInteractionByCol);\n            this.isHitComboAllowed = (hit0, hit1) => {\n                let allowAcrossResources = this.dayRanges.length === 1;\n                return this.resourceDayTableModel.isHitComboAllowed(hit0, hit1, allowAcrossResources);\n            };\n        }\n        render() {\n            let { props, context } = this;\n            let { options, dateEnv } = context;\n            let { dateProfile } = props;\n            let resourceStore = this.filterResourceStore(props.resourceStore, options.filterResourcesWithEvents, props.rawEventStore, dateProfile.activeRange);\n            let resourceOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER;\n            let resources = this.flattenResources(resourceStore, resourceOrderSpecs);\n            let daySeries = this.buildDaySeries(dateProfile, context.dateProfileGenerator);\n            let dayCols = this.buildDayCols(daySeries, dateEnv, {\n                slotRange: dateProfile,\n                activeRange: dateProfile.activeRange,\n            });\n            let dayRanges = this.dayRanges = this.extractDayRanges(dayCols);\n            // an event must intersect a column's rendered range to earn a column there\n            let hasEventsByDate = options.filterResourcesWithEvents && dayCols.length > 1\n                ? this.computeHasEventsByDate(props.rawEventStore, resourceStore, dayCols)\n                : null;\n            let resourceDayTableModel = this.resourceDayTableModel = this.buildResourceTableModel(null, dayCols, resources, options.datesAboveResources, hasEventsByDate, context);\n            // split seg by all-day/timed\n            let splitProps = this.allDaySplitter.splitProps(props);\n            // split the all-day segs by resource\n            let allDayResourceSplitProps = this.allDayResourceSplitter.splitProps({\n                businessHours: splitProps.allDay.businessHours,\n                dateSelection: splitProps.allDay.dateSelection,\n                eventStore: splitProps.allDay.eventStore,\n                eventUiBases: splitProps.allDay.eventUiBases,\n                eventSelection: splitProps.allDay.eventSelection,\n                eventDrag: splitProps.allDay.eventDrag,\n                eventResize: splitProps.allDay.eventResize,\n                resourceDayTableModel,\n            });\n            this.allDayResourceSlicers = protectedApi.mapHash(allDayResourceSplitProps, (split, resourceId) => this.allDayResourceSlicers[resourceId] || new protectedApi.DaySeriesSlicer());\n            let allDayResourceSlicedProps = protectedApi.mapHash(this.allDayResourceSlicers, (slicer, resourceId) => slicer.sliceProps(allDayResourceSplitProps[resourceId], dateProfile, options.nextDayThreshold, context, daySeries));\n            let allDayResourceJoinedProps = this.allDayResourceJoiner.joinProps(allDayResourceSlicedProps, resourceDayTableModel);\n            // split the timed segs by resource\n            let timedResourceSplitProps = this.timedResourceSplitter.splitProps({\n                businessHours: splitProps.timed.businessHours,\n                dateSelection: splitProps.timed.dateSelection,\n                eventStore: splitProps.timed.eventStore,\n                eventUiBases: splitProps.timed.eventUiBases,\n                eventSelection: splitProps.timed.eventSelection, // result not used\n                eventDrag: splitProps.timed.eventDrag,\n                eventResize: splitProps.timed.eventResize,\n                resourceDayTableModel,\n            });\n            this.timedResourceSlicers = protectedApi.mapHash(timedResourceSplitProps, (split, resourceId) => this.timedResourceSlicers[resourceId] || new protectedApi.DayTimeColsSlicer());\n            let timedResourceSlicedProps = protectedApi.mapHash(this.timedResourceSlicers, (slicer, resourceId) => slicer.sliceProps(timedResourceSplitProps[resourceId], dateProfile, null, context, dayRanges));\n            let timedResourceJoinedProps = this.timedResourceJoiner.joinProps(timedResourceSlicedProps, resourceDayTableModel);\n            let datesRepDistinctDays = true;\n            let dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, resourceDayTableModel.colCount);\n            return (jsxRuntime.jsx(protectedApi.NowTimer, { unit: options.nowIndicator ? 'minute' : 'day' /* hacky */, children: (nowDate, todayRange, nowMs) => {\n                    // timed-only column splitting\n                    let colCount = resourceDayTableModel.colCount;\n                    let fgEventSegsByCol = this.splitFgEventSegs(timedResourceJoinedProps.fgEventSegs, colCount);\n                    let bgEventSegsByCol = this.splitBgEventSegs(timedResourceJoinedProps.bgEventSegs, colCount);\n                    let businessHourSegsByCol = this.splitBusinessHourSegs(timedResourceJoinedProps.businessHourSegs, colCount);\n                    let nowIndicatorSegsByCol = this.splitNowIndicatorSegs((() => {\n                        // was buildNowIndicatorSegs\n                        let nonResourceSegs = !props.forPrint && options.nowIndicator\n                            ? this.timedResourceSlicers[''].sliceNowDate(nowDate, this.props.dateProfile, this.context.options.nextDayThreshold, this.context, this.dayRanges)\n                            : []; // TODO: breaks memoization?\n                        const expandedSegs = this.timedResourceJoiner.expandSegs(resourceDayTableModel, nonResourceSegs);\n                        const dayCnt = dayCols.length;\n                        return expandedSegs.map((seg) => ({\n                            ...seg,\n                            showDot: !options.datesAboveResources && dayCnt > 1\n                                ? true\n                                : resourceDayTableModel.dateFirstCols[resourceDayTableModel.cols[seg.col].dateI] === seg.col,\n                        }));\n                    })(), colCount);\n                    let dateSelectionSegsByCol = this.splitDateSelectionSegs(timedResourceJoinedProps.dateSelectionSegs, colCount);\n                    let eventDragByCol = this.splitEventDrag(timedResourceJoinedProps.eventDrag, colCount);\n                    let eventResizeByCol = this.splitEventResize(timedResourceJoinedProps.eventResize, colCount);\n                    const headerTiers = this.buildResourceRowConfigs(resourceDayTableModel, datesRepDistinctDays, props.dateProfile, todayRange, dayHeaderFormat, context, options.dayLaneClass, this.buildBlankRenderProps(protectedApi.computeTimeGridPrintMode(props.forPrint, options.eventPrintLayout) === 'stack'));\n                    return (jsxRuntime.jsx(protectedApi.TimeGridLayout, { labelId: props.labelId, labelStr: props.labelStr, dateProfile: dateProfile, nowDate: nowDate, nowMs: nowMs, todayRange: todayRange, cells: resourceDayTableModel.cols, forPrint: props.forPrint, isHitComboAllowed: this.isHitComboAllowed, className: props.className, \n                        // header content\n                        headerTiers: headerTiers, \n                        // all-day content\n                        fgEventSegs: allDayResourceJoinedProps.fgEventSegs, bgEventSegs: allDayResourceJoinedProps.bgEventSegs, businessHourSegs: allDayResourceJoinedProps.businessHourSegs, dateSelectionSegs: allDayResourceJoinedProps.dateSelectionSegs, eventDrag: allDayResourceJoinedProps.eventDrag, eventResize: allDayResourceJoinedProps.eventResize, \n                        // timed content\n                        fgEventSegsByCol: fgEventSegsByCol, bgEventSegsByCol: bgEventSegsByCol, businessHourSegsByCol: businessHourSegsByCol, nowIndicatorSegsByCol: nowIndicatorSegsByCol, dateSelectionSegsByCol: dateSelectionSegsByCol, eventDragByCol: eventDragByCol, eventResizeByCol: eventResizeByCol, \n                        // universal content\n                        eventSelection: allDayResourceJoinedProps.eventSelection || splitProps.timed.eventSelection }));\n                } }));\n        }\n    }\n    // Extra DayLaneInfo props for the blank header's dayLaneClass hook.\n    // buildResourceRowConfigs supplies the shared date props.\n    function buildBlankDayLaneProps(isStack) {\n        return { isStack };\n    }\n\n    var resourceTimeGridPlugin = {\n        name: 'resource-timegrid',\n        premiumReleaseDate: '2026-11-12',\n        deps: [\n            premiumCommonPlugin,\n            timeGridPlugin__default[\"default\"],\n            resourcePlugin,\n            resourceDayGridPlugin,\n        ],\n        initialView: 'resourceTimeGridDay',\n        views: {\n            resourceTimeGrid: {\n                type: 'timeGrid', // will inherit this configuration\n                component: ResourceTimeGridView,\n                needsResourceData: true,\n            },\n            resourceTimeGridDay: {\n                type: 'resourceTimeGrid',\n                duration: { days: 1 },\n            },\n            resourceTimeGridWeek: {\n                type: 'resourceTimeGrid',\n                duration: { weeks: 1 },\n            },\n        },\n    };\n\n    function fracToCssDim(frac) {\n        return frac * 100 + '%';\n    }\n\n    function parseDimConfig(input, minDim = 0) {\n        if (input != null) {\n            if (typeof input === 'string') {\n                let m = input.match(/^(.*)(%|px)$/);\n                if (m) {\n                    const num = parseFloat(m[1]);\n                    if (!isNaN(num)) {\n                        if (m[2] === '%') {\n                            return { pixels: 0, frac: num / 100, min: minDim };\n                        }\n                        else {\n                            return { pixels: num, frac: 0, min: minDim };\n                        }\n                    }\n                }\n            }\n            else if (typeof input === 'number' && !isNaN(input)) {\n                return { pixels: input, frac: 0, min: minDim };\n            }\n        }\n    }\n    /*\n    A sibling without a parsed width grows to fill the space\n    */\n    function toSiblingDimConfig(dimConfig, grow, minDim) {\n        return dimConfig\n            ? { ...dimConfig, grow: grow || 0 }\n            : { pixels: 0, frac: 0, grow: grow || 1, min: minDim };\n    }\n    /*\n    Ensure at least one column can grow\n    Mutates in-place\n    */\n    function ensureDimConfigsGrow(dimConfigs) {\n        for (const dimConfig of dimConfigs) {\n            if (dimConfig.grow) {\n                return;\n            }\n        }\n        // make all expand equally\n        for (const dimConfig of dimConfigs) {\n            dimConfig.grow = 1;\n        }\n    }\n    function pixelizeDimConfigs(dimConfigs, clientDim) {\n        const pixelDims = [];\n        let preGrowTotal = 0;\n        let growDenom = 0;\n        for (const dimConfig of dimConfigs) {\n            const constrainedPixels = Math.max(dimConfig.pixels + (dimConfig.frac * clientDim), dimConfig.min);\n            pixelDims.push(constrainedPixels);\n            preGrowTotal += constrainedPixels;\n            growDenom += dimConfig.grow;\n        }\n        if (preGrowTotal < clientDim) {\n            const remainder = clientDim - preGrowTotal;\n            for (let i = 0; i < dimConfigs.length; i++) {\n                pixelDims[i] += remainder * (dimConfigs[i].grow / growDenom);\n            }\n        }\n        return [pixelDims, preGrowTotal];\n    }\n    function serializeDimConfig({ pixels, frac }) {\n        if (!frac) {\n            return pixels;\n        }\n        if (!pixels) {\n            return fracToCssDim(frac);\n        }\n        return `calc(${fracToCssDim(frac)} + ${pixels}px)`;\n    }\n    function resizeSiblingDimConfig(dimConfigs, pixelDims, clientDim, resizeIndex, resizeDim) {\n        const newDimConfigs = [];\n        for (let i = 0; i < resizeIndex; i++) {\n            newDimConfigs.push(resizeDimConfig(dimConfigs[i], pixelDims[i], clientDim));\n        }\n        newDimConfigs.push(resizeDimConfig(dimConfigs[resizeIndex], resizeDim, clientDim));\n        const len = dimConfigs.length;\n        let anyGrow = false;\n        for (let i = resizeIndex + 1; i < len; i++) {\n            const dimConfig = dimConfigs[i];\n            newDimConfigs.push(dimConfig);\n            if (dimConfig.grow) {\n                anyGrow = true;\n            }\n        }\n        if (!anyGrow) {\n            for (let i = resizeIndex + 1; i < len; i++) {\n                newDimConfigs[i] = Object.assign({}, newDimConfigs[i], { grow: 1 });\n            }\n        }\n        return newDimConfigs;\n    }\n    function resizeDimConfig(dimConfig, newPixels, clientDim) {\n        const { min } = dimConfig;\n        newPixels = Math.max(min, newPixels);\n        if (dimConfig.pixels) {\n            return { pixels: newPixels, frac: 0, grow: 0, min };\n        }\n        return { pixels: 0, frac: newPixels / clientDim, grow: 0, min };\n    }\n\n    const ROW_BORDER_WIDTH = 1;\n    // Resource/Group Verticals\n    // -------------------------------------------------------------------------------------------------\n    function computeHeights(siblingNodes, getEntityKey, getEntityHeight, minHeight) {\n        const heightMap = new Map();\n        let [totalHeight, expandableCount] = computeTightHeights(siblingNodes, getEntityKey, getEntityHeight, heightMap);\n        if (minHeight != null && minHeight > totalHeight) {\n            expandHeights(siblingNodes, getEntityKey, heightMap, (minHeight - totalHeight) / expandableCount);\n            totalHeight = minHeight;\n        }\n        return [heightMap, totalHeight];\n    }\n    function computeTightHeights(siblingNodes, getEntityKey, getEntityHeight, heightMap) {\n        let totalHeight = 0;\n        let expandableCount = 0;\n        for (const siblingNode of siblingNodes) {\n            const entityKey = getEntityKey(siblingNode.entity);\n            let ownHeight = getEntityHeight(entityKey) || 0;\n            const [childrenHeight, childrenExpandableCount] = computeTightHeights(siblingNode.children, getEntityKey, getEntityHeight, heightMap);\n            if (siblingNode.pooledHeight) { // 'own' is side-by-side with children\n                if (ownHeight > childrenHeight) {\n                    // children are smaller. grow them\n                    expandHeights(siblingNode.children, getEntityKey, heightMap, (ownHeight - childrenHeight) / childrenExpandableCount);\n                }\n                else {\n                    // own-element is smaller. grow to height of children\n                    ownHeight = childrenHeight;\n                }\n                totalHeight += ownHeight;\n            }\n            else { // 'own' is above children\n                totalHeight += ownHeight;\n                if (siblingNode.children.length) {\n                    totalHeight += ROW_BORDER_WIDTH + childrenHeight;\n                }\n            }\n            heightMap.set(entityKey, ownHeight);\n            // expandable?\n            // vertically stacked, and not a group\n            if (siblingNode.pooledHeight === undefined) {\n                expandableCount++;\n            }\n            expandableCount += childrenExpandableCount;\n        }\n        // borders between siblings\n        if (siblingNodes.length) {\n            totalHeight += ROW_BORDER_WIDTH * (siblingNodes.length - 1);\n        }\n        return [totalHeight, expandableCount];\n    }\n    function expandHeights(siblingNodes, getEntityKey, heightMap, expansion) {\n        for (const siblingNode of siblingNodes) {\n            // expandable?\n            // vertically stacked, and not a group\n            if (siblingNode.pooledHeight === undefined) {\n                const entityKey = getEntityKey(siblingNode.entity);\n                heightMap.set(entityKey, heightMap.get(entityKey) + expansion);\n            }\n            expandHeights(siblingNode.children, getEntityKey, heightMap, expansion);\n        }\n    }\n    function computeTopsFromHeights(siblingNodes, getEntityKey, heightMap, initialTop = 0) {\n        const topMap = new Map();\n        computeTopsStartingAt(siblingNodes, getEntityKey, heightMap, topMap, initialTop);\n        return topMap;\n    }\n    function computeTopsStartingAt(siblingNodes, getEntityKey, heightMap, topMap, top) {\n        for (let i = 0; i < siblingNodes.length; i++) {\n            const siblingNode = siblingNodes[i];\n            const entityKey = getEntityKey(siblingNode.entity);\n            topMap.set(entityKey, top);\n            if (!siblingNode.pooledHeight) {\n                top += heightMap.get(entityKey) + ROW_BORDER_WIDTH;\n            }\n            top = computeTopsStartingAt(siblingNode.children, getEntityKey, heightMap, topMap, top);\n        }\n        return top;\n    }\n    function findEntityByCoord(siblingNodes, entityTops, // keyed by createEntityId\n    entityHeights, // keyed by createEntityId\n    coord, // assumed >= 0\n    createEntityId) {\n        for (const siblingNode of siblingNodes) {\n            const entityKey = createEntityId(siblingNode.entity);\n            const siblingOwnTop = entityTops.get(entityKey);\n            const siblingOwnHeight = entityHeights.get(entityKey);\n            // intersection of the sibling's own element?\n            if (siblingOwnTop + siblingOwnHeight > coord) {\n                if (siblingNode.pooledHeight) {\n                    // need more specific result\n                    return findEntityByCoord(siblingNode.children, entityTops, entityHeights, coord, createEntityId);\n                }\n                else {\n                    return [siblingNode.entity, siblingOwnTop, siblingOwnHeight];\n                }\n            }\n            else if (!siblingNode.pooledHeight) {\n                // search siblings below\n                const childrenRes = findEntityByCoord(siblingNode.children, entityTops, entityHeights, coord, createEntityId);\n                if (childrenRes) {\n                    return childrenRes;\n                }\n            }\n        }\n    }\n\n    /*\n    A \"layout\" wraps the resource/group entity with presentation information (indent, isExpanded, etc)\n    Creates a layout hierarchy (`layouts`) and flattened projections for each row type and all rows.\n    Filters away not-expanded nodes.\n\n    TODO: even when a row is collapsed, consistent global rowIndex\n    */\n    function buildResourceLayouts(hierarchy, hasNesting, expansions, expansionDefault) {\n        const flatResourceRowLayouts = [];\n        const flatGroupRowLayouts = [];\n        const flatGroupColLayouts = [];\n        const flatRowLayouts = [];\n        function processNodes(nodes, startingIndex, startingVisibleIndex, depth, rowDepth, indent, isVisible) {\n            const layouts = [];\n            let totalCnt = 0; // visible or not\n            let visibleCnt = 0;\n            // TODO: more DRY within\n            for (const node of nodes) {\n                // ResourceRow\n                if (node.resourceFields) {\n                    const isExpanded = expansions[node.entity.id] ?? expansionDefault;\n                    const rowIndex = startingIndex + totalCnt++;\n                    const visibleIndex = startingVisibleIndex + visibleCnt++;\n                    const resourceLayout = {\n                        rowIndex,\n                        visibleIndex,\n                        entity: node.entity,\n                        resourceFields: node.resourceFields,\n                        isExpanded,\n                        hasChildren: Boolean(node.children.length),\n                        depth,\n                        rowDepth,\n                        indent,\n                        children: [],\n                    };\n                    if (isVisible) {\n                        flatRowLayouts.push(resourceLayout);\n                        flatResourceRowLayouts.push(resourceLayout);\n                        layouts.push(resourceLayout);\n                    }\n                    const [localChildren, subtreeTotalCnt, subtreeVisibleCnt] = processNodes(node.children, startingIndex + totalCnt, startingVisibleIndex + visibleCnt, depth + 1, rowDepth + 1, indent + 1, isVisible && isExpanded);\n                    if (isVisible && isExpanded) {\n                        resourceLayout.children = localChildren;\n                        visibleCnt += subtreeVisibleCnt;\n                    }\n                    totalCnt += subtreeTotalCnt;\n                    // GroupCell\n                }\n                else if (node.pooledHeight) {\n                    const rowIndex = startingIndex + totalCnt; // DON'T advance\n                    const visibleIndex = startingVisibleIndex + visibleCnt; // DON'T advance\n                    const groupCellLayout = {\n                        rowIndex,\n                        visibleIndex,\n                        rowSpan: 0, // populated very soon...\n                        entity: node.entity,\n                        pooledHeight: true,\n                        children: [], // populates very soon...\n                    };\n                    if (isVisible) {\n                        (flatGroupColLayouts[depth] || (flatGroupColLayouts[depth] = []))\n                            .push(groupCellLayout);\n                        layouts.push(groupCellLayout);\n                    }\n                    const [localChildren, subtreeTotalCnt, subtreeVisibleCnt] = processNodes(node.children, startingIndex + totalCnt, startingVisibleIndex + visibleCnt, depth + 1, rowDepth, // do NOT advance\n                    indent, isVisible);\n                    if (isVisible) {\n                        groupCellLayout.children = localChildren;\n                        groupCellLayout.rowSpan = subtreeTotalCnt;\n                        visibleCnt += subtreeVisibleCnt;\n                    }\n                    totalCnt += subtreeTotalCnt;\n                    // GroupRow\n                }\n                else {\n                    const isExpanded = expansions[createGroupId(node.entity)] ?? expansionDefault;\n                    const rowIndex = startingIndex + totalCnt++;\n                    const visibleIndex = startingVisibleIndex + visibleCnt++;\n                    const groupRowLayout = {\n                        rowIndex,\n                        visibleIndex,\n                        entity: node.entity,\n                        pooledHeight: false,\n                        isExpanded,\n                        hasChildren: Boolean(node.children.length),\n                        depth,\n                        rowDepth,\n                        indent,\n                        children: [], // populates very soon...\n                    };\n                    if (isVisible) {\n                        flatRowLayouts.push(groupRowLayout);\n                        flatGroupRowLayouts.push(groupRowLayout);\n                        layouts.push(groupRowLayout);\n                    }\n                    const [localChildren, subtreeTotalCnt, subtreeVisibleCnt] = processNodes(node.children, startingIndex + totalCnt, startingVisibleIndex + visibleCnt, depth + 1, rowDepth + 1, indent + 1, isVisible && isExpanded);\n                    if (isVisible && isExpanded) {\n                        groupRowLayout.children = localChildren;\n                        visibleCnt += subtreeVisibleCnt;\n                    }\n                    totalCnt += subtreeTotalCnt;\n                }\n            }\n            return [layouts, totalCnt, visibleCnt];\n        }\n        const [layouts, totalCnt] = processNodes(hierarchy, 0, 0, 0, 0, hasNesting ? 1 : 0, true);\n        return {\n            layouts,\n            flatRowLayouts,\n            flatResourceRowLayouts,\n            flatGroupRowLayouts,\n            flatGroupColLayouts,\n            totalCnt,\n        };\n    }\n\n    function buildAriaCellId(prefix, rowIndex, colIndex) {\n        return `${prefix}-${rowIndex}-${colIndex}`;\n    }\n    // Without nesting, a table: there's no roving tabindex, and a grid makes JAWS switch to forms mode\n    // (arrow keys passed to the page, which ignores them) when focus lands on an event.\n    // With nesting, still a treegrid, the only role that conveys the hierarchy (aria-level/aria-expanded),\n    // until roving tabindex is implemented\n    function getAriaTableRole(hasNesting) {\n        return hasNesting ? 'treegrid' : 'table';\n    }\n    function getAriaCellRole(props) {\n        return props.inTreeGrid ? 'gridcell' : 'cell';\n    }\n    // Derives the cell's DOM id (referenced by proxy-row aria-owns) and aria-colindex from the same\n    // (prefix, rowIndex, colIndex) source, so the id and column attributes can never disagree.\n    function buildAriaCellAttrs(props) {\n        return {\n            id: (props.cellIdPrefix && props.cellRowIndex != null && props.cellColIndex != null)\n                ? buildAriaCellId(props.cellIdPrefix, props.cellRowIndex, props.cellColIndex)\n                : undefined,\n            'aria-colindex': props.cellColIndex != null ? 1 + props.cellColIndex : undefined,\n        };\n    }\n    // Renders visually hidden proxy rows that own cells split across the spreadsheet and timeline panes.\n    // The grid declares aria-colcount and every owned cell declares aria-colindex. Inference from the\n    // owned-cell order alone would misnumber rows covered by a vertically spanning group-column cell:\n    // only the first covered row owns the spanning cell, so later covered rows' first owned cell would\n    // be inferred as column 1 unless the AT applies aria-rowspan across proxy rows (unreliable).\n    function AriaProxyRows(props) {\n        const { cellIdPrefix, bodyRows, resourceColCnt, superHeaderRowSpan, hasNesting, } = props;\n        const totalHeaderRowSpan = 1 + superHeaderRowSpan;\n        const resourceHeaderCellIds = Array.from({ length: resourceColCnt }, (_value, colIndex) => {\n            return buildAriaCellId(cellIdPrefix, 1 + superHeaderRowSpan, colIndex);\n        });\n        const timelineHeaderCellId = buildAriaCellId(cellIdPrefix, 1, resourceColCnt);\n        return (jsxRuntime.jsxs(\"div\", { role: 'presentation', style: { position: 'absolute', width: 0, height: 0, overflow: 'hidden' }, children: [jsxRuntime.jsx(\"div\", { role: 'row', \"aria-rowindex\": 1, \"aria-owns\": superHeaderRowSpan\n                        ? `${buildAriaCellId(cellIdPrefix, 1, 0)} ${timelineHeaderCellId}`\n                        : [...resourceHeaderCellIds, timelineHeaderCellId].join(' ') }), Boolean(superHeaderRowSpan) && (jsxRuntime.jsx(\"div\", { role: 'row', \"aria-rowindex\": 2, \"aria-owns\": resourceHeaderCellIds.join(' ') })), bodyRows.map((ariaRow) => {\n                    const rowLayout = ariaRow.layout;\n                    const rowIndex = 1 + totalHeaderRowSpan + rowLayout.rowIndex;\n                    return (jsxRuntime.jsx(\"div\", { role: 'row', \"aria-rowindex\": rowIndex, \"aria-level\": hasNesting ? 1 + rowLayout.rowDepth : undefined, \"aria-expanded\": isEntityGroup(rowLayout.entity) || rowLayout.hasChildren\n                            ? rowLayout.isExpanded\n                            : undefined, \"aria-owns\": Array.from(ariaRow.colIndices)\n                            .sort((colIndex0, colIndex1) => colIndex0 - colIndex1)\n                            .map((colIndex) => buildAriaCellId(cellIdPrefix, rowIndex, colIndex))\n                            .join(' ') }, rowIndex));\n                })] }));\n    }\n    // Builds proxy body-row ownership from the independently virtualized cell sources.\n    // Only mounted cells are included, and cells from different panes accumulate on the same logical row.\n    function buildAriaBodyRows(flatRowLayouts, groupColPositions, rowPositions, groupColCnt, resourceColCnt) {\n        const ariaBodyRowMap = new Map();\n        // Merge a mounted cell into its logical owner row while avoiding duplicate column references.\n        const addCell = (rowLayout, colIndex) => {\n            let ariaRow = ariaBodyRowMap.get(rowLayout.visibleIndex);\n            if (!ariaRow) {\n                ariaRow = {\n                    layout: rowLayout,\n                    colIndices: new Set(),\n                };\n                ariaBodyRowMap.set(rowLayout.visibleIndex, ariaRow);\n            }\n            ariaRow.colIndices.add(colIndex);\n        };\n        // A vertically spanning group-column cell belongs to the first logical row it covers,\n        // mirroring HTML rowspan, where the spanned cell is a child of the first covered <tr>.\n        // Because the cell and the rows are virtualized independently, the owner row might be outside\n        // rowPositions while the spanning cell itself intersects the viewport (the cell covers later,\n        // mounted rows). We still emit a proxy row for that unmounted owner — it will own only the\n        // group cell, lacking the resource's naming rowheader and lane — because the alternative is\n        // worse: a mounted cell owned by no row surfaces as a stray direct child of the grid,\n        // breaking the table structure for assistive technology.\n        for (let colIndex = 0; colIndex < groupColPositions.length; colIndex += 1) {\n            for (const groupCellPosition of groupColPositions[colIndex]) {\n                addCell(flatRowLayouts[groupCellPosition.item.visibleIndex], colIndex);\n            }\n        }\n        // Add cells rendered once per mounted logical row. Group rows have one spreadsheet cell spanning\n        // the resource columns; resource rows have one cell per non-group spreadsheet column.\n        for (const rowPosition of rowPositions) {\n            const rowLayout = rowPosition.item;\n            if (isEntityGroup(rowLayout.entity)) {\n                addCell(rowLayout, 0);\n            }\n            else {\n                for (let colIndex = groupColCnt; colIndex < resourceColCnt; colIndex += 1) {\n                    addCell(rowLayout, colIndex);\n                }\n            }\n            // The timeline lane is the final column for both group and resource rows.\n            addCell(rowLayout, resourceColCnt);\n        }\n        // Collection begins with column-group cells, so map insertion order is not necessarily visual order.\n        // Proxy-row DOM order must match the visual vertical order.\n        return Array.from(ariaBodyRowMap.values()).sort((row0, row1) => {\n            return row0.layout.visibleIndex - row1.layout.visibleIndex;\n        });\n    }\n\n    /*\n    parallels the ResourceGroupHeaderCell\n    */\n    class GroupLane extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            // ref\n            this.innerElRef = compat.createRef();\n        }\n        render() {\n            let { props, context } = this;\n            let { group, forPrint } = props;\n            let groupSpec = group.spec; // type HACK\n            let renderProps = {\n                fieldValue: group.value,\n                view: context.viewApi,\n            };\n            return (jsxRuntime.jsx(protectedApi.ContentContainer, { tag: forPrint ? 'td' : 'div', attrs: {\n                    ...buildAriaCellAttrs(props),\n                    role: getAriaCellRole(props),\n                }, className: publicApi.joinClassNames(!forPrint && classNames__default[\"default\"].liquid, // expand to whole row\n                classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, !forPrint && classNames__default[\"default\"].flexCol, classNames__default[\"default\"].contentBox, classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessTop, !props.borderBottom && classNames__default[\"default\"].borderlessBottom), style: forPrint ? undefined : {\n                    height: props.height,\n                }, renderProps: renderProps, generatorName: \"resourceGroupLaneContent\", customGenerator: groupSpec.laneContent, classNameGenerator: groupSpec.laneClass, didMount: groupSpec.laneDidMount, willUnmount: groupSpec.laneWillUnmount, children: (InnerContainer) => (jsxRuntime.jsx(InnerContainer, { tag: \"div\", elRef: this.innerElRef, className: publicApi.joinClassNames(protectedApi.generateClassName(groupSpec.laneInnerClass, renderProps), classNames__default[\"default\"].noShrink, classNames__default[\"default\"].noMargin) })) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            const innerEl = this.innerElRef.current;\n            this.disconnectInnerHeight = protectedApi.watchHeight(innerEl, (height) => {\n                if (this._isUnmounting)\n                    return;\n                protectedApi.setRef(this.props.innerHeightRef, height);\n            });\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.disconnectInnerHeight();\n            protectedApi.setRef(this.props.innerHeightRef, null);\n        }\n    }\n\n    class ResourceLane extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            // memo\n            this.refineRenderProps = protectedApi.memoizeObjArg(refineResourceLaneRenderProps);\n            this.buildDateSpanProps = protectedApi.memoize(buildResourceDateSpanProps);\n            this.buildEventRenderProps = protectedApi.memoize(buildResourceEventRenderProps);\n            this.slicer = new TimelineLaneSlicer();\n            this.handleEventsHeight = (eventsHeight) => {\n                if (this._isUnmounting)\n                    return;\n                this.eventsHeight = eventsHeight;\n                protectedApi.afterSize(this.handleHeight);\n            };\n            this.handleTopEl = (topEl) => {\n                if (this.disconnectTopHeight) {\n                    this.disconnectTopHeight();\n                    this.disconnectTopHeight = undefined;\n                }\n                if (topEl) {\n                    this.disconnectTopHeight = protectedApi.watchHeight(topEl, (topHeight) => {\n                        if (this._isUnmounting)\n                            return;\n                        this.topHeight = topHeight;\n                        protectedApi.afterSize(this.handleHeight);\n                    });\n                }\n            };\n            this.handleBottomEl = (footerEl) => {\n                if (this.disconnectBottomHeight) {\n                    this.disconnectBottomHeight();\n                    this.disconnectBottomHeight = undefined;\n                }\n                if (footerEl) {\n                    this.disconnectBottomHeight = protectedApi.watchHeight(footerEl, (bottomHeight) => {\n                        if (this._isUnmounting)\n                            return;\n                        this.bottomHeight = bottomHeight;\n                        protectedApi.afterSize(this.handleHeight);\n                    });\n                }\n            };\n            this.handleHeight = () => {\n                if (this._isUnmounting)\n                    return;\n                const { topHeight, bottomHeight, eventsHeight } = this;\n                if (topHeight != null && bottomHeight != null && eventsHeight != null) {\n                    protectedApi.setRef(this.props.heightRef, topHeight + bottomHeight + eventsHeight);\n                }\n            };\n        }\n        render() {\n            let { props, context } = this;\n            let { resource } = props;\n            let { options } = context;\n            let renderProps = this.refineRenderProps({\n                resource,\n                context,\n                eventOverlap: Boolean(options.eventOverlap),\n            });\n            let eventRenderProps = this.buildEventRenderProps(renderProps.resource);\n            /* sliced */\n            let slicedProps = this.slicer.sliceProps(props, props.dateProfile, props.tDateProfile.isTimeScale ? null : options.nextDayThreshold, context, // wish we didn't have to pass in the rest of the args...\n            props.dateProfile, context.dateProfileGenerator, props.tDateProfile, context.dateEnv);\n            return (jsxRuntime.jsx(\"div\", { role: props.role, className: publicApi.joinClassNames(props.className, // probably contains fillX\n                classNames__default[\"default\"].flexRow), style: {\n                    top: props.top,\n                    width: props.width,\n                    insetInlineStart: props.insetInlineStart ?? props.clipStart,\n                }, children: jsxRuntime.jsx(protectedApi.ContentContainer, { tag: \"div\", attrs: {\n                        ...buildAriaCellAttrs(props),\n                        role: getAriaCellRole(props),\n                        'data-resource-id': resource.id,\n                    }, className: publicApi.joinClassNames(classNames__default[\"default\"].liquid, classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, classNames__default[\"default\"].flexCol, classNames__default[\"default\"].contentBox, classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessTop, !props.borderBottom && classNames__default[\"default\"].borderlessBottom, classNames__default[\"default\"].rel), style: {\n                        height: props.height,\n                    }, renderProps: renderProps, generatorName: undefined, classNameGenerator: options.resourceLaneClass, didMount: options.resourceLaneDidMount, willUnmount: options.resourceLaneWillUnmount, children: () => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TimelineBg, { tDateProfile: props.tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, \n                                // content\n                                bgEventSegs: slicedProps.bgEventSegs, businessHourSegs: slicedProps.businessHourSegs, dateSelectionSegs: slicedProps.dateSelectionSegs, eventResizeSegs: slicedProps.eventResize ? slicedProps.eventResize.segs : null, renderProps: eventRenderProps, \n                                // dimensions\n                                slotWidth: props.slotWidth, \n                                // virtualization\n                                clipStart: props.clipStart, clipEnd: props.clipEnd }), jsxRuntime.jsx(protectedApi.ContentContainer, { tag: 'div', elRef: this.handleTopEl, className: publicApi.joinClassNames(classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noShrink), renderProps: renderProps, generatorName: 'resourceLaneTopContent', customGenerator: options.resourceLaneTopContent, classNameGenerator: options.resourceLaneTopClass }), jsxRuntime.jsx(TimelineFg, { dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, \n                                // content\n                                fgEventSegs: slicedProps.fgEventSegs, eventDrag: slicedProps.eventDrag, eventResize: slicedProps.eventResize, eventSelection: slicedProps.eventSelection, dateSpanProps: this.buildDateSpanProps(resource.id), renderProps: eventRenderProps, \n                                // dimensions\n                                slotWidth: props.slotWidth, \n                                // virtualization\n                                clipStart: props.clipStart, clipEnd: props.clipEnd, \n                                // ref\n                                heightRef: this.handleEventsHeight }), jsxRuntime.jsx(protectedApi.ContentContainer, { tag: 'div', elRef: this.handleBottomEl, className: publicApi.joinClassNames(classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noShrink), renderProps: renderProps, generatorName: 'resourceLaneBottomContent', customGenerator: options.resourceLaneBottomContent, classNameGenerator: options.resourceLaneBottomClass })] })) }) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n        }\n    }\n    /*\n    For the lane's events and more-links. Memoize these, for stable references\n    */\n    function buildResourceDateSpanProps(resourceId) {\n        return { resourceId };\n    }\n    function buildResourceEventRenderProps(resource) {\n        return { resource };\n    }\n    function refineResourceLaneRenderProps(input) {\n        return {\n            resource: new ResourceApi(input.context, input.resource),\n            options: { eventOverlap: input.eventOverlap },\n        };\n    }\n\n    class ResizableTwoCol extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // ref\n            this.rootEl = null;\n            this.startElRef = compat.createRef();\n            this.resizerElRef = compat.createRef();\n            this.handleRootEl = (el) => {\n                this.rootEl = el;\n                if (this.props.elRef) {\n                    protectedApi.setRef(this.props.elRef, el);\n                }\n            };\n        }\n        render() {\n            const { props, state, context } = this;\n            const { options } = context;\n            const widthConfig = this.widthConfig = state.widthOverride || props.initialStartWidthConfig;\n            return (jsxRuntime.jsxs(\"div\", { ref: this.handleRootEl, className: publicApi.joinClassNames(props.className, classNames__default[\"default\"].flexRow), children: [jsxRuntime.jsx(\"div\", { className: props.startClassName, style: {\n                            width: serializeDimConfig(widthConfig),\n                        }, ref: this.startElRef, children: props.startContent }), jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(options.resourceColumnDividerClass, classNames__default[\"default\"].rel), \n                        // TODO: make a className somehow?...\n                        // TODO: what if not resizable?\n                        style: { cursor: 'col-resize' }, ref: this.resizerElRef, children: jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].hitXSkinny, classNames__default[\"default\"].z1) }) }), jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(props.endClassName, classNames__default[\"default\"].liquid), children: props.endContent })] }));\n        }\n        componentDidMount() {\n            const ElementDraggingImpl = this.context.pluginHooks.elementDraggingImpl;\n            if (ElementDraggingImpl) {\n                const resizerEl = this.resizerElRef.current;\n                const dragging = this.resizerDragging = new ElementDraggingImpl(resizerEl);\n                dragging.emitter.on('dragstart', () => {\n                    const isRtl = protectedApi.computeElIsRtl(resizerEl);\n                    const viewWidth = this.rootEl.getBoundingClientRect().width;\n                    const origWidth = this.startElRef.current.getBoundingClientRect().width;\n                    const origWidthConfig = this.widthConfig;\n                    let newWidthConfig;\n                    dragging.emitter.on('dragmove', (pev) => {\n                        const newWidth = Math.min(origWidth + pev.deltaX * (isRtl ? -1 : 1), viewWidth);\n                        newWidthConfig = resizeDimConfig(origWidthConfig, newWidth, viewWidth);\n                        this.setState({\n                            widthOverride: newWidthConfig,\n                        });\n                    });\n                    dragging.emitter.on('dragend', () => {\n                        if (newWidthConfig) {\n                            protectedApi.setRef(this.props.resizedWidthConfigRef, newWidthConfig);\n                        }\n                    });\n                    dragging.setAutoScrollEnabled(false); // because gets weird with auto-scrolling time area\n                });\n            }\n        }\n        componentWillUnmount() {\n            if (this.resizerDragging) {\n                this.resizerDragging.destroy();\n            }\n        }\n    }\n\n    /*\n    Cell for a resource group that can span multiple logical rows.\n    */\n    class ResourceGroupCell extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            this.innerElRef = compat.createRef();\n        }\n        render() {\n            const { props, context } = this;\n            const { colSpec, forPrint } = props;\n            const renderProps = {\n                fieldValue: props.fieldValue,\n                view: context.viewApi,\n            };\n            return (jsxRuntime.jsx(protectedApi.ContentContainer, { tag: forPrint ? 'td' : 'div', attrs: forPrint ? {\n                    rowSpan: props.rowSpan,\n                } : {\n                    ...buildAriaCellAttrs(props),\n                    role: 'rowheader',\n                    'aria-rowspan': props.rowSpan,\n                }, className: publicApi.joinClassNames(classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, !forPrint && classNames__default[\"default\"].flexCol, classNames__default[\"default\"].alignStart, !forPrint && classNames__default[\"default\"].liquid, forPrint && classNames__default[\"default\"].crop, forPrint && context.options.resourceRowClass, classNames__default[\"default\"].borderlessTop, classNames__default[\"default\"].borderlessEnd, !props.borderStart && classNames__default[\"default\"].borderlessStart, !props.borderBottom && classNames__default[\"default\"].borderlessBottom), renderProps: renderProps, generatorName: \"resourceCellContent\", customGenerator: colSpec.cellContent, defaultGenerator: renderGroupInner, classNameGenerator: colSpec.cellClass, didMount: colSpec.cellDidMount, willUnmount: colSpec.cellWillUnmount, children: (InnerContent) => (jsxRuntime.jsx(\"div\", { ref: this.innerElRef, className: publicApi.joinClassNames(classNames__default[\"default\"].noShrink, classNames__default[\"default\"].whiteSpaceNoWrap, classNames__default[\"default\"].flexRow, !forPrint && classNames__default[\"default\"].stickyT), children: jsxRuntime.jsx(InnerContent, { tag: \"div\", className: protectedApi.generateClassName(colSpec.cellInnerClass, renderProps) }) })) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            this.disconnectInnerHeight = protectedApi.watchHeight(this.innerElRef.current, (height) => {\n                if (this._isUnmounting) {\n                    return;\n                }\n                protectedApi.setRef(this.props.innerHeightRef, height);\n            });\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.disconnectInnerHeight?.();\n            protectedApi.setRef(this.props.innerHeightRef, null);\n        }\n    }\n    function renderGroupInner(renderProps) {\n        return renderProps.fieldValue || jsxRuntime.jsx(jsxRuntime.Fragment, { children: \"\\u00A0\" });\n    }\n\n    /*\n    Screen-only row wrapper for a vertically spanning resource-group cell.\n    */\n    class ResourceGroupSubrow extends protectedApi.BaseComponent {\n        render() {\n            let { props, context } = this;\n            let { options } = context;\n            // a grouped cell. no data that is specific to this specific resource\n            // `colSpec` is for the group. a GroupSpec :(\n            return (jsxRuntime.jsx(\"div\", { role: props.role, className: publicApi.joinClassNames(options.resourceRowClass, props.className, classNames__default[\"default\"].flexRow, classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessTop, !props.borderBottom && classNames__default[\"default\"].borderlessBottom), style: {\n                    top: props.top,\n                    height: props.height,\n                    minWidth: 0,\n                    width: props.width,\n                    flexGrow: props.grow,\n                }, children: jsxRuntime.jsx(ResourceGroupCell, { cellIdPrefix: props.cellIdPrefix, cellRowIndex: props.cellRowIndex, cellColIndex: props.cellColIndex, colSpec: props.colSpec, fieldValue: props.fieldValue, rowSpan: props.rowSpan, borderStart: props.borderStart, innerHeightRef: props.innerHeightRef }) }));\n        }\n    }\n\n    class ResourceIndent extends protectedApi.BaseComponent {\n        render() {\n            const { props, context } = this;\n            return (jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(context.options.resourceIndentClass, classNames__default[\"default\"].noShrink, classNames__default[\"default\"].flexCol, classNames__default[\"default\"].alignEnd, props.className), style: {\n                    ...props.style,\n                    width: props.indentWidth != null\n                        ? props.indentWidth * props.level\n                        : 0,\n                }, children: props.children }));\n        }\n    }\n\n    class ResourceExpander extends protectedApi.BaseComponent {\n        render() {\n            const { props } = this;\n            const { options } = this.context;\n            const classNameGenerator = options.resourceExpanderClass;\n            const contentGenerator = options.resourceExpanderContent;\n            const renderProps = {\n                isExpanded: props.isExpanded,\n            };\n            return (jsxRuntime.jsx(\"span\", { \"aria-hidden\": true, className: publicApi.joinClassNames(protectedApi.generateClassName(classNameGenerator, renderProps), classNames__default[\"default\"].flexRow, classNames__default[\"default\"].cursorPointer, classNames__default[\"default\"].selectNone, // prevent text-selecting cell underneath\n                classNames__default[\"default\"].noMargin, props.className), onClick: props.onExpanderClick, ref: props.elRef, children: contentGenerator && (jsxRuntime.jsx(protectedApi.ContentContainer, { tag: 'span', style: { display: 'contents' }, attrs: { 'aria-hidden': true }, renderProps: renderProps, generatorName: undefined, customGenerator: contentGenerator })) }));\n        }\n    }\n\n    /*\n    Group cell that spans horizontally, consuming multiple colspans\n    */\n    class ResourceGroupHeaderCell extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            // ref\n            this.innerElRef = compat.createRef();\n            this.onExpanderClick = () => {\n                let { props } = this;\n                this.context.dispatch({\n                    type: 'SET_RESOURCE_ENTITY_EXPANDED',\n                    id: createGroupId(props.group),\n                    isExpanded: !props.isExpanded,\n                });\n            };\n        }\n        render() {\n            let { props, context } = this;\n            let { forPrint } = props;\n            let renderProps = {\n                fieldValue: props.group.value,\n                view: context.viewApi,\n            };\n            let spec = props.group.spec; // type HACK\n            return (jsxRuntime.jsx(protectedApi.ContentContainer, { tag: forPrint ? 'td' : 'div', attrs: forPrint ? {\n                    colSpan: props.colSpan,\n                } : {\n                    ...buildAriaCellAttrs(props),\n                    role: 'rowheader',\n                    'aria-colspan': props.colSpan,\n                }, className: publicApi.joinClassNames(!forPrint && classNames__default[\"default\"].liquid, // expand to whole row\n                classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, !forPrint && classNames__default[\"default\"].flexCol, classNames__default[\"default\"].alignStart, // h-align\n                classNames__default[\"default\"].crop, classNames__default[\"default\"].contentBox, classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessTop, !props.borderBottom && classNames__default[\"default\"].borderlessBottom), style: forPrint ? undefined : {\n                    height: props.height,\n                }, renderProps: renderProps, generatorName: \"resourceGroupHeaderContent\", customGenerator: spec.labelContent, defaultGenerator: renderCellInner, classNameGenerator: spec.labelClass, didMount: spec.labelDidMount, willUnmount: spec.labelWillUnmount, children: (InnerContent) => (jsxRuntime.jsxs(\"div\", { ref: this.innerElRef, className: publicApi.joinClassNames(classNames__default[\"default\"].noShrink, classNames__default[\"default\"].whiteSpaceNoWrap, classNames__default[\"default\"].flexRow), style: {\n                        isolation: 'isolate', // TODO: className\n                    }, children: [jsxRuntime.jsx(ResourceIndent, { level: 1, indentWidth: props.indentWidth, className: classNames__default[\"default\"].z2, children: jsxRuntime.jsx(ResourceExpander, { isExpanded: props.isExpanded, onExpanderClick: this.onExpanderClick }) }), jsxRuntime.jsx(InnerContent, { tag: \"div\", className: publicApi.joinClassNames(protectedApi.generateClassName(spec.labelInnerClass, renderProps), classNames__default[\"default\"].z1) })] })) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            const innerEl = this.innerElRef.current;\n            this.disconnectInnerHeight = protectedApi.watchHeight(innerEl, (height) => {\n                if (this._isUnmounting)\n                    return;\n                protectedApi.setRef(this.props.innerHeightRef, height);\n            });\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.disconnectInnerHeight();\n            protectedApi.setRef(this.props.innerHeightRef, null);\n        }\n    }\n    ResourceGroupHeaderCell.addPropsEquality({\n        group: isGroupsEqual,\n    });\n    function renderCellInner(renderProps) {\n        return renderProps.fieldValue || jsxRuntime.jsx(jsxRuntime.Fragment, { children: \"\\u00A0\" });\n    }\n\n    class ResourceCell extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            this.innerElRef = compat.createRef();\n            this.refineRenderProps = protectedApi.memoizeObjArg(refineRenderProps);\n            this.onExpanderClick = (ev) => {\n                let { props } = this;\n                if (props.hasChildren) {\n                    this.context.dispatch({\n                        type: 'SET_RESOURCE_ENTITY_EXPANDED',\n                        id: props.resource.id,\n                        isExpanded: !props.isExpanded,\n                    });\n                }\n            };\n        }\n        render() {\n            let { props, context } = this;\n            let { colSpec, forPrint } = props;\n            let renderProps = this.refineRenderProps({\n                resource: props.resource,\n                field: props.field,\n                fieldValue: props.fieldValue,\n                context,\n            });\n            return (jsxRuntime.jsx(protectedApi.ContentContainer, { tag: forPrint ? 'td' : 'div', attrs: {\n                    ...buildAriaCellAttrs(props),\n                    role: colSpec.isMain ? 'rowheader' : getAriaCellRole(props),\n                    'data-resource-id': props.resource.id,\n                }, className: publicApi.joinClassNames(classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, !forPrint && classNames__default[\"default\"].flexCol, classNames__default[\"default\"].alignStart, forPrint && context.options.resourceRowClass, classNames__default[\"default\"].borderlessTop, classNames__default[\"default\"].borderlessEnd, !props.borderStart && classNames__default[\"default\"].borderlessStart, !props.borderBottom && classNames__default[\"default\"].borderlessBottom, classNames__default[\"default\"].crop), style: forPrint ? undefined : {\n                    minWidth: 0,\n                    width: props.width,\n                }, renderProps: renderProps, generatorName: \"resourceCellContent\", customGenerator: colSpec.cellContent, defaultGenerator: renderResourceInner, classNameGenerator: colSpec.cellClass, didMount: colSpec.cellDidMount, willUnmount: colSpec.cellWillUnmount, children: (InnerContent) => (jsxRuntime.jsxs(\"div\", { ref: this.innerElRef, className: publicApi.joinClassNames(classNames__default[\"default\"].noShrink, classNames__default[\"default\"].whiteSpaceNoWrap, classNames__default[\"default\"].flexRow), style: {\n                        isolation: 'isolate', // TODO: className\n                    }, children: [colSpec.isMain && Boolean(props.indent) && (jsxRuntime.jsx(ResourceIndent, { level: props.indent, indentWidth: props.indentWidth, className: classNames__default[\"default\"].z2, children: props.hasChildren && (jsxRuntime.jsx(ResourceExpander, { isExpanded: props.isExpanded, onExpanderClick: this.onExpanderClick })) })), jsxRuntime.jsx(InnerContent, { tag: \"div\", className: publicApi.joinClassNames(protectedApi.generateClassName(colSpec.cellInnerClass, renderProps), classNames__default[\"default\"].z1) })] })) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            this.disconnectHeight = protectedApi.watchHeight(this.innerElRef.current, (height) => {\n                if (this._isUnmounting)\n                    return;\n                protectedApi.setRef(this.props.innerHeightRef, height);\n            });\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.disconnectHeight();\n            protectedApi.setRef(this.props.innerHeightRef, null);\n        }\n    }\n    function renderResourceInner(renderProps) {\n        return renderProps.fieldValue || jsxRuntime.jsx(jsxRuntime.Fragment, { children: \"\\u00A0\" });\n    }\n    function refineRenderProps(input) {\n        return {\n            resource: new ResourceApi(input.context, input.resource),\n            field: input.field,\n            fieldValue: input.fieldValue,\n            view: input.context.viewApi,\n        };\n    }\n\n    /*\n    For screen-only\n    */\n    class ResourceSubrow extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            // refs\n            this.innerHeightRefMap = new protectedApi.RefMap(() => {\n                protectedApi.afterSize(this.handleInnerHeights);\n            });\n            this.currentInnerHeight = null;\n            this.handleInnerHeights = () => {\n                if (this._isUnmounting)\n                    return;\n                const innerHeightMap = this.innerHeightRefMap.current;\n                let max = null;\n                for (const innerHeight of innerHeightMap.values()) {\n                    if (max == null || innerHeight > max) {\n                        max = innerHeight;\n                    }\n                }\n                if (this.currentInnerHeight !== max) {\n                    this.currentInnerHeight = max;\n                    protectedApi.setRef(this.props.innerHeightRef, max);\n                }\n            };\n        }\n        render() {\n            const { props, innerHeightRefMap } = this;\n            const { resource, resourceFields, colSpecs } = props;\n            const { options } = this.context;\n            const colWidths = props.colWidths || [];\n            return (jsxRuntime.jsx(\"div\", { role: props.role, className: publicApi.joinClassNames(options.resourceRowClass, props.className, // what for???\n                classNames__default[\"default\"].flexRow, classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessTop, !props.borderBottom && classNames__default[\"default\"].borderlessBottom), style: {\n                    top: props.top,\n                    height: props.height,\n                }, children: mapRange(props.colStartIndex, colSpecs.length, (i) => {\n                    const colSpec = colSpecs[i];\n                    const fieldValue = colSpec.field ? resourceFields[colSpec.field] :\n                        (resource.title || getPublicId(resource.id));\n                    return (jsxRuntime.jsx(ResourceCell, { cellIdPrefix: props.cellIdPrefix, cellRowIndex: props.cellRowIndex, inTreeGrid: props.inTreeGrid, cellColIndex: props.cellIdPrefix ? i : undefined, colSpec: colSpec, resource: resource, field: colSpec.field || 'title', fieldValue: fieldValue, indent: props.indent, hasChildren: props.hasChildren, isExpanded: props.isExpanded, innerHeightRef: innerHeightRefMap.createRef(i), width: colWidths[i], indentWidth: props.indentWidth, borderStart: props.borderStart || Boolean(i) }, i));\n                }) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.currentInnerHeight = null;\n        }\n    }\n    ResourceSubrow.addPropsEquality({\n        colWidths: protectedApi.isArraysEqual,\n    });\n    // Utils\n    // -------------------------------------------------------------------------------------------------\n    function mapRange(start, end, func) {\n        const items = [];\n        for (let i = start; i < end; i++) {\n            items.push(func(i));\n        }\n        return items;\n    }\n\n    /*\n    Takes up no vertical space. Fills itself within outer container.\n    Caller is responsible for this.\n    */\n    class BodySection extends protectedApi.BaseComponent {\n        render() {\n            const { props } = this;\n            const { rowInnerHeightRefMap, headerRowSpan } = props;\n            const groupColCnt = props.groupCellCnts.length;\n            const colWidths = props.colWidths || [];\n            return (jsxRuntime.jsxs(\"div\", { className: classNames__default[\"default\"].flexRow, style: {\n                    minWidth: props.canvasWidth,\n                    minHeight: props.canvasHeight,\n                }, children: [props.groupColPositions.map((groupCellPositions, colIndex) => (jsxRuntime.jsx(\"div\", { role: \"presentation\", className: classNames__default[\"default\"].rel /* origin for abs-positioned rows */, style: {\n                            height: 0,\n                            minWidth: 0,\n                            width: colWidths[colIndex],\n                        }, children: groupCellPositions.map((groupCellPosition, groupIndex) => {\n                            const groupCellLayout = groupCellPosition.item;\n                            const group = groupCellLayout.entity;\n                            const groupKey = groupCellPosition.key;\n                            const isNotLast = groupIndex < groupCellPositions.length - 1;\n                            const rowHeight = groupCellPosition.size;\n                            return (jsxRuntime.jsx(ResourceGroupSubrow, { colSpec: group.spec, rowSpan: groupCellLayout.rowSpan, fieldValue: group.value, className: classNames__default[\"default\"].fillX, borderStart: Boolean(colIndex), borderBottom: isNotLast, role: \"presentation\", cellIdPrefix: props.cellIdPrefix, cellRowIndex: 1 + headerRowSpan + groupCellLayout.rowIndex, cellColIndex: colIndex, innerHeightRef: rowInnerHeightRefMap.createRef(groupKey), top: groupCellPosition.start, height: (rowHeight != null && isNotLast)\n                                    ? rowHeight + ROW_BORDER_WIDTH // considering bottom border, which is added to cell\n                                    : rowHeight }, groupKey));\n                        }) }, colIndex))), jsxRuntime.jsxs(\"div\", { role: \"presentation\", className: classNames__default[\"default\"].rel, style: {\n                            height: 0,\n                            minWidth: 0,\n                            width: sumArray(colWidths.slice(groupColCnt)),\n                        }, children: [props.groupRowPositions.map((rowPosition) => {\n                                const groupRowLayout = rowPosition.item;\n                                const group = groupRowLayout.entity;\n                                const groupKey = rowPosition.key;\n                                // Compare against every expansion-filtered row, not only the virtualized subset.\n                                const isNotLast = groupRowLayout.visibleIndex < props.displayedRowCnt - 1;\n                                return (jsxRuntime.jsx(\"div\", { role: \"presentation\", className: publicApi.joinClassNames(classNames__default[\"default\"].fillX, classNames__default[\"default\"].flexRow), style: {\n                                        top: rowPosition.start,\n                                    }, children: jsxRuntime.jsx(ResourceGroupHeaderCell, { cellIdPrefix: props.cellIdPrefix, cellRowIndex: 1 + headerRowSpan + groupRowLayout.rowIndex, cellColIndex: 0, group: group, isExpanded: groupRowLayout.isExpanded, innerHeightRef: rowInnerHeightRefMap.createRef(groupKey), colSpan: props.colSpecs.length, borderBottom: isNotLast, height: rowPosition.size, indentWidth: props.indentWidth }) }, groupKey));\n                            }), props.resourceRowPositions.map((rowPosition) => {\n                                const resourceLayout = rowPosition.item;\n                                const resource = resourceLayout.entity;\n                                const rowHeight = rowPosition.size;\n                                // Compare against every expansion-filtered row, not only the virtualized subset.\n                                const isNotLast = resourceLayout.visibleIndex < props.displayedRowCnt - 1;\n                                return (jsxRuntime.jsx(ResourceSubrow, { resource: resource, resourceFields: resourceLayout.resourceFields, indent: resourceLayout.indent, hasChildren: resourceLayout.hasChildren, isExpanded: resourceLayout.isExpanded, colStartIndex: groupColCnt, colSpecs: props.colSpecs, colWidths: colWidths, innerHeightRef: rowInnerHeightRefMap.createRef(resource.id), className: classNames__default[\"default\"].fillX, borderStart: Boolean(groupColCnt), borderBottom: isNotLast, role: \"presentation\", cellIdPrefix: props.cellIdPrefix, inTreeGrid: props.inTreeGrid, cellRowIndex: 1 + headerRowSpan + resourceLayout.rowIndex, top: rowPosition.start, height: (rowHeight != null && isNotLast)\n                                        ? rowHeight + ROW_BORDER_WIDTH // considering bottom border, which is added to cell\n                                        : rowHeight, indentWidth: props.indentWidth }, resource.id /* TODO: use rowPosition.key? */));\n                            })] })] }));\n        }\n    }\n    // Utils\n    // -------------------------------------------------------------------------------------------------\n    function sumArray(a) {\n        let sum = 0;\n        for (const num of a) {\n            sum += num;\n        }\n        return sum;\n    }\n\n    class HeaderCell extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            // ref\n            this.innerElRef = compat.createRef();\n        }\n        render() {\n            let { props, context } = this;\n            let { colSpec, forPrint } = props;\n            let renderProps = { view: context.viewApi };\n            // need empty inner div for abs positioning for resizer\n            return (jsxRuntime.jsx(protectedApi.ContentContainer, { tag: forPrint ? 'th' : 'div', attrs: {\n                    ...buildAriaCellAttrs(props),\n                    role: 'columnheader',\n                }, className: publicApi.joinClassNames(forPrint && context.options.resourceHeaderRowClass, classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, !forPrint && classNames__default[\"default\"].flexCol, classNames__default[\"default\"].borderlessY, classNames__default[\"default\"].borderlessEnd, !props.borderStart && classNames__default[\"default\"].borderlessStart, classNames__default[\"default\"].rel), style: forPrint ? undefined : {\n                    minWidth: 0,\n                    width: props.width,\n                }, renderProps: renderProps, generatorName: \"resourceColumnHeaderContent\", customGenerator: colSpec.headerContent, defaultGenerator: colSpec.headerDefault, classNameGenerator: colSpec.headerClass, didMount: colSpec.headerDidMount, willUnmount: colSpec.headerWillUnmount, children: (InnerContent) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].crop, // must crop instead of outer\n                            classNames__default[\"default\"].flexCol, classNames__default[\"default\"].alignStart), children: jsxRuntime.jsxs(\"div\", { ref: this.innerElRef, className: publicApi.joinClassNames(classNames__default[\"default\"].noShrink, classNames__default[\"default\"].whiteSpaceNoWrap, classNames__default[\"default\"].flexRow), children: [this.props.indent && (jsxRuntime.jsx(ResourceIndent, { level: 1, indentWidth: props.indentWidth })), jsxRuntime.jsx(InnerContent, { tag: \"div\", className: protectedApi.generateClassName(colSpec.headerInnerClass, renderProps) })] }) }), props.resizer && !forPrint && (jsxRuntime.jsx(\"div\", { ref: props.resizerElRef, className: publicApi.joinClassNames(protectedApi.generateClassName(colSpec.headerResizerClass, renderProps), classNames__default[\"default\"].z1, classNames__default[\"default\"].cursorColResizer) }))] })) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            const innerEl = this.innerElRef.current;\n            this.disconnectInnerHeight = protectedApi.watchHeight(innerEl, (height) => {\n                if (this._isUnmounting)\n                    return;\n                protectedApi.setRef(this.props.innerHeightRef, height);\n            });\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.disconnectInnerHeight();\n            protectedApi.setRef(this.props.innerHeightRef, null);\n        }\n    }\n\n    class HeaderCells extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            // refs\n            this.resizerElRefMap = new protectedApi.RefMap((resizerEl, index) => {\n                let { colDraggings } = this;\n                if (!resizerEl) {\n                    let dragging = colDraggings[index];\n                    if (dragging) {\n                        dragging.destroy();\n                        delete colDraggings[index];\n                    }\n                }\n                else {\n                    let dragging = this.initColResizing(resizerEl, index);\n                    if (dragging) {\n                        colDraggings[index] = dragging;\n                    }\n                }\n            });\n            this.innerHeightRefMap = new protectedApi.RefMap(() => {\n                protectedApi.afterSize(this.handleInnerHeights);\n            });\n            this.colDraggings = {};\n            this.handleInnerHeights = () => {\n                if (this._isUnmounting)\n                    return;\n                const { innerHeightRefMap } = this;\n                let max = 0;\n                for (const innerHeight of innerHeightRefMap.current.values()) {\n                    max = Math.max(max, innerHeight);\n                }\n                if (this.currentInnerHeight !== max) {\n                    this.currentInnerHeight = max;\n                    protectedApi.setRef(this.props.innerHeightRef, max);\n                }\n            };\n        }\n        render() {\n            const { props, innerHeightRefMap, resizerElRefMap } = this;\n            const { colSpecs } = props;\n            const colWidths = props.colWidths || [];\n            return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: colSpecs.map((colSpec, colIndex) => (jsxRuntime.jsx(HeaderCell, { cellIdPrefix: props.cellIdPrefix, cellRowIndex: props.rowIndex != null ? 1 + props.rowIndex : undefined, cellColIndex: props.cellIdPrefix ? colIndex : undefined, width: colWidths[colIndex], colSpec: colSpec, resizer: colIndex < colSpecs.length - 1, indent: colSpec.isMain && props.indent, resizerElRef: resizerElRefMap.createRef(colIndex), innerHeightRef: innerHeightRefMap.createRef(colIndex), borderStart: Boolean(colIndex), indentWidth: props.indentWidth, forPrint: props.forPrint }, colIndex))) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.currentInnerHeight = undefined;\n            protectedApi.setRef(this.props.innerHeightRef, null);\n        }\n        // Dragging\n        // -----------------------------------------------------------------------------------------------\n        initColResizing(resizerEl, colIndex) {\n            let { pluginHooks } = this.context;\n            let ElementDraggingImpl = pluginHooks.elementDraggingImpl;\n            if (ElementDraggingImpl) {\n                let dragging = new ElementDraggingImpl(resizerEl);\n                dragging.emitter.on('dragstart', () => {\n                    const isRtl = protectedApi.computeElIsRtl(resizerEl);\n                    const startWidth = this.props.colWidths[colIndex];\n                    dragging.emitter.on('dragmove', (pev) => {\n                        if (this.props.onColResize) {\n                            this.props.onColResize(colIndex, startWidth + pev.deltaX * (isRtl ? -1 : 1));\n                        }\n                    });\n                    // because gets weird with auto-scrolling time area\n                    dragging.setAutoScrollEnabled(false);\n                });\n                return dragging;\n            }\n            return null;\n        }\n    }\n\n    /*\n    TODO: make more DRY with HeaderCell. Almost exactly the same except doesn't need resizer\n    */\n    class SuperHeaderCell extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            // refs\n            this.innerElRef = compat.createRef();\n        }\n        render() {\n            let { props, context } = this;\n            let { renderHooks, forPrint } = props;\n            let renderProps = { view: context.viewApi };\n            const { options } = context;\n            return (jsxRuntime.jsx(protectedApi.ContentContainer, { tag: forPrint ? 'th' : 'div', attrs: {\n                    ...buildAriaCellAttrs(this.props),\n                    role: 'columnheader',\n                    'aria-colspan': this.props.colSpan,\n                    colSpan: forPrint ? props.colSpan : undefined,\n                }, className: publicApi.joinClassNames(forPrint && options.resourceHeaderRowClass, !forPrint && classNames__default[\"default\"].liquid, classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, !forPrint && classNames__default[\"default\"].flexCol, classNames__default[\"default\"].alignStart, classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessTop, !forPrint && classNames__default[\"default\"].borderlessBottom, !forPrint && classNames__default[\"default\"].crop), renderProps: renderProps, generatorName: \"resourceColumnHeaderContent\", customGenerator: renderHooks.headerContent, defaultGenerator: renderHooks.headerDefault, classNameGenerator: renderHooks.headerClass, didMount: renderHooks.headerDidMount, willUnmount: renderHooks.headerWillUnmount, children: (InnerContent) => (jsxRuntime.jsxs(\"div\", { ref: this.innerElRef, className: publicApi.joinClassNames(classNames__default[\"default\"].noShrink, classNames__default[\"default\"].whiteSpaceNoWrap, classNames__default[\"default\"].flexRow), children: [this.props.indent && (jsxRuntime.jsx(ResourceIndent, { level: 1, indentWidth: this.props.indentWidth })), jsxRuntime.jsx(InnerContent, { tag: \"div\", className: protectedApi.generateClassName(renderHooks.headerInnerClass, renderProps) })] })) }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            const innerEl = this.innerElRef.current;\n            this.disconnectInnerHeight = protectedApi.watchHeight(innerEl, (height) => {\n                if (this._isUnmounting)\n                    return;\n                protectedApi.setRef(this.props.innerHeightRef, height);\n            });\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.disconnectInnerHeight();\n            protectedApi.setRef(this.props.innerHeightRef, null);\n        }\n    }\n\n    class Virtualizer {\n        constructor(getItemKey, getItemStart, getItemSize, \n        // called when viewport changes and Virtualizer wants caller (aka renderer) to rerender items\n        requestRerender, overscan = 1) {\n            this.getItemKey = getItemKey;\n            this.getItemStart = getItemStart;\n            this.getItemSize = getItemSize;\n            this.requestRerender = requestRerender;\n            this.overscan = overscan;\n            // left exposed so they can be prepopulated :(\n            this.viewportSize = 0;\n            this.scroll = 0;\n            this.items = [];\n        }\n        computePositions(items, disabled, forcedScroll) {\n            if (disabled) {\n                this.items = [];\n                this.itemPositions = undefined; // affects _handleViewportChange\n                return this.computeAllPositions(items);\n            }\n            this.items = items;\n            if (forcedScroll !== undefined) {\n                this.scroll = forcedScroll;\n            }\n            if (!this.viewportSize) {\n                return [];\n            }\n            return (this.itemPositions = this.computePositionsInRange(items));\n        }\n        handleViewportSize(size) {\n            if (size !== this.viewportSize) {\n                this.viewportSize = size;\n                this._handleViewportChange();\n            }\n        }\n        handleScroll(scroll) {\n            if (scroll !== this.scroll) {\n                this.scroll = scroll;\n                this._handleViewportChange();\n            }\n        }\n        _handleViewportChange() {\n            if (this.itemPositions) {\n                const testItemPositions = this.computePositionsInRange(this.items);\n                // Cheap test for whether rows in the visible scroll-window changed and repositioning needed.\n                // Only handles changes because of *scroll-window*, NOT because of underlying row data change,\n                // which caller is responsible for rerendering themselves\n                if (testItemPositions.length !== this.itemPositions.length || (testItemPositions.length &&\n                    testItemPositions[0].index !== this.itemPositions[0].index)) {\n                    this.requestRerender();\n                }\n            }\n        }\n        computePositionsInRange(items) {\n            const { scroll, viewportSize, getItemKey, getItemStart, getItemSize, overscan } = this;\n            const count = items.length;\n            let itemPositions = [];\n            let index = 0;\n            let runningStart = 0;\n            while (index < count) {\n                const item = items[index];\n                const key = getItemKey(item);\n                const start = getItemStart ? getItemStart(key, index, item) : runningStart;\n                const size = getItemSize(key, index, item);\n                if (start + size > scroll) {\n                    break;\n                }\n                index++;\n                runningStart += size;\n            }\n            // back up for underscan\n            const startIndex = Math.max(index - overscan, 0);\n            while (index > startIndex) {\n                const item = items[index - 1];\n                const key = getItemKey(item);\n                const size = getItemSize(key, index - 1, item);\n                index--;\n                runningStart -= size;\n            }\n            while (index < count) {\n                const item = items[index];\n                const key = getItemKey(item);\n                const start = getItemStart ? getItemStart(key, index, item) : runningStart;\n                const size = getItemSize(key, index, item);\n                if (start >= scroll + viewportSize) {\n                    break;\n                }\n                itemPositions.push({\n                    item,\n                    key,\n                    index,\n                    start,\n                    size,\n                });\n                index++;\n                runningStart += size;\n            }\n            const endIndex = Math.min(index + overscan, count);\n            // overshoot for overscan\n            while (index < endIndex) {\n                const item = items[index];\n                const key = getItemKey(item);\n                const start = getItemStart ? getItemStart(key, index, item) : runningStart;\n                const size = getItemSize(key, index, item);\n                itemPositions.push({\n                    item,\n                    key,\n                    index,\n                    start,\n                    size,\n                });\n                index++;\n                runningStart += size;\n            }\n            return itemPositions;\n        }\n        computeAllPositions(items) {\n            const { getItemKey, getItemStart, getItemSize } = this;\n            let runningStart = 0;\n            return items.map((item, index) => {\n                const key = getItemKey(item);\n                const start = getItemStart ? getItemStart(key, index, item) : runningStart;\n                const size = getItemSize(key, index, item);\n                runningStart += size;\n                return {\n                    item,\n                    key,\n                    index,\n                    start,\n                    size,\n                };\n            });\n        }\n    }\n    function computeShift(itemPositions) {\n        const count = itemPositions.length;\n        if (count) {\n            const start = itemPositions[0].start;\n            const end = itemPositions[count - 1].start + itemPositions[count - 1].size;\n            return [start, end, itemPositions[0].index];\n        }\n    }\n\n    function computeResourceTimelineHeaderHeight(dataGridHeaderRowInnerHeightMap, timelineHeaderRowInnerHeightMap, hasDataGridSuperHeader, timelineHeaderRowCnt) {\n        const dataGridKeys = (hasDataGridSuperHeader ? [true] : []).concat(false);\n        let dataGridHeight = 0;\n        for (const key of dataGridKeys) {\n            const rowHeight = dataGridHeaderRowInnerHeightMap.get(key);\n            if (rowHeight == null) {\n                return;\n            }\n            dataGridHeight += rowHeight;\n        }\n        let timelineHeight = 0;\n        for (let rowIndex = 0; rowIndex < timelineHeaderRowCnt; rowIndex += 1) {\n            const rowHeight = timelineHeaderRowInnerHeightMap.get(rowIndex);\n            if (rowHeight == null) {\n                return;\n            }\n            timelineHeight += rowHeight;\n        }\n        return Math.max(dataGridHeight + (hasDataGridSuperHeader ? ROW_BORDER_WIDTH : 0), timelineHeight + ROW_BORDER_WIDTH * (timelineHeaderRowCnt - 1));\n    }\n\n    const defaultOwnCellHeight = 40;\n    const rowHeightSampleSize = 30;\n    class ResourceTimelineLayoutNormal extends protectedApi.DateComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // memoized\n            this.buildResourceLayouts = protectedApi.memoize(buildResourceLayouts);\n            // amount of extra space that should be temporarily added to vertical rows\n            // after setting, must call forceUpdate\n            // only supported for bodyScroller (aka getIsHeightAuto()===false)\n            this.scrollSlack = 0;\n            this.queuedEntityScroll = false;\n            // the assumed height of rows that haven't been measured yet\n            this.estimatedRowHeight = defaultOwnCellHeight;\n            this.recentlyMeasuredRowKeys = []; // the last rowHeightSampleSize, oldest first\n            // A row is as tall as its taller cell, so a cell's change in height is not the row's. An empty\n            // lane, for example, is much shorter than its row, and has no effect on the row's height\n            this.handleSpreadsheetCellHeightChange = (val, key, oldVal) => {\n                const timeHeight = this.timeEntityInnerHeightMap.current.get(key) || 0;\n                if (oldVal == null) {\n                    this.recentlyMeasuredRowKeys.push(key);\n                    if (this.recentlyMeasuredRowKeys.length > rowHeightSampleSize) {\n                        this.recentlyMeasuredRowKeys.shift();\n                    }\n                }\n                this.handleBodyRowHeightChange(key, Math.max(oldVal ?? this.estimatedRowHeight, timeHeight), Math.max(val, timeHeight));\n            };\n            this.handleTimeCellHeightChange = (val, key, oldVal) => {\n                const spreadsheetHeight = this.dataGridEntityInnerHeightMap.current.get(key) ?? this.estimatedRowHeight;\n                this.handleBodyRowHeightChange(key, Math.max(spreadsheetHeight, oldVal || 0), Math.max(spreadsheetHeight, val));\n            };\n            // This is a means to recompute row positioning when *HeightMaps change\n            this.handleBodyRowHeightChange = (key, oldHeight, newHeight) => {\n                if (this._isUnmounting)\n                    return;\n                if (this.isScrolling) {\n                    const scrollSlackDelta = oldHeight - newHeight;\n                    if (scrollSlackDelta) {\n                        const topCoord = this.bodyTops.get(key);\n                        // Live scroll position, because currentEntityScroll lags when the browser clamps the\n                        // scroll after content shrinks, and its scroll event hasn't fired yet\n                        if (topCoord != null && topCoord < this.bodyScroller.y) {\n                            if (!protectedApi.getIsHeightAuto(this.context.options)) {\n                                // console.log('DELTA', key, oldHeight, '->', newHeight)\n                                this.scrollSlack += scrollSlackDelta;\n                            }\n                        }\n                    }\n                }\n                else {\n                    this.queuedEntityScroll = true;\n                }\n                protectedApi.afterSize(this.boundForceUpdate);\n            };\n            this.handleHeaderRowHeightChange = () => {\n                if (this._isUnmounting)\n                    return;\n                protectedApi.afterSize(this.boundForceUpdate);\n            };\n            this.boundForceUpdate = () => {\n                if (this._isUnmounting)\n                    return;\n                this.forceUpdate();\n            };\n            this.spreadsheetHeaderScrollerRef = compat.createRef();\n            this.spreadsheetBodyScrollerRef = compat.createRef();\n            this.spreadsheetFooterScrollerRef = compat.createRef();\n            this.timeHeaderScrollerRef = compat.createRef();\n            this.timeBodyScrollerRef = compat.createRef();\n            this.timeFooterScrollerRef = compat.createRef();\n            this.headerRowInnerWidthMap = new protectedApi.RefMap(() => {\n                protectedApi.afterSize(this.handleSlotInnerWidths);\n            });\n            // TODO: give simpler handlers to this???\n            this.timelineHeaderRowInnerHeightMap = new protectedApi.RefMap(this.handleHeaderRowHeightChange);\n            this.dataGridHeaderRowInnerHeightMap = new protectedApi.RefMap(this.handleHeaderRowHeightChange);\n            // keyed by createEntityId\n            // NOTE: ignoring deletes can cause memory issues if resources constantly change and have new keys\n            // refactor in future. FWIW, TanStack Virtual doesn't garbage collect unnused dimensions either\n            this.dataGridEntityInnerHeightMap = new protectedApi.RefMap(this.handleSpreadsheetCellHeightChange, /* ignoreDeletes = */ true);\n            this.timeEntityInnerHeightMap = new protectedApi.RefMap(this.handleTimeCellHeightChange, /* ignoreDeletes = */ true);\n            // updated in-place\n            // .time takes precedence\n            // to operate on pixel value (.x), clear time\n            this.scroll = {};\n            // virtualizers\n            this.getEntityTop = (key) => this.bodyTops.get(key);\n            this.getEntityHeight = (key) => this.bodyHeights.get(key);\n            this.rowVirtualizer = new Virtualizer((rowLayout) => createEntityId(rowLayout.entity), this.getEntityTop, this.getEntityHeight, this.boundForceUpdate);\n            this.groupColVirtualizers = [];\n            this.slotVirtualizer = new Virtualizer((slotKey) => slotKey, (_key, index) => index * (this.props.slotWidth ?? ESTIMATED_SLOT_WIDTH), () => this.props.slotWidth ?? ESTIMATED_SLOT_WIDTH, this.boundForceUpdate, \n            /* overscan = */ 3);\n            this.timeHeaderVirtualizers = [];\n            // Sizing\n            // -----------------------------------------------------------------------------------------------\n            this.handleSpreadsheetClientWidth = (spreadsheetClientWidth) => {\n                if (this._isUnmounting)\n                    return;\n                protectedApi.setRef(this.props.spreadsheetClientWidthRef, spreadsheetClientWidth);\n            };\n            this.handleSpreadsheetBottomScrollbarWidth = (spreadsheetBottomScrollbarWidth) => {\n                this.setState({\n                    spreadsheetBottomScrollbarWidth,\n                });\n            };\n            this.handleTimeTotalWidth = (timeTotalWidth) => {\n                if (this._isUnmounting)\n                    return;\n                this.setState({\n                    timeTotalWidth,\n                });\n            };\n            this.handleTimeClientWidth = (timeClientWidth) => {\n                if (this._isUnmounting)\n                    return;\n                protectedApi.setRef(this.props.timeClientWidthRef, timeClientWidth);\n                this.setState({\n                    timeClientWidth,\n                });\n                this.slotVirtualizer.handleViewportSize(timeClientWidth);\n                for (const timeHeaderVirtualizer of this.timeHeaderVirtualizers) {\n                    timeHeaderVirtualizer.handleViewportSize(timeClientWidth);\n                    // TODO: what about difference in scrollbar width?\n                }\n            };\n            this.handleTimeClientHeight = (timeClientHeight) => {\n                if (this._isUnmounting)\n                    return;\n                this.setState({\n                    timeClientHeight,\n                });\n                if (!protectedApi.getIsHeightAuto(this.context.options)) {\n                    this.setVirtualizerViewportSize(timeClientHeight);\n                }\n            };\n            this.handleTimeBottomScrollbarWidth = (timeBottomScrollbarWidth) => {\n                if (this._isUnmounting)\n                    return;\n                this.setState({\n                    timeBottomScrollbarWidth,\n                });\n            };\n            this.handleSlotInnerWidths = () => {\n                if (this._isUnmounting)\n                    return;\n                const headerSlotInnerWidth = this.headerRowInnerWidthMap.current.get(this.props.tDateProfile.cellRows.length - 1);\n                if (headerSlotInnerWidth != null && headerSlotInnerWidth !== this.slotInnerWidth) {\n                    this.slotInnerWidth = headerSlotInnerWidth;\n                    protectedApi.setRef(this.props.slotInnerWidthRef, headerSlotInnerWidth);\n                }\n            };\n            this.updateVirtualizerScroll = protectedApi.debounce(() => {\n                const scroll = this.currentEntityScroll;\n                this.rowVirtualizer.handleScroll(scroll);\n                for (const groupColVirtualizer of this.groupColVirtualizers) {\n                    groupColVirtualizer.handleScroll(scroll);\n                }\n            }, 10)[0];\n            // Window Scrolling\n            // -----------------------------------------------------------------------------------------------\n            this.isTrackingWindowScroll = false;\n            this.bodyOffset = 0;\n            this.lastOffsetQuery = 0;\n            this.handleWindowScroll = () => {\n                const scrollY = window.scrollY;\n                const now = Date.now();\n                if (now - this.lastOffsetQuery > 200) {\n                    this.lastOffsetQuery = now;\n                    this.bodyOffset = this.bodyEl.getBoundingClientRect().top + scrollY;\n                }\n                this.handleAnyEntityScroll(scrollY - this.bodyOffset);\n            };\n            this.handleTimeScrollRequest = (timeScroll) => {\n                this.scroll.time = timeScroll;\n                this.applyTimeScroll();\n            };\n            // HACKY\n            // can't use isDevice because we want programmatic .scrollLeft assignments to work with scroll-virtualization too.\n            // the main reason we use a isDevice gate is to prevent the initial-scroll assignment from triggering handleTimeScroll,\n            // but the debounce luckily helps us in this case\n            this.handleTimeScroll = (_isDevice, scroll) => {\n                this.scroll.x = scroll;\n                this._handleTimeScroll();\n            };\n            this._handleTimeScroll = protectedApi.debounce(() => {\n                this.scroll.time = undefined; // prevents computeTimeScroll from computing based on time\n                const scrollX = this.scroll.x;\n                this.slotVirtualizer.handleScroll(scrollX);\n                for (const timeHeaderVirtualizer of this.timeHeaderVirtualizers) {\n                    timeHeaderVirtualizer.handleScroll(scrollX);\n                }\n            }, 10)[0];\n            this.handleTimeScrollEnd = () => {\n                protectedApi.setRef(this.props.scrollRef, this.scroll);\n            };\n            this.isScrolling = false;\n            // REQUESTED scroll by external systems\n            // (for bodyScroller only, NOT window)\n            this.handleResourceScrollRequest = (resourceId) => {\n                this.scroll.entityId = resourceId;\n                this.scroll.fromBottom = undefined;\n                // The resource might not be rendered yet, such as when added within batchRendering. Otherwise\n                // render() would virtualize rows around the requested scroll without ever applying it\n                if (!this.applyEntityScroll()) {\n                    this.queuedEntityScroll = true;\n                }\n            };\n            // START vertical scroll\n            // (for bodyScroller only, NOT window)\n            this.handleEntityScrollStart = () => {\n                this.isScrolling = true;\n            };\n            // DURING verical scroll\n            // (for bodyScroller only, NOT window)\n            this.handleEntityScroll = (isDevice, scroll) => {\n                // The layout's own scroll to a cut-short position keeps its anchor (see applyEntityScroll). Any\n                // other scroll drops it. Decided here, with the moving scroller's position: at scroll start, the\n                // syncer hasn't picked that scroller yet\n                if (isDevice || !this.isCutShortEntityScroll(scroll)) {\n                    this.cutShortEntityScrollY = undefined;\n                    this.scroll.entityId = undefined;\n                    this.scroll.fromBottom = undefined;\n                }\n                if (!protectedApi.getIsHeightAuto(this.context.options)) {\n                    this.handleAnyEntityScroll(scroll);\n                    // natural handler for vertical scroll, for either div or window scroll\n                    // if scrolls into slack area, move scroll to zero ASAP\n                    if (scroll < this.scrollSlack) {\n                        // console.log('ABORT', this.scrollSlack)\n                        this.scrollSlack = 0;\n                        this.forceUpdate(() => {\n                            this.bodyScroller.scrollTo({ y: 0 });\n                        });\n                    }\n                }\n            };\n            // END vertical scroll\n            // (for bodyScroller only, NOT window)\n            this.handleEntityScrollEnd = () => {\n                this.isScrolling = false;\n                if (!this.isTrackingWindowScroll) {\n                    const { bodyLayouts, bodyTops, bodyHeights, scroll } = this;\n                    const y = this.bodyScroller.y;\n                    if (this.isCutShortEntityScroll(y)) {\n                        // keep the anchor, and apply it again now that rows measured during the scroll have heights\n                        this.queuedEntityScroll = true;\n                    }\n                    else if (!y) {\n                        // If already at top, keep at top. Anchoring to the first row would hide any rows that are\n                        // later inserted above it\n                        scroll.entityId = undefined;\n                        scroll.fromBottom = undefined;\n                    }\n                    else {\n                        const coordRes = findEntityByCoord(bodyLayouts, bodyTops, bodyHeights, y, createEntityId);\n                        if (coordRes) {\n                            const [entity, elTop, elHeight] = coordRes;\n                            scroll.entityId = createEntityId(entity);\n                            scroll.fromBottom = elTop + elHeight - y;\n                        }\n                    }\n                    // At scrolling end, convert scrollSlack into real scroll and zero out. The anchor above is\n                    // relative to the row, so it also holds if this rerender changes estimatedRowHeight\n                    if (this.scrollSlack) {\n                        // console.log('CONSUMING', this.scrollSlack)\n                        this.scrollSlack = 0;\n                        this.queuedEntityScroll = true;\n                    }\n                    // Virtualization always rerenders, because rows measured during the scroll can change\n                    // estimatedRowHeight. Otherwise, all rows are measured from the start\n                    if (this.queuedEntityScroll || this.context.options.virtualization) {\n                        this.forceUpdate();\n                    }\n                }\n            };\n            // Hit System\n            // -----------------------------------------------------------------------------------------------\n            this.handleBodyEl = (el) => {\n                this.bodyEl = el;\n                if (el) {\n                    this.context.registerInteractiveComponent(this, { el });\n                }\n                else {\n                    this.context.unregisterInteractiveComponent(this);\n                }\n            };\n        }\n        render() {\n            let { props, state, context } = this;\n            let { dateProfile, hasNesting } = props;\n            let { options, viewSpec } = context;\n            const { borderlessX, borderlessTop, borderlessBottom } = protectedApi.computeViewBorderless(options);\n            let { spreadsheetBottomScrollbarWidth, timeTotalWidth, timeClientWidth, timeClientHeight, timeBottomScrollbarWidth } = state;\n            /* date */\n            const { tDateProfile } = props;\n            let { cellRows } = tDateProfile;\n            /* table settings */\n            let allowVerticalScrolling = !protectedApi.getIsHeightAuto(options);\n            let tableHeaderSticky = protectedApi.getTableHeaderSticky(options);\n            let footerScrollbarSticky = protectedApi.getFooterScrollbarSticky(options);\n            const { colSpecs, groupColCnt, superHeaderRendering } = props;\n            /* table hierarchy */\n            const { resourceHierarchy } = props;\n            const superHeaderRowSpan = superHeaderRendering ? 1 : 0;\n            const totalHeaderRowSpan = superHeaderRowSpan + 1;\n            /* table display */\n            let { layouts: bodyLayouts, flatRowLayouts, flatGroupColLayouts, totalCnt, } = this.buildResourceLayouts(resourceHierarchy, hasNesting, props.resourceEntityExpansions, options.resourcesInitiallyExpanded);\n            this.bodyLayouts = bodyLayouts;\n            // update groupColVirtualizers\n            let groupColVirtualizers = this.groupColVirtualizers;\n            let oldLen = groupColVirtualizers.length;\n            let newLen = flatGroupColLayouts.length;\n            if (newLen > oldLen) {\n                for (let i = oldLen; i < newLen; i++) {\n                    groupColVirtualizers[i] = new Virtualizer((groupCellLayout) => createGroupId(groupCellLayout.entity), this.getEntityTop, this.getEntityHeight, this.boundForceUpdate);\n                }\n            }\n            else if (newLen < oldLen) {\n                groupColVirtualizers = groupColVirtualizers.slice(0, newLen);\n            }\n            this.groupColVirtualizers = groupColVirtualizers;\n            // update timeHeaderVirtualizers\n            let timeHeaderVirtualizers = this.timeHeaderVirtualizers;\n            oldLen = timeHeaderVirtualizers.length;\n            newLen = cellRows.length;\n            if (newLen > oldLen) {\n                for (let i = oldLen; i < newLen; i++) {\n                    timeHeaderVirtualizers[i] = new Virtualizer((cell) => cell.key, undefined, // getItemStart (let Virtualizer compute it)\n                    (key, index, cell) => cell.colspan * (this.props.slotWidth ?? ESTIMATED_SLOT_WIDTH), this.boundForceUpdate);\n                    // HACK to prepopulate\n                    timeHeaderVirtualizers[i].viewportSize = timeHeaderVirtualizers[0].viewportSize;\n                    timeHeaderVirtualizers[i].scroll = timeHeaderVirtualizers[0].scroll;\n                }\n            }\n            this.timeHeaderVirtualizers = timeHeaderVirtualizers;\n            // Expansion-filtered rows, including those outside the virtualized viewport.\n            // `totalCnt` also includes collapsed descendants; `rowPositions` below is the mounted subset.\n            const displayedRowCnt = flatRowLayouts.length;\n            /* table positions */\n            // does not include bottom border between header and body\n            const headerHeight = computeResourceTimelineHeaderHeight(this.dataGridHeaderRowInnerHeightMap.current, this.timelineHeaderRowInnerHeightMap.current, Boolean(superHeaderRendering), tDateProfile.cellRows.length);\n            let endScrollbarWidth = (timeTotalWidth != null && timeClientWidth != null)\n                ? timeTotalWidth - timeClientWidth\n                : undefined;\n            this.updateEstimatedRowHeight();\n            // totalBodyHeight is the height WITHIN the scrollers\n            let [bodyHeights, totalBodyHeight] = computeHeights(// TODO: memoize?\n            bodyLayouts, createEntityId, (entityKey) => {\n                const entitySpreadsheetHeight = this.dataGridEntityInnerHeightMap.current.get(entityKey) ?? this.estimatedRowHeight;\n                // map doesn't contain group-column-cell heights, thus ||0\n                // TODO: better use estimatedRowHeight\n                const entityTimeHeight = this.timeEntityInnerHeightMap.current.get(entityKey) || 0;\n                return Math.max(entitySpreadsheetHeight, entityTimeHeight);\n            }, \n            /* minHeight = */ (allowVerticalScrolling && options.expandRows)\n                ? timeClientHeight\n                : undefined);\n            this.bodyHeights = bodyHeights;\n            let bodyTops = computeTopsFromHeights(bodyLayouts, createEntityId, bodyHeights, this.scrollSlack);\n            this.bodyTops = bodyTops;\n            /* virtualize */\n            const virtualizationDisabled = !options.virtualization;\n            // ensure in-range items are computed with most recent scroll, even tho maybe not applied yet\n            const forcedEntityScroll = this.computeEntityScroll();\n            const rowPositions = this.rowVirtualizer.computePositions(flatRowLayouts, virtualizationDisabled, forcedEntityScroll);\n            // Keep render loops component-type-specific for future row recycling.\n            const groupRowPositions = [];\n            const resourceRowPositions = [];\n            for (const rowPosition of rowPositions) {\n                if ('resourceFields' in rowPosition.item) {\n                    resourceRowPositions.push(rowPosition);\n                }\n                else {\n                    groupRowPositions.push(rowPosition);\n                }\n            }\n            const groupColPositions = this.groupColVirtualizers.map((groupColVirtualizer, i) => {\n                return groupColVirtualizer.computePositions(flatGroupColLayouts[i], virtualizationDisabled, forcedEntityScroll);\n            });\n            // Scope deterministic row/column cell IDs to this calendar instance.\n            const cellIdPrefix = `${context.baseId}rt`;\n            const ariaBodyRows = buildAriaBodyRows(flatRowLayouts, groupColPositions, rowPositions, groupColCnt, colSpecs.length);\n            // Only paint vertical fills/lines that are in view\n            // Big performance impact for very tall virtualized lists\n            // NOTE: could be zero rows and groups!\n            const rowPositionShift = computeShift(rowPositions);\n            const yFillTop = rowPositionShift?.[0] ?? 0;\n            const yFillBottom = rowPositionShift?.[1] ?? 0;\n            let yFillHeight;\n            if (allowVerticalScrolling) {\n                yFillHeight = timeClientHeight != null\n                    ? Math.max(yFillBottom, timeClientHeight) - yFillTop\n                    : undefined;\n            }\n            else {\n                yFillHeight = yFillBottom - yFillTop;\n            }\n            // Uses the same slot geometry as slotVirtualizer, which is estimated until measured.\n            // When the canvas fits without scrolling, scrollTo() is a no-op that fires no scroll event,\n            // so an uncapped time-based scroll would linger and the virtualizer would skip the leading\n            // slots (#8093)\n            this.maxHScroll = timeClientWidth != null\n                ? Math.max(0, tDateProfile.slotCnt * (props.slotWidth ?? ESTIMATED_SLOT_WIDTH) - timeClientWidth)\n                : undefined;\n            const forcedTimeScroll = this.computeTimeScroll();\n            const slotDatePositions = this.slotVirtualizer.computePositions(tDateProfile.slotKeys, virtualizationDisabled, forcedTimeScroll);\n            const slotDateShift = computeShift(slotDatePositions);\n            /* */\n            const { timeCanvasWidth } = props;\n            const slotWidth = props.slotWidth ?? ESTIMATED_SLOT_WIDTH;\n            const { spreadsheetColWidths, spreadsheetCanvasWidth } = props;\n            /* event display */\n            const { splitProps, bgSlicedProps } = props;\n            /* business hour display */\n            const { hasResourceBusinessHours, fallbackBusinessHours } = props;\n            const enableNowIndicator = // TODO: DRY\n             options.nowIndicator &&\n                isNowInTimelineRange(props.nowDate, props.dateProfile, props.tDateProfile);\n            /* filler */\n            const spreadsheetBottomFiller = Math.max(0, (timeBottomScrollbarWidth || 0) -\n                (spreadsheetBottomScrollbarWidth || 0));\n            const timelineBottomFiller = Math.max(0, (spreadsheetBottomScrollbarWidth || 0) -\n                (timeBottomScrollbarWidth || 0));\n            const maxVScroll = this.maxVScroll =\n                (allowVerticalScrolling && timeClientHeight != null)\n                    ? Math.max(0, totalBodyHeight - timeClientHeight)\n                    : 0;\n            const allowBottomFiller = !options.expandRows && // if rows expand, then we never need filler\n                !maxVScroll; // no scrolling possible\n            const spreadsheetNeedsBottomFiller = allowBottomFiller || Boolean(spreadsheetBottomFiller);\n            const timelineNeedsBottomFiller = allowBottomFiller || Boolean(timelineBottomFiller);\n            return (jsxRuntime.jsxs(protectedApi.ViewContainer, { viewSpec: viewSpec, attrs: {\n                    role: getAriaTableRole(hasNesting),\n                    'aria-rowcount': totalHeaderRowSpan + totalCnt,\n                    'aria-colcount': colSpecs.length + 1,\n                    'aria-label': props.labelStr,\n                    'aria-labelledby': props.labelId,\n                }, className: publicApi.joinClassNames(props.className, protectedApi.generateClassName(options.tableClass, {\n                    borderlessX,\n                    borderlessTop,\n                    borderlessBottom,\n                    multiMonthColumns: 0,\n                }), classNames__default[\"default\"].flexCol), children: [jsxRuntime.jsx(AriaProxyRows, { cellIdPrefix: cellIdPrefix, bodyRows: ariaBodyRows, resourceColCnt: colSpecs.length, superHeaderRowSpan: superHeaderRowSpan, hasNesting: hasNesting }), jsxRuntime.jsx(ResizableTwoCol, { initialStartWidthConfig: props.initialSpreadsheetWidthConfig, resizedWidthConfigRef: props.spreadsheetResizedWidthConfigRef, className: allowVerticalScrolling ? classNames__default[\"default\"].liquid : '', \n                        /* spreadsheet\n                        --------------------------------------------------------------------------------- */\n                        startClassName: publicApi.joinClassNames(classNames__default[\"default\"].flexCol, classNames__default[\"default\"].isolate), startContent: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(\"div\", { role: \"presentation\", className: publicApi.joinClassNames(protectedApi.generateClassName(options.tableHeaderClass, {\n                                        isSticky: tableHeaderSticky,\n                                        borderlessX,\n                                        borderlessTop,\n                                        borderlessBottom,\n                                        multiMonthColumns: 0,\n                                    }), classNames__default[\"default\"].flexCol, tableHeaderSticky && classNames__default[\"default\"].tableHeaderSticky, classNames__default[\"default\"].z1), children: [jsxRuntime.jsxs(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].flexCol, classNames__default[\"default\"].contentBox), style: {\n                                                height: headerHeight,\n                                            }, children: [Boolean(superHeaderRendering) && (jsxRuntime.jsx(\"div\", { role: \"presentation\", className: publicApi.joinClassNames(options.resourceHeaderRowClass, classNames__default[\"default\"].flexRow, classNames__default[\"default\"].grow, classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessTop), children: jsxRuntime.jsx(SuperHeaderCell, { cellIdPrefix: cellIdPrefix, cellRowIndex: 1, cellColIndex: 0, renderHooks: superHeaderRendering, indent: hasNesting && !groupColCnt /* group-cols are leftmost, making expander alignment irrelevant */, innerHeightRef: this.dataGridHeaderRowInnerHeightMap.createRef(true), colSpan: colSpecs.length, indentWidth: props.indentWidth }) })), jsxRuntime.jsx(protectedApi.Scroller, { horizontal: true, hideScrollbars: true, className: publicApi.joinClassNames(classNames__default[\"default\"].flexCol, classNames__default[\"default\"].grow), ref: this.spreadsheetHeaderScrollerRef, children: jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].flexCol, classNames__default[\"default\"].grow), style: { minWidth: spreadsheetCanvasWidth }, children: jsxRuntime.jsx(\"div\", { role: \"presentation\", className: publicApi.joinClassNames(options.resourceHeaderRowClass, classNames__default[\"default\"].flexRow, classNames__default[\"default\"].grow, classNames__default[\"default\"].borderless), children: jsxRuntime.jsx(HeaderCells, { colSpecs: colSpecs, colWidths: spreadsheetColWidths, indent: hasNesting, indentWidth: props.indentWidth, rowIndex: superHeaderRowSpan, cellIdPrefix: cellIdPrefix, \n                                                                // refs\n                                                                innerHeightRef: this.dataGridHeaderRowInnerHeightMap.createRef(false), onColResize: props.onColResize }) }) }) })] }), jsxRuntime.jsx(\"div\", { className: protectedApi.generateClassName(options.slotHeaderDividerClass, {\n                                                inTableHeader: true,\n                                                options: { dayMinWidth: options.dayMinWidth },\n                                            }) })] }), jsxRuntime.jsxs(protectedApi.Scroller, { vertical: allowVerticalScrolling, horizontal: true, hideScrollbars: true, className: publicApi.joinClassNames(protectedApi.generateClassName(options.tableBodyClass, {\n                                        borderlessX,\n                                        borderlessTop,\n                                        borderlessBottom,\n                                        multiMonthColumns: 0,\n                                    }), classNames__default[\"default\"].flexCol, classNames__default[\"default\"].rel, // for Ruler.fillStart\n                                    allowVerticalScrolling && classNames__default[\"default\"].liquid, classNames__default[\"default\"].z0), ref: this.spreadsheetBodyScrollerRef, clientWidthRef: this.handleSpreadsheetClientWidth, children: [jsxRuntime.jsx(BodySection, { cellIdPrefix: cellIdPrefix, inTreeGrid: hasNesting, groupRowPositions: groupRowPositions, resourceRowPositions: resourceRowPositions, groupColPositions: groupColPositions, displayedRowCnt: displayedRowCnt, groupCellCnts: flatGroupColLayouts.map((flatGroupCellLayouts) => flatGroupCellLayouts.length), colWidths: spreadsheetColWidths, colSpecs: colSpecs, rowInnerHeightRefMap: this.dataGridEntityInnerHeightMap, headerRowSpan: totalHeaderRowSpan, indentWidth: props.indentWidth, canvasWidth: spreadsheetCanvasWidth, canvasHeight: totalBodyHeight }), spreadsheetNeedsBottomFiller && (jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(protectedApi.generateClassName(options.fillerClass, { inTableHeader: false }), classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessBottom), style: { minHeight: spreadsheetBottomFiller } }))] }), jsxRuntime.jsx(protectedApi.FooterScrollbar, { isSticky: footerScrollbarSticky, canvasWidth: spreadsheetCanvasWidth, scrollerRef: this.spreadsheetFooterScrollerRef, scrollbarWidthRef: this.handleSpreadsheetBottomScrollbarWidth })] }), \n                        /* time-area (TODO: try to make this DRY-er with TimelineView???)\n                        --------------------------------------------------------------------------------- */\n                        endClassName: publicApi.joinClassNames(classNames__default[\"default\"].flexCol, classNames__default[\"default\"].isolate), endContent: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(\"div\", { className: publicApi.joinClassNames(protectedApi.generateClassName(options.tableHeaderClass, {\n                                        isSticky: tableHeaderSticky,\n                                        borderlessX,\n                                        borderlessTop,\n                                        borderlessBottom,\n                                        multiMonthColumns: 0,\n                                    }), classNames__default[\"default\"].flexCol, tableHeaderSticky && classNames__default[\"default\"].tableHeaderSticky, classNames__default[\"default\"].z1), children: [jsxRuntime.jsxs(protectedApi.Scroller, { ref: this.timeHeaderScrollerRef, horizontal: true, hideScrollbars: true, className: publicApi.joinClassNames(classNames__default[\"default\"].flexRow, classNames__default[\"default\"].contentBox), style: {\n                                                height: headerHeight,\n                                            }, children: [jsxRuntime.jsx(\"div\", { role: \"presentation\", children: jsxRuntime.jsx(\"div\", { ...buildAriaCellAttrs({\n                                                            cellIdPrefix,\n                                                            cellRowIndex: 1,\n                                                            cellColIndex: colSpecs.length,\n                                                        }), role: \"columnheader\", \"aria-rowspan\": totalHeaderRowSpan, className: classNames__default[\"default\"].srOnly, children: options.eventsHint }) }), jsxRuntime.jsxs(\"div\", { \"aria-hidden\": true, className: publicApi.joinClassNames(// TODO: DRY\n                                                    classNames__default[\"default\"].rel, // origin for now-indicator\n                                                    classNames__default[\"default\"].flexCol, timeCanvasWidth == null && classNames__default[\"default\"].liquid, \n                                                    // slotLiquid:true implies that slots are expanding bigger than their min,\n                                                    // and that there are NOT any horizontal scrollbars. if so, then no worries\n                                                    // about sticky-event-titles. if so, we're able to apply cropping to prevent\n                                                    // event hover-resizers and whatnot from bleeding out of the canvas and causing\n                                                    // horizontal scrollbars when there normally wouldn't be any\n                                                    props.slotLiquid && classNames__default[\"default\"].crop), style: { minWidth: timeCanvasWidth }, children: [cellRows.map((cells, rowIndex) => {\n                                                            const rowLevel = cellRows.length - rowIndex - 1;\n                                                            const headerCellPositions = timeHeaderVirtualizers[rowIndex].computePositions(cells, virtualizationDisabled, forcedTimeScroll);\n                                                            const shift = computeShift(headerCellPositions);\n                                                            if (shift) {\n                                                                timeHeaderVirtualizers[rowIndex].computePositions(cells, virtualizationDisabled, forcedTimeScroll);\n                                                            }\n                                                            return (jsxRuntime.jsx(TimelineHeaderRow, { className: publicApi.joinClassNames(classNames__default[\"default\"].rel, classNames__default[\"default\"].grow), dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, rowLevel: rowLevel, cells: cells, slotWidth: slotWidth, innerWidthRef: this.headerRowInnerWidthMap.createRef(rowIndex), innerHeighRef: this.timelineHeaderRowInnerHeightMap.createRef(rowIndex), insetInlineStart: shift && shift[0], width: shift ? (shift[1] - shift[0]) : undefined, cellStartIndex: shift && shift[2], cellCount: headerCellPositions.length }, rowIndex));\n                                                        }), enableNowIndicator && (\n                                                        // TODO: make this positioned WITHIN padding\n                                                        jsxRuntime.jsx(TimelineNowIndicatorArrow, { tDateProfile: tDateProfile, nowMs: props.nowMs, slotWidth: slotWidth }))] }), Boolean(endScrollbarWidth) && (jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(protectedApi.generateClassName(options.fillerClass, { inTableHeader: true }), classNames__default[\"default\"].borderlessY, classNames__default[\"default\"].borderlessEnd), style: { minWidth: endScrollbarWidth } }))] }), jsxRuntime.jsx(\"div\", { className: protectedApi.generateClassName(options.slotHeaderDividerClass, {\n                                                inTableHeader: false,\n                                                options: { dayMinWidth: options.dayMinWidth },\n                                            }) })] }), jsxRuntime.jsx(protectedApi.Scroller, { vertical: allowVerticalScrolling &&\n                                        // infer whether scrolling would happen. prevents clientHeight thrashing due to horizontal scrollbars\n                                        (totalBodyHeight != null && timeClientHeight != null && totalBodyHeight > timeClientHeight), horizontal: true, hideScrollbars: footerScrollbarSticky /* FYI, this view is never print */, className: publicApi.joinClassNames(protectedApi.generateClassName(options.tableBodyClass, {\n                                        borderlessX,\n                                        borderlessTop,\n                                        borderlessBottom,\n                                        multiMonthColumns: 0,\n                                    }), classNames__default[\"default\"].flexCol, classNames__default[\"default\"].rel, // for Ruler.fillStart\n                                    allowVerticalScrolling && classNames__default[\"default\"].liquid, classNames__default[\"default\"].z0), ref: this.timeBodyScrollerRef, clientWidthRef: this.handleTimeClientWidth, clientHeightRef: allowVerticalScrolling\n                                        ? this.handleTimeClientHeight\n                                        : undefined // for when height:auto, which will have dynamic height and needlessly fire ResizeObserver\n                                    , bottomScrollbarWidthRef: allowVerticalScrolling\n                                        ? this.handleTimeBottomScrollbarWidth\n                                        : undefined // for when height:auto, which will have dynamic height and needlessly fire ResizeObserver\n                                    , children: jsxRuntime.jsxs(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].rel, // origin for canvas?\n                                        classNames__default[\"default\"].grow, classNames__default[\"default\"].flexCol, \n                                        // slotLiquid:true implies that slots are expanding bigger than their min,\n                                        // and that there are NOT any horizontal scrollbars. if so, then no worries\n                                        // about sticky-event-titles. if so, we're able to apply cropping to prevent\n                                        // event hover-resizers and whatnot from bleeding out of the canvas and causing\n                                        // horizontal scrollbars when there normally wouldn't be any\n                                        props.slotLiquid && classNames__default[\"default\"].crop), style: {\n                                            minWidth: timeCanvasWidth,\n                                            minHeight: totalBodyHeight,\n                                        }, ref: this.handleBodyEl, children: [jsxRuntime.jsxs(\"div\", { \n                                                // roving-origin for anything that fills y-axis,\n                                                // like slots or non-resource bg events\n                                                // is ZERO-width, but has defined top/bottom\n                                                className: classNames__default[\"default\"].abs, style: {\n                                                    top: yFillTop,\n                                                    height: yFillHeight,\n                                                    bottom: yFillHeight == null ? 0 : undefined,\n                                                    insetInlineStart: slotDateShift?.[0],\n                                                }, children: [jsxRuntime.jsx(TimelineSlats, { dateProfile: dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, slatStartIndex: slotDateShift?.[2], slatCount: slotDatePositions.length, slotWidth: slotWidth }), jsxRuntime.jsx(TimelineBg, { tDateProfile: tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, \n                                                        // content\n                                                        bgEventSegs: bgSlicedProps.bgEventSegs, businessHourSegs: hasResourceBusinessHours ? null : bgSlicedProps.businessHourSegs, dateSelectionSegs: bgSlicedProps.dateSelectionSegs, eventResizeSegs: (bgSlicedProps.eventResize ? bgSlicedProps.eventResize.segs : null), \n                                                        // dimensions\n                                                        slotWidth: props.slotWidth, \n                                                        // virtualization\n                                                        clipStart: slotDateShift?.[0], clipEnd: slotDateShift?.[1] }), enableNowIndicator && (jsxRuntime.jsx(TimelineNowIndicatorLine, { tDateProfile: tDateProfile, nowMs: props.nowMs, slotWidth: slotWidth, clipStart: slotDateShift?.[0] }))] }), jsxRuntime.jsxs(\"div\", { \n                                                // roving-origin for all types of resource(-group)-rows\n                                                // is ZERO-height, always fixed to top, but has definet x-coordinate and width\n                                                role: \"presentation\", className: classNames__default[\"default\"].abs, style: {\n                                                    top: 0,\n                                                    insetInlineStart: slotDateShift?.[0],\n                                                    width: slotDateShift ? (slotDateShift[1] - slotDateShift[0]) : undefined,\n                                                }, children: [groupRowPositions.map((rowPosition) => {\n                                                        const rowLayout = rowPosition.item;\n                                                        const group = rowLayout.entity;\n                                                        const groupKey = rowPosition.key;\n                                                        return (jsxRuntime.jsx(\"div\", { role: \"presentation\", className: publicApi.joinClassNames(classNames__default[\"default\"].fillX, classNames__default[\"default\"].flexRow), style: {\n                                                                top: rowPosition.start,\n                                                            }, children: jsxRuntime.jsx(GroupLane, { cellIdPrefix: cellIdPrefix, inTreeGrid: hasNesting, cellRowIndex: 1 + totalHeaderRowSpan + rowLayout.rowIndex, cellColIndex: colSpecs.length, group: group, borderBottom: rowLayout.visibleIndex < displayedRowCnt - 1, innerHeightRef: this.timeEntityInnerHeightMap.createRef(groupKey), height: rowPosition.size }) }, groupKey));\n                                                    }), resourceRowPositions.map((rowPosition) => {\n                                                        const resourceLayout = rowPosition.item;\n                                                        const resource = resourceLayout.entity;\n                                                        return (compat.createElement(ResourceLane, { ...splitProps[resource.id], key: resource.id /* TODO: use rowPosition.key? */, role: \"presentation\", cellIdPrefix: cellIdPrefix, inTreeGrid: hasNesting, cellRowIndex: 1 + totalHeaderRowSpan + resourceLayout.rowIndex, cellColIndex: colSpecs.length, className: classNames__default[\"default\"].fillX, resource: resource, dateProfile: dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, businessHours: resource.businessHours || fallbackBusinessHours, borderBottom: resourceLayout.visibleIndex < displayedRowCnt - 1, \n                                                            // ref\n                                                            heightRef: this.timeEntityInnerHeightMap.createRef(resource.id), \n                                                            // dimensions\n                                                            slotWidth: props.slotWidth, \n                                                            // position\n                                                            top: rowPosition.start, height: rowPosition.size, \n                                                            // virtualization\n                                                            clipStart: slotDateShift?.[0], clipEnd: slotDateShift?.[1] }));\n                                                    })] }), timelineNeedsBottomFiller && (jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(protectedApi.generateClassName(options.fillerClass, { inTableHeader: false }), classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessBottom, classNames__default[\"default\"].fillX), style: {\n                                                    top: yFillBottom,\n                                                    minHeight: timelineBottomFiller,\n                                                } }))] }) }), Boolean(footerScrollbarSticky) && (jsxRuntime.jsx(protectedApi.FooterScrollbar, { isSticky: true, canvasWidth: timeCanvasWidth, scrollbarWidthRef: this.handleTimeBottomScrollbarWidth, scrollerRef: this.timeFooterScrollerRef })), jsxRuntime.jsx(protectedApi.Ruler, { widthRef: this.handleTimeTotalWidth })] }) })] }));\n        }\n        // Lifecycle\n        // -----------------------------------------------------------------------------------------------\n        componentDidMount() {\n            const { props, context } = this;\n            this._isUnmounting = false;\n            this.timeScroller = new ScrollerSyncer(true); // horizontal=true\n            this.bodyScroller = new ScrollerSyncer(); // horizontal=false\n            this.spreadsheetScroller = new ScrollerSyncer(true); // horizontal=true\n            this.updateScrollersSyncers();\n            this.updateWindowScrolling();\n            if (props.initialScroll) {\n                this.scroll = { ...props.initialScroll }; // copy\n                this.applyEntityScroll();\n                this.applyTimeScroll();\n            }\n            else {\n                this.resetTimeScroll();\n            }\n            this.timeScroller.addScrollListener(this.handleTimeScroll);\n            this.timeScroller.addScrollEndListener(this.handleTimeScrollEnd);\n            this.bodyScroller.addScrollStartListener(this.handleEntityScrollStart);\n            this.bodyScroller.addScrollListener(this.handleEntityScroll);\n            this.bodyScroller.addScrollEndListener(this.handleEntityScrollEnd);\n            context.emitter.on('_timeScrollRequest', this.handleTimeScrollRequest);\n            context.emitter.on('_resourceScrollRequest', this.handleResourceScrollRequest);\n        }\n        componentDidUpdate(prevProps, prevState) {\n            const { props, state } = this;\n            const { options } = this.context;\n            this.updateScrollersSyncers();\n            this.updateWindowScrolling();\n            const dateProfileChange = prevProps.dateProfile !== props.dateProfile;\n            const slotWidthChange = prevProps.slotWidth !== props.slotWidth;\n            const timeCanvasWidthChange = prevProps.timeCanvasWidth !== props.timeCanvasWidth;\n            const timeClientWidthChange = prevState.timeClientWidth !== state.timeClientWidth;\n            if (dateProfileChange || slotWidthChange || timeCanvasWidthChange || timeClientWidthChange) {\n                if (dateProfileChange && options.scrollTimeReset) {\n                    this.resetTimeScroll();\n                }\n                else {\n                    this.applyTimeScroll();\n                }\n            }\n            /*\n            Unfortunately this will execute after auto-scroll finished but before scrollEnd can record\n            the updated scroll positioning, causing a scroll-jump to the last recorded entityScroll.\n            */\n            if (this.queuedEntityScroll) {\n                // console.log('queuedEntityScroll!')\n                this.queuedEntityScroll = false;\n                this.applyEntityScroll();\n            }\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.slotInnerWidth = undefined;\n            this.timeScroller.destroy();\n            this.bodyScroller.destroy();\n            this.spreadsheetScroller.destroy();\n            this.destroyWindowScrolling();\n            this.bodyScroller.removeScrollEndListener(this.handleEntityScrollEnd);\n            this.bodyScroller.removeScrollListener(this.handleEntityScroll);\n            this.context.emitter.off('_timeScrollRequest', this.handleTimeScrollRequest);\n            this.context.emitter.off('_resourceScrollRequest', this.handleResourceScrollRequest);\n        }\n        // Virtualizer Utils\n        // -----------------------------------------------------------------------------------------------\n        setVirtualizerViewportSize(height) {\n            this.rowVirtualizer.handleViewportSize(height);\n            for (const groupColVirtualizer of this.groupColVirtualizers) {\n                groupColVirtualizer.handleViewportSize(height);\n            }\n        }\n        handleAnyEntityScroll(scroll) {\n            this.currentEntityScroll = scroll;\n            this.updateVirtualizerScroll();\n        }\n        updateWindowScrolling() {\n            if (protectedApi.getIsHeightAuto(this.context.options)) {\n                if (!this.isTrackingWindowScroll) {\n                    this.isTrackingWindowScroll = true;\n                    this.setVirtualizerViewportSize(window.innerHeight);\n                    ([this.handleWindowResize, this.cancelWindowResize] = protectedApi.debounce(() => {\n                        this.setVirtualizerViewportSize(window.innerHeight);\n                    }, 200));\n                    window.addEventListener('resize', this.handleWindowResize);\n                    window.addEventListener('scroll', this.handleWindowScroll, { passive: true });\n                }\n            }\n            else {\n                this.destroyWindowScrolling();\n            }\n        }\n        destroyWindowScrolling() {\n            if (this.isTrackingWindowScroll) {\n                this.isTrackingWindowScroll = false;\n                this.cancelWindowResize();\n                window.removeEventListener('resize', this.handleWindowResize);\n                window.removeEventListener('scroll', this.handleWindowScroll, { passive: true });\n            }\n        }\n        // Scrolling\n        // -----------------------------------------------------------------------------------------------\n        updateScrollersSyncers() {\n            this.timeScroller.handleChildren([\n                this.timeHeaderScrollerRef.current,\n                this.timeBodyScrollerRef.current,\n                this.timeFooterScrollerRef.current,\n            ]);\n            this.bodyScroller.handleChildren([\n                this.spreadsheetBodyScrollerRef.current,\n                this.timeBodyScrollerRef.current,\n            ]);\n            this.spreadsheetScroller.handleChildren([\n                this.spreadsheetHeaderScrollerRef.current,\n                this.spreadsheetBodyScrollerRef.current,\n                this.spreadsheetFooterScrollerRef.current,\n            ]);\n        }\n        // TIME Scrolling\n        // -----------------------------------------------------------------------------------------------\n        resetTimeScroll() {\n            this.handleTimeScrollRequest(this.context.options.scrollTime);\n        }\n        applyTimeScroll() {\n            const x = this.computeTimeScroll();\n            if (x !== undefined) {\n                this.timeScroller.scrollTo({ x });\n                if (this.scroll.x !== x) {\n                    this.scroll.x = x;\n                    protectedApi.setRef(this.props.scrollRef, this.scroll);\n                }\n            }\n        }\n        // used by render() for virtualization too\n        computeTimeScroll() {\n            const { props, context, scroll } = this;\n            const { tDateProfile } = props;\n            const slotWidth = props.slotWidth ?? ESTIMATED_SLOT_WIDTH;\n            let { x, time } = scroll;\n            if (time) {\n                x = timeToCoord(time, context.dateEnv, props.dateProfile, tDateProfile, slotWidth);\n                if (x) {\n                    x += 1; // overcome border. TODO: DRY this up\n                }\n            }\n            if (x !== undefined && this.maxHScroll !== undefined) {\n                x = Math.min(this.maxHScroll, x);\n            }\n            return x;\n        }\n        // ENTITY (RESOURCE) Scrolling\n        // -----------------------------------------------------------------------------------------------\n        // Assumes unmeasured rows are as tall as the median of the rows measured most recently, so that\n        // the scroll height stays stable when rows are alike, and a scrollbar drag can track the pointer.\n        // Doesn't change during a scroll, when it would move rows that scrollSlack doesn't account for.\n        // Doesn't change when the window scrolls, because the anchoring below only works on bodyScroller.\n        updateEstimatedRowHeight() {\n            const { recentlyMeasuredRowKeys } = this;\n            const { options } = this.context;\n            if (options.virtualization &&\n                !protectedApi.getIsHeightAuto(options) &&\n                !this.isScrolling &&\n                recentlyMeasuredRowKeys.length) {\n                const sortedHeights = recentlyMeasuredRowKeys.map((key) => Math.max(this.dataGridEntityInnerHeightMap.current.get(key), this.timeEntityInnerHeightMap.current.get(key) || 0)).sort((a, b) => a - b);\n                const estimatedRowHeight = sortedHeights[sortedHeights.length >> 1];\n                if (estimatedRowHeight !== this.estimatedRowHeight) {\n                    this.estimatedRowHeight = estimatedRowHeight;\n                    this.queuedEntityScroll = true; // keep the current row in place\n                }\n            }\n        }\n        isCutShortEntityScroll(y) {\n            return this.cutShortEntityScrollY !== undefined &&\n                Math.abs(y - this.cutShortEntityScrollY) < 1;\n        }\n        // returns whether applied\n        applyEntityScroll() {\n            const requestedScrollTop = this.computeRequestedEntityScroll();\n            if (requestedScrollTop !== undefined) {\n                const scrollTop = Math.min(this.maxVScroll, requestedScrollTop);\n                // maxVScroll comes from the row heights known at render, which estimate rows not measured yet,\n                // such as rows just added. If it cuts the scroll short, the scroll events this causes are the\n                // layout's own: keep the anchor through them, and apply it again once more rows are measured.\n                // See handleEntityScrollStart and handleEntityScrollEnd\n                this.cutShortEntityScrollY = scrollTop < requestedScrollTop ? scrollTop : undefined;\n                this.bodyScroller.scrollTo({ y: scrollTop });\n                return true;\n            }\n            this.cutShortEntityScrollY = undefined;\n            return false;\n        }\n        computeEntityScroll() {\n            const requestedScrollTop = this.computeRequestedEntityScroll();\n            if (requestedScrollTop !== undefined) {\n                return Math.min(this.maxVScroll, requestedScrollTop);\n            }\n        }\n        // where the anchor wants the scroll, before clamping to maxVScroll\n        computeRequestedEntityScroll() {\n            const { bodyTops, bodyHeights, scroll } = this;\n            const { entityId, fromBottom } = scroll;\n            if (entityId) {\n                const top = bodyTops.get(entityId);\n                const height = bodyHeights.get(entityId);\n                if (top != null) {\n                    const bottom = top + height;\n                    return fromBottom != null ?\n                        bottom - fromBottom : // pixels from bottom edge\n                        top + // just use top edge\n                            (top ? 1 : 0); // overcome top border\n                }\n            }\n        }\n        prepareHits() {\n            /*\n            HACK for queuedHeightChange usage in componentDidUpdate\n            This executes when a drag/resize starts and clears the last recorded entity scroll\n            */\n            this.scroll.entityId = undefined;\n            this.scroll.fromBottom = undefined;\n            this.cutShortEntityScrollY = undefined;\n        }\n        queryHit(isRtl, positionLeft, positionTop) {\n            let { props, context, bodyLayouts, bodyTops, bodyHeights } = this;\n            const { dateProfile, tDateProfile, timeCanvasWidth } = props;\n            const slotWidth = props.slotWidth ?? ESTIMATED_SLOT_WIDTH;\n            const { dateEnv } = context;\n            let coordRes = findEntityByCoord(bodyLayouts, bodyTops, bodyHeights, positionTop, createEntityId);\n            if (coordRes) {\n                let [entityAtTop, top, height] = coordRes;\n                if (!isEntityGroup(entityAtTop)) {\n                    let resource = entityAtTop;\n                    let bottom = top + height;\n                    const hitData = computeTimelineHitData(positionLeft, timeCanvasWidth, slotWidth, isRtl, tDateProfile, dateEnv);\n                    if (!hitData) { // in the dead tail of a DST-truncated slot\n                        return null;\n                    }\n                    return {\n                        dateProfile,\n                        dateSpan: {\n                            ...hitData.dateSpan,\n                            resourceId: resource.id,\n                        },\n                        rect: {\n                            ...hitData.rect,\n                            top,\n                            bottom,\n                        },\n                        getDayEl: () => getTimelineSlotEl(this.bodyEl, hitData.slatIndex),\n                        layer: 0,\n                    };\n                }\n            }\n            return null;\n        }\n    }\n\n    /*\n    TODO: test multiple levels of group-col nesting\n    */\n    function buildPrintLayouts(hierarchy, hasNesting, expansions, expansionDefault) {\n        const layouts = [];\n        function processNodes(nodes, indent, colGroups) {\n            for (const node of nodes) {\n                if (node.resourceFields) { // resource\n                    const isExpanded = expansions[node.entity.id] ?? expansionDefault;\n                    const hasChildren = Boolean(node.children.length);\n                    layouts.push({\n                        type: 'resource',\n                        entity: node.entity,\n                        resourceFields: node.resourceFields,\n                        colGroups,\n                        isExpanded,\n                        hasChildren,\n                        indent,\n                    });\n                    processNodes(node.children, indent + 1, colGroups);\n                }\n                else if (node.pooledHeight) { // column-group\n                    processNodes(node.children, indent, colGroups.concat(node.entity));\n                }\n                else { // row-group (FYI, can't be within a column-group)\n                    const isExpanded = expansions[createGroupId(node.entity)] ?? expansionDefault;\n                    const hasChildren = Boolean(node.children.length);\n                    layouts.push({\n                        type: 'group',\n                        entity: node.entity,\n                        isExpanded,\n                        hasChildren,\n                        indent,\n                    });\n                    processNodes(node.children, indent + 1, colGroups);\n                }\n            }\n        }\n        processNodes(hierarchy, hasNesting ? 1 : 0, []);\n        return layouts;\n    }\n    // Computes real table row spans after print truncation so spans never extend past a rendered row.\n    function buildPrintTableRows(layouts, groupColCnt) {\n        const rows = layouts.map((layout) => layout.type === 'resource' ? {\n            ...layout,\n            colGroupCells: Array.from({ length: groupColCnt }, () => null),\n        } : layout);\n        for (let rowIndex = 0; rowIndex < rows.length; rowIndex += 1) {\n            const row = rows[rowIndex];\n            if (row.type !== 'resource') {\n                continue;\n            }\n            for (let colIndex = 0; colIndex < groupColCnt; colIndex += 1) {\n                const group = row.colGroups[colIndex];\n                const prevRow = rows[rowIndex - 1];\n                if (!group ||\n                    (prevRow?.type === 'resource' && prevRow.colGroups[colIndex] === group)) {\n                    continue;\n                }\n                let rowSpan = 1;\n                while (rowIndex + rowSpan < rows.length) {\n                    const nextRow = rows[rowIndex + rowSpan];\n                    if (nextRow.type !== 'resource' || nextRow.colGroups[colIndex] !== group) {\n                        break;\n                    }\n                    rowSpan += 1;\n                }\n                row.colGroupCells[colIndex] = {\n                    group,\n                    rowSpan,\n                };\n            }\n        }\n        return rows;\n    }\n\n    /** Renders one logical resource row whose Timeline bands can fragment across print pages. */\n    class ResourcePrintRow extends TimelinePrintRenderer {\n        constructor() {\n            super(...arguments);\n            // memo\n            this.refineRenderProps = protectedApi.memoizeObjArg(refineResourceLaneRenderProps);\n            this.buildDateSpanProps = protectedApi.memoize(buildResourceDateSpanProps);\n            this.buildEventRenderProps = protectedApi.memoize(buildResourceEventRenderProps);\n            // internal\n            this.slicer = new TimelineLaneSlicer();\n        }\n        render() {\n            const { props, context } = this;\n            const { options } = context;\n            const { layout } = props;\n            const { entity: resource } = layout;\n            const renderProps = this.refineRenderProps({\n                resource,\n                context,\n                eventOverlap: Boolean(options.eventOverlap),\n            });\n            const eventRenderProps = this.buildEventRenderProps(renderProps.resource);\n            const resourceLaneClassName = protectedApi.generateClassName(options.resourceLaneClass, renderProps);\n            const slicedProps = this.slicer.sliceProps(props, props.dateProfile, props.tDateProfile.isTimeScale ? null : options.nextDayThreshold, context, props.dateProfile, context.dateProfileGenerator, props.tDateProfile, context.dateEnv);\n            const { eventBands, moreLinkBand } = this.buildPrintBands(slicedProps.fgEventSegs, props.tDateProfile, props.slotWidth);\n            const timelineBandProps = {\n                dateProfile: props.dateProfile,\n                tDateProfile: props.tDateProfile,\n                nowDate: props.nowDate,\n                nowMs: props.nowMs,\n                todayRange: props.todayRange,\n                eventSelection: slicedProps.eventSelection,\n                dateSpanProps: this.buildDateSpanProps(resource.id),\n                renderProps: eventRenderProps,\n                timeCanvasClipStart: props.timeCanvasClipStart,\n            };\n            return (jsxRuntime.jsxs(\"tr\", { children: [layout.colGroupCells.map((cell, colIndex) => cell && (jsxRuntime.jsx(ResourceGroupCell, { colSpec: cell.group.spec, fieldValue: cell.group.value, rowSpan: cell.rowSpan, borderStart: Boolean(colIndex), borderBottom: props.rowIndex + cell.rowSpan < props.rowCount, forPrint: true }, colIndex))), props.colSpecs.slice(props.groupColCnt).map((colSpec, colIndex0) => {\n                        const colIndex = props.groupColCnt + colIndex0;\n                        const fieldValue = colSpec.field\n                            ? layout.resourceFields[colSpec.field]\n                            : (resource.title || getPublicId(resource.id));\n                        return (jsxRuntime.jsx(ResourceCell, { colSpec: colSpec, resource: resource, field: colSpec.field || 'title', fieldValue: fieldValue, indent: layout.indent, hasChildren: layout.hasChildren, isExpanded: layout.isExpanded, width: undefined, indentWidth: props.indentWidth, borderStart: Boolean(colIndex), borderBottom: props.isNotLast, forPrint: true }, colIndex));\n                    }), jsxRuntime.jsx(\"td\", { className: publicApi.joinClassNames(options.resourceColumnDividerClass) }), jsxRuntime.jsx(protectedApi.ContentContainer, { tag: \"td\", attrs: {\n                            'data-resource-id': resource.id,\n                        }, className: publicApi.joinClassNames(resourceLaneClassName, options.resourceRowClass, classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noPadding, classNames__default[\"default\"].contentBox, classNames__default[\"default\"].borderlessX, classNames__default[\"default\"].borderlessTop, !props.isNotLast && classNames__default[\"default\"].borderlessBottom), renderProps: renderProps, generatorName: undefined, didMount: options.resourceLaneDidMount, willUnmount: options.resourceLaneWillUnmount, children: () => (jsxRuntime.jsxs(\"div\", { className: classNames__default[\"default\"].rel, children: [jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].fill, classNames__default[\"default\"].crop), children: jsxRuntime.jsx(TimelineBg, { tDateProfile: props.tDateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, bgEventSegs: slicedProps.bgEventSegs, businessHourSegs: slicedProps.businessHourSegs, dateSelectionSegs: null, eventResizeSegs: null, renderProps: eventRenderProps, slotWidth: props.slotWidth, clipStart: props.timeCanvasClipStart }) }), jsxRuntime.jsx(protectedApi.ContentContainer, { tag: \"div\", className: publicApi.joinClassNames(classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noShrink), renderProps: renderProps, generatorName: \"resourceLaneTopContent\", customGenerator: options.resourceLaneTopContent, classNameGenerator: options.resourceLaneTopClass }), eventBands.map((band) => (compat.createElement(TimelinePrintEventBand, { ...timelineBandProps, key: band.levelIndex, band: band, heightRefMap: this.printHeights.segHeightRefMap }))), moreLinkBand && (jsxRuntime.jsx(TimelinePrintMoreLinkBand, { ...timelineBandProps, band: moreLinkBand, heightRefMap: this.printHeights.moreLinkHeightRefMap })), jsxRuntime.jsx(protectedApi.ContentContainer, { tag: \"div\", className: publicApi.joinClassNames(classNames__default[\"default\"].noMargin, classNames__default[\"default\"].noShrink), renderProps: renderProps, generatorName: \"resourceLaneBottomContent\", customGenerator: options.resourceLaneBottomContent, classNameGenerator: options.resourceLaneBottomClass })] })) })] }));\n        }\n    }\n\n    class ResourceTimelineLayoutPrint extends protectedApi.BaseComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // memoized\n            this.buildPrintLayouts = protectedApi.memoize(buildPrintLayouts);\n            this.buildPrintTableRows = protectedApi.memoize(buildPrintTableRows);\n            // handlers\n            this.handleHeaderRowHeightChange = () => {\n                if (!this._isUnmounting) {\n                    protectedApi.afterSize(this.boundForceUpdate);\n                }\n            };\n            this.boundForceUpdate = () => {\n                if (!this._isUnmounting) {\n                    this.forceUpdate();\n                }\n            };\n            // refs\n            this.headerElRef = compat.createRef();\n            this.dividerProbeElRef = compat.createRef();\n            this.timelineHeaderRowInnerHeightMap = new protectedApi.RefMap(this.handleHeaderRowHeightChange);\n            this.dataGridHeaderRowInnerHeightMap = new protectedApi.RefMap(this.handleHeaderRowHeightChange);\n        }\n        render() {\n            let { props, context, dataGridHeaderRowInnerHeightMap, timelineHeaderRowInnerHeightMap, } = this;\n            let { dateProfile } = props;\n            let { options, viewSpec } = context;\n            const { borderlessX, borderlessTop, borderlessBottom } = protectedApi.computeViewBorderless(options);\n            const { tDateProfile, todayRange, nowDate, hasNesting } = props;\n            const { slotWidth, timeCanvasWidth } = props;\n            const { splitProps, bgSlicedProps, timeCanvasClipStart } = props;\n            const { superHeaderRendering, groupColCnt, colSpecs } = props;\n            const { cellRows } = tDateProfile;\n            const headerContentHeight = computeResourceTimelineHeaderHeight(dataGridHeaderRowInnerHeightMap.current, timelineHeaderRowInnerHeightMap.current, Boolean(superHeaderRendering), cellRows.length);\n            const tableDisplayInfo = {\n                borderlessX,\n                borderlessTop,\n                borderlessBottom,\n                multiMonthColumns: 0,\n            };\n            const headerDividerClassName = protectedApi.generateClassName(options.slotHeaderDividerClass, {\n                inTableHeader: true,\n                options: { dayMinWidth: options.dayMinWidth },\n            });\n            const { resourceHierarchy } = props;\n            let printLayouts = this.buildPrintLayouts(resourceHierarchy, hasNesting, props.resourceEntityExpansions, options.resourcesInitiallyExpanded);\n            if (printLayouts.length > options.printMaxRows) {\n                printLayouts = printLayouts.slice(0, options.printMaxRows);\n                protectedApi.warn(`Rows truncated for print. Only included the first ${options.printMaxRows} rows.`);\n            }\n            const printRows = this.buildPrintTableRows(printLayouts, groupColCnt);\n            const resourceColWidths = computeResourceColWidths(props.spreadsheetWidthConfig, props.spreadsheetColWidths, colSpecs.length);\n            const dividerWidth = this.state.dividerWidth ?? 0;\n            const timelineViewportInsetStart = serializeDimConfig({\n                pixels: props.spreadsheetWidthConfig.pixels + dividerWidth,\n                frac: props.spreadsheetWidthConfig.frac,\n            });\n            const timelineHeaderCell = (jsxRuntime.jsx(\"th\", { rowSpan: superHeaderRendering ? 2 : undefined, className: publicApi.joinClassNames(classNames__default[\"default\"].noPadding, classNames__default[\"default\"].borderless, classNames__default[\"default\"].crop), children: jsxRuntime.jsx(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].rel, classNames__default[\"default\"].flexCol), style: {\n                        width: timeCanvasWidth,\n                        height: headerContentHeight,\n                        insetInlineStart: -timeCanvasClipStart,\n                    }, children: cellRows.map((cells, rowIndex) => {\n                        const rowLevel = cellRows.length - rowIndex - 1;\n                        return (jsxRuntime.jsx(TimelineHeaderRow, { className: classNames__default[\"default\"].grow, dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, rowLevel: rowLevel, cells: cells, slotWidth: slotWidth, innerHeighRef: this.timelineHeaderRowInnerHeightMap.createRef(rowIndex) }, rowLevel));\n                    }) }) }));\n            const headerDividerCell = (jsxRuntime.jsx(\"th\", { rowSpan: superHeaderRendering ? 2 : undefined, className: publicApi.joinClassNames(options.resourceColumnDividerClass) }));\n            return (jsxRuntime.jsxs(protectedApi.ViewContainer, { viewSpec: viewSpec, className: publicApi.joinClassNames(props.className, classNames__default[\"default\"].rel, classNames__default[\"default\"].crop, classNames__default[\"default\"].isolate), children: [jsxRuntime.jsx(\"div\", { ref: this.dividerProbeElRef, className: publicApi.joinClassNames(options.resourceColumnDividerClass, classNames__default[\"default\"].offscreen) }), jsxRuntime.jsxs(\"div\", { className: publicApi.joinClassNames(classNames__default[\"default\"].abs, classNames__default[\"default\"].crop, classNames__default[\"default\"].end0, classNames__default[\"default\"].pointerEventsNone, classNames__default[\"default\"].z0), style: {\n                            top: this.state.headerHeight ?? 0,\n                            // Compensates for Firefox miscomputing absolute height with repeated print headers.\n                            bottom: '-5%',\n                            insetInlineStart: timelineViewportInsetStart,\n                        }, children: [jsxRuntime.jsx(TimelineSlats, { dateProfile: dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, slotWidth: slotWidth, clipStart: timeCanvasClipStart }), jsxRuntime.jsx(TimelineBg, { tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, bgEventSegs: bgSlicedProps.bgEventSegs, businessHourSegs: props.hasResourceBusinessHours\n                                    ? null\n                                    : bgSlicedProps.businessHourSegs, dateSelectionSegs: null, eventResizeSegs: null, slotWidth: slotWidth, clipStart: timeCanvasClipStart })] }), jsxRuntime.jsxs(\"table\", { className: publicApi.joinClassNames(protectedApi.generateClassName(options.tableClass, tableDisplayInfo), classNames__default[\"default\"].printTable, classNames__default[\"default\"].rel, classNames__default[\"default\"].z1), children: [jsxRuntime.jsxs(\"colgroup\", { children: [colSpecs.map((_colSpec, colIndex) => (jsxRuntime.jsx(\"col\", { style: { width: resourceColWidths?.[colIndex] } }, colIndex))), jsxRuntime.jsx(\"col\", { style: { width: this.state.dividerWidth } }), jsxRuntime.jsx(\"col\", {})] }), jsxRuntime.jsxs(\"thead\", { ref: this.headerElRef, className: protectedApi.generateClassName(options.tableHeaderClass, {\n                                    ...tableDisplayInfo,\n                                    isSticky: false,\n                                }), children: [superHeaderRendering ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(\"tr\", { children: [jsxRuntime.jsx(SuperHeaderCell, { renderHooks: superHeaderRendering, indent: hasNesting && !groupColCnt /* group-cols are leftmost, making expander alignment irrelevant */, colSpan: colSpecs.length, indentWidth: props.indentWidth, innerHeightRef: this.dataGridHeaderRowInnerHeightMap.createRef(true), forPrint: true }), headerDividerCell, timelineHeaderCell] }), jsxRuntime.jsx(\"tr\", { children: jsxRuntime.jsx(HeaderCells, { colSpecs: colSpecs, colWidths: undefined, indent: hasNesting, indentWidth: props.indentWidth, innerHeightRef: this.dataGridHeaderRowInnerHeightMap.createRef(false), forPrint: true }) })] })) : (jsxRuntime.jsxs(\"tr\", { children: [jsxRuntime.jsx(HeaderCells, { colSpecs: colSpecs, colWidths: undefined, indent: hasNesting, indentWidth: props.indentWidth, innerHeightRef: this.dataGridHeaderRowInnerHeightMap.createRef(false), forPrint: true }), headerDividerCell, timelineHeaderCell] })), jsxRuntime.jsxs(\"tr\", { children: [jsxRuntime.jsx(\"th\", { colSpan: colSpecs.length, className: publicApi.joinClassNames(classNames__default[\"default\"].noPadding, headerDividerClassName) }), jsxRuntime.jsx(\"th\", { className: publicApi.joinClassNames(options.resourceColumnDividerClass, classNames__default[\"default\"].noPaddingY) }), jsxRuntime.jsx(\"th\", { className: publicApi.joinClassNames(classNames__default[\"default\"].noPadding, headerDividerClassName) })] })] }), jsxRuntime.jsx(\"tbody\", { className: protectedApi.generateClassName(options.tableBodyClass, tableDisplayInfo), children: printRows.map((printRow, rowIndex0) => {\n                                    const isNotLast = rowIndex0 < printRows.length - 1;\n                                    if (printRow.type === 'resource') {\n                                        const resource = printRow.entity;\n                                        return (compat.createElement(ResourcePrintRow, { ...splitProps[resource.id], key: resource.id, layout: printRow, rowIndex: rowIndex0, rowCount: printRows.length, isNotLast: isNotLast, dateProfile: dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, nowMs: props.nowMs, todayRange: todayRange, colSpecs: colSpecs, groupColCnt: groupColCnt, timeCanvasClipStart: timeCanvasClipStart, slotWidth: slotWidth, indentWidth: props.indentWidth, businessHours: props.hasResourceBusinessHours\n                                                ? splitProps[resource.id].businessHours\n                                                : null, dateSelection: null, eventDrag: null, eventResize: null }));\n                                    }\n                                    else {\n                                        const group = printRow.entity;\n                                        const groupKey = createGroupId(group);\n                                        return (jsxRuntime.jsxs(\"tr\", { className: classNames__default[\"default\"].breakInsideAvoid, children: [jsxRuntime.jsx(ResourceGroupHeaderCell, { group: group, isExpanded: printRow.isExpanded, colSpan: props.colSpecs.length, borderBottom: isNotLast, indentWidth: props.indentWidth, forPrint: true }), jsxRuntime.jsx(\"td\", { className: publicApi.joinClassNames(options.resourceColumnDividerClass) }), jsxRuntime.jsx(GroupLane, { group: group, borderBottom: isNotLast, forPrint: true })] }, groupKey));\n                                    }\n                                }) })] })] }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n            this.disconnectHeaderHeight = protectedApi.watchHeight(this.headerElRef.current, (headerHeight) => {\n                if (!this._isUnmounting && headerHeight !== this.state.headerHeight) {\n                    this.setState({ headerHeight });\n                }\n            });\n            this.disconnectDividerWidth = protectedApi.watchWidth(this.dividerProbeElRef.current, (dividerWidth) => {\n                if (!this._isUnmounting && dividerWidth !== this.state.dividerWidth) {\n                    this.setState({ dividerWidth });\n                }\n            });\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n            this.disconnectHeaderHeight?.();\n            this.disconnectDividerWidth?.();\n        }\n    }\n    function computeResourceColWidths(totalConfig, pixelWidths, colCnt) {\n        let ratios;\n        if (pixelWidths) {\n            const pixelTotal = pixelWidths.reduce((total, width) => total + width, 0);\n            if (pixelTotal) {\n                ratios = pixelWidths.map((width) => width / pixelTotal);\n            }\n        }\n        // Use equal proportions when screen-resolved column widths are not yet available.\n        ratios ?? (ratios = Array.from({ length: colCnt }, () => 1 / colCnt));\n        return ratios.map((ratio) => serializeDimConfig({\n            pixels: totalConfig.pixels * ratio,\n            frac: totalConfig.frac * ratio,\n        }));\n    }\n\n    const SPREADSHEET_COL_MIN_WIDTH = 50;\n    function processColOptions(options) {\n        let allColSpecs = options.resourceColumns || [];\n        let superHeaderRendering = null;\n        if (!allColSpecs.length) {\n            allColSpecs.push({\n                headerDefault: () => 'Resources', // TODO: view.defaults\n            });\n        }\n        else if (options.resourceColumnHeaderContent) { // weird way to determine if content\n            superHeaderRendering = {\n                headerClass: options.resourceColumnHeaderClass,\n                headerInnerClass: options.resourceColumnHeaderInnerClass,\n                headerContent: options.resourceColumnHeaderContent,\n                headerDidMount: options.resourceColumnHeaderDidMount,\n                headerWillUnmount: options.resourceColumnHeaderWillUnmount,\n            };\n        }\n        let resourceColSpecs = [];\n        let groupColSpecs = []; // part of the colSpecs, but filtered out in order to put first\n        let groupSpecs = [];\n        let groupRowDepth = 0;\n        let foundMainColSpec = false;\n        for (let colSpec of allColSpecs) {\n            (colSpec.group ? groupColSpecs : resourceColSpecs).push({\n                ...colSpec,\n                isMain: ((!colSpec.group && !foundMainColSpec)\n                    ? (foundMainColSpec = true)\n                    : false),\n                headerClass: protectedApi.joinFuncishClassNames(options.resourceColumnHeaderClass, colSpec.headerClass, 'resourceColumnHeaderClass'),\n                headerInnerClass: protectedApi.joinFuncishClassNames(options.resourceColumnHeaderInnerClass, colSpec.headerInnerClass, 'resourceColumnHeaderInnerClass'),\n                headerResizerClass: protectedApi.joinFuncishClassNames(options.resourceColumnResizerClass, colSpec.headerResizerClass, 'resourceColumnResizerClass'),\n                headerContent: protectedApi.mergeContentInjectors(options.resourceColumnHeaderContent, colSpec.headerContent),\n                headerDidMount: protectedApi.mergeLifecycleCallbacks(options.resourceColumnHeaderDidMount, colSpec.headerDidMount),\n                headerWillUnmount: protectedApi.mergeLifecycleCallbacks(options.resourceColumnHeaderWillUnmount, colSpec.headerWillUnmount),\n                cellClass: protectedApi.joinFuncishClassNames(options.resourceCellClass, colSpec.cellClass, 'resourceCellClass'),\n                cellInnerClass: protectedApi.joinFuncishClassNames(options.resourceCellInnerClass, colSpec.cellInnerClass, 'resourceCellInnerClass'),\n                cellContent: protectedApi.mergeContentInjectors(options.resourceCellContent, colSpec.cellContent),\n                cellDidMount: protectedApi.mergeLifecycleCallbacks(options.resourceCellDidMount, colSpec.cellDidMount),\n                cellWillUnmount: protectedApi.mergeLifecycleCallbacks(options.resourceCellWillUnmount, colSpec.cellWillUnmount),\n            });\n        }\n        if (groupColSpecs.length) {\n            groupSpecs = groupColSpecs;\n        }\n        else {\n            groupRowDepth = 1;\n            let hGroupField = options.resourceGroupField;\n            if (hGroupField) {\n                groupSpecs.push({\n                    field: hGroupField,\n                    labelClass: options.resourceGroupHeaderClass,\n                    labelInnerClass: options.resourceGroupHeaderInnerClass,\n                    labelContent: options.resourceGroupHeaderContent,\n                    labelDidMount: options.resourceGroupHeaderDidMount,\n                    labelWillUnmount: options.resourceGroupHeaderWillUnmount,\n                    laneClass: options.resourceGroupLaneClass,\n                    laneInnerClass: options.resourceGroupLaneInnerClass,\n                    laneContent: options.resourceGroupLaneContent,\n                    laneDidMount: options.resourceGroupLaneDidMount,\n                    laneWillUnmount: options.resourceGroupLaneWillUnmount,\n                });\n            }\n        }\n        let allOrderSpecs = options.resourceOrder || DEFAULT_RESOURCE_ORDER;\n        let plainOrderSpecs = [];\n        for (let orderSpec of allOrderSpecs) {\n            let isGroup = false;\n            for (let groupSpec of groupSpecs) {\n                if (groupSpec.field === orderSpec.field) {\n                    groupSpec.order = orderSpec.order; // -1, 0, 1\n                    isGroup = true;\n                    break;\n                }\n            }\n            if (!isGroup) {\n                plainOrderSpecs.push(orderSpec);\n            }\n        }\n        const colSpecs = groupColSpecs.concat(resourceColSpecs);\n        const colWidthConfigs = colSpecs.map((colSpec) => (toSiblingDimConfig(parseDimOption(colSpec.width, SPREADSHEET_COL_MIN_WIDTH, 'resource column `width`', 'The column grows to fill the space instead.'), \n        /* grow = */ undefined, SPREADSHEET_COL_MIN_WIDTH)));\n        ensureDimConfigsGrow(colWidthConfigs);\n        return {\n            groupSpecs,\n            groupRowDepth,\n            orderSpecs: plainOrderSpecs,\n            colSpecs,\n            groupColCnt: groupColSpecs.length,\n            colWidthConfigs,\n            superHeaderRendering,\n        };\n    }\n    /*\n    Only a number, px or % parses. Anything else warns, naming the option and what happens instead\n    */\n    function parseDimOption(input, minDim, name, fallback) {\n        const dimConfig = parseDimConfig(input, minDim);\n        if (input != null && !dimConfig) {\n            protectedApi.warn(`Invalid ${name}: ${JSON.stringify(input)}. Expected a number, or a string in px or %. ${fallback}`);\n        }\n        return dimConfig;\n    }\n\n    const MIN_RESOURCE_AREA_WIDTH = 30; // definitely bigger than scrollbars\n    const DEFAULT_RESOURCE_COLUMNS_WIDTH = '30%';\n    class ResourceTimelineView extends protectedApi.DateComponent {\n        constructor() {\n            super(...arguments);\n            this.state = {};\n            // memoized\n            this.buildTimelineDateProfile = protectedApi.memoize(buildTimelineDateProfile);\n            this.filterResourceStore = protectedApi.memoize(filterResourceStore);\n            this.processColOptions = protectedApi.memoize(processColOptions);\n            this.parseResourceColumnsWidth = protectedApi.memoize(parseResourceColumnsWidth);\n            this.buildResourceHierarchy = protectedApi.memoize(buildResourceHierarchy);\n            this.computeSlotWidth = protectedApi.memoize(computeSlotWidth);\n            this.computeHasNesting = protectedApi.memoize(computeHasNesting);\n            this.computeHasResourceBusinessHours = protectedApi.memoize(computeHasResourceBusinessHours);\n            // ref\n            this.scrollRef = compat.createRef();\n            this.spreadsheetResizedWidthConfigRef = compat.createRef();\n            this.resourceSplitter = new ResourceSplitter();\n            this.bgSlicer = new TimelineLaneSlicer();\n            this.handleColResize = (colIndex, newWidth) => {\n                if (this._isUnmounting)\n                    return;\n                const colWidthOverrides = resizeSiblingDimConfig(this.spreadsheetColWidthConfigs, this.spreadsheetColWidths, this.state.spreadsheetClientWidth, colIndex, newWidth);\n                this.setState({ colWidthOverrides });\n            };\n            this.handleSpreadsheetClientWidth = (spreadsheetClientWidth) => {\n                if (this._isUnmounting)\n                    return;\n                if (spreadsheetClientWidth != null) {\n                    this.setState({ spreadsheetClientWidth });\n                }\n            };\n            this.handleTimeClientWidth = (timeClientWidth) => {\n                if (this._isUnmounting)\n                    return;\n                if (timeClientWidth != null) {\n                    this.setState({ timeClientWidth });\n                }\n            };\n            this.handleSlotInnerWidth = (slotInnerWidth) => {\n                if (this._isUnmounting)\n                    return;\n                if (slotInnerWidth != null) {\n                    this.setState({ slotInnerWidth });\n                }\n            };\n            this.handleExpanderEl = (expanderEl) => {\n                if (this.disconnectExpanderWidth) {\n                    this.disconnectExpanderWidth();\n                    this.disconnectExpanderWidth = undefined;\n                }\n                if (expanderEl) {\n                    this.disconnectExpanderWidth = protectedApi.watchWidth(expanderEl, (width) => {\n                        if (this._isUnmounting)\n                            return;\n                        this.setState({ expanderWidth: width });\n                    });\n                }\n            };\n        }\n        render() {\n            let { props, state, context } = this;\n            let { dateProfile } = props;\n            let { options } = context;\n            /* date */\n            let tDateProfile = this.buildTimelineDateProfile(dateProfile, context.dateEnv, options, context.dateProfileGenerator);\n            let { unit: timerUnit, value: timeUnitValue } = protectedApi.greatestDurationDenominator(tDateProfile.slotDuration);\n            /* table settings */\n            let { groupSpecs, groupRowDepth, orderSpecs, colSpecs, groupColCnt, colWidthConfigs: initialColWidthConfigs, superHeaderRendering, } = this.processColOptions(context.options);\n            const spreadsheetWidthConfig = this.spreadsheetResizedWidthConfigRef.current ??\n                this.parseResourceColumnsWidth(options.resourceColumnsWidth);\n            /* spreadsheet col widths */\n            let spreadsheetColWidthConfigs = state.colWidthOverrides || initialColWidthConfigs;\n            let [spreadsheetColWidths, spreadsheetCanvasWidth] = state.spreadsheetClientWidth != null\n                ? pixelizeDimConfigs(spreadsheetColWidthConfigs, state.spreadsheetClientWidth)\n                : [undefined, undefined];\n            this.spreadsheetColWidthConfigs = spreadsheetColWidthConfigs;\n            this.spreadsheetColWidths = spreadsheetColWidths;\n            /* table hierarchy */\n            let resourceStore = this.filterResourceStore(props.resourceStore, options.filterResourcesWithEvents, props.rawEventStore, dateProfile.activeRange);\n            let resourceHierarchy = this.buildResourceHierarchy(resourceStore, orderSpecs, groupSpecs, groupRowDepth);\n            let hasNesting = this.computeHasNesting(resourceHierarchy);\n            /* table positions */\n            let [timeCanvasWidth, slotWidth, slotLiquid] = this.computeSlotWidth(tDateProfile.slotCnt, tDateProfile.slotsPerLabel, options.slotMinWidth, state.slotInnerWidth, // is ACTUALLY the last-level label width. rename?\n            state.timeClientWidth);\n            /* event display */\n            let splitProps = this.resourceSplitter.splitProps({ ...props, resourceStore });\n            let bgLaneProps = splitProps[''];\n            let bgSlicedProps = this.bgSlicer.sliceProps(bgLaneProps, dateProfile, tDateProfile.isTimeScale ? null : options.nextDayThreshold, context, // wish we didn't need to pass in the rest of these args...\n            dateProfile, context.dateProfileGenerator, tDateProfile, context.dateEnv);\n            /* business hour display */\n            let hasResourceBusinessHours = this.computeHasResourceBusinessHours(resourceHierarchy);\n            let fallbackBusinessHours = hasResourceBusinessHours ? props.businessHours : null;\n            return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(protectedApi.NowTimer, { unit: timerUnit, unitValue: timeUnitValue, children: (nowDate, todayRange, nowMs) => {\n                            const baseProps = {\n                                className: props.className,\n                                tDateProfile,\n                                dateProfile,\n                                resourceHierarchy,\n                                resourceEntityExpansions: props.resourceEntityExpansions,\n                                hasNesting,\n                                nowDate,\n                                nowMs,\n                                todayRange,\n                                colSpecs,\n                                groupColCnt,\n                                superHeaderRendering,\n                                splitProps,\n                                bgSlicedProps,\n                                slotWidth,\n                                timeCanvasWidth,\n                                spreadsheetColWidths,\n                            };\n                            return props.forPrint ? (jsxRuntime.jsx(ResourceTimelineLayoutPrint, { ...baseProps, hasResourceBusinessHours: hasResourceBusinessHours, spreadsheetWidthConfig: spreadsheetWidthConfig, timeCanvasClipStart: this.scrollRef.current.x /* for simulating horizontal scroll */, indentWidth: state.expanderWidth })) : (jsxRuntime.jsx(ResourceTimelineLayoutNormal, { ...baseProps, labelId: props.labelId, labelStr: props.labelStr, eventSelection: props.eventSelection, hasResourceBusinessHours: hasResourceBusinessHours, fallbackBusinessHours: fallbackBusinessHours, slotLiquid: slotLiquid, timeClientWidthRef: this.handleTimeClientWidth, slotInnerWidthRef: this.handleSlotInnerWidth, initialSpreadsheetWidthConfig: spreadsheetWidthConfig, spreadsheetCanvasWidth: spreadsheetCanvasWidth, initialScroll: this.scrollRef.current /* for reviving after print-view */, \n                                // refs\n                                spreadsheetResizedWidthConfigRef: this.spreadsheetResizedWidthConfigRef, spreadsheetClientWidthRef: this.handleSpreadsheetClientWidth, scrollRef: this.scrollRef, \n                                // handlers\n                                onColResize: this.handleColResize, indentWidth: state.expanderWidth }));\n                        } }), jsxRuntime.jsx(ResourceExpander // for probing size\n                    , { isExpanded: true, elRef: this.handleExpanderEl, className: classNames__default[\"default\"].offscreen })] }));\n        }\n        componentDidMount() {\n            this._isUnmounting = false;\n        }\n        componentWillUnmount() {\n            this._isUnmounting = true;\n        }\n    }\n    ResourceTimelineView.addStateEquality({\n        colWidthOverrides: protectedApi.isArraysEqual,\n    });\n    function computeHasResourceBusinessHours(resourceHierarchy) {\n        for (const node of resourceHierarchy) {\n            if ((node.resourceFields && node.entity.businessHours) ||\n                computeHasResourceBusinessHours(node.children)) {\n                return true;\n            }\n        }\n        return false;\n    }\n    function computeHasNesting(resourceHierarchy) {\n        for (const node of resourceHierarchy) {\n            if ((node.children.length && !node.pooledHeight) || // has children, but NOT a col-spanning group\n                computeHasNesting(node.children)) {\n                return true;\n            }\n        }\n        return false;\n    }\n    /*\n    An invalid value gets the default, instead of failing to render\n    */\n    function parseResourceColumnsWidth(input) {\n        return parseDimOption(input, MIN_RESOURCE_AREA_WIDTH, 'option `resourceColumnsWidth`', `Using ${DEFAULT_RESOURCE_COLUMNS_WIDTH}.`) ?? parseDimConfig(DEFAULT_RESOURCE_COLUMNS_WIDTH, MIN_RESOURCE_AREA_WIDTH);\n    }\n\n    var resourceTimelinePlugin = {\n        name: 'resource-timeline',\n        premiumReleaseDate: '2026-11-12',\n        deps: [\n            premiumCommonPlugin,\n            resourcePlugin,\n            timelinePlugin,\n        ],\n        initialView: 'resourceTimelineDay',\n        views: {\n            resourceTimeline: {\n                type: 'timeline', // inherit configuration\n                component: ResourceTimelineView,\n                needsResourceData: true,\n                resourceColumnsWidth: DEFAULT_RESOURCE_COLUMNS_WIDTH,\n                resourcesInitiallyExpanded: true,\n                eventResizableFromStart: true, // TODO: not DRY with this same setting in the main timeline config\n            },\n            resourceTimelineDay: {\n                type: 'resourceTimeline',\n                duration: { days: 1 },\n            },\n            resourceTimelineWeek: {\n                type: 'resourceTimeline',\n                duration: { weeks: 1 },\n            },\n            resourceTimelineMonth: {\n                type: 'resourceTimeline',\n                duration: { months: 1 },\n            },\n            resourceTimelineYear: {\n                type: 'resourceTimeline',\n                duration: { years: 1 },\n            },\n        },\n    };\n\n    var scrollGridPlugin = {\n        name: 'scrollgrid',\n        premiumReleaseDate: '2026-11-12',\n        deps: [premiumCommonPlugin],\n        scrollerSyncerClass: ScrollerSyncer\n    };\n\n    let contexts = [];\n    function contextInit(context) {\n        if (!contexts.length) {\n            attachGlobalHandlers();\n        }\n        contexts.push(context);\n        context.calendarApi.on('_unmount', () => {\n            protectedApi.removeExact(contexts, context);\n            if (!contexts.length) {\n                removeGlobalHandlers();\n            }\n        });\n    }\n    function attachGlobalHandlers() {\n        window.addEventListener('beforeprint', handleBeforePrint);\n        window.addEventListener('afterprint', handleAfterPrint);\n        /*\n        // for testing\n        let forPrint = false\n        document.addEventListener('keypress', (ev) => {\n          if (ev.key === 'p') {\n            forPrint = !forPrint\n            if (forPrint) {\n              handleBeforePrint()\n            } else {\n              handleAfterPrint()\n            }\n          }\n        })\n        */\n    }\n    function removeGlobalHandlers() {\n        window.removeEventListener('beforeprint', handleBeforePrint);\n        window.removeEventListener('afterprint', handleAfterPrint);\n    }\n    function handleBeforePrint() {\n        for (let context of contexts) {\n            context.emitter.trigger('_beforeprint');\n        }\n    }\n    function handleAfterPrint() {\n        for (let context of contexts) {\n            context.emitter.trigger('_afterprint');\n        }\n    }\n\n    var adaptivePlugin = {\n        name: 'adaptive',\n        premiumReleaseDate: '2026-11-12',\n        deps: [premiumCommonPlugin],\n        contextInit,\n    };\n\n    publicApi.globalPlugins.push(resourceDayGridPlugin, resourceTimeGridPlugin, resourceTimelinePlugin, scrollGridPlugin, timelinePlugin, adaptivePlugin);\n\n})(FullCalendar.ProtectedApi, FullCalendar.DayGrid, FullCalendar.PreactJSXRuntime, FullCalendar, FullCalendar.ProtectedStyles, FullCalendar.Preact, FullCalendar.TimeGrid);\n"]}