@kosdev-code/kos-ddk-model-components 2.1.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/actions/action.d.ts +1 -2
- package/components/actions/action.d.ts.map +1 -1
- package/components/actions/index.d.ts.map +1 -1
- package/components/actions/intent/calibrate-action.d.ts +1 -2
- package/components/actions/intent/calibrate-action.d.ts.map +1 -1
- package/components/actions/intent/fixed-45.d.ts +1 -2
- package/components/actions/intent/fixed-45.d.ts.map +1 -1
- package/components/actions/intent/flush-action.d.ts +1 -2
- package/components/actions/intent/flush-action.d.ts.map +1 -1
- package/components/actions/intent/high-flow-test-action.d.ts +1 -2
- package/components/actions/intent/high-flow-test-action.d.ts.map +1 -1
- package/components/actions/intent/hold-to-pour-action.d.ts +1 -2
- package/components/actions/intent/hold-to-pour-action.d.ts.map +1 -1
- package/components/actions/intent/index.d.ts.map +1 -1
- package/components/actions/intent/intent-action.d.ts +2 -3
- package/components/actions/intent/intent-action.d.ts.map +1 -1
- package/components/actions/intent/low-flow-test-action.d.ts +1 -2
- package/components/actions/intent/low-flow-test-action.d.ts.map +1 -1
- package/components/actions/intent/manual-override-action.d.ts +1 -2
- package/components/actions/intent/manual-override-action.d.ts.map +1 -1
- package/components/actions/intent/msv-reset-action.d.ts +1 -2
- package/components/actions/intent/msv-reset-action.d.ts.map +1 -1
- package/components/actions/intent/prime-action.d.ts +1 -2
- package/components/actions/intent/prime-action.d.ts.map +1 -1
- package/components/actions/intent/purge-action.d.ts +1 -2
- package/components/actions/intent/purge-action.d.ts.map +1 -1
- package/components/actions/trouble/generic-trouble-action.d.ts +1 -2
- package/components/actions/trouble/generic-trouble-action.d.ts.map +1 -1
- package/components/actions/trouble/index.d.ts.map +1 -1
- package/components/actions/trouble/trouble-aware-action.d.ts +1 -2
- package/components/actions/trouble/trouble-aware-action.d.ts.map +1 -1
- package/components/agitate-modal/agitator-modal.d.ts +0 -1
- package/components/agitate-modal/agitator-modal.d.ts.map +1 -1
- package/components/agitate-modal/index.d.ts.map +1 -1
- package/components/agitation-control-view/agitation-control-view.d.ts +0 -1
- package/components/agitation-control-view/agitation-control-view.d.ts.map +1 -1
- package/components/agitation-control-view/index.d.ts.map +1 -1
- package/components/calibrate-modal/calibrate-modal.d.ts +1 -2
- package/components/calibrate-modal/calibrate-modal.d.ts.map +1 -1
- package/components/calibrate-modal/index.d.ts.map +1 -1
- package/components/carb-tank/detail/agitator.d.ts +1 -2
- package/components/carb-tank/detail/agitator.d.ts.map +1 -1
- package/components/carb-tank/index.d.ts.map +1 -1
- package/components/carb-tank/summary/agitator.d.ts +1 -2
- package/components/carb-tank/summary/agitator.d.ts.map +1 -1
- package/components/cartridge-agitator/detail/agitator.d.ts +1 -2
- package/components/cartridge-agitator/detail/agitator.d.ts.map +1 -1
- package/components/cartridge-agitator/index.d.ts.map +1 -1
- package/components/cartridge-agitator/summary/agitator.d.ts +1 -2
- package/components/cartridge-agitator/summary/agitator.d.ts.map +1 -1
- package/components/config-prop-context/StagedChanges.d.ts +1 -2
- package/components/config-prop-context/StagedChanges.d.ts.map +1 -1
- package/components/config-prop-context/index.d.ts.map +1 -1
- package/components/config-prop-info-card/config-prop-info-card.d.ts +1 -2
- package/components/config-prop-info-card/config-prop-info-card.d.ts.map +1 -1
- package/components/config-prop-info-card/index.d.ts.map +1 -1
- package/components/config-prop-input-card/config-prop-input-card.d.ts +2 -3
- package/components/config-prop-input-card/config-prop-input-card.d.ts.map +1 -1
- package/components/config-prop-input-card/index.d.ts.map +1 -1
- package/components/config-prop-input-range-card/config-prop-input-range-card.d.ts +2 -3
- package/components/config-prop-input-range-card/config-prop-input-range-card.d.ts.map +1 -1
- package/components/config-prop-input-range-card/index.d.ts.map +1 -1
- package/components/config-prop-multi-input-enable-card/config-prop-multi-input-enable-card.d.ts +1 -2
- package/components/config-prop-multi-input-enable-card/config-prop-multi-input-enable-card.d.ts.map +1 -1
- package/components/config-prop-multi-input-enable-card/index.d.ts.map +1 -1
- package/components/config-prop-picker-card/config-prop-picker-card.d.ts +2 -3
- package/components/config-prop-picker-card/config-prop-picker-card.d.ts.map +1 -1
- package/components/config-prop-picker-card/index.d.ts.map +1 -1
- package/components/config-prop-single-input-enable-card/config-prop-single-input-enable-card.d.ts +1 -2
- package/components/config-prop-single-input-enable-card/config-prop-single-input-enable-card.d.ts.map +1 -1
- package/components/config-prop-single-input-enable-card/index.d.ts.map +1 -1
- package/components/config-prop-switch-card/config-prop-switch-card.d.ts +1 -2
- package/components/config-prop-switch-card/config-prop-switch-card.d.ts.map +1 -1
- package/components/config-prop-switch-card/index.d.ts.map +1 -1
- package/components/config-prop-time-picker-card/config-prop-time-picker-card.d.ts +2 -3
- package/components/config-prop-time-picker-card/config-prop-time-picker-card.d.ts.map +1 -1
- package/components/config-prop-time-picker-card/index.d.ts.map +1 -1
- package/components/config-prop-toggle-card/config-prop-toggle-card.d.ts +2 -3
- package/components/config-prop-toggle-card/config-prop-toggle-card.d.ts.map +1 -1
- package/components/config-prop-toggle-card/index.d.ts.map +1 -1
- package/components/config-property-input/base-config-property-component-factory.d.ts +0 -1
- package/components/config-property-input/base-config-property-component-factory.d.ts.map +1 -1
- package/components/config-property-input/config-property-input-types.d.ts +1 -2
- package/components/config-property-input/config-property-input-types.d.ts.map +1 -1
- package/components/config-property-input/config-property-input.d.ts +1 -2
- package/components/config-property-input/config-property-input.d.ts.map +1 -1
- package/components/config-property-input/index.d.ts.map +1 -1
- package/components/date-picker-card/date-picker-card.d.ts +0 -1
- package/components/date-picker-card/date-picker-card.d.ts.map +1 -1
- package/components/date-picker-card/index.d.ts.map +1 -1
- package/components/diagnostics-modal/diagnostics-modal.d.ts +1 -2
- package/components/diagnostics-modal/diagnostics-modal.d.ts.map +1 -1
- package/components/diagnostics-modal/index.d.ts.map +1 -1
- package/components/dispenser-info-settings/dispenser-info-settings.d.ts +0 -1
- package/components/dispenser-info-settings/dispenser-info-settings.d.ts.map +1 -1
- package/components/dispenser-info-settings/index.d.ts.map +1 -1
- package/components/dispenser-serial-number/dispenser-serial-number.d.ts +1 -2
- package/components/dispenser-serial-number/dispenser-serial-number.d.ts.map +1 -1
- package/components/dispenser-serial-number/index.d.ts.map +1 -1
- package/components/dispenser-settings/dispenser-settings.d.ts +0 -1
- package/components/dispenser-settings/dispenser-settings.d.ts.map +1 -1
- package/components/dispenser-settings/index.d.ts.map +1 -1
- package/components/enjoy-by-date/enjoy-by-date.d.ts +1 -2
- package/components/enjoy-by-date/enjoy-by-date.d.ts.map +1 -1
- package/components/enjoy-by-date/index.d.ts.map +1 -1
- package/components/future-progress-bar/future-progress-bar.d.ts +1 -2
- package/components/future-progress-bar/future-progress-bar.d.ts.map +1 -1
- package/components/future-progress-bar/index.d.ts.map +1 -1
- package/components/hardware-info/hardware-info.d.ts.map +1 -1
- package/components/hardware-info/index.d.ts.map +1 -1
- package/components/hold-to-pour-button/hold-to-pour-button.d.ts +1 -2
- package/components/hold-to-pour-button/hold-to-pour-button.d.ts.map +1 -1
- package/components/hold-to-pour-button/index.d.ts.map +1 -1
- package/components/holders/holder-card.d.ts +2 -3
- package/components/holders/holder-card.d.ts.map +1 -1
- package/components/holders/holder-group-view.d.ts +3 -4
- package/components/holders/holder-group-view.d.ts.map +1 -1
- package/components/holders/index.d.ts.map +1 -1
- package/components/holders/macro-holder-card.d.ts +2 -3
- package/components/holders/macro-holder-card.d.ts.map +1 -1
- package/components/holders/macro-holder-group-view.d.ts +1 -2
- package/components/holders/macro-holder-group-view.d.ts.map +1 -1
- package/components/holders/macro-setup-step-card.d.ts +2 -3
- package/components/holders/macro-setup-step-card.d.ts.map +1 -1
- package/components/holders/use-visible-troubles.d.ts +1 -2
- package/components/holders/use-visible-troubles.d.ts.map +1 -1
- package/components/ice-agitator/detail/agitator.d.ts +1 -2
- package/components/ice-agitator/detail/agitator.d.ts.map +1 -1
- package/components/ice-agitator/index.d.ts.map +1 -1
- package/components/ice-agitator/summary/agitator.d.ts +1 -2
- package/components/ice-agitator/summary/agitator.d.ts.map +1 -1
- package/components/ice-agitator-settings-view/ice-agitator-settings-view.d.ts +4 -5
- package/components/ice-agitator-settings-view/ice-agitator-settings-view.d.ts.map +1 -1
- package/components/ice-agitator-settings-view/index.d.ts.map +1 -1
- package/components/index.d.ts.map +1 -1
- package/components/localization-settings/index.d.ts.map +1 -1
- package/components/localization-settings/localization-settings.d.ts.map +1 -1
- package/components/network-test-results/NetworkTestResults.d.ts +0 -1
- package/components/network-test-results/NetworkTestResults.d.ts.map +1 -1
- package/components/network-test-results/index.d.ts.map +1 -1
- package/components/notification-card-view/index.d.ts.map +1 -1
- package/components/notification-card-view/notification-card-view.d.ts +1 -2
- package/components/notification-card-view/notification-card-view.d.ts.map +1 -1
- package/components/plugin-tabs/index.d.ts.map +1 -1
- package/components/plugin-tabs/plugin-tabs.d.ts +0 -1
- package/components/plugin-tabs/plugin-tabs.d.ts.map +1 -1
- package/components/probe-view/index.d.ts.map +1 -1
- package/components/probe-view/probe-view.d.ts +1 -2
- package/components/probe-view/probe-view.d.ts.map +1 -1
- package/components/pump-cards/cgp-pump-card/cgp-pump-card.d.ts +1 -2
- package/components/pump-cards/cgp-pump-card/cgp-pump-card.d.ts.map +1 -1
- package/components/pump-cards/cgp-pump-card/index.d.ts.map +1 -1
- package/components/pump-cards/holder-actions/holder-actions.d.ts +1 -2
- package/components/pump-cards/holder-actions/holder-actions.d.ts.map +1 -1
- package/components/pump-cards/holder-actions/index.d.ts.map +1 -1
- package/components/pump-cards/holder-notifications/holder-notifications.d.ts +1 -2
- package/components/pump-cards/holder-notifications/holder-notifications.d.ts.map +1 -1
- package/components/pump-cards/holder-notifications/index.d.ts.map +1 -1
- package/components/pump-cards/index.d.ts.map +1 -1
- package/components/pump-cards/lfcv-pump-card/index.d.ts.map +1 -1
- package/components/pump-cards/lfcv-pump-card/lfcv-pump-card.d.ts +1 -2
- package/components/pump-cards/lfcv-pump-card/lfcv-pump-card.d.ts.map +1 -1
- package/components/pump-cards/msv-pump-card/index.d.ts.map +1 -1
- package/components/pump-cards/msv-pump-card/msv-pump-card.d.ts +1 -2
- package/components/pump-cards/msv-pump-card/msv-pump-card.d.ts.map +1 -1
- package/components/pump-cards/super-pump/index.d.ts.map +1 -1
- package/components/pump-cards/super-pump/super-pump-card.d.ts +2 -3
- package/components/pump-cards/super-pump/super-pump-card.d.ts.map +1 -1
- package/components/pump-cards/valve-card/index.d.ts.map +1 -1
- package/components/pump-cards/valve-card/valve-card.d.ts +1 -2
- package/components/pump-cards/valve-card/valve-card.d.ts.map +1 -1
- package/components/pump-cards/water-pump-card/index.d.ts.map +1 -1
- package/components/pump-cards/water-pump-card/water-pump-card.d.ts +1 -2
- package/components/pump-cards/water-pump-card/water-pump-card.d.ts.map +1 -1
- package/components/reboot-view/index.d.ts.map +1 -1
- package/components/reboot-view/reboot-view.d.ts +0 -1
- package/components/reboot-view/reboot-view.d.ts.map +1 -1
- package/components/remote-nns-modal/index.d.ts.map +1 -1
- package/components/remote-nns-modal/remote-nns-modal.d.ts +1 -2
- package/components/remote-nns-modal/remote-nns-modal.d.ts.map +1 -1
- package/components/remote-tray/detail/remote-tray.d.ts +1 -2
- package/components/remote-tray/detail/remote-tray.d.ts.map +1 -1
- package/components/remote-tray/index.d.ts.map +1 -1
- package/components/remote-tray/summary/remote-tray.d.ts +1 -2
- package/components/remote-tray/summary/remote-tray.d.ts.map +1 -1
- package/components/replace-line/index.d.ts.map +1 -1
- package/components/replace-line/replace-line.d.ts +1 -2
- package/components/replace-line/replace-line.d.ts.map +1 -1
- package/components/replace-pump/index.d.ts.map +1 -1
- package/components/replace-pump/replace-pump.d.ts +1 -2
- package/components/replace-pump/replace-pump.d.ts.map +1 -1
- package/components/rfid-override/index.d.ts.map +1 -1
- package/components/rfid-override/rfid-override.d.ts +0 -1
- package/components/rfid-override/rfid-override.d.ts.map +1 -1
- package/components/setup-required/index.d.ts.map +1 -1
- package/components/setup-required/setup-required.d.ts.map +1 -1
- package/components/setup-sidebar/index.d.ts.map +1 -1
- package/components/setup-sidebar/setup-sidebar.d.ts +6 -7
- package/components/setup-sidebar/setup-sidebar.d.ts.map +1 -1
- package/components/software/index.d.ts.map +1 -1
- package/components/software/software.d.ts.map +1 -1
- package/components/spm-field-calibration/index.d.ts.map +1 -1
- package/components/spm-field-calibration/spm-field-calibration-modal.d.ts +1 -2
- package/components/spm-field-calibration/spm-field-calibration-modal.d.ts.map +1 -1
- package/components/state-experience/index.d.ts.map +1 -1
- package/components/state-experience/state-experience.d.ts +0 -1
- package/components/state-experience/state-experience.d.ts.map +1 -1
- package/components/system-date-picker-card/index.d.ts.map +1 -1
- package/components/system-date-picker-card/system-date-picker-card.d.ts.map +1 -1
- package/components/time-picker-card/index.d.ts.map +1 -1
- package/components/time-picker-card/time-picker-card.d.ts +1 -2
- package/components/time-picker-card/time-picker-card.d.ts.map +1 -1
- package/components/time-settings/index.d.ts.map +1 -1
- package/components/time-settings/time-settings.d.ts.map +1 -1
- package/components/time-zone-picker-card/index.d.ts.map +1 -1
- package/components/time-zone-picker-card/time-zone-picker-card.d.ts +0 -1
- package/components/time-zone-picker-card/time-zone-picker-card.d.ts.map +1 -1
- package/components/water-settings/index.d.ts.map +1 -1
- package/components/water-settings/water-settings.d.ts +0 -1
- package/components/water-settings/water-settings.d.ts.map +1 -1
- package/contexts/animation/animation-provider.d.ts +1 -2
- package/contexts/animation/animation-provider.d.ts.map +1 -1
- package/contexts/animation/index.d.ts.map +1 -1
- package/contexts/application/application-component-configuration-provider.d.ts +2 -3
- package/contexts/application/application-component-configuration-provider.d.ts.map +1 -1
- package/contexts/application/application-provider.d.ts +1 -2
- package/contexts/application/application-provider.d.ts.map +1 -1
- package/contexts/application/index.d.ts.map +1 -1
- package/contexts/dashboard-operations/dashboard-operations-provider.d.ts +1 -2
- package/contexts/dashboard-operations/dashboard-operations-provider.d.ts.map +1 -1
- package/contexts/dashboard-operations/index.d.ts.map +1 -1
- package/contexts/dispenser-info/dispenser-info-provider.d.ts +1 -2
- package/contexts/dispenser-info/dispenser-info-provider.d.ts.map +1 -1
- package/contexts/dispenser-info/index.d.ts.map +1 -1
- package/contexts/index.d.ts.map +1 -1
- package/contexts/ingredient-summary/index.d.ts.map +1 -1
- package/contexts/ingredient-summary/ingredient-summary-provider.d.ts +1 -2
- package/contexts/ingredient-summary/ingredient-summary-provider.d.ts.map +1 -1
- package/contexts/macro-assignment/index.d.ts.map +1 -1
- package/contexts/macro-assignment/macro-assignment-provider.d.ts +1 -2
- package/contexts/macro-assignment/macro-assignment-provider.d.ts.map +1 -1
- package/contexts/network-test/index.d.ts.map +1 -1
- package/contexts/network-test/network-test-provider.d.ts +1 -2
- package/contexts/network-test/network-test-provider.d.ts.map +1 -1
- package/contexts/network-test-container/index.d.ts.map +1 -1
- package/contexts/network-test-container/network-test-container-provider.d.ts +1 -2
- package/contexts/network-test-container/network-test-container-provider.d.ts.map +1 -1
- package/contexts/nutritive-sweetener/index.d.ts.map +1 -1
- package/contexts/nutritive-sweetener/nutritive-sweetener-provider.d.ts +1 -2
- package/contexts/nutritive-sweetener/nutritive-sweetener-provider.d.ts.map +1 -1
- package/contexts/reboot/index.d.ts.map +1 -1
- package/contexts/reboot/reboot-provider.d.ts +1 -2
- package/contexts/reboot/reboot-provider.d.ts.map +1 -1
- package/contexts/settings/index.d.ts.map +1 -1
- package/contexts/settings/settings-provider.d.ts +1 -2
- package/contexts/settings/settings-provider.d.ts.map +1 -1
- package/contexts/setup-step/index.d.ts.map +1 -1
- package/contexts/setup-step/setup-step-provider.d.ts +1 -2
- package/contexts/setup-step/setup-step-provider.d.ts.map +1 -1
- package/contexts/setup-step-container/index.d.ts.map +1 -1
- package/contexts/setup-step-container/setup-step-container-provider.d.ts +1 -2
- package/contexts/setup-step-container/setup-step-container-provider.d.ts.map +1 -1
- package/contexts/utilities/index.d.ts.map +1 -1
- package/contexts/utilities/utilities-provider.d.ts +1 -2
- package/contexts/utilities/utilities-provider.d.ts.map +1 -1
- package/contexts/utilities-container/index.d.ts.map +1 -1
- package/contexts/utilities-container/utilities-container-provider.d.ts +1 -2
- package/contexts/utilities-container/utilities-container-provider.d.ts.map +1 -1
- package/extensions/cui-extension.d.ts +5 -5
- package/extensions/cui-extension.d.ts.map +1 -1
- package/extensions/dashboard-detail-extension.d.ts +14 -15
- package/extensions/dashboard-detail-extension.d.ts.map +1 -1
- package/extensions/dashboard-macro-summary-extension.d.ts +14 -15
- package/extensions/dashboard-macro-summary-extension.d.ts.map +1 -1
- package/extensions/dashboard-pump-detail-extension.d.ts +14 -15
- package/extensions/dashboard-pump-detail-extension.d.ts.map +1 -1
- package/extensions/dashboard-summary-extension.d.ts +14 -15
- package/extensions/dashboard-summary-extension.d.ts.map +1 -1
- package/extensions/index.d.ts.map +1 -1
- package/extensions/nav-view-extension.d.ts +5 -5
- package/extensions/nav-view-extension.d.ts.map +1 -1
- package/extensions/setup-extension.d.ts +5 -5
- package/extensions/setup-extension.d.ts.map +1 -1
- package/extensions/trouble-action-extension.d.ts +13 -13
- package/extensions/trouble-action-extension.d.ts.map +1 -1
- package/extensions/view-extension.d.ts +5 -5
- package/extensions/view-extension.d.ts.map +1 -1
- package/hooks/actions/index.d.ts.map +1 -1
- package/hooks/actions/types.d.ts.map +1 -1
- package/hooks/actions/use-combined-actions.d.ts +4 -5
- package/hooks/actions/use-combined-actions.d.ts.map +1 -1
- package/hooks/actions/use-pump-action.d.ts +2 -3
- package/hooks/actions/use-pump-action.d.ts.map +1 -1
- package/hooks/actions/use-trouble-action.d.ts +2 -3
- package/hooks/actions/use-trouble-action.d.ts.map +1 -1
- package/hooks/agitation-control/index.d.ts.map +1 -1
- package/hooks/agitation-control/use-agitation-control.d.ts +1 -2
- package/hooks/agitation-control/use-agitation-control.d.ts.map +1 -1
- package/hooks/agitation-control/with-agitation-control.d.ts +0 -1
- package/hooks/agitation-control/with-agitation-control.d.ts.map +1 -1
- package/hooks/animation/index.d.ts.map +1 -1
- package/hooks/animation/use-animation.d.ts +1 -2
- package/hooks/animation/use-animation.d.ts.map +1 -1
- package/hooks/animation/with-animation.d.ts +0 -1
- package/hooks/animation/with-animation.d.ts.map +1 -1
- package/hooks/application/index.d.ts.map +1 -1
- package/hooks/application/use-application.d.ts +1 -2
- package/hooks/application/use-application.d.ts.map +1 -1
- package/hooks/application/with-application.d.ts +0 -1
- package/hooks/application/with-application.d.ts.map +1 -1
- package/hooks/calibration/index.d.ts.map +1 -1
- package/hooks/calibration/use-pump-calibration.d.ts +1 -2
- package/hooks/calibration/use-pump-calibration.d.ts.map +1 -1
- package/hooks/carb-water/index.d.ts.map +1 -1
- package/hooks/carb-water/use-carb-water.d.ts +1 -2
- package/hooks/carb-water/use-carb-water.d.ts.map +1 -1
- package/hooks/carb-water/with-carb-water.d.ts +0 -1
- package/hooks/carb-water/with-carb-water.d.ts.map +1 -1
- package/hooks/copy-logs/index.d.ts.map +1 -1
- package/hooks/copy-logs/use-copy-logs.d.ts +1 -2
- package/hooks/copy-logs/use-copy-logs.d.ts.map +1 -1
- package/hooks/copy-logs/with-copy-logs.d.ts +0 -1
- package/hooks/copy-logs/with-copy-logs.d.ts.map +1 -1
- package/hooks/dashboard-operations/index.d.ts.map +1 -1
- package/hooks/dashboard-operations/use-dashboard-operations.d.ts +1 -2
- package/hooks/dashboard-operations/use-dashboard-operations.d.ts.map +1 -1
- package/hooks/dashboard-operations/with-dashboard-operations.d.ts +0 -1
- package/hooks/dashboard-operations/with-dashboard-operations.d.ts.map +1 -1
- package/hooks/dispenser-info/index.d.ts.map +1 -1
- package/hooks/dispenser-info/use-dispenser-info.d.ts +1 -2
- package/hooks/dispenser-info/use-dispenser-info.d.ts.map +1 -1
- package/hooks/dispenser-info/with-dispenser-info.d.ts +0 -1
- package/hooks/dispenser-info/with-dispenser-info.d.ts.map +1 -1
- package/hooks/door/index.d.ts.map +1 -1
- package/hooks/door/use-door.d.ts +1 -2
- package/hooks/door/use-door.d.ts.map +1 -1
- package/hooks/door/with-door.d.ts +0 -1
- package/hooks/door/with-door.d.ts.map +1 -1
- package/hooks/extensions/index.d.ts.map +1 -1
- package/hooks/extensions/use-view-extensions.d.ts +1 -1
- package/hooks/extensions/use-view-extensions.d.ts.map +1 -1
- package/hooks/future/index.d.ts.map +1 -1
- package/hooks/future/use-future-container.d.ts +2 -3
- package/hooks/future/use-future-container.d.ts.map +1 -1
- package/hooks/holder-experience/holder-experience.d.ts +2 -3
- package/hooks/holder-experience/holder-experience.d.ts.map +1 -1
- package/hooks/holder-experience/index.d.ts.map +1 -1
- package/hooks/holders/index.d.ts.map +1 -1
- package/hooks/holders/use-holder-content.d.ts +4 -5
- package/hooks/holders/use-holder-content.d.ts.map +1 -1
- package/hooks/index.d.ts.map +1 -1
- package/hooks/ingredient-summary/index.d.ts.map +1 -1
- package/hooks/ingredient-summary/use-ingredient-summary.d.ts +1 -2
- package/hooks/ingredient-summary/use-ingredient-summary.d.ts.map +1 -1
- package/hooks/ingredient-summary/with-ingredient-summary.d.ts +0 -1
- package/hooks/ingredient-summary/with-ingredient-summary.d.ts.map +1 -1
- package/hooks/macro-assignment/index.d.ts.map +1 -1
- package/hooks/macro-assignment/use-macro-assignment.d.ts +1 -2
- package/hooks/macro-assignment/use-macro-assignment.d.ts.map +1 -1
- package/hooks/macro-assignment/with-macro-assignment.d.ts +0 -1
- package/hooks/macro-assignment/with-macro-assignment.d.ts.map +1 -1
- package/hooks/network-test/index.d.ts.map +1 -1
- package/hooks/network-test/use-network-test.d.ts +1 -2
- package/hooks/network-test/use-network-test.d.ts.map +1 -1
- package/hooks/network-test/with-network-test.d.ts +0 -1
- package/hooks/network-test/with-network-test.d.ts.map +1 -1
- package/hooks/network-test-container/index.d.ts.map +1 -1
- package/hooks/network-test-container/use-network-test-container.d.ts +1 -2
- package/hooks/network-test-container/use-network-test-container.d.ts.map +1 -1
- package/hooks/network-test-container/with-network-test-container.d.ts +0 -1
- package/hooks/network-test-container/with-network-test-container.d.ts.map +1 -1
- package/hooks/nutritive-sweetener/index.d.ts.map +1 -1
- package/hooks/nutritive-sweetener/use-nutritive-sweetener.d.ts +1 -2
- package/hooks/nutritive-sweetener/use-nutritive-sweetener.d.ts.map +1 -1
- package/hooks/nutritive-sweetener/with-nutritive-sweetener.d.ts +0 -1
- package/hooks/nutritive-sweetener/with-nutritive-sweetener.d.ts.map +1 -1
- package/hooks/plain-water/index.d.ts.map +1 -1
- package/hooks/plain-water/use-plain-water.d.ts +1 -2
- package/hooks/plain-water/use-plain-water.d.ts.map +1 -1
- package/hooks/plain-water/with-plain-water.d.ts +0 -1
- package/hooks/plain-water/with-plain-water.d.ts.map +1 -1
- package/hooks/plugin-extensions/index.d.ts.map +1 -1
- package/hooks/plugin-extensions/use-plugin-extensions.d.ts +1 -1
- package/hooks/plugin-extensions/use-plugin-extensions.d.ts.map +1 -1
- package/hooks/reboot/index.d.ts.map +1 -1
- package/hooks/reboot/use-reboot.d.ts +1 -2
- package/hooks/reboot/use-reboot.d.ts.map +1 -1
- package/hooks/reboot/with-reboot.d.ts +0 -1
- package/hooks/reboot/with-reboot.d.ts.map +1 -1
- package/hooks/settings/index.d.ts.map +1 -1
- package/hooks/settings/use-settings.d.ts +1 -2
- package/hooks/settings/use-settings.d.ts.map +1 -1
- package/hooks/settings/with-settings.d.ts +0 -1
- package/hooks/settings/with-settings.d.ts.map +1 -1
- package/hooks/setup-step/index.d.ts.map +1 -1
- package/hooks/setup-step/use-setup-step.d.ts +1 -2
- package/hooks/setup-step/use-setup-step.d.ts.map +1 -1
- package/hooks/setup-step/with-setup-step.d.ts +0 -1
- package/hooks/setup-step/with-setup-step.d.ts.map +1 -1
- package/hooks/setup-step-container/index.d.ts.map +1 -1
- package/hooks/setup-step-container/use-setup-step-container.d.ts +1 -2
- package/hooks/setup-step-container/use-setup-step-container.d.ts.map +1 -1
- package/hooks/setup-step-container/with-setup-step-container.d.ts +0 -1
- package/hooks/setup-step-container/with-setup-step-container.d.ts.map +1 -1
- package/hooks/start/index.d.ts.map +1 -1
- package/hooks/start/use-start.d.ts +1 -2
- package/hooks/start/use-start.d.ts.map +1 -1
- package/hooks/start/with-start.d.ts +0 -1
- package/hooks/start/with-start.d.ts.map +1 -1
- package/hooks/test/index.d.ts.map +1 -1
- package/hooks/test/use-test.d.ts +1 -2
- package/hooks/test/use-test.d.ts.map +1 -1
- package/hooks/test/with-test.d.ts +0 -1
- package/hooks/test/with-test.d.ts.map +1 -1
- package/hooks/trouble-action/index.d.ts.map +1 -1
- package/hooks/trouble-action/use-trouble-action.d.ts +1 -2
- package/hooks/trouble-action/use-trouble-action.d.ts.map +1 -1
- package/hooks/trouble-action/with-trouble-action.d.ts +0 -1
- package/hooks/trouble-action/with-trouble-action.d.ts.map +1 -1
- package/hooks/troubles/index.d.ts.map +1 -1
- package/hooks/troubles/use-trouble-data.d.ts +1 -2
- package/hooks/troubles/use-trouble-data.d.ts.map +1 -1
- package/hooks/troubles/use-trouble-decoration.d.ts +1 -2
- package/hooks/troubles/use-trouble-decoration.d.ts.map +1 -1
- package/hooks/troubles/use-trouble-visibility.d.ts +1 -2
- package/hooks/troubles/use-trouble-visibility.d.ts.map +1 -1
- package/hooks/utilities/index.d.ts.map +1 -1
- package/hooks/utilities/use-utilities.d.ts +1 -2
- package/hooks/utilities/use-utilities.d.ts.map +1 -1
- package/hooks/utilities/with-utilities.d.ts +0 -1
- package/hooks/utilities/with-utilities.d.ts.map +1 -1
- package/hooks/utilities-container/index.d.ts.map +1 -1
- package/hooks/utilities-container/use-utilities-container.d.ts +1 -2
- package/hooks/utilities-container/use-utilities-container.d.ts.map +1 -1
- package/hooks/utilities-container/with-utilities-container.d.ts +0 -1
- package/hooks/utilities-container/with-utilities-container.d.ts.map +1 -1
- package/index.cjs +9414 -191
- package/index.cjs.map +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +7172 -5011
- package/index.js.map +1 -0
- package/models/index.d.ts.map +1 -1
- package/models/test/index.d.ts.map +1 -1
- package/models/test/services/index.d.ts.map +1 -1
- package/models/test/services/test-services.d.ts +1 -1
- package/models/test/services/test-services.d.ts.map +1 -1
- package/models/test/test-model.d.ts +1 -2
- package/models/test/test-model.d.ts.map +1 -1
- package/models/test/test-registration.d.ts +2 -3
- package/models/test/test-registration.d.ts.map +1 -1
- package/package.json +9 -9
- package/styles/actions.d.ts +5 -6
- package/styles/actions.d.ts.map +1 -1
- package/utils/companion-utils.d.ts +1 -2
- package/utils/companion-utils.d.ts.map +1 -1
- package/utils/extension-utils.d.ts +2 -3
- package/utils/extension-utils.d.ts.map +1 -1
- package/utils/index.d.ts.map +1 -1
- package/utils/plugin-visibility-extension.d.ts.map +1 -1
- package/utils/registration/constants/extension-points.d.ts.map +1 -1
- package/utils/registration/extensions/index.d.ts.map +1 -1
- package/utils/registration/index.d.ts.map +1 -1
- package/utils/registration/registration-utils.d.ts +1 -2
- package/utils/registration/registration-utils.d.ts.map +1 -1
- package/utils/troubles/index.d.ts.map +1 -1
- package/utils/troubles/trouble-label-factory.d.ts +1 -2
- package/utils/troubles/trouble-label-factory.d.ts.map +1 -1
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../packages/kos-ddk-model-components/src/components/actions/intent/intent-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/calibrate-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/fixed-45.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/flush-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/high-flow-test-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/hold-to-pour-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/low-flow-test-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/manual-override-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/msv-reset-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/prime-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/intent/purge-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/trouble/trouble-aware-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/trouble/generic-trouble-action.ts","../../../packages/kos-ddk-model-components/src/components/actions/trouble/index.ts","../../../packages/kos-ddk-model-components/src/components/agitate-modal/agitator-modal.tsx","../../../packages/kos-ddk-model-components/src/hooks/agitation-control/use-agitation-control.ts","../../../packages/kos-ddk-model-components/src/hooks/future/use-future-container.ts","../../../packages/kos-ddk-model-components/src/components/future-progress-bar/future-progress-bar.tsx","../../../packages/kos-ddk-model-components/src/components/agitation-control-view/agitation-control-view.tsx","../../../packages/kos-ddk-model-components/src/components/calibrate-modal/calibrate-modal.tsx","../../../packages/kos-ddk-model-components/src/components/probe-view/probe-view.tsx","../../../packages/kos-ddk-model-components/src/components/carb-tank/detail/agitator.tsx","../../../packages/kos-ddk-model-components/src/components/carb-tank/summary/agitator.tsx","../../../packages/kos-ddk-model-components/src/components/cartridge-agitator/detail/agitator.tsx","../../../packages/kos-ddk-model-components/src/components/cartridge-agitator/summary/agitator.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-context/StagedChanges.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-info-card/config-prop-info-card.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-input-card/config-prop-input-card.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-input-range-card/config-prop-input-range-card.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-toggle-card/config-prop-toggle-card.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-picker-card/config-prop-picker-card.tsx","../../../packages/kos-ddk-model-components/src/components/config-property-input/base-config-property-component-factory.tsx","../../../packages/kos-ddk-model-components/src/components/config-property-input/config-property-input.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-multi-input-enable-card/config-prop-multi-input-enable-card.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-single-input-enable-card/config-prop-single-input-enable-card.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-switch-card/config-prop-switch-card.tsx","../../../packages/kos-ddk-model-components/src/components/time-picker-card/time-picker-card.tsx","../../../packages/kos-ddk-model-components/src/components/config-prop-time-picker-card/config-prop-time-picker-card.tsx","../../../packages/kos-ddk-model-components/src/components/date-picker-card/date-picker-card.tsx","../../../packages/kos-ddk-model-components/src/components/diagnostics-modal/diagnostics-modal.tsx","../../../packages/kos-ddk-model-components/src/hooks/actions/types.ts","../../../packages/kos-ddk-model-components/src/hooks/actions/use-combined-actions.ts","../../../packages/kos-ddk-model-components/src/hooks/actions/use-pump-action.ts","../../../packages/kos-ddk-model-components/src/hooks/actions/use-trouble-action.ts","../../../packages/kos-ddk-model-components/src/hooks/agitation-control/with-agitation-control.tsx","../../../packages/kos-ddk-model-components/src/hooks/animation/use-animation.ts","../../../packages/kos-ddk-model-components/src/hooks/animation/with-animation.tsx","../../../packages/kos-ddk-model-components/src/hooks/application/use-application.ts","../../../packages/kos-ddk-model-components/src/hooks/application/with-application.tsx","../../../packages/kos-ddk-model-components/src/hooks/carb-water/use-carb-water.ts","../../../packages/kos-ddk-model-components/src/hooks/carb-water/with-carb-water.tsx","../../../packages/kos-ddk-model-components/src/hooks/copy-logs/use-copy-logs.ts","../../../packages/kos-ddk-model-components/src/hooks/copy-logs/with-copy-logs.tsx","../../../packages/kos-ddk-model-components/src/hooks/dashboard-operations/use-dashboard-operations.ts","../../../packages/kos-ddk-model-components/src/hooks/dashboard-operations/with-dashboard-operations.tsx","../../../packages/kos-ddk-model-components/src/hooks/dispenser-info/use-dispenser-info.ts","../../../packages/kos-ddk-model-components/src/hooks/dispenser-info/with-dispenser-info.tsx","../../../packages/kos-ddk-model-components/src/hooks/door/use-door.ts","../../../packages/kos-ddk-model-components/src/hooks/door/with-door.tsx","../../../node_modules/zod/v3/helpers/util.js","../../../node_modules/zod/v3/ZodError.js","../../../node_modules/zod/v3/locales/en.js","../../../node_modules/zod/v3/errors.js","../../../node_modules/zod/v3/helpers/parseUtil.js","../../../node_modules/zod/v3/helpers/errorUtil.js","../../../node_modules/zod/v3/types.js","../../../packages/kos-ddk-model-components/src/extensions/dashboard-summary-extension.ts","../../../packages/kos-ddk-model-components/src/extensions/dashboard-detail-extension.ts","../../../packages/kos-ddk-model-components/src/extensions/dashboard-pump-detail-extension.ts","../../../packages/kos-ddk-model-components/src/extensions/dashboard-macro-summary-extension.ts","../../../packages/kos-ddk-model-components/src/extensions/cui-extension.ts","../../../packages/kos-ddk-model-components/src/extensions/nav-view-extension.ts","../../../packages/kos-ddk-model-components/src/extensions/setup-extension.ts","../../../packages/kos-ddk-model-components/src/extensions/trouble-action-extension.ts","../../../packages/kos-ddk-model-components/src/extensions/view-extension.ts","../../../packages/kos-ddk-model-components/src/hooks/extensions/use-view-extensions.ts","../../../packages/kos-ddk-model-components/src/hooks/holder-experience/holder-experience.tsx","../../../packages/kos-ddk-model-components/src/hooks/holders/use-holder-content.tsx","../../../packages/kos-ddk-model-components/src/hooks/ingredient-summary/use-ingredient-summary.ts","../../../packages/kos-ddk-model-components/src/hooks/ingredient-summary/with-ingredient-summary.tsx","../../../packages/kos-ddk-model-components/src/hooks/macro-assignment/use-macro-assignment.ts","../../../packages/kos-ddk-model-components/src/hooks/macro-assignment/with-macro-assignment.tsx","../../../packages/kos-ddk-model-components/src/hooks/network-test/use-network-test.ts","../../../packages/kos-ddk-model-components/src/hooks/network-test/with-network-test.tsx","../../../packages/kos-ddk-model-components/src/hooks/network-test-container/use-network-test-container.ts","../../../packages/kos-ddk-model-components/src/hooks/network-test-container/with-network-test-container.tsx","../../../packages/kos-ddk-model-components/src/hooks/nutritive-sweetener/use-nutritive-sweetener.ts","../../../packages/kos-ddk-model-components/src/hooks/nutritive-sweetener/with-nutritive-sweetener.tsx","../../../packages/kos-ddk-model-components/src/hooks/plain-water/use-plain-water.ts","../../../packages/kos-ddk-model-components/src/hooks/plain-water/with-plain-water.tsx","../../../packages/kos-ddk-model-components/src/utils/companion-utils.ts","../../../packages/kos-ddk-model-components/src/utils/plugin-visibility-extension.ts","../../../packages/kos-ddk-model-components/src/utils/extension-utils.ts","../../../packages/kos-ddk-model-components/src/utils/registration/constants/extension-points.ts","../../../packages/kos-ddk-model-components/src/utils/registration/extensions/index.ts","../../../packages/kos-ddk-model-components/src/utils/registration/registration-utils.ts","../../../packages/kos-ddk-model-components/src/utils/troubles/trouble-label-factory.ts","../../../packages/kos-ddk-model-components/src/hooks/plugin-extensions/use-plugin-extensions.ts","../../../packages/kos-ddk-model-components/src/hooks/reboot/use-reboot.ts","../../../packages/kos-ddk-model-components/src/hooks/reboot/with-reboot.tsx","../../../packages/kos-ddk-model-components/src/hooks/settings/use-settings.ts","../../../packages/kos-ddk-model-components/src/hooks/settings/with-settings.tsx","../../../packages/kos-ddk-model-components/src/hooks/setup-step/use-setup-step.ts","../../../packages/kos-ddk-model-components/src/hooks/setup-step/with-setup-step.tsx","../../../packages/kos-ddk-model-components/src/hooks/setup-step-container/use-setup-step-container.ts","../../../packages/kos-ddk-model-components/src/hooks/setup-step-container/with-setup-step-container.tsx","../../../packages/kos-ddk-model-components/src/hooks/calibration/use-pump-calibration.ts","../../../packages/kos-ddk-model-components/src/hooks/start/use-start.ts","../../../packages/kos-ddk-model-components/src/hooks/start/with-start.tsx","../../../packages/kos-ddk-model-components/src/hooks/trouble-action/use-trouble-action.ts","../../../packages/kos-ddk-model-components/src/hooks/trouble-action/with-trouble-action.tsx","../../../packages/kos-ddk-model-components/src/hooks/troubles/use-trouble-data.ts","../../../packages/kos-ddk-model-components/src/hooks/troubles/use-trouble-decoration.ts","../../../packages/kos-ddk-model-components/src/hooks/troubles/use-trouble-visibility.ts","../../../packages/kos-ddk-model-components/src/hooks/utilities/use-utilities.ts","../../../packages/kos-ddk-model-components/src/hooks/utilities/with-utilities.tsx","../../../packages/kos-ddk-model-components/src/hooks/utilities-container/use-utilities-container.ts","../../../packages/kos-ddk-model-components/src/hooks/utilities-container/with-utilities-container.tsx","../../../packages/kos-ddk-model-components/src/components/dispenser-serial-number/dispenser-serial-number.tsx","../../../packages/kos-ddk-model-components/src/components/dispenser-info-settings/dispenser-info-settings.tsx","../../../packages/kos-ddk-model-components/src/components/dispenser-settings/dispenser-settings.tsx","../../../packages/kos-ddk-model-components/src/components/enjoy-by-date/enjoy-by-date.tsx","../../../packages/kos-ddk-model-components/src/components/hardware-info/hardware-info.tsx","../../../packages/kos-ddk-model-components/src/components/hold-to-pour-button/hold-to-pour-button.tsx","../../../packages/kos-ddk-model-components/src/contexts/animation/animation-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/application/application-component-configuration-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/application/application-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/dashboard-operations/dashboard-operations-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/dispenser-info/dispenser-info-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/ingredient-summary/ingredient-summary-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/macro-assignment/macro-assignment-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/network-test/network-test-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/network-test-container/network-test-container-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/reboot/reboot-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/settings/settings-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/setup-step/setup-step-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/setup-step-container/setup-step-container-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/utilities/utilities-provider.tsx","../../../packages/kos-ddk-model-components/src/contexts/utilities-container/utilities-container-provider.tsx","../../../packages/kos-ddk-model-components/src/components/holders/use-visible-troubles.ts","../../../packages/kos-ddk-model-components/src/components/holders/holder-card.tsx","../../../packages/kos-ddk-model-components/src/components/holders/holder-group-view.tsx","../../../packages/kos-ddk-model-components/src/components/holders/macro-holder-card.tsx","../../../packages/kos-ddk-model-components/src/components/holders/macro-holder-group-view.tsx","../../../packages/kos-ddk-model-components/src/components/holders/macro-setup-step-card.tsx","../../../packages/kos-ddk-model-components/src/components/ice-agitator/detail/agitator.tsx","../../../packages/kos-ddk-model-components/src/components/ice-agitator/summary/agitator.tsx","../../../packages/kos-ddk-model-components/src/components/ice-agitator-settings-view/ice-agitator-settings-view.tsx","../../../packages/kos-ddk-model-components/src/components/localization-settings/localization-settings.tsx","../../../packages/kos-ddk-model-components/src/components/network-test-results/NetworkTestResults.tsx","../../../packages/kos-ddk-model-components/src/components/notification-card-view/notification-card-view.tsx","../../../packages/kos-ddk-model-components/src/components/plugin-tabs/plugin-tabs.tsx","../../../packages/kos-ddk-model-components/src/components/pump-cards/holder-actions/holder-actions.tsx","../../../packages/kos-ddk-model-components/src/components/pump-cards/holder-notifications/holder-notifications.tsx","../../../packages/kos-ddk-model-components/src/components/pump-cards/cgp-pump-card/cgp-pump-card.tsx","../../../packages/kos-ddk-model-components/src/components/pump-cards/lfcv-pump-card/lfcv-pump-card.tsx","../../../packages/kos-ddk-model-components/src/components/pump-cards/msv-pump-card/msv-pump-card.tsx","../../../packages/kos-ddk-model-components/src/components/pump-cards/super-pump/super-pump-card.tsx","../../../packages/kos-ddk-model-components/src/components/pump-cards/valve-card/valve-card.tsx","../../../packages/kos-ddk-model-components/src/components/pump-cards/water-pump-card/water-pump-card.tsx","../../../packages/kos-ddk-model-components/src/components/reboot-view/reboot-view.tsx","../../../packages/kos-ddk-model-components/src/components/remote-nns-modal/remote-nns-modal.tsx","../../../packages/kos-ddk-model-components/src/components/remote-tray/detail/remote-tray.tsx","../../../packages/kos-ddk-model-components/src/components/remote-tray/summary/remote-tray.tsx","../../../packages/kos-ddk-model-components/src/components/replace-line/replace-line.tsx","../../../packages/kos-ddk-model-components/src/components/replace-pump/replace-pump.tsx","../../../packages/kos-ddk-model-components/src/components/rfid-override/rfid-override.tsx","../../../packages/kos-ddk-model-components/src/components/setup-required/setup-required.tsx","../../../packages/kos-ddk-model-components/src/components/setup-sidebar/setup-sidebar.tsx","../../../packages/kos-ddk-model-components/src/components/software/software.tsx","../../../packages/kos-ddk-model-components/src/components/spm-field-calibration/spm-field-calibration-modal.tsx","../../../packages/kos-ddk-model-components/src/components/state-experience/state-experience.tsx","../../../packages/kos-ddk-model-components/src/components/system-date-picker-card/system-date-picker-card.tsx","../../../packages/kos-ddk-model-components/src/components/time-zone-picker-card/time-zone-picker-card.tsx","../../../packages/kos-ddk-model-components/src/components/time-settings/time-settings.tsx","../../../packages/kos-ddk-model-components/src/components/water-settings/water-settings.tsx","../../../packages/kos-ddk-model-components/src/styles/actions.tsx"],"sourcesContent":["import { type IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { FutureManager, IFutureModel } from \"@kosdev-code/kos-ui-sdk\";\nimport type { IntentAwareAction } from \"../action\";\n\nexport interface IntentActionOptions {\n intent: string;\n title: string;\n namespace?: string;\n successMessage?: string;\n failureMessage?: string;\n actionLabel?: string;\n}\nexport abstract class IntentAction implements IntentAwareAction {\n future?: IFutureModel;\n protected intentContainer: IntentAware;\n title: string;\n intent: string;\n namespace?: string;\n successMessage?: string;\n failureMessage?: string;\n actionLabel?: string;\n constructor(intentContainer: IntentAware, options: IntentActionOptions) {\n this.intentContainer = intentContainer;\n this.title = options.title;\n this.namespace = options.namespace;\n this.intent = options.intent;\n this.successMessage = options.successMessage;\n this.failureMessage = options.failureMessage;\n this.actionLabel = options.actionLabel;\n }\n\n abstract enabled();\n\n get type() {\n return \"intentContainer\";\n }\n\n async performAction() {\n const future = await this.intentContainer.performIntent(this.intent);\n\n if (future?.tracker) {\n this.future = FutureManager.getFuture(future.tracker);\n }\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class CalibrateAction extends IntentAction {\n constructor(holder: IntentAware) {\n super(holder, {\n title: \"Calibrate\",\n intent: \"CALIBRATE\",\n successMessage: \"Calibrate Complete\",\n failureMessage: \"Calibrate Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class Fixed45FlowTestAction extends IntentAction {\n constructor(holder: IntentAware) {\n super(holder, {\n title: \"45ml Flow Test\",\n intent: \"FIXED_45\",\n successMessage: \"45ml Flow Test Complete\",\n failureMessage: \"45ml Flow Test Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class FlushAction extends IntentAction {\n constructor(intentContainer: IntentAware) {\n super(intentContainer, {\n title: \"Flush\",\n intent: \"FLUSH\",\n successMessage: \"Flush Complete\",\n failureMessage: \"Flush Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class HighFlowTestAction extends IntentAction {\n constructor(holder: IntentAware) {\n super(holder, {\n title: \"High Flow Test\",\n intent: \"HIGH_FLOW_TEST\",\n successMessage: \"High Flow Test Complete\",\n failureMessage: \"High Flow Test Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class HoldToPourAction extends IntentAction {\n constructor(holder: IntentAware) {\n super(holder, {\n title: \"Hold to Pour\",\n intent: \"HOLD_TO_POUR\",\n successMessage: \"Pour Complete\",\n failureMessage: \"Pour Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class LowFlowTestAction extends IntentAction {\n constructor(holder: IntentAware) {\n super(holder, {\n title: \"Low Flow Test\",\n intent: \"LOW_FLOW_TEST\",\n successMessage: \"Low Flow Test Complete\",\n failureMessage: \"Low Flow Test Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class ManualOverrideAction extends IntentAction {\n constructor(holder: IntentAware) {\n super(holder, {\n title: \"Manual Override\",\n intent: \"SOFT_START\",\n successMessage: \"Manual Override Complete\",\n failureMessage: \"Manual Override Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class MSVResetAction extends IntentAction {\n constructor(holder: IntentAware) {\n super(holder, {\n title: \"Reset\",\n intent: \"MSV_RESET\",\n successMessage: \"Reset Complete\",\n failureMessage: \"Reset Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class PrimeAction extends IntentAction {\n constructor(intentContainer: IntentAware) {\n super(intentContainer, {\n title: \"Prime\",\n intent: \"PRIME\",\n successMessage: \"Prime Complete\",\n failureMessage: \"Prime Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IntentAction } from \"./intent-action\";\n\nexport class PurgeAction extends IntentAction {\n constructor(intentContainer: IntentAware) {\n super(intentContainer, {\n title: \"Purge\",\n intent: \"PURGE\",\n successMessage: \"Purge Complete\",\n failureMessage: \"Purge Failed\",\n });\n }\n\n enabled() {\n return true;\n }\n}\n","import {\n FutureManager,\n IFutureModel,\n type TroubleAware,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport type { TroubleAwareAction } from \"../action\";\n\nexport interface TroubleActionOptions {\n trouble: string;\n title?: string;\n namespace?: string;\n successMessage?: string;\n failureMessage?: string;\n action?: string;\n progress?: string;\n}\nexport abstract class TroubleAction implements TroubleAwareAction {\n future?: IFutureModel;\n protected troubleAware: TroubleAware;\n title: string;\n troubleKey: string;\n namespace?: string;\n successMessage?: string;\n failureMessage?: string;\n actionLabel?: string;\n constructor(troubleAware: TroubleAware, options: TroubleActionOptions) {\n this.troubleAware = troubleAware;\n this.troubleKey = options.trouble;\n this.namespace = options.namespace || \"troubles\";\n this.title =\n options.title || `${this.namespace}:troubles.${this.troubleKey}.progress`;\n this.successMessage =\n options.successMessage ||\n `${this.namespace}:troubles.${this.troubleKey}.success`;\n this.failureMessage =\n options.failureMessage ||\n `${this.namespace}:troubles.${this.troubleKey}.error`;\n this.actionLabel =\n options.action || `${this.namespace}:troubles.${this.troubleKey}.action`;\n }\n\n abstract enabled();\n\n get type() {\n return \"troubleAware\";\n }\n\n async performAction() {\n const troubles = this.troubleAware.troublesByType[this.troubleKey];\n if (!troubles) {\n return;\n }\n const trouble = troubles[0];\n const future = await trouble.resolve();\n\n if (future?.tracker) {\n this.future = FutureManager.getFuture(future.tracker);\n }\n }\n}\n","import type { TroubleAware } from \"@kosdev-code/kos-ui-sdk\";\nimport { TroubleAction } from \"./trouble-aware-action\";\n\nexport class GenericTroubleAction extends TroubleAction {\n constructor(troubleAware: TroubleAware, troubleKey: string) {\n super(troubleAware, {\n trouble: troubleKey,\n });\n }\n enabled() {\n return true;\n }\n}\n","export * from \"./generic-trouble-action\";\nexport * from \"./trouble-aware-action\";\nexport const TROUBLE_PRIME = \"PrimeTrouble\";\nexport const TROUBLE_PURGE = \"PurgeTrouble\";\n","import styled from \"@emotion/styled\";\nimport {\n BackButton,\n Button,\n Content,\n Footer,\n Header,\n InfoCard,\n Modal,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useState } from \"react\";\nimport type { HolderExperienceProps } from \"../../hooks\";\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n gap: 32px;\n height: 100%;\n`;\n\nexport const AgitatorModal = kosComponent(\n ({ holder, onComplete }: HolderExperienceProps) => {\n const [closing, setClosing] = useState(false);\n const { t } = useKosTranslation(\"common\");\n const { componentModeOverride } = useComponentConfigurationContext();\n\n const agitated = holder.data.agitated;\n\n return (\n <Modal\n contain={componentModeOverride !== \"compact\"}\n onClosed={onComplete}\n show={!closing}\n >\n <Container>\n <Header\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n title={t(\"shelf-agitator\")}\n showOpenButton={false}\n onClose={() => setClosing(true)}\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n />\n\n <Content align=\"top\">\n <InfoCard\n label={t(\"agitating\")}\n padding=\"x-large\"\n value={agitated ? t(\"no\") : t(\"yes\")}\n />\n </Content>\n <Footer>\n <Button\n mode=\"primary\"\n disabled={agitated}\n onPointerDown={() => console.log(\"agitate!\")}\n >\n {t(\"test-shelf-agitator\")}\n </Button>\n </Footer>\n </Container>\n </Modal>\n );\n }\n);\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n AgitationControl,\n AgitationControlModel,\n} from \"@kosdev-code/kos-ddk-models\";\n\nexport const useAgitationControl = () => {\n const modelId = AgitationControl.type;\n const result = useKosModel<AgitationControlModel>({\n modelId,\n modelType: AgitationControl.type,\n options: {},\n });\n\n return result;\n};\n","import {\n FutureEndState,\n kosAutoEffect,\n type FutureContainer,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useEffect, useState } from \"react\";\n\nexport const useFutureContainer = <T extends Record<string, any> = any>(\n futureContainer?: FutureContainer<T>\n) => {\n const [future, setFuture] = useState(futureContainer?.futureHandler.future);\n const [endState, setEndState] = useState(\n futureContainer?.futureHandler?.future?.endState\n );\n useEffect(() => {\n const disposer = kosAutoEffect(() => {\n const _future = futureContainer?.futureHandler.future;\n setFuture(_future);\n setEndState(_future?.endState);\n });\n return () => {\n disposer();\n futureContainer?.futureHandler.removeFuture();\n };\n }, [futureContainer?.futureHandler]);\n\n const clearFuture = useCallback(() => {\n futureContainer?.futureHandler.removeFuture();\n }, [futureContainer?.futureHandler]);\n\n return {\n future,\n clearFuture,\n success: endState === FutureEndState.Success,\n failure: endState && endState !== FutureEndState.Success,\n };\n};\n","import styled from \"@emotion/styled\";\nimport {\n Button,\n CloseButton,\n ProgressBar,\n ProgressStatus,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { MessageErrorIcon, SuccessIcon } from \"@kosdev-code/kos-ddk-styles\";\nimport {\n kosComponent,\n KosLog,\n useKosTranslation,\n type IFutureModel,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport React, {\n PropsWithChildren,\n ReactNode,\n useCallback,\n useEffect,\n} from \"react\";\n\nconst log = KosLog.createLogger({ name: \"future-progress-bar\" });\n\nconst MessageCloseButton = styled(CloseButton)`\n --ddk-component-icon-button-icon-color-active: var(\n --ddk-component-progress-bar-close-button-color-active\n );\n --ddk-component-icon-button-icon-color-default: var(\n --ddk-component-progress-bar-close-button-color-default\n );\n --ddk-component-icon-button-icon-color-disabled: var(\n --ddk-component-progress-bar-close-button-color-disabled\n );\n --ddk-component-icon-button-icon-color-hover: var(\n --ddk-component-progress-bar-close-button-color-hover\n );\n`;\n\ninterface FailureData {\n title: string;\n subtitle: string;\n}\ninterface Props {\n future?: IFutureModel<any>;\n title: ReactNode;\n failureMessage?: React.ReactNode | FailureData;\n successMessage?: React.ReactNode;\n cancelMessage?: React.ReactNode;\n onSuccess?: () => void;\n onClose?: () => void;\n isCancelable?: boolean;\n}\n\nconst MessageWrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 8px;\n`;\nconst Message = styled.div`\n align-items: var(--ddk-component-progress-bar-message-align-items);\n color: var(--ddk-component-progress-bar-message-color);\n display: flex;\n flex-direction: var(--ddk-component-progress-bar-message-flex-direction);\n gap: var(--ddk-component-progress-bar-message-gap);\n justify-content: space-between;\n width: 100%;\n`;\n\nconst MessageContainer = styled.div`\n display: flex;\n gap: var(--ddk-component-status-bar-gap);\n align-items: center;\n`;\n\nconst MessageSubtitle = styled.div`\n border-top: solid 1px #888888;\n padding-top: 8px;\n width: calc(100% - 10px);\n`;\ninterface FailureProps {\n onPointerDown?: () => void;\n title?: string;\n subtitle?: string;\n}\nexport const FailureMessage: React.FunctionComponent<\n PropsWithChildren<FailureProps>\n> = ({ children, onPointerDown, title, subtitle }) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n const { t } = useKosTranslation(\"common\");\n const content = title ?? children;\n return (\n <Message>\n <MessageWrapper>\n <MessageContainer\n style={{\n fontSize: \"var(--ddk-component-progress-bar-message-font-size)\",\n }}\n >\n <MessageErrorIcon\n style={{\n color: \"var(--ddk-component-progress-bar-icon-color-failure)\",\n fontSize: \"var(--ddk-component-progress-bar-icon-size)\",\n }}\n ></MessageErrorIcon>\n {content}\n </MessageContainer>\n {subtitle && <MessageSubtitle>{subtitle}</MessageSubtitle>}\n </MessageWrapper>\n {componentModeOverride === \"compact\" ? (\n <Button mode=\"primary\" onPointerDown={onPointerDown}>\n {t(\"close\", \"Close\")}\n </Button>\n ) : (\n <MessageCloseButton\n label={false}\n size=\"large\"\n onPointerDown={onPointerDown}\n />\n )}\n </Message>\n );\n};\n\nexport const SuccessMessage: React.FunctionComponent<\n PropsWithChildren<FailureProps>\n> = ({ children, onPointerDown }) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n const { t } = useKosTranslation(\"common\");\n return (\n <Message>\n <MessageContainer>\n <SuccessIcon\n style={{\n color: \"var(--ddk-semantic-color-system-green)\",\n fontSize: \"var(--ddk-component-progress-bar-icon-size)\",\n }}\n ></SuccessIcon>\n {children}\n </MessageContainer>\n {componentModeOverride === \"compact\" ? (\n <Button mode=\"primary\" onPointerDown={onPointerDown}>\n {t(\"close\", \"Close\")}\n </Button>\n ) : (\n <MessageCloseButton\n label={false}\n size=\"large\"\n onPointerDown={onPointerDown}\n />\n )}\n </Message>\n );\n};\nconst isFailureData = (data: any): data is FailureData =>\n data?.title && data?.subtitle;\nexport const FutureProgressBar: React.FunctionComponent<Props> = kosComponent(\n ({\n title,\n future,\n failureMessage,\n successMessage,\n cancelMessage,\n isCancelable = true,\n onSuccess,\n onClose,\n }) => {\n const { t: tCommon } = useKosTranslation(\"common\");\n const [show, setShow] = React.useState(true);\n const [status, setStatus] = React.useState<ProgressStatus>();\n\n const progressData = `${future?.timeRemaining} ${tCommon(\n \"remaining\",\n \"remaining\"\n )}`;\n\n const close = useCallback(() => {\n if (status === \"in-progress\") return;\n\n onClose?.();\n setShow(false);\n }, [onClose, status]);\n\n const handleSuccess = useCallback(() => {\n close();\n onSuccess?.();\n }, [close, onSuccess]);\n\n useEffect(() => {\n if (future?.status === \"IN_PROGRESS\" || future?.status === \"NOT_ACTIVE\") {\n setStatus(\"in-progress\");\n setShow(true);\n } else if (future?.status === \"SUCCESS\") {\n setStatus(\"success\");\n setShow(!!successMessage);\n if (!successMessage) {\n close();\n onSuccess?.();\n }\n } else if (future?.status === \"FAIL\" || future?.status === \"ABORT\") {\n setStatus(\"failure\");\n setShow(!!failureMessage);\n } else if (future?.status === \"CANCEL\") {\n setStatus(\"cancelled\");\n setShow(!!cancelMessage);\n } else {\n if (future) {\n log.error(\"unknown status\", future?.status);\n }\n }\n }, [\n failureMessage,\n future,\n future?.status,\n successMessage,\n cancelMessage,\n close,\n onSuccess,\n ]);\n const subtitle = isFailureData(failureMessage)\n ? failureMessage.subtitle\n : undefined;\n const failure = isFailureData(failureMessage)\n ? failureMessage.title\n : failureMessage ??\n tCommon(\"something-went-wrong\", \"Something went wrong\");\n\n return (\n future && (\n <ProgressBar\n isCancelable={isCancelable}\n onCancel={() => {\n future.cancelFuture();\n }}\n blocked={status === \"in-progress\"}\n onClose={close}\n renderFailure={\n failureMessage && (\n <FailureMessage subtitle={subtitle} onPointerDown={close}>\n {failure}\n </FailureMessage>\n )\n }\n renderCancel={\n cancelMessage && (\n <FailureMessage onPointerDown={close}>\n {cancelMessage}\n </FailureMessage>\n )\n }\n renderSuccess={\n successMessage && (\n <SuccessMessage onPointerDown={handleSuccess}>\n {successMessage}\n </SuccessMessage>\n )\n }\n show={show}\n status={status}\n subtitle={progressData}\n title={title}\n value={future.progress}\n />\n )\n );\n }\n);\n","import styled from \"@emotion/styled\";\n\nimport {\n kosComponent,\n KosLog,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback } from \"react\";\nimport { useAgitationControl } from \"../../hooks/agitation-control/use-agitation-control\";\nimport { useFutureContainer } from \"../../hooks/future/use-future-container\";\nimport { FutureProgressBar } from \"../future-progress-bar\";\n\nconst log = KosLog.createLogger({ name: \"agitation-control-view\" });\nlog.debug(\"agitation-control-view component loaded\");\n\nconst AgitationControlViewContainer = styled.div``;\n\ninterface Props {}\nexport const AgitationControlView: React.FunctionComponent<Props> =\n kosComponent(() => {\n const { model } = useAgitationControl();\n const { t, i18n } = useKosTranslation(\"troubles\");\n const { future, failure } = useFutureContainer(model);\n const handleClose = useCallback(() => {\n if (model) {\n model.clearAll();\n }\n }, [model]);\n const errorReason = future?.reason;\n const errReasonKey = errorReason\n ? `__troubles.errors.${errorReason}__`\n : undefined;\n\n const errKey = \"troubles.agitation.error\";\n const hasReason = i18n.exists(`troubles.errors.${errorReason}`);\n return (\n <AgitationControlViewContainer>\n <FutureProgressBar\n title={t(\"troubles.agitation.title\")}\n future={future}\n isCancelable={true}\n onClose={handleClose}\n failureMessage={t(errKey, {\n context: errReasonKey && hasReason ? \"reason\" : undefined,\n data: {\n reason: errReasonKey,\n },\n })}\n ></FutureProgressBar>\n </AgitationControlViewContainer>\n );\n });\n","import {\n BodyMediumInformation,\n Button,\n InputCard,\n LabelInformation,\n WorkflowModal,\n type ExperienceProps,\n type WorkflowModalProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { FcmPumpModel } from \"@kosdev-code/kos-freestyle-sdk\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { useFutureContainer } from \"../../hooks/future/use-future-container\";\nimport { FutureProgressBar } from \"../future-progress-bar\";\n\ntype State =\n | \"high-flow-test-idle\"\n | \"high-flow-test-in-progress\"\n | \"high-flow-test-success\"\n | \"calibration-idle\"\n | \"calibration-in-progress\"\n | \"calibration-input\"\n | \"calibration-input-confirmation\"\n | \"verification-idle\"\n | \"verification-in-progress\"\n | \"verification-input\"\n | \"verification-input-confirmation\"\n | \"verification-success\"\n | \"verification-failure\"\n | \"failure\";\n\ninterface CalibrateModelProps extends ExperienceProps {\n pump: FcmPumpModel;\n}\n\nexport const CalibrateModal = kosComponent(\n ({ pump, onComplete }: CalibrateModelProps) => {\n const { t } = useKosTranslation(\"common\", { keyPrefix: \"fcm-calibration\" });\n const [state, setState] = useState<State>(\"high-flow-test-idle\");\n const [error, setError] = useState<string | undefined>();\n const [volume1, setVolume1] = useState<string>();\n const [volume2, setVolume2] = useState<string>();\n\n const { future } = useFutureContainer(pump);\n\n useEffect(() => {\n switch (future?.endState) {\n case \"CANCEL\":\n switch (state) {\n case \"high-flow-test-in-progress\":\n setState(\"high-flow-test-idle\");\n break;\n default:\n setError(\"calibration-canceled\");\n setState(\"failure\");\n }\n break;\n case \"SUCCESS\":\n switch (state) {\n case \"high-flow-test-in-progress\":\n setState(\"high-flow-test-success\");\n break;\n case \"calibration-in-progress\":\n setState(\"calibration-input\");\n break;\n case \"verification-in-progress\":\n setState(\"verification-input\");\n break;\n }\n break;\n case \"FAIL\":\n setError(future?.reason);\n setState(\"failure\");\n break;\n }\n }, [future?.endState, future?.reason, state]);\n\n const workflow = useMemo((): Record<State, WorkflowModalProps> => {\n return {\n \"high-flow-test-idle\": {\n information: (\n <LabelInformation>\n {t(\"high-flow-test-idle-information\")}\n </LabelInformation>\n ),\n footer: (\n <Button\n onPointerDown={() => {\n pump.performPreCalibrate();\n setState(\"high-flow-test-in-progress\");\n }}\n >\n {t(\"initiate-high-flow-test\")}\n </Button>\n ),\n status: \"information\",\n },\n\n \"high-flow-test-in-progress\": {\n information: (\n <LabelInformation>\n {t(\"high-flow-test-in-progress-information\")}\n </LabelInformation>\n ),\n footer: <Button disabled>{t(\"initiate-high-flow-test\")}</Button>,\n status: \"loading\",\n },\n\n \"high-flow-test-success\": {\n information: (\n <LabelInformation>\n {t(\"high-flow-test-success-information\")}\n </LabelInformation>\n ),\n footer: (\n <Button onPointerDown={() => setState(\"calibration-idle\")}>\n {t(\"proceed\")}\n </Button>\n ),\n status: \"success\",\n },\n\n \"calibration-idle\": {\n information: (\n <BodyMediumInformation>\n {t(\"calibration-idle-information\")}\n </BodyMediumInformation>\n ),\n footer: (\n <Button\n onPointerDown={() => {\n pump.performCalibrate();\n setState(\"calibration-in-progress\");\n }}\n >\n {t(\"calibrate\")}\n </Button>\n ),\n status: \"information\",\n },\n\n \"calibration-in-progress\": {\n information: (\n <LabelInformation>\n {t(\"calibration-in-progress-information\")}\n </LabelInformation>\n ),\n status: \"loading\",\n },\n\n \"calibration-input\": {\n information: (\n <>\n <BodyMediumInformation>\n {t(\"calibration-input-information\")}\n </BodyMediumInformation>\n <InputCard\n label=\"Volume\"\n unitValue=\"ml\"\n layout=\"num\"\n onChange={(value) => {\n if (value === undefined) return;\n setVolume1(value);\n }}\n value={volume1 !== undefined ? volume1 : \"\"}\n />\n </>\n ),\n footer: (\n <Button\n disabled={volume1 === undefined}\n onPointerDown={() => {\n if (volume1 === undefined) return;\n setState(\"verification-idle\");\n }}\n >\n {t(\"proceed\")}\n </Button>\n ),\n status: \"information\",\n },\n\n // Todo: calibration-input-confirmation if necessary...\n \"calibration-input-confirmation\": {},\n\n \"verification-idle\": {\n information: (\n <BodyMediumInformation>\n {t(\"verification-idle-information\")}\n </BodyMediumInformation>\n ),\n footer: (\n <Button\n onPointerDown={async () => {\n if (volume1 === undefined) return;\n pump.performVerify(volume1);\n setState(\"verification-in-progress\");\n }}\n >\n {t(\"initiate-verification-pour\")}\n </Button>\n ),\n status: \"information\",\n },\n\n \"verification-in-progress\": {\n information: (\n <LabelInformation>\n {t(\"verification-in-progress-information\")}\n </LabelInformation>\n ),\n status: \"loading\",\n },\n\n \"verification-input\": {\n information: (\n <>\n <BodyMediumInformation>\n {t(\"verification-input-information\")}\n </BodyMediumInformation>\n <InputCard\n label=\"Volume\"\n unitValue=\"ml\"\n layout=\"num\"\n onChange={(value) => {\n if (value === undefined) return;\n setVolume2(value);\n }}\n value={volume2 !== undefined ? volume2 : \"\"}\n />\n </>\n ),\n footer: (\n <Button\n disabled={volume2 === undefined}\n onPointerDown={async () => {\n if (volume1 === undefined || volume2 === undefined) return;\n\n const result = await pump.performComplete(volume1, volume2);\n if (result === \"success\") {\n setState(\"verification-success\");\n } else {\n setError(result);\n if (result === \"errBadPump\") {\n setState(\"verification-failure\");\n } else {\n setState(\"failure\");\n }\n }\n }}\n >\n {t(\"proceed\")}\n </Button>\n ),\n status: \"information\",\n },\n\n // Todo: verification-input-confirmation if necessary...\n \"verification-input-confirmation\": {},\n\n \"verification-success\": {\n information: (\n <LabelInformation>\n {t(\"verification-success-information\")}\n </LabelInformation>\n ),\n footer: (\n <Button onPointerDown={onComplete}>{t(\"exit-calibration\")}</Button>\n ),\n status: \"success\",\n },\n\n \"verification-failure\": {\n information: (\n <LabelInformation>{t(`error.${error}`)}</LabelInformation>\n ),\n footer: (\n <Button onPointerDown={onComplete}>{t(\"exit-calibration\")}</Button>\n ),\n status: \"error\",\n },\n\n failure: {\n information: (\n <>\n <LabelInformation>{t(\"calibration-failed\")}</LabelInformation>\n <BodyMediumInformation>\n {t(`error.${error || \"unknownError\"}`)}\n </BodyMediumInformation>\n </>\n ),\n footer: (\n <Button onPointerDown={onComplete}>{t(\"exit-calibration\")}</Button>\n ),\n status: \"error\",\n },\n };\n }, [error, onComplete, pump, t, volume1, volume2]);\n\n return (\n <>\n <WorkflowModal\n title={t(pump.name)}\n {...workflow[state]}\n onClose={() => onComplete()}\n />\n {future && (\n <FutureProgressBar title={t(\"initiating\")} future={future} />\n )}\n </>\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport type { ProbeAware } from \"@kosdev-code/kos-freestyle-sdk\";\n\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\n\ninterface ProbeViewProps {\n probeAware?: ProbeAware;\n}\nexport const ProbeView: React.FC<ProbeViewProps> = kosComponent(\n ({ probeAware }) => {\n if (!probeAware) {\n return null;\n }\n const highProbeWet = probeAware.highProbeWet.value;\n const lowProbeWet = probeAware.lowProbeWet.value;\n const filling = probeAware.filling.value;\n return (\n <ProbViewContainer>\n <ProbeStatus>\n <Subheader>High Probe</Subheader>\n <ProbeValue>{highProbeWet ? \"Wet\" : \"Dry\"}</ProbeValue>\n </ProbeStatus>\n <ProbeStatus>\n <Subheader>Low Probe</Subheader>\n <ProbeValue>{lowProbeWet ? \"Wet\" : \"Dry\"}</ProbeValue>\n </ProbeStatus>\n <ProbeStatus>\n <Subheader>Filling</Subheader>\n <ProbeValue>{filling ? \"Yes\" : \"No\"}</ProbeValue>\n </ProbeStatus>\n </ProbViewContainer>\n );\n }\n);\n\nconst ProbViewContainer = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n width: 100%;\n`;\n\nconst ProbeStatus = styled.div`\n border-radius: 16px;\n border: 1px solid var(--ddk-generic-color-grey-20, #c5c5c5);\n display: flex;\n padding: 48px 24px;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n flex: 1;\n`;\n\nconst Subheader = styled.div`\n color: var(--ddk-generic-color-grey-50);\n text-align: center;\n font-size: var(--ddk-generic-font-size-small);\n`;\n\nconst ProbeValue = styled.div`\n color: var(--ddk-generic-color-grey-90);\n text-align: center;\n font-size: var(--ddk-generic-font-size-large);\n`;\n","import { Button, Content, Footer } from \"@kosdev-code/kos-ddk-components\";\nimport type {\n CarbAgitatorModel,\n FreestyleAssemblyModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\nimport { FutureProgressBar } from \"../../future-progress-bar\";\n\nimport {\n kosComponent,\n KosLog,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nimport { useCallback } from \"react\";\nimport { useFutureContainer } from \"../../../hooks/future/use-future-container\";\nimport { ProbeView } from \"../../probe-view\";\n\ninterface AgitatorProps {\n assembly: FreestyleAssemblyModel;\n cardModel: CarbAgitatorModel;\n}\n\nexport const CarbTankDetail: React.FunctionComponent<AgitatorProps> =\n kosComponent(({ cardModel }) => {\n KosLog.debug(`Agitator`, cardModel.path);\n const { t } = useKosTranslation(\"carb-tank\", {\n keyPrefix: \"dashboard.detail\",\n });\n const { future } = useFutureContainer(cardModel);\n const handleAction = useCallback(\n (action: string) => {\n if (action === \"agitate\") {\n cardModel?.handleTestCarbTank();\n } else if (action === \"activate\") {\n cardModel?.toggleCarbTank();\n }\n },\n [cardModel]\n );\n return (\n <>\n <Content>\n <ProbeView probeAware={cardModel} />\n </Content>\n\n <Footer>\n <Button\n onPointerDown={() => handleAction(\"agitate\")}\n disabled={!cardModel.isCarbInitialized}\n >\n {t(\"action.test\")}\n </Button>\n <Button onPointerDown={() => handleAction(\"activate\")}>\n {t(\"action.activate\", {\n context: cardModel.isCarbInitialized ? \"enabled\" : \"disabled\",\n })}\n </Button>\n </Footer>\n {future && (\n <FutureProgressBar\n title={t(\"testing\")}\n future={future}\n ></FutureProgressBar>\n )}\n </>\n );\n });\n\nexport default CarbTankDetail;\n","import styled from \"@emotion/styled\";\nimport { StatusIndicator } from \"@kosdev-code/kos-ddk-components\";\nimport type {\n CarbAgitatorModel,\n FreestyleAssemblyModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\n\nimport {\n kosComponent,\n KosLog,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\n\ninterface AgitatorProps {\n assembly: FreestyleAssemblyModel;\n cardModel: CarbAgitatorModel;\n}\n\ninterface FooterProps {\n color?: string;\n}\nconst Footer = styled.div<FooterProps>`\n font-size: var(--ddk-component-holder-card-footer-font-size);\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n`;\nexport const CarbTankSummary: React.FunctionComponent<AgitatorProps> =\n kosComponent((props) => {\n KosLog.debug(`summary component loaded for holder ${props}`);\n KosLog.info(`render agitator summary for holder ${props.cardModel.path}`);\n\n const { t } = useKosTranslation(\"common\");\n\n return (\n <>\n <StatusIndicator\n size=\"small\"\n status={\n props.cardModel.isCarbInitialized ? \"completed\" : \"incomplete\"\n }\n />\n {props.cardModel.isFilling && <Footer>{t(\"agitating\")}</Footer>}\n </>\n );\n });\n\nexport default CarbTankSummary;\n","import {\n Button,\n Content,\n Footer,\n InfoCard,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type {\n CartridgeAgitatorModel,\n FreestyleAssemblyModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\nimport { FutureProgressBar } from \"../../future-progress-bar\";\n\nimport {\n kosComponent,\n KosLog,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nimport { useCallback } from \"react\";\nimport { useFutureContainer } from \"../../../hooks/future/use-future-container\";\n\ninterface AgitatorProps {\n assembly: FreestyleAssemblyModel;\n cardModel: CartridgeAgitatorModel;\n}\n\nexport const AgitatorDetail: React.FunctionComponent<AgitatorProps> =\n kosComponent(({ cardModel }) => {\n KosLog.debug(`Agitator`, cardModel.path);\n const { t } = useKosTranslation([\"agitator\", \"common\"]);\n const { future } = useFutureContainer(cardModel);\n const handleAction = useCallback(\n (action: string) => {\n if (action === \"agitate\") {\n cardModel?.testAgitate();\n }\n },\n [cardModel]\n );\n return (\n <>\n <Content>\n <InfoCard\n label=\"Agitating\"\n value={cardModel.isAgitating ? t(\"common:yes\") : t(\"common:no\")}\n />\n </Content>\n\n <Footer>\n <Button onPointerDown={() => handleAction(\"agitate\")}>\n {t(\"action.label\", { context: \"agitator\" })}\n </Button>\n </Footer>\n {future && (\n <FutureProgressBar\n title={t(\"testing\")}\n future={future}\n ></FutureProgressBar>\n )}\n </>\n );\n });\n\nexport default AgitatorDetail;\n","import styled from \"@emotion/styled\";\nimport { StatusIndicator } from \"@kosdev-code/kos-ddk-components\";\nimport type {\n CartridgeAgitatorModel,\n FreestyleAssemblyModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\n\nimport {\n kosComponent,\n KosLog,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\n\ninterface AgitatorProps {\n assembly: FreestyleAssemblyModel;\n cardModel: CartridgeAgitatorModel;\n}\n\ninterface FooterProps {\n color?: string;\n}\nconst Footer = styled.div<FooterProps>`\n font-size: var(--ddk-component-holder-card-footer-font-size);\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n`;\nexport const AgitatorSummary: React.FunctionComponent<AgitatorProps> =\n kosComponent((props) => {\n KosLog.debug(`summary component loaded for holder ${props}`);\n KosLog.info(`render agitator summary for holder ${props.cardModel.path}`);\n\n const { t } = useKosTranslation(\"common\");\n\n return (\n <>\n <StatusIndicator size=\"small\" status={\"completed\"} />\n {props.cardModel.isAgitating && <Footer>{t(\"agitating\")}</Footer>}\n </>\n );\n });\n\nexport default AgitatorSummary;\n","import type { KosConfigProperty } from \"@kosdev-code/kos-ui-sdk\";\nimport React, { createContext, ReactNode, useContext, useState } from \"react\";\n\ninterface StagedChange {\n configProperty: KosConfigProperty;\n value: any;\n}\n\ninterface StagedChangesContextProps {\n getStagedChange?: (key: string) => StagedChange | undefined;\n updateStagedChange?: (key: string, value: StagedChange) => void;\n saveChanges?: () => Promise<void>;\n clearStagedChanges?: () => void;\n}\n\nconst defaultContext: StagedChangesContextProps = {\n getStagedChange: undefined,\n updateStagedChange: undefined,\n saveChanges: undefined,\n clearStagedChanges: undefined,\n};\n\nconst StagedChangesContext =\n createContext<StagedChangesContextProps>(defaultContext);\n\ninterface StagedChangesProviderProps {\n children: ReactNode;\n}\n\nexport const StagedChangesProvider: React.FC<StagedChangesProviderProps> = ({\n children,\n}) => {\n const [stagedChanges, setStagedChanges] = useState<{\n [key: string]: StagedChange;\n }>({});\n\n const getStagedChange = (key: string) => stagedChanges[key];\n\n const updateStagedChange = (key: string, value: StagedChange) => {\n setStagedChanges((prev) => {\n return { ...prev, [key]: value };\n });\n };\n\n const clearStagedChanges = () => setStagedChanges({});\n\n const saveChanges = async () => {\n // Todo: can we await for updates to complete?\n for (const key in stagedChanges) {\n stagedChanges[key].configProperty.updateProperty(\n stagedChanges[key].value\n );\n }\n clearStagedChanges();\n };\n\n return (\n <StagedChangesContext.Provider\n value={{\n getStagedChange,\n updateStagedChange,\n saveChanges,\n clearStagedChanges,\n }}\n >\n {children}\n </StagedChangesContext.Provider>\n );\n};\n\nexport const useStagedChanges = () => useContext(StagedChangesContext);\n\nexport const withStagedChanges =\n <P extends object>(Component: React.ComponentType<P>): React.FC<P> =>\n (props: P) =>\n (\n <StagedChangesProvider>\n <Component {...props} />\n </StagedChangesProvider>\n );\n","import { InfoCard } from \"@kosdev-code/kos-ddk-components\";\nimport { KosConfigProperty, useConfigProperty } from \"@kosdev-code/kos-ui-sdk\";\n\ninterface InfoCardProp {\n label: string;\n configProperty: KosConfigProperty<string>;\n}\n\nexport const ConfigPropInfoCard = ({ label, configProperty }: InfoCardProp) => {\n const { value } = useConfigProperty({ configProperty });\n\n return <InfoCard label={label} value={value} />;\n};\n","import {\n KosConfigProperty,\n useConfigProperty,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n InputCard,\n type InputCardProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { ConfigPropertyComponent } from \"../config-property-input\";\nimport { useCallback } from \"react\";\n\nexport interface ConfigPropInputCardProps\n extends Omit<InputCardProps, \"onChange\" | \"unitValue\" | \"value\"> {\n configProperty: KosConfigProperty<number> | KosConfigProperty<string>;\n hideUnits?: boolean;\n}\n\nexport const ConfigPropInputCard: ConfigPropertyComponent<\n ConfigPropInputCardProps\n> = ({ configProperty, hideUnits, isValid, ...props }) => {\n const { t } = useKosTranslation(\"common\", { keyPrefix: \"validation\" });\n const { significantValue } = useConfigProperty({\n configProperty,\n });\n\n const inputCardOnChange = (value?: string) => {\n if (!value) value = \"\";\n configProperty.updateProperty(value);\n };\n\n const maxValue = (configProperty.displayOptions as any)?.max;\n const minValue = (configProperty.displayOptions as any)?.min;\n\n const isValidTest = useCallback(\n (inputValue) => {\n const isValidResult = isValid?.(inputValue);\n if (isValidResult) return isValidResult;\n\n if (Number(inputValue) < minValue) {\n return t(\"minValue\", { data: { minValue } });\n } else if (Number(inputValue) > maxValue) {\n return t(\"maxValue\", { data: { maxValue } });\n } else {\n return undefined;\n }\n },\n [isValid, maxValue, minValue, t]\n );\n\n return (\n <InputCard\n {...props}\n isValid={isValidTest}\n onChange={inputCardOnChange}\n unitValue={hideUnits ? undefined : configProperty.unit}\n value={significantValue}\n />\n );\n};\n","import {\n InputRangeCard,\n InputRangeCardProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport {\n KosConfigProperty,\n useConfigProperty,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { ConfigPropertyComponent } from \"../config-property-input/config-property-input-types\";\n\nexport interface ConfigPropInputRangeCardProps\n extends Omit<InputRangeCardProps, \"label\" | \"minValue\" | \"maxValue\"> {\n configProperty: KosConfigProperty<any>;\n label?: string;\n}\n\nexport const ConfigPropInputRangeCard: ConfigPropertyComponent<\n ConfigPropInputRangeCardProps\n> = ({ configProperty, label, onChange, ...props }) => {\n const { t } = useKosTranslation([\"config-properties\", \"common\"]);\n const configPropertyState = useConfigProperty({ configProperty });\n\n return (\n <InputRangeCard\n {...props}\n label={label ?? t(configProperty.id)}\n layout=\"num\"\n maxValue={(configPropertyState.displayOptions as any)?.max}\n minValue={(configPropertyState.displayOptions as any)?.min}\n onChange={(value) => configProperty.updateProperty(value)}\n unitValue={configPropertyState.unit}\n value={configPropertyState.significantValue}\n />\n );\n};\n","import { KosConfigProperty, useConfigProperty } from \"@kosdev-code/kos-ui-sdk\";\nimport { ToggleCard, ToggleCardProps } from \"@kosdev-code/kos-ddk-components\";\nimport { ConfigPropertyComponent } from \"../config-property-input\";\nimport { useStagedChanges } from \"../config-prop-context\";\n\nexport interface ConfigPropToggleCardProps\n extends Omit<ToggleCardProps, \"onChange\" | \"checked\"> {\n configProperty: KosConfigProperty<boolean>;\n overrideChecked?: boolean;\n}\n\nexport const ConfigPropToggleCard: ConfigPropertyComponent<\n ConfigPropToggleCardProps\n> = ({ configProperty, overrideChecked, ...props }) => {\n const { getStagedChange, updateStagedChange } = useStagedChanges();\n const { value } = useConfigProperty({ configProperty });\n\n const effectiveValue = getStagedChange?.(configProperty.id)?.value ?? value;\n\n const toggleCardOnChange = (value: boolean) => {\n if (updateStagedChange) {\n // If context is available, update staged changes\n updateStagedChange(configProperty.id, {\n configProperty,\n value,\n });\n } else {\n // If context is not available, directly update the property\n configProperty.updateProperty(value);\n }\n };\n\n return (\n <ToggleCard\n toggleLabel={effectiveValue === \"true\" ? \"Enabled\" : \"Disabled\"}\n {...props}\n onChange={toggleCardOnChange}\n checked={\n overrideChecked !== undefined\n ? overrideChecked\n : effectiveValue === \"true\"\n }\n />\n );\n};\n","import { PickerCard, PickerCardProps } from \"@kosdev-code/kos-ddk-components\";\nimport {\n KosConfigProperty,\n OptionsType,\n useConfigProperty,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { ConfigPropertyComponent } from \"../config-property-input/config-property-input-types\";\n\ninterface OptionType {\n id: string;\n label: string;\n [key: string]: unknown;\n}\n\nconst optionsTransformer = (options?: OptionsType[]): OptionType[] =>\n options?.map<OptionType>((item) => {\n return { id: item.value, label: item.label };\n }) || ([] as OptionType[]);\n\nexport interface ConfigPropPickerCardProps<T>\n extends Omit<PickerCardProps<T>, \"label\"> {\n collapse?: boolean;\n configProperty: KosConfigProperty<any>;\n float?: boolean;\n label?: string;\n displayMode?: \"raw\" | \"formatted\";\n}\n\nexport const ConfigPropPickerCard: ConfigPropertyComponent<\n ConfigPropPickerCardProps<any>\n> = ({\n collapse,\n cancelButtonLabel,\n configProperty,\n displayMode = \"raw\",\n displayValue,\n float,\n items,\n label,\n onChange,\n onSave,\n proceedButtonLabel,\n selectedItemId,\n unitValue,\n ...props\n}) => {\n const { t } = useKosTranslation([\"config-properties\", \"common\"]);\n const configPropertyState = useConfigProperty({\n configProperty,\n optionsTransformer,\n });\n\n return (\n <PickerCard\n {...props}\n cancelButtonLabel={\n cancelButtonLabel ??\n (t(\"discard-changes\", {\n defaultValue: \"Discard Changes\",\n ns: \"common\",\n }) ||\n undefined)\n }\n collapse={collapse}\n displayValue={\n displayValue ?? displayMode === \"raw\"\n ? configPropertyState.value\n : configPropertyState.displayValue\n }\n float={float}\n items={items ?? configPropertyState.mappedOptions}\n label={label ?? t(configProperty.id)}\n onSave={(value) =>\n onSave ? onSave(value) : configProperty.updateProperty(value)\n }\n proceedButtonLabel={\n proceedButtonLabel ??\n (t(\"save\", { defaultValue: \"Save\", ns: \"common\" }) || undefined)\n }\n selectedItemId={selectedItemId ?? configPropertyState.value}\n unitValue={unitValue ?? configPropertyState.unit}\n />\n );\n};\n","import { ConfigPropInputCard } from \"../config-prop-input-card\";\nimport { ConfigPropInputRangeCard } from \"../config-prop-input-range-card\";\nimport { ConfigPropPickerCard } from \"../config-prop-picker-card/config-prop-picker-card\";\nimport { ConfigPropToggleCard } from \"../config-prop-toggle-card\";\nimport { ConfigPropertyComponentFactory } from \"./config-property-input-types\";\nimport styled from \"@emotion/styled\";\n\nconst CompactConfigPropInputCard = styled(ConfigPropInputCard)`\n border-top: var(--ddk-component-input-enable-card-input-container-border);\n border-radius: 0;\n cursor: pointer;\n padding: var(--ddk-component-input-enable-card-input-padding);\n & {\n // action-item...\n --ddk-component-action-item-background-color-default: var(\n --ddk-component-input-enable-card-input-background-color\n );\n --ddk-component-action-item-border-color-default: var(\n --ddk-component-input-enable-card-input-border-color\n );\n --ddk-component-action-item-font-weight: var(\n --ddk-component-input-enable-card-input-font-weight\n );\n --ddk-component-action-item-height: var(\n --ddk-component-input-enable-card-input-height\n );\n --ddk-component-action-item-min-width: var(\n --ddk-component-input-enable-card-input-min-width\n );\n\n // input-action-item\n --ddk-component-input-action-item-font-family: var(\n --ddk-component-input-enable-card-input-font-family\n );\n\n // card...\n --ddk-component-card-color-light: var(\n --ddk-component-input-enable-card-input-color\n );\n --ddk-component-card-font-weight: var(\n --ddk-component-input-enable-card-input-font-weight\n );\n }\n`;\n\nconst CompactConfigPropPickerCard = styled(ConfigPropPickerCard)`\n border-top: var(--ddk-component-input-enable-card-input-container-border);\n border-radius: 0;\n cursor: pointer;\n padding: var(--ddk-component-input-enable-card-input-padding);\n & {\n // action-item...\n --ddk-component-action-item-background-color-default: var(\n --ddk-component-input-enable-card-input-background-color\n );\n --ddk-component-action-item-border-color-default: var(\n --ddk-component-input-enable-card-input-border-color\n );\n --ddk-component-action-item-font-weight: var(\n --ddk-component-input-enable-card-input-font-weight\n );\n --ddk-component-action-item-height: var(\n --ddk-component-input-enable-card-input-height\n );\n --ddk-component-action-item-min-width: var(\n --ddk-component-input-enable-card-input-min-width\n );\n --ddk-component-action-item-button-container-width: initial;\n\n // input-action-item\n --ddk-component-input-action-item-font-family: var(\n --ddk-component-input-enable-card-input-font-family\n );\n\n // card...\n --ddk-component-card-color-light: var(\n --ddk-component-input-enable-card-input-color\n );\n --ddk-component-card-font-weight: var(\n --ddk-component-input-enable-card-input-font-weight\n );\n }\n`;\n\nexport const baseConfigPropertyComponentFactory: ConfigPropertyComponentFactory =\n (configProperty, _configPropertyState, t, props, mode) => {\n let component;\n\n const ConfigPropInputCardComponent =\n mode === \"compact\" ? CompactConfigPropInputCard : ConfigPropInputCard;\n\n const ConfigPropPickerCardComponent =\n mode === \"compact\" ? CompactConfigPropPickerCard : ConfigPropPickerCard;\n\n const label = props.label ?? t(configProperty.id);\n\n switch (configProperty.schemaType) {\n case \"boolean\":\n component = (\n <ConfigPropToggleCard\n configProperty={configProperty}\n {...props}\n label={label}\n />\n );\n break;\n case \"double\":\n component = (\n <ConfigPropInputRangeCard\n configProperty={configProperty}\n {...props}\n label={label}\n />\n );\n break;\n case \"int\":\n component = (\n <ConfigPropInputRangeCard\n configProperty={configProperty}\n {...props}\n label={label}\n />\n );\n break;\n case \"String\":\n component = (\n <ConfigPropInputCardComponent\n configProperty={configProperty}\n {...props}\n label={label}\n />\n );\n break;\n case \"enum\":\n component = (\n <ConfigPropPickerCardComponent\n configProperty={configProperty}\n {...props}\n label={label}\n />\n );\n break;\n default:\n break;\n }\n\n return component;\n };\n","import {\n KosConfigProperty,\n OptionsType,\n TFunction,\n useConfigProperty,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { baseConfigPropertyComponentFactory } from \"./base-config-property-component-factory\";\nimport { ConfigPropertyComponentFactory } from \"./config-property-input-types\";\nimport { useComponentConfigurationContext } from \"@kosdev-code/kos-ddk-components\";\n\ninterface OptionType {\n id: string;\n label: string;\n [key: string]: unknown;\n}\n\nconst transformer = (options?: OptionsType[]): OptionType[] =>\n options?.map<OptionType>((item) => {\n return { id: item.value, label: item.label };\n }) || ([] as OptionType[]);\n\ninterface ConfigPropertyDynamicComponent {\n configProperty: KosConfigProperty<any>;\n factory?: ConfigPropertyComponentFactory;\n mappedOptions?: OptionsType[];\n t?: TFunction;\n onChange?: (value: unknown) => void;\n [key: string]: any;\n}\n\nexport const ConfigPropertyInput = ({\n configProperty,\n factory,\n mappedOptions,\n t: tOverride,\n ...props\n}: ConfigPropertyDynamicComponent) => {\n const { t } = useKosTranslation([\"config-properties\", \"common\"]);\n const { componentModeOverride } = useComponentConfigurationContext();\n\n const configPropertyState = useConfigProperty({\n configProperty,\n optionsTransformer: transformer,\n });\n\n factory = factory ?? baseConfigPropertyComponentFactory;\n\n return factory(\n configProperty,\n {\n ...configPropertyState,\n mappedOptions: mappedOptions ?? configPropertyState.mappedOptions,\n },\n tOverride ?? t,\n props,\n componentModeOverride\n );\n};\n","import styled from \"@emotion/styled\";\nimport {\n useConfigProperty,\n type KosConfigProperty,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n Card,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { ConfigPropToggleCard } from \"../config-prop-toggle-card\";\nimport { ConfigPropertyInput } from \"../config-property-input\";\n\ninterface MultiInputEnableCardProps {\n mode?: \"standard\" | \"compact\";\n}\n\nconst MultiInputEnableCard = styled(Card)<MultiInputEnableCardProps>`\n align-items: ${(props) =>\n props.mode === \"compact\" ? \"flex-start\" : undefined};\n flex-direction: var(\n --ddk-component-input-enable-card-container-flex-direction\n );\n padding: var(--ddk-component-input-enable-card-container-padding);\n gap: var(--ddk-component-input-enable-card-container-gap);\n`;\n\nconst InputContainer = styled.div`\n box-sizing: border-box;\n display: flex;\n flex-direction: var(\n --ddk-component-input-enable-card-input-container-flex-direction\n );\n gap: var(--ddk-component-input-enable-card-input-container-gap);\n width: 100%;\n`;\n\ninterface ConfigPropCardOptions {\n label: string;\n hideUnits?: boolean;\n layout?: \"default\" | \"hex\" | \"num\" | \"alphanumeric\";\n}\n\ninterface ConfigPropCard {\n configProperty: KosConfigProperty<any>;\n options?: ConfigPropCardOptions;\n}\n\ninterface ConfigPropMultiInputEnableCardProps {\n configProperties: ConfigPropCard[];\n disabled?: boolean;\n enabledConfigProperty: KosConfigProperty<boolean>;\n}\n\nconst SingleConfigPropInputCard = styled(ConfigPropertyInput)`\n width: 100%;\n`;\n\ninterface ConfigPropToggleCardContainerProps {\n compact?: boolean;\n}\n\nconst ConfigPropToggleCardContainer = styled.div<ConfigPropToggleCardContainerProps>`\n box-sizing: border-box;\n padding: ${(props) =>\n props.compact\n ? \"var(--ddk-component-input-enable-card-toggle-container-padding)\"\n : \"0\"};\n width: var(--ddk-component-input-enable-card-toggle-container-width);\n`;\n\nexport const ConfigPropMultiInputEnableCard = ({\n configProperties,\n disabled,\n enabledConfigProperty,\n}: ConfigPropMultiInputEnableCardProps) => {\n const { value } = useConfigProperty({\n configProperty: enabledConfigProperty,\n });\n\n const enabledConfigPropertyValue = value === \"true\";\n\n const { componentModeOverride } = useComponentConfigurationContext();\n const hasSingleConfigProperty = configProperties.length === 1;\n\n const ConfigPropInputCardComponent = hasSingleConfigProperty\n ? SingleConfigPropInputCard\n : ConfigPropertyInput;\n\n return (\n <MultiInputEnableCard\n disabled={!enabledConfigPropertyValue || disabled}\n mode={componentModeOverride}\n >\n <InputContainer>\n {configProperties.map((configProperty) => (\n <ConfigPropInputCardComponent\n disabled={!enabledConfigPropertyValue || disabled}\n key={configProperty.configProperty.id}\n label={\n configProperty.options ? configProperty.options.label : undefined\n }\n configProperty={configProperty.configProperty}\n collapse={\n !hasSingleConfigProperty && componentModeOverride === \"standard\" // collapse for standard view...\n }\n layout={\n configProperty.options ? configProperty.options.layout : undefined\n }\n float\n hideUnits={\n configProperty.options\n ? configProperty.options.hideUnits\n : undefined\n }\n />\n ))}\n </InputContainer>\n <ConfigPropToggleCardContainer\n compact={\n !hasSingleConfigProperty || componentModeOverride === \"compact\"\n }\n >\n <ConfigPropToggleCard\n alwaysShowLabel\n collapse\n configProperty={enabledConfigProperty}\n disabled={disabled}\n stretch={componentModeOverride === \"compact\" ? true : false}\n />\n </ConfigPropToggleCardContainer>\n </MultiInputEnableCard>\n );\n};\n","import { ConfigPropMultiInputEnableCard } from \"../config-prop-multi-input-enable-card\";\nimport { type KosConfigProperty } from \"@kosdev-code/kos-ui-sdk\";\nimport { useMemo } from \"react\";\n\ninterface ConfigPropCardOptions {\n label: string;\n hideUnits?: boolean;\n}\n\ninterface ConfigPropSingleInputEnableCardProps {\n configProperty: KosConfigProperty<any>;\n disabled?: boolean;\n enabledConfigProperty: KosConfigProperty<boolean>;\n options: ConfigPropCardOptions;\n}\n\nexport const ConfigPropSingleInputEnableCard = ({\n configProperty,\n disabled,\n enabledConfigProperty,\n options,\n}: ConfigPropSingleInputEnableCardProps) => {\n const configProperties = useMemo(\n () => [{ configProperty, options }],\n [configProperty, options]\n );\n\n return (\n <ConfigPropMultiInputEnableCard\n configProperties={configProperties}\n disabled={disabled}\n enabledConfigProperty={enabledConfigProperty}\n />\n );\n};\n","import { KosConfigProperty, useConfigProperty } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n SwitchCard,\n SwitchCardProps,\n SwitchValue,\n} from \"@kosdev-code/kos-ddk-components\";\n\ninterface ConfigPropSwitchCardProps extends SwitchCardProps {\n configProperty?: KosConfigProperty<string>;\n}\n\nexport const ConfigPropSwitchCard = ({\n configProperty,\n ...props\n}: ConfigPropSwitchCardProps) => {\n const { value } = useConfigProperty({ configProperty });\n const switchCardOnChange = (value: SwitchValue) => {\n if (value === undefined) return;\n\n configProperty?.updateProperty(String(value));\n };\n\n return <SwitchCard {...props} onChange={switchCardOnChange} value={value} />;\n};\n","import {\n MultiPickerCard,\n type MultiPickerCardProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { Hours, Minutes } from \"@kosdev-code/kos-ddk-models\";\nimport { TimeIcon } from \"@kosdev-code/kos-ddk-styles\";\nimport {\n useKosRegions,\n useKosTranslation,\n useRegionTimeProps,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useMemo } from \"react\";\n\nexport interface TimePickerCardProps\n extends Omit<\n MultiPickerCardProps<number>,\n \"data\" | \"onChange\" | \"icon\" | \"onSave\"\n > {\n time: Date;\n onSave: ({ hours, minutes }: { hours: Hours; minutes: Minutes }) => void;\n}\n\nexport const TimePickerCard = ({\n description,\n float,\n label,\n modalTitle,\n onSave,\n time: initialDate,\n ...props\n}: TimePickerCardProps) => {\n const { regionModel } = useKosRegions();\n const { t } = useKosTranslation(\"common\", { keyPrefix: \"schedule\" });\n\n const {\n amPmOptions,\n formattedTime,\n hourOptions,\n minuteOptions,\n setTime,\n time,\n } = useRegionTimeProps({ initialDate });\n\n const timeHours = time.getHours();\n\n const hr12Options = useMemo(\n () => [\n {\n id: \"hr\",\n items: hourOptions,\n selectedItemId: timeHours < 12 ? timeHours : timeHours - 12,\n loop: true,\n },\n {\n id: \"min\",\n items: minuteOptions,\n selectedItemId: time.getMinutes(),\n loop: true,\n },\n {\n id: \"ampm\",\n items: amPmOptions,\n selectedItemId: timeHours < 12 ? \"AM\" : \"PM\",\n },\n ],\n [amPmOptions, hourOptions, minuteOptions, time, timeHours]\n );\n\n const hr24Options = useMemo(\n () => [\n {\n id: \"hr\",\n items: hourOptions,\n selectedItemId: timeHours,\n loop: true,\n },\n {\n id: \"min\",\n items: minuteOptions,\n selectedItemId: time.getMinutes(),\n loop: true,\n },\n ],\n [hourOptions, minuteOptions, time, timeHours]\n );\n\n return (\n <MultiPickerCard<number | string>\n {...props}\n cancelButtonLabel={t(\"discard-changes\", \"Discard Changes\") || undefined}\n closeButtonLabel={t(\"close\", \"Close\") || undefined}\n data={regionModel?.is12HourTimeFormat ? hr12Options : hr24Options}\n description={description}\n displayValue={formattedTime}\n float={float}\n icon={TimeIcon}\n label={label}\n modalTitle={modalTitle}\n proceedButtonLabel={t(\"save\", \"Save\") || undefined}\n onSave={(val) => {\n const hours = regionModel?.is12HourTimeFormat\n ? val.ampm === \"AM\"\n ? (val.hr as Hours)\n : (((val.hr as Hours) + 12) as Hours)\n : (val.hr as Hours);\n\n const minutes = val.min as Minutes;\n\n const newTime = new Date(time);\n newTime.setHours(hours);\n newTime.setMinutes(minutes);\n\n setTime(newTime);\n\n onSave?.({ hours, minutes });\n }}\n />\n );\n};\n","import { KosConfigProperty, useConfigProperty } from \"@kosdev-code/kos-ui-sdk\";\nimport { ConfigPropertyComponent } from \"../config-property-input\";\nimport { TimePickerCard, type TimePickerCardProps } from \"../time-picker-card\";\nimport { toSeconds, toTimeComponents } from \"@kosdev-code/kos-ddk-models\";\nimport { useStagedChanges } from \"../config-prop-context\";\n\nexport interface ConfigPropTimePickerCardProps\n extends Omit<TimePickerCardProps, \"time\" | \"onSave\"> {\n configProperty: KosConfigProperty<any>;\n}\n\nexport const ConfigPropTimePickerCard: ConfigPropertyComponent<\n ConfigPropTimePickerCardProps\n> = ({ configProperty, ...props }) => {\n const { getStagedChange, updateStagedChange } = useStagedChanges();\n const { value } = useConfigProperty({ configProperty });\n\n const effectiveValue = getStagedChange?.(configProperty.id)?.value ?? value;\n const { hours, minutes } = toTimeComponents(Number(effectiveValue));\n const time = new Date();\n time.setHours(hours);\n time.setMinutes(minutes);\n\n // Config property stored as seconds from midnight...\n // const seconds = Number(value);\n\n const handleOnSave = (value) => {\n const time = toSeconds(value.hours, value.minutes);\n\n if (updateStagedChange) {\n // If context is available, update staged changes\n updateStagedChange(configProperty.id, {\n configProperty,\n value: time,\n });\n } else {\n // If context is not available, directly update the property\n configProperty.updateProperty(time);\n }\n };\n\n return <TimePickerCard {...props} onSave={handleOnSave} time={time} />;\n};\n","import {\n MultiPickerCard,\n type DialConfiguration,\n type MultiPickerCardProps,\n type SelectedIds,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { CalendarIcon } from \"@kosdev-code/kos-ddk-styles\";\nimport {\n useDateProps,\n useKosRegions,\n useKosTranslation,\n type DaysOfWeekFilter,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useMemo } from \"react\";\n\nconst daysOfWeekFilter: DaysOfWeekFilter = [0, 6];\n\ninterface DatePickerCardDate {\n day: number;\n month: number;\n year: number;\n}\n\ninterface DatePickerCardProps\n extends Omit<MultiPickerCardProps<number>, \"onSave\" | \"data\"> {\n day?: number;\n month?: number;\n onSave: (date: DatePickerCardDate) => void;\n year?: number;\n}\n\nexport const DatePickerCard = ({\n day = new Date().getDate(),\n month = new Date().getMonth(),\n onSave,\n year = new Date().getFullYear(),\n ...props\n}: DatePickerCardProps) => {\n const { t } = useKosTranslation(\"region\");\n const { regionModel } = useKosRegions();\n\n const dateData = useDateProps({\n date: { year, month, day },\n formatOptions: {\n dayFormat: \"short\",\n yearFormat: \"long\",\n monthFormat: \"long\",\n formatString: regionModel?.selectedDateFormat || \"yyyy/MM/dd\",\n },\n filterOptions: {\n daysOfWeekFilter: daysOfWeekFilter,\n yearsRange: [year - 10, year + 10],\n },\n });\n\n const yearOptions = useMemo(\n () =>\n dateData?.dateState?.yearsOptionsArray?.map((item) => {\n return {\n id: item.value,\n label: item.label,\n };\n }),\n [dateData?.dateState?.yearsOptionsArray]\n );\n\n const daysOptions = useMemo(\n () =>\n dateData?.dateState?.daysOptionsArray?.map((item) => {\n return {\n id: item.value,\n label: item.label,\n };\n }),\n [dateData?.dateState?.daysOptionsArray]\n );\n\n const monthOptions = useMemo(\n () =>\n dateData?.dateState?.monthsOptionsArray?.map((item) => {\n return {\n id: item.value,\n label: String(item.label),\n };\n }),\n [dateData?.dateState?.monthsOptionsArray]\n );\n\n const dateOptions: DialConfiguration<number>[] = useMemo(() => {\n const dateOptions: DialConfiguration<number>[] = [];\n\n regionModel?.selectedDateOrder.split(\"\").forEach((c) => {\n if (c === \"y\") {\n dateOptions.push({\n id: \"year\",\n items: yearOptions,\n selectedItemId: dateData?.dateState?.year,\n loop: false,\n });\n } else if (c === \"m\") {\n dateOptions.push({\n id: \"month\",\n items: monthOptions,\n selectedItemId: dateData?.dateState?.month,\n });\n } else if (c === \"d\") {\n dateOptions.push({\n id: \"day\",\n items: daysOptions,\n selectedItemId: dateData?.dateState?.day,\n loop: false,\n });\n }\n });\n return dateOptions;\n }, [\n dateData?.dateState?.day,\n dateData?.dateState?.month,\n dateData?.dateState?.year,\n daysOptions,\n monthOptions,\n regionModel?.selectedDateOrder,\n yearOptions,\n ]);\n\n const dateOnSaveHandler = useCallback(\n async (date: SelectedIds<number>) => {\n const validDate = new Date(date.year, date.month + 1, 0);\n const validDayOfMonth = validDate.getDate();\n const day = date.day > validDayOfMonth ? 1 : date.day;\n\n onSave({\n day,\n month: date.month,\n year: date.year,\n });\n },\n [onSave]\n );\n\n return (\n <MultiPickerCard<number>\n cancelButtonLabel={t(\"discard-changes\", \"Discard Changes\") || undefined}\n closeButtonLabel={t(\"close\", \"Close\") || undefined}\n data={dateOptions}\n displayValue={dateData.dateState.formattedDate}\n icon={CalendarIcon}\n label={t(\"todays-date\", \"Today's Date\")}\n onSave={dateOnSaveHandler}\n proceedButtonLabel={t(\"save\", \"Save\") || undefined}\n {...props}\n />\n );\n};\n","import {\n BodyMediumInformation,\n Button,\n LabelInformation,\n WorkflowModal,\n type ExperienceProps,\n type WorkflowModalProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type {\n FcmPumpModel,\n FcmPumpServices,\n} from \"@kosdev-code/kos-freestyle-sdk\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\n\nimport { useCallback, useMemo, useState } from \"react\";\n\ntype State = \"idle\" | \"test\" | \"success\" | \"failure\";\n\ninterface DiagnosticsModelProps extends ExperienceProps {\n pump: FcmPumpModel;\n}\n\nexport const DiagnosticsModal = kosComponent(\n ({ pump, onComplete }: DiagnosticsModelProps) => {\n const { t } = useKosTranslation(\"common\", {\n keyPrefix: \"fcm-diagnostics\",\n });\n const [state, setState] = useState<State>(\"idle\");\n const [error, setError] =\n useState<FcmPumpServices.ElectricalTestErrorType>();\n\n // Todo: We may need to add an electrical test interface for pump models to\n // implement if we want to genericize electrical tests...\n\n const test = useCallback(async () => {\n setState(\"test\");\n setError(undefined);\n\n const result = await pump.performElectricalTest();\n if (result.error) {\n setError(result.error);\n setState(\"failure\");\n } else if (result.result === \"errEEPROM\") {\n setError(\"errEEPROM\");\n setState(\"failure\");\n } else {\n setState(\"success\");\n }\n }, [pump]);\n\n const workflow = useMemo((): Record<string, WorkflowModalProps> => {\n return {\n idle: {\n information: (\n <LabelInformation>{t(\"perform-electrical-test\")}</LabelInformation>\n ),\n footer: <Button onPointerDown={test}>{t(\"electrical-test\")}</Button>,\n },\n\n test: {\n information: <LabelInformation>{t(\"testing\")}</LabelInformation>,\n footer: <Button disabled>{t(\"electrical-test\")}</Button>,\n status: \"loading\",\n },\n\n success: {\n information: (\n <LabelInformation>\n {t(\"electrical-test-success-header\")}\n </LabelInformation>\n ),\n footer: <Button onPointerDown={test}>{t(\"electrical-test\")}</Button>,\n status: \"success\",\n },\n\n failure: {\n information: (\n <>\n <LabelInformation>\n {t(\"electrical-test-failure-header\")}\n </LabelInformation>\n <BodyMediumInformation>\n {t(`error.${error}`)}\n </BodyMediumInformation>\n </>\n ),\n footer: <Button onPointerDown={test}>{t(\"electrical-test\")}</Button>,\n status: \"information\",\n },\n };\n }, [error, t, test]);\n\n return (\n <WorkflowModal\n title={t(pump.name)}\n {...workflow[state]}\n onClose={() => onComplete()}\n />\n );\n }\n);\n","export interface ActionLabels {\n title: string;\n summary: string;\n successMessage: string;\n failureMessage: string;\n actionLabel: string;\n}\n\nexport const defaultIntentLabels: ActionLabels = {\n title: \"\",\n summary: \"\",\n successMessage: \"\",\n failureMessage: \"\",\n actionLabel: \"\",\n};\n","import { useEffect, useState } from \"react\";\n\nimport type { Action } from \"../../components/actions\";\nimport { defaultIntentLabels, type ActionLabels } from \"./types\";\nimport type { PumpActionResponse } from \"./use-pump-action\";\nimport type { TroubleActionResponse } from \"./use-trouble-action\";\n\ntype CombinedAction = PumpActionResponse | TroubleActionResponse;\nexport const useCombinedActions = (actions: CombinedAction[]) => {\n const [action, setAction] = useState<Action | null>(null);\n const [labels, setLabels] = useState<ActionLabels>(defaultIntentLabels);\n const deps = actions\n .map((actionResult) => {\n const [action, , labels] = actionResult;\n const result = [action?.future, action, labels];\n return result;\n })\n .flat();\n useEffect(() => {\n const currentResult = actions.find((actionResult) => {\n const [action] = actionResult;\n return !!action?.future;\n });\n if (currentResult) {\n setAction(currentResult[0]);\n setLabels(currentResult[2]);\n } else {\n setAction(null);\n setLabels(defaultIntentLabels);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...deps, actions]);\n\n return [action, labels];\n};\n","/**\n * (C) Copyright 2024, TCCC, All rights reserved.\n */\n\nimport { type IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { useKosTranslation, type TFunction } from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useState } from \"react\";\nimport {\n CalibrateAction,\n Fixed45FlowTestAction,\n FlushAction,\n HighFlowTestAction,\n HoldToPourAction,\n LowFlowTestAction,\n ManualOverrideAction,\n MSVResetAction,\n PrimeAction,\n PurgeAction,\n type IntentAwareAction,\n} from \"../../components\";\nimport { defaultIntentLabels, type ActionLabels } from \"./types\";\n\ntype PumpAction =\n | \"calibrate\"\n | \"fixed-45\"\n | \"flush\"\n | \"high-flow-test\"\n | \"hold-to-pour\"\n | \"low-flow-test\"\n | \"manual-override\"\n | \"msv-reset\"\n | \"prime\"\n | \"purge\";\n\ntype Factory = (actionId: PumpAction) => FactoryResponse;\ntype FactoryResponse =\n | (new (intentContainer: IntentAware) => IntentAwareAction)\n | undefined;\n\nconst pumpActionFactory = (actionId: PumpAction): FactoryResponse => {\n switch (actionId) {\n case \"calibrate\":\n return CalibrateAction;\n case \"fixed-45\":\n return Fixed45FlowTestAction;\n case \"flush\":\n return FlushAction;\n case \"high-flow-test\":\n return HighFlowTestAction;\n case \"hold-to-pour\":\n return HoldToPourAction;\n case \"low-flow-test\":\n return LowFlowTestAction;\n case \"manual-override\":\n return ManualOverrideAction;\n case \"msv-reset\":\n return MSVResetAction;\n case \"prime\":\n return PrimeAction;\n case \"purge\":\n return PurgeAction;\n default:\n return undefined;\n }\n};\n\nconst intentLabelFactory =\n (t: TFunction) =>\n (intentName: string, namespace = \"intents\") => {\n return {\n title: t(`${namespace}:troubles.${intentName}.progress`),\n summary: t(`${namespace}:troubles.${intentName}.summary`),\n successMessage: t(`${namespace}:troubles.${intentName}.success`),\n failureMessage: t(`${namespace}:troubles.${intentName}.error`),\n actionLabel: t(`${namespace}:troubles.${intentName}.action`),\n };\n };\n\nexport type PumpActionResponse = [\n IntentAwareAction | null,\n (actionId: PumpAction) => Promise<void>,\n ActionLabels\n];\n\n/**\n * React hook for executing pump maintenance and diagnostic actions.\n *\n * This hook provides a unified interface for triggering various pump operations\n * including calibration, priming, purging, and flow tests. It manages action\n * state, progress tracking via KOS Futures, and internationalized labels.\n *\n * The hook supports optional intent containers, returning safe defaults when\n * no container is provided. This allows components to render UI before models\n * are fully loaded, supporting progressive enhancement patterns.\n *\n * Available pump actions:\n * - `calibrate` - Calibrate pump flow rate\n * - `prime` - Prime the pump line\n * - `purge` - Purge the pump line\n * - `flush` - Flush the system\n * - `low-flow-test` - Run low flow rate test\n * - `high-flow-test` - Run high flow rate test\n * - `fixed-45` - Fixed 45oz pour test\n * - `hold-to-pour` - Hold-to-pour operation\n * - `manual-override` - Manual pump override\n * - `msv-reset` - MSV reset operation\n *\n * @param intentContainer - Optional model implementing {@link IntentAware} interface.\n * When undefined, hook returns null action and safe handlers that\n * won't execute operations. This enables components to render before\n * models are available.\n * @param actionFactory - Optional factory function for custom action types.\n * Defaults to {@link pumpActionFactory} with standard pump actions.\n * Provide custom factory to extend available actions.\n *\n * @returns Tuple containing:\n * - [0] {@link IntentAwareAction} instance or null (null when intentContainer undefined or before first action)\n * - [1] `handleAction` function accepting {@link PumpAction} type strings to trigger operations\n * - [2] {@link ActionLabels} object with internationalized strings (title, summary, success/failure messages, action label)\n *\n * @example\n * Basic pump action controls:\n * ```tsx\n * import { usePumpAction } from '@kosdev-code/kos-ddk-model-components';\n *\n * function PumpControls({ pump }: { pump: PumpModel }) {\n * const [action, handleAction, labels] = usePumpAction(pump);\n *\n * return (\n * <div>\n * <button onPointerDown={() => handleAction(\"calibrate\")}>\n * Calibrate\n * </button>\n * <button onPointerDown={() => handleAction(\"prime\")}>\n * Prime\n * </button>\n * <button onPointerDown={() => handleAction(\"purge\")}>\n * Purge\n * </button>\n * {action && (\n * <FutureProgressBar\n * title={labels.title}\n * future={action.future}\n * />\n * )}\n * </div>\n * );\n * }\n * ```\n *\n * @example\n * Handling optional pump (progressive enhancement):\n * ```tsx\n * function MaintenancePanel({ pump }: { pump?: PumpModel }) {\n * const [action, handleAction, labels] = usePumpAction(pump);\n *\n * // Hook safely handles undefined pump - returns null action and safe handlers\n * return (\n * <div>\n * <button\n * disabled={!pump}\n * onClick={() => handleAction(\"prime\")}\n * >\n * {labels.actionLabel || 'Prime'}\n * </button>\n * {action && <ProgressDisplay action={action} />}\n * </div>\n * );\n * }\n * ```\n *\n * @example\n * Custom action factory:\n * ```tsx\n * const customFactory = (actionId: PumpAction) => {\n * if (actionId === \"my-custom-action\") return MyCustomAction;\n * return pumpActionFactory(actionId);\n * };\n *\n * function CustomPumpControls({ pump }: { pump: PumpModel }) {\n * const [action, handleAction] = usePumpAction(pump, customFactory);\n *\n * return (\n * <button onClick={() => handleAction(\"my-custom-action\")}>\n * Custom Operation\n * </button>\n * );\n * }\n * ```\n *\n * @category Hooks - Actions\n * @see {@link IntentAware} for required model interface\n * @see {@link PumpAction} for available action types\n * @see {@link IntentAwareAction} for action execution and progress tracking\n * @see {@link ActionLabels} for internationalization label structure\n */\nexport const usePumpAction = (\n intentContainer?: IntentAware,\n actionFactory: Factory = pumpActionFactory\n): PumpActionResponse => {\n const { t } = useKosTranslation(\"troubles\");\n const [action, setAction] = useState<IntentAwareAction | null>(null);\n const [labels, setLabels] = useState<ActionLabels>(defaultIntentLabels);\n\n const handleAction = useCallback(\n async (actionId: PumpAction) => {\n const _action = actionFactory(actionId);\n if (_action) {\n const labels = intentLabelFactory(t)(actionId);\n setLabels(labels);\n if (intentContainer) {\n const A = new _action(intentContainer);\n await A.performAction();\n setAction(A);\n }\n }\n },\n [actionFactory, intentContainer, t]\n );\n\n if (!intentContainer) {\n return [null, handleAction, labels];\n }\n\n return [action, handleAction, labels];\n};\n","import type { TroubleAware } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n KosLog,\n useKosTranslation,\n type TFunction,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useState } from \"react\";\n\nimport {\n GenericTroubleAction,\n type TroubleAwareAction,\n} from \"../../components/actions\";\n\nimport type { ActionLabels } from \"./types\";\n\ntype Factory = (actionId: string) => FactoryResponse;\ntype FactoryResponse =\n | (new (model: TroubleAware, trouble: string) => TroubleAwareAction)\n | undefined;\nconst pumpActionFactory = (actionId: string): FactoryResponse => {\n // add conditions for specialized trouble actions\n KosLog.debug(`pumpActionFactory: actionId=${actionId}`);\n return GenericTroubleAction;\n};\n\nexport type TroubleActionResponse = [\n TroubleAwareAction | null,\n () => Promise<void>,\n ActionLabels\n];\nconst troubleLabelFactory =\n (t: TFunction) =>\n (troubleKey: string, namespace = \"troubles\") => {\n return {\n title: t(`${namespace}:troubles.${troubleKey}.progress`),\n summary: t(`${namespace}:troubles.${troubleKey}.summary`),\n successMessage: t(`${namespace}:troubles.${troubleKey}.success`),\n failureMessage: t(`${namespace}:troubles.${troubleKey}.error`),\n actionLabel: t(`${namespace}:troubles.${troubleKey}.action`),\n };\n };\nexport const useTroubleAction = (\n troubleAware: TroubleAware,\n troubleKey: string,\n actionFactory: Factory = pumpActionFactory\n): TroubleActionResponse => {\n const { t } = useKosTranslation(\"troubles\");\n const [action, setAction] = useState<TroubleAwareAction | null>(null);\n const [labels] = useState(troubleLabelFactory(t)(troubleKey));\n const handleAction = useCallback(async () => {\n const _action = actionFactory(troubleKey);\n if (_action) {\n const A = new _action(troubleAware, troubleKey);\n\n await A.performAction();\n setAction(A);\n }\n }, [actionFactory, troubleAware, troubleKey]);\n return [action, handleAction, labels];\n};\n","import { AgitationControlModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useAgitationControl } from \"./use-agitation-control\";\n\ninterface AgitationControlProps {\n agitationControl: AgitationControlModel;\n}\n\ntype HoCAgitationControlProps = AgitationControlProps;\n// react HOC to provide a AgitationControl to a component\nexport function withAgitationControl<\n T extends HoCAgitationControlProps = HoCAgitationControlProps\n>(WrappedComponent: React.ComponentType<T>) {\n return (props: Omit<T, keyof AgitationControlProps>) => {\n const { model, status, KosModelLoader } = useAgitationControl();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} agitationControl={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { Animation, AnimationModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useAnimation = () => {\n const modelId = Animation.type;\n const result = useKosModel<AnimationModel>({\n modelId,\n modelType: Animation.type,\n options: {},\n });\n\n return result;\n};\n","import { AnimationModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useAnimation } from \"./use-animation\";\n\nexport interface AnimationProps {\n animation: AnimationModel;\n}\n// react HOC to provide a Animation to a component\nexport function withAnimation<T extends AnimationProps = AnimationProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (props: Omit<T, keyof AnimationProps>) => {\n const { model, status, KosModelLoader } = useAnimation();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} animation={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { Application, ApplicationModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useApplication = () => {\n const modelId = Application.type;\n const result = useKosModel<ApplicationModel>({\n modelId,\n modelType: Application.type,\n options: {},\n });\n\n return result;\n};\n","import { ApplicationModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useApplication } from \"./use-application\";\n\ninterface ApplicationProps {\n application: ApplicationModel;\n}\n// react HOC to provide a Application to a component\nexport function withApplication<T extends ApplicationProps = ApplicationProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (props: Omit<T, keyof ApplicationProps>) => {\n const { model, status, KosModelLoader } = useApplication();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} application={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { CarbWater, CarbWaterModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useCarbWater = () => {\n const modelId = CarbWater.type;\n const result = useKosModel<CarbWaterModel>({\n modelId,\n modelType: CarbWater.type,\n options: {},\n });\n\n return result;\n};\n","import { CarbWaterModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useCarbWater } from \"./use-carb-water\";\n\ninterface CarbWaterProps {\n carbWater: CarbWaterModel;\n}\n// react HOC to provide a CarbWater to a component\nexport function withCarbWater<T extends CarbWaterProps = CarbWaterProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (props: Omit<T, keyof CarbWaterProps>) => {\n const { model, status, KosModelLoader } = useCarbWater();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} carbWater={model} />\n </KosModelLoader>\n );\n };\n}\n","import { CopyLogs, CopyLogsModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\n\nexport const useCopyLogs = () => {\n const modelId = CopyLogs.type;\n const result = useKosModel<CopyLogsModel>({\n modelId,\n modelType: CopyLogs.type,\n options: {},\n activate: true,\n destroyOnUnmount: true,\n });\n\n return result;\n};\n","import { CopyLogsModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useCopyLogs } from \"./use-copy-logs\";\n\ninterface CopyLogsProps {\n copyLogs: CopyLogsModel;\n}\n\ntype HoCCopyLogsProps = CopyLogsProps;\n// react HOC to provide a CopyLogs to a component\nexport function withCopyLogs<T extends HoCCopyLogsProps = HoCCopyLogsProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (props: Omit<T, keyof CopyLogsProps>) => {\n const { model, status, KosModelLoader } = useCopyLogs();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} copyLogs={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n DashboardOperations,\n DashboardOperationsModel,\n} from \"@kosdev-code/kos-ddk-models\";\n\nexport const useDashboardOperations = () => {\n const modelId = DashboardOperations.type;\n const result = useKosModel<DashboardOperationsModel>({\n modelId,\n modelType: DashboardOperations.type,\n options: {},\n });\n\n return result;\n};\n","import { DashboardOperationsModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useDashboardOperations } from \"./use-dashboard-operations\";\n\ninterface DashboardOperationsProps {\n dashboardOperations: DashboardOperationsModel;\n}\n// react HOC to provide a DashboardOperations to a component\nexport function withDashboardOperations<\n T extends DashboardOperationsProps = DashboardOperationsProps\n>(WrappedComponent: React.ComponentType<T>) {\n return (props: Omit<T, keyof DashboardOperationsProps>) => {\n const { model, status, KosModelLoader } = useDashboardOperations();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} dashboardOperations={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { DispenserInfo, DispenserInfoModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useDispenserInfo = () => {\n const modelId = DispenserInfo.type;\n const result = useKosModel<DispenserInfoModel>({\n modelId,\n modelType: DispenserInfo.type,\n options: {},\n });\n\n return result;\n};\n","import { DispenserInfoModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useDispenserInfo } from \"./use-dispenser-info\";\n\nexport interface DispenserInfoProps {\n dispenserInfo: DispenserInfoModel;\n}\n// react HOC to provide a DispenserInfo to a component\nexport function withDispenserInfo<\n T extends DispenserInfoProps = DispenserInfoProps\n>(WrappedComponent: React.ComponentType<T>) {\n return (props: Omit<T, keyof DispenserInfoProps>) => {\n const { model, status, KosModelLoader } = useDispenserInfo();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} dispenserInfo={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { Door, DoorModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useDoor = (id: string) => {\n const modelId = id;\n const result = useKosModel<DoorModel>({\n modelId,\n modelType: Door.type,\n options: {},\n });\n\n return result;\n};\n","import { DoorModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useDoor } from \"./use-door\";\n\ninterface DoorProps {\n door: DoorModel;\n}\n\ninterface Identifiable {\n id: string;\n}\n\ntype HoCDoorProps = DoorProps & Identifiable;\n// react HOC to provide a Door to a component\nexport function withDoor<T extends HoCDoorProps = HoCDoorProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (props: Omit<T, keyof DoorProps>) => {\n const { model, status, KosModelLoader } = useDoor(props.id);\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} door={model} />\n </KosModelLoader>\n );\n };\n}\n","export var util;\n(function (util) {\n util.assertEqual = (_) => { };\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array.map((val) => (typeof val === \"string\" ? `'${val}'` : val)).join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nexport var objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nexport const ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n","import { util } from \"./helpers/util.js\";\nexport const ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nexport const quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nexport class ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n const firstEl = sub.path[0];\n fieldErrors[firstEl] = fieldErrors[firstEl] || [];\n fieldErrors[firstEl].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n","import { ZodIssueCode } from \"../ZodError.js\";\nimport { util, ZodParsedType } from \"../helpers/util.js\";\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"bigint\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\nexport default errorMap;\n","import defaultErrorMap from \"./locales/en.js\";\nlet overrideErrorMap = defaultErrorMap;\nexport { defaultErrorMap };\nexport function setErrorMap(map) {\n overrideErrorMap = map;\n}\nexport function getErrorMap() {\n return overrideErrorMap;\n}\n","import { getErrorMap } from \"../errors.js\";\nimport defaultErrorMap from \"../locales/en.js\";\nexport const makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n if (issueData.message !== undefined) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message,\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage,\n };\n};\nexport const EMPTY_PATH = [];\nexport function addIssueToContext(ctx, issueData) {\n const overrideMap = getErrorMap();\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap, // contextual error map is first priority\n ctx.schemaErrorMap, // then schema-bound map if available\n overrideMap, // then global override map\n overrideMap === defaultErrorMap ? undefined : defaultErrorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nexport class ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nexport const INVALID = Object.freeze({\n status: \"aborted\",\n});\nexport const DIRTY = (value) => ({ status: \"dirty\", value });\nexport const OK = (value) => ({ status: \"valid\", value });\nexport const isAborted = (x) => x.status === \"aborted\";\nexport const isDirty = (x) => x.status === \"dirty\";\nexport const isValid = (x) => x.status === \"valid\";\nexport const isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n","export var errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n // biome-ignore lint:\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message?.message;\n})(errorUtil || (errorUtil = {}));\n","import { ZodError, ZodIssueCode, } from \"./ZodError.js\";\nimport { defaultErrorMap, getErrorMap } from \"./errors.js\";\nimport { errorUtil } from \"./helpers/errorUtil.js\";\nimport { DIRTY, INVALID, OK, ParseStatus, addIssueToContext, isAborted, isAsync, isDirty, isValid, makeIssue, } from \"./helpers/parseUtil.js\";\nimport { util, ZodParsedType, getParsedType } from \"./helpers/util.js\";\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nexport class ZodType {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap,\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async,\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return isValid(result)\n ? {\n value: result.value,\n }\n : {\n issues: ctx.common.issues,\n };\n }\n catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true,\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result)\n ? {\n value: result.value,\n }\n : {\n issues: ctx.common.issues,\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true,\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data),\n };\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[0-9a-z]+$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\nconst nanoidRegex = /^[a-z0-9_-]{21}$/i;\nconst jwtRegex = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\nconst durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\n// faster, simpler, safer\nconst ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nconst ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n// const ipv6Regex =\n// /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\nconst ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\nconst ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nconst base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n// https://base64.guru/standards/base64url\nconst base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n// simple\n// const dateRegexSource = `\\\\d{4}-\\\\d{2}-\\\\d{2}`;\n// no leap year validation\n// const dateRegexSource = `\\\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\\\d|2\\\\d))`;\n// with leap year validation\nconst dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateRegex = new RegExp(`^${dateRegexSource}$`);\nfunction timeRegexSource(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n }\n else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\"; // require seconds if precision is nonzero\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n}\nfunction timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetimeRegex(args) {\n let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n}\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nfunction isValidJWT(jwt, alg) {\n if (!jwtRegex.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n if (!header)\n return false;\n // Convert base64url to base64\n const base64 = header\n .replace(/-/g, \"+\")\n .replace(/_/g, \"/\")\n .padEnd(header.length + ((4 - (header.length % 4)) % 4), \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nfunction isValidCidr(ip, version) {\n if ((version === \"v4\" || !version) && ipv4CidrRegex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6CidrRegex.test(ip)) {\n return true;\n }\n return false;\n}\nexport class ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"nanoid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"date\") {\n const regex = dateRegex;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"time\") {\n const regex = timeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"duration\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"jwt\") {\n if (!isValidJWT(input.data, check.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"jwt\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cidr\") {\n if (!isValidCidr(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cidr\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64\") {\n if (!base64Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64url\") {\n if (!base64urlRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message) });\n }\n base64url(message) {\n // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil.errToObj(message),\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil.errToObj(options?.message),\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil.errToObj(options?.message),\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message) });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options?.position,\n ...errorUtil.errToObj(options?.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nexport class ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams(params),\n });\n};\nexport class ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n }\n catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params),\n });\n};\nexport class ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams(params),\n });\n};\nexport class ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nexport class ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nexport class ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nexport class ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nexport class ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nexport class ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nexport class ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nexport class ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nexport class ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nexport class ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape<T, Augmentation>,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n this._cached = { shape, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") {\n }\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil.errToObj(message).message ?? defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // <Def extends ZodObjectDef>(def: Def) =>\n // <Augmentation extends ZodRawShape>(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape<ReturnType<Def[\"shape\"]>, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge<Incoming extends AnyZodObject>(\n // merging: Incoming\n // ): //ZodObject<T & Incoming[\"_shape\"], UnknownKeys, Catchall> = (merging) => {\n // ZodObject<\n // extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n for (const key of util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n }\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n for (const key of util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n }\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nexport class ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return util.objectValues(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else if (type instanceof ZodOptional) {\n return [undefined, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n }\n else {\n return [];\n }\n};\nexport class ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nexport class ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\n// type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];\nexport class ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nexport class ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nexport class ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nexport class ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nexport class ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), defaultErrorMap].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), defaultErrorMap].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(async function (...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args ? args : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nexport class ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nexport class ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nexport class ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return ZodEnum.create(values, {\n ...this._def,\n ...newDef,\n });\n }\n exclude(values, newDef = this._def) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef,\n });\n }\n}\nZodEnum.create = createZodEnum;\nexport class ZodNativeEnum extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nexport class ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nexport class ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed) => {\n if (status.value === \"aborted\")\n return INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n });\n }\n else {\n if (status.value === \"aborted\")\n return INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return INVALID;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {\n if (!isValid(base))\n return INVALID;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result,\n }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nexport { ZodEffects as ZodTransformer };\nexport class ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nexport class ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nexport class ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams(params),\n });\n};\nexport class ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nexport class ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nexport const BRAND = Symbol(\"zod_brand\");\nexport class ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nexport class ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nexport class ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if (isValid(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\n////////////////////////////////////////\n////////////////////////////////////////\n////////// //////////\n////////// z.custom //////////\n////////// //////////\n////////////////////////////////////////\n////////////////////////////////////////\nfunction cleanParams(params, data) {\n const p = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n return p2;\n}\nexport function custom(check, _params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n const r = check(data);\n if (r instanceof Promise) {\n return r.then((r) => {\n if (!r) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny.create();\n}\nexport { ZodType as Schema, ZodType as ZodSchema };\nexport const late = {\n object: ZodObject.lazycreate,\n};\nexport var ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n// requires TS 4.4+\nclass Class {\n constructor(..._) { }\n}\nconst instanceOfType = (\n// const instanceOfType = <T extends new (...args: any[]) => any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nexport const coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nexport { anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, dateType as date, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, instanceOfType as instanceof, intersectionType as intersection, lazyType as lazy, literalType as literal, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, recordType as record, setType as set, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, voidType as void, };\nexport const NEVER = INVALID;\n","/**\n * Dashboard Summary Extension Point with Explicit Registration\n *\n * This provides the dashboard summary extension point for use across DDK applications\n * with explicit registration pattern to avoid circular dependencies.\n *\n * Replaces the legacy dashboard-summary-reducer with the simplified extension point API.\n */\n\nimport type { AssemblyModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n createExtensionSchema,\n createViewAwareTransform,\n defineExtensionPoint,\n extensionPointId,\n validateRankIfPresent,\n validateWithSchema,\n type ValidationContext,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\n// Define the Zod schema for Dashboard Summary using the base schema\nconst DashboardSummarySchema = createExtensionSchema(\n {\n type: z\n .literal(\"dashboard.summary\")\n .describe(\"Extension type, must be 'dashboard.summary'\"),\n dashboardKey: z\n .string()\n .min(1, \"Dashboard key is required\")\n .describe(\"Key used to identify which dashboard this summary belongs to\"),\n },\n { rankable: true }\n);\n\n// Define the dashboard summary types locally for self-containment\ntype DashboardSummaryDefinition = z.infer<typeof DashboardSummarySchema>;\n\n// Define the props that dashboard summary components can accept\ninterface DashboardSummaryComponentProps {\n dashboardKey?: string;\n assembly?: AssemblyModel;\n cardModel?: any;\n}\n\nconst EXTENSION_ID = extensionPointId(\"ddk\", \"dashboard\", \"summary\");\n\n/**\n * Dashboard Summary extension point that replaces legacy dashboard-summary-reducer behavior\n *\n * Uses explicit registration pattern to avoid circular dependencies\n * and make the extension point system more predictable.\n */\nexport const DashboardSummaryExtension = defineExtensionPoint<\n DashboardSummaryDefinition,\n DashboardSummaryDefinition,\n DashboardSummaryComponentProps\n>({\n id: EXTENSION_ID,\n contributionKey: \"dashboardSummary\",\n displayName: \"Dashboard Summary\",\n description:\n \"Extension point for dashboard summary plugin configurations with view support\",\n hasView: true,\n isRankable: true,\n\n schema: DashboardSummarySchema,\n metadata: {\n exportName: \"DashboardSummaryExtension\",\n category: \"Dashboard\",\n tags: [\"dashboard\", \"summary\", \"visualization\"],\n },\n\n validate: (data: DashboardSummaryDefinition, context: ValidationContext) => {\n // Use Zod validation first\n if (!validateWithSchema(DashboardSummarySchema, data, context)) {\n return;\n }\n\n // Additional business logic validation\n validateRankIfPresent(data, context);\n },\n\n transform: createViewAwareTransform<DashboardSummaryDefinition>(),\n});\n\n// Export constants for backward compatibility with existing code\nexport const EXTENSION_POINT_DASHBOARD_SUMMARY = EXTENSION_ID;\nexport const EXTENSION_POINT_DASHBOARD_SUMMARY_DEF = `${EXTENSION_ID}.def`;\nexport const EXTENSION_POINT_DASHBOARD_SUMMARY_VIEW = `${EXTENSION_ID}.view`;\n","/**\n * Dashboard Detail Extension Point with Explicit Registration\n *\n * This provides the dashboard detail extension point for use across DDK applications\n * with explicit registration pattern to avoid circular dependencies.\n *\n * Replaces the legacy dashboard-detail-reducer with the simplified extension point API.\n */\n\nimport type { AssemblyModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n createExtensionSchema,\n createViewAwareTransform,\n defineExtensionPoint,\n extensionPointId,\n validateRankIfPresent,\n validateWithSchema,\n type ValidationContext,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\n// Define the Zod schema for Dashboard Detail using the base schema\nconst DashboardDetailSchema = createExtensionSchema(\n {\n type: z\n .literal(\"dashboard.detail\")\n .describe(\"Extension type, must be 'dashboard.detail'\"),\n dashboardKey: z\n .string()\n .min(1, \"Dashboard key is required\")\n .describe(\"Key used to identify which dashboard this detail belongs to\"),\n },\n { rankable: true }\n);\n\n// Define the dashboard detail types locally for self-containment\ntype DashboardDetailDefinition = z.infer<typeof DashboardDetailSchema>;\n\n// Define the props that dashboard detail components can accept\ninterface DashboardDetailComponentProps {\n dashboardKey?: string;\n assembly?: AssemblyModel;\n cardModel?: any;\n [key: string]: unknown;\n}\n\nconst EXTENSION_ID = extensionPointId(\"ddk\", \"dashboard\", \"detail\");\n\n/**\n * Dashboard Detail extension point that replaces legacy dashboard-detail-reducer behavior\n *\n * Uses explicit registration pattern to avoid circular dependencies\n * and make the extension point system more predictable.\n */\nexport const DashboardDetailExtension = defineExtensionPoint<\n DashboardDetailDefinition,\n DashboardDetailDefinition,\n DashboardDetailComponentProps\n>({\n id: EXTENSION_ID,\n contributionKey: \"dashboardDetail\",\n displayName: \"Dashboard Detail\",\n description:\n \"Extension point for dashboard detail plugin configurations with view support\",\n hasView: true,\n isRankable: true,\n\n schema: DashboardDetailSchema,\n metadata: {\n exportName: \"DashboardDetailExtension\",\n category: \"Dashboard\",\n tags: [\"dashboard\", \"detail\", \"visualization\"],\n },\n\n validate: (data: DashboardDetailDefinition, context: ValidationContext) => {\n // Use Zod validation first\n if (!validateWithSchema(DashboardDetailSchema, data, context)) {\n return;\n }\n\n // Additional business logic validation\n validateRankIfPresent(data, context);\n },\n\n transform: createViewAwareTransform<DashboardDetailDefinition>(),\n});\n\n// Export constants for backward compatibility with existing code\nexport const EXTENSION_POINT_DASHBOARD_DETAIL = EXTENSION_ID;\nexport const EXTENSION_POINT_DASHBOARD_DETAIL_DEF = `${EXTENSION_ID}.def`;\nexport const EXTENSION_POINT_DASHBOARD_DETAIL_VIEW = `${EXTENSION_ID}.view`;","/**\n * Dashboard Pump Detail Extension Point with Explicit Registration\n *\n * This provides the dashboard pump detail extension point for use across DDK applications\n * with explicit registration pattern to avoid circular dependencies.\n *\n * Replaces the legacy dashboard-pump-detail-reducer with the simplified extension point API.\n */\n\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n createExtensionSchema,\n createViewAwareTransform,\n defineExtensionPoint,\n extensionPointId,\n validateRankIfPresent,\n validateWithSchema,\n type ValidationContext,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\n// Define the Zod schema for dashboard pump detail contributions using the base schema\nconst DashboardPumpDetailSchema = createExtensionSchema(\n {\n type: z\n .literal(\"dashboard.detail.pump\")\n .describe(\"Extension type, must be 'dashboard.detail.pump'\"),\n dashboardKey: z\n .string()\n .min(1, \"Dashboard key is required\")\n .describe(\n \"Key used to match this extension with specific dashboard pumps\"\n ),\n },\n { rankable: true }\n);\n\n// Define the dashboard pump detail types locally for self-containment\ntype DashboardPumpDetailDefinition = z.infer<typeof DashboardPumpDetailSchema>;\n\n// Define the props that dashboard pump detail components can accept\ninterface DashboardPumpDetailComponentProps {\n holder?: HolderModel;\n}\n\nconst EXTENSION_ID = extensionPointId(\"ddk\", \"dashboard\", \"pump-detail\");\n\n/**\n * Dashboard Pump Detail extension point that replaces legacy dashboard-pump-detail-reducer behavior\n *\n * Uses explicit registration pattern to avoid circular dependencies\n * and make the extension point system more predictable.\n */\nexport const DashboardPumpDetailExtension = defineExtensionPoint<\n DashboardPumpDetailDefinition,\n DashboardPumpDetailDefinition,\n DashboardPumpDetailComponentProps\n>({\n id: EXTENSION_ID,\n contributionKey: \"dashboardPumpDetail\",\n displayName: \"Dashboard Pump Detail\",\n description:\n \"Extension point for dashboard pump detail plugin configurations with view support\",\n hasView: true,\n isRankable: true,\n schema: DashboardPumpDetailSchema,\n metadata: {\n exportName: \"DashboardPumpDetailExtension\",\n },\n\n validate: (\n data: DashboardPumpDetailDefinition,\n context: ValidationContext\n ) => {\n // Use Zod validation first\n if (!validateWithSchema(DashboardPumpDetailSchema, data, context)) {\n return;\n }\n\n // Additional business logic validation\n validateRankIfPresent(data, context);\n },\n\n transform: createViewAwareTransform<DashboardPumpDetailDefinition>(),\n});\n\n// Export constants for backward compatibility with existing code\nexport const EXTENSION_POINT_DASHBOARD_PUMP_DETAIL = EXTENSION_ID;\nexport const EXTENSION_POINT_DASHBOARD_PUMP_DETAIL_DEF = `${EXTENSION_ID}.def`;\nexport const EXTENSION_POINT_DASHBOARD_PUMP_DETAIL_VIEW = `${EXTENSION_ID}.view`;\n","/**\n * Dashboard Macro Summary Extension Point with Explicit Registration\n *\n * Provides a pluggable summary body for macro holder cards on the dashboard.\n * Contributions are keyed by `dashboardKey`, matched against the value returned\n * by `ExtensionManager.executeDashboardKeyFactory(holder)` (default: the\n * holder's first pump type, e.g. \"cgp\", \"lfcv\", \"msv\"). When a contribution\n * matches, its component renders inside the macro card body in place of the\n * default `<StatusIndicator>`.\n */\n\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n createExtensionSchema,\n createViewAwareTransform,\n defineExtensionPoint,\n extensionPointId,\n validateRankIfPresent,\n validateWithSchema,\n type ValidationContext,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\nconst DashboardMacroSummarySchema = createExtensionSchema(\n {\n type: z\n .literal(\"dashboard.macro.summary\")\n .describe(\"Extension type, must be 'dashboard.macro.summary'\"),\n dashboardKey: z\n .string()\n .min(1, \"Dashboard key is required\")\n .describe(\n \"Key used to match this extension with a macro holder. Tried in order: (1) holder.name (e.g. 'ns', 'water', 'carb'), (2) ExtensionManager.executeDashboardKeyFactory(holder) (default: holder.pumps.data[0]?.type, e.g. 'lfcv', 'cgp').\"\n ),\n },\n { rankable: true }\n);\n\ntype DashboardMacroSummaryDefinition = z.infer<\n typeof DashboardMacroSummarySchema\n>;\n\ninterface DashboardMacroSummaryComponentProps {\n holder?: HolderModel;\n}\n\nconst EXTENSION_ID = extensionPointId(\"ddk\", \"dashboard\", \"macro-summary\");\n\nexport const DashboardMacroSummaryExtension = defineExtensionPoint<\n DashboardMacroSummaryDefinition,\n DashboardMacroSummaryDefinition,\n DashboardMacroSummaryComponentProps\n>({\n id: EXTENSION_ID,\n contributionKey: \"dashboardMacroSummary\",\n displayName: \"Dashboard Macro Summary\",\n description:\n \"Extension point for plug-in supplied macro holder card summary content (the body shown on the dashboard, not the tap-detail modal)\",\n hasView: true,\n isRankable: true,\n schema: DashboardMacroSummarySchema,\n metadata: {\n exportName: \"DashboardMacroSummaryExtension\",\n category: \"Dashboard\",\n tags: [\"dashboard\", \"summary\", \"macro\"],\n },\n\n validate: (\n data: DashboardMacroSummaryDefinition,\n context: ValidationContext\n ) => {\n if (!validateWithSchema(DashboardMacroSummarySchema, data, context)) {\n return;\n }\n validateRankIfPresent(data, context);\n },\n\n transform: createViewAwareTransform<DashboardMacroSummaryDefinition>(),\n});\n\nexport const EXTENSION_POINT_DASHBOARD_MACRO_SUMMARY = EXTENSION_ID;\nexport const EXTENSION_POINT_DASHBOARD_MACRO_SUMMARY_DEF = `${EXTENSION_ID}.def`;\nexport const EXTENSION_POINT_DASHBOARD_MACRO_SUMMARY_VIEW = `${EXTENSION_ID}.view`;\n","/**\n * CUI Extension Point with Explicit Registration\n *\n * This provides the CUI extension point for use across DDK applications\n * with explicit registration pattern to avoid circular dependencies.\n *\n * Replaces the legacy cui-reducer with the simplified extension point API.\n */\n\nimport {\n createExtensionSchema,\n createViewAwareTransform,\n defineExtensionPoint,\n extensionPointId,\n validateDescriptorFormat,\n validateWithSchema,\n type ValidationContext,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\n// Define the Zod schema for CUI contributions using the base schema\nconst CuiSchema = createExtensionSchema({\n cuiDescriptor: z\n .string()\n .min(1, \"CUI descriptor is required\")\n .describe(\n \"Descriptor used to identify and categorize the CUI functionality\"\n ),\n modalMode: z\n .enum([\"fullscreen\", \"maximized\"])\n .optional()\n .describe(\"Modal display mode for the CUI interface\"),\n});\n\n// Define the CUI types locally for self-containment\ntype CuiDefinition = z.infer<typeof CuiSchema>;\n\nconst EXTENSION_ID = extensionPointId(\"ddk\", \"cui\");\n\n/**\n * CUI extension point that replaces legacy cui-reducer behavior\n *\n * Uses explicit registration pattern to avoid circular dependencies\n * and make the extension point system more predictable.\n */\nexport const CuiExtension = defineExtensionPoint<\n CuiDefinition,\n CuiDefinition,\n Record<string, unknown>\n>({\n id: EXTENSION_ID,\n contributionKey: \"cui\",\n displayName: \"CUI (Consumer User Interface)\",\n description:\n \"Extension point for CUI plugin configurations with view support\",\n hasView: true,\n isRankable: false,\n schema: CuiSchema,\n metadata: {\n exportName: \"CuiExtension\",\n category: \"Interface\",\n tags: [\"cui\", \"user-interface\", \"consumer\"],\n },\n\n validate: (data: CuiDefinition, context: ValidationContext) => {\n // Use Zod validation first\n if (!validateWithSchema(CuiSchema, data, context)) {\n return;\n }\n\n // Additional business logic validation\n validateDescriptorFormat(\"CUI descriptor\", data.cuiDescriptor, context);\n\n // Modal mode validation is already handled by Zod enum\n },\n\n transform: createViewAwareTransform<CuiDefinition>(),\n});\n\n// Export constants for backward compatibility with existing code\nexport const EXTENSION_POINT_CUI = EXTENSION_ID;\nexport const EXTENSION_POINT_CUI_DEF = `${EXTENSION_ID}.def`;\nexport const EXTENSION_POINT_CUI_VIEW = `${EXTENSION_ID}.view`;\n","/**\n * NavView Extension Point with Explicit Registration\n *\n * This provides the NavView extension point for navigation views across DDK applications\n * with explicit registration pattern to avoid circular dependencies.\n *\n * Replaces the legacy nav-view-reducer with the simplified extension point API.\n */\n\nimport {\n createExtensionSchema,\n createViewAwareTransform,\n defineExtensionPoint,\n extensionPointId,\n validateDescriptorFormat,\n validateWithSchema,\n type ValidationContext,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\n// Define the Zod schema for NavView contributions using the base schema\nconst NavViewSchema = createExtensionSchema({\n navDescriptor: z\n .string()\n .min(1, \"Navigation descriptor is required\")\n .describe(\n \"Descriptor used to identify and map the navigation functionality\"\n ),\n});\n\n// Define the NavView types locally for self-containment\ntype NavViewDefinition = z.infer<typeof NavViewSchema>;\n\nconst EXTENSION_ID = extensionPointId(\"ddk\", \"nav\", \"view\");\n\n/**\n * NavView extension point that replaces legacy nav-view-reducer behavior\n *\n * Uses explicit registration pattern to avoid circular dependencies\n * and make the extension point system more predictable.\n */\nexport const NavViewExtension = defineExtensionPoint<\n NavViewDefinition,\n NavViewDefinition,\n Record<string, unknown>\n>({\n id: EXTENSION_ID,\n contributionKey: \"navViews\",\n displayName: \"Navigation Views\",\n description:\n \"Extension point for navigation view plugin configurations with view support\",\n hasView: true,\n isRankable: false,\n schema: NavViewSchema,\n metadata: {\n exportName: \"NavViewExtension\",\n category: \"Navigation\",\n tags: [\"navigation\", \"nav\", \"views\", \"routing\"],\n },\n\n validate: (data: NavViewDefinition, context: ValidationContext) => {\n // Use Zod validation first\n if (!validateWithSchema(NavViewSchema, data, context)) {\n return;\n }\n\n // Additional business logic validation\n validateDescriptorFormat(\n \"Navigation descriptor\",\n data.navDescriptor,\n context\n );\n },\n\n transform: createViewAwareTransform<NavViewDefinition>(),\n});\n\n// Export constants for backward compatibility with existing code\nexport const EXTENSION_POINT_NAV_VIEW = EXTENSION_ID;\nexport const EXTENSION_POINT_NAV_VIEW_DEF = `${EXTENSION_ID}.def`;\nexport const EXTENSION_POINT_NAV_VIEW_VIEW = `${EXTENSION_ID}.view`;\n","/**\n * Setup Extension Point with Explicit Registration\n *\n * This provides the Setup extension point for setup step configurations across DDK applications\n * with explicit registration pattern to avoid circular dependencies.\n *\n * Replaces the legacy setup-reducer with the simplified extension point API.\n */\n\nimport {\n createExtensionSchema,\n createViewAwareTransform,\n defineExtensionPoint,\n extensionPointId,\n validateDescriptorFormat,\n validateRankIfPresent,\n validateWithSchema,\n type ValidationContext,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\n// Define the Zod schema for Setup contributions using the base schema\nconst SetupSchema = createExtensionSchema(\n {\n setupDescriptor: z\n .string()\n .min(1, \"Setup descriptor is required\")\n .describe(\"Descriptor used to identify and categorize the setup step\"),\n },\n { rankable: true }\n);\n\n// Define the Setup types locally for self-containment\ntype SetupDefinition = z.infer<typeof SetupSchema>;\n\nconst EXTENSION_ID = extensionPointId(\"ddk\", \"setup\");\n\n/**\n * Setup extension point that replaces legacy setup-reducer behavior\n *\n * Uses explicit registration pattern to avoid circular dependencies\n * and make the extension point system more predictable.\n */\nexport const SetupExtension = defineExtensionPoint<\n SetupDefinition,\n SetupDefinition,\n Record<string, unknown>\n>({\n id: EXTENSION_ID,\n contributionKey: \"setupStep\",\n displayName: \"Setup Steps\",\n description:\n \"Extension point for setup step plugin configurations with view support\",\n hasView: true,\n isRankable: true,\n schema: SetupSchema,\n metadata: {\n exportName: \"SetupExtension\",\n category: \"Setup\",\n tags: [\"setup\", \"configuration\", \"steps\", \"wizard\"],\n },\n\n validate: (data: SetupDefinition, context: ValidationContext) => {\n // Use Zod validation first\n if (!validateWithSchema(SetupSchema, data, context)) {\n return;\n }\n\n // Additional business logic validation\n validateDescriptorFormat(\"Setup descriptor\", data.setupDescriptor, context);\n validateRankIfPresent(data, context);\n },\n\n transform: createViewAwareTransform<SetupDefinition>(),\n});\n\n// Export constants for backward compatibility with existing code\nexport const EXTENSION_POINT_SETUP = EXTENSION_ID;\nexport const EXTENSION_POINT_SETUP_DEF = `${EXTENSION_ID}.def`;\nexport const EXTENSION_POINT_SETUP_VIEW = `${EXTENSION_ID}.view`;\n","/**\n * Trouble Action Extension Point with Explicit Registration\n *\n * This extension point enables plugins to define UI components and state management for device troubles.\n * It supports a powerful normalization pattern where multiple different trouble types can be grouped\n * under the same UI experience for consistent user workflows.\n *\n * ## Architecture Overview\n *\n * 1. **TroubleContainer** detects device troubles and emits specific troubleTypes\n * 2. **TroubleActionModel** maps active troubles to normalized state keys/values\n * 3. **StateExperience** renders appropriate UI components based on trouble state\n * 4. **Plugins** contribute trouble-specific UI components via this extension point\n *\n * ## Normalization Pattern\n *\n * Multiple related troubles can share the same stateKey to show the same troubleshooting UI:\n *\n * ```json\n * [\n * {\n * \"troubleType\": \"pump-motor-fault\",\n * \"stateKey\": \"pumpProblem\",\n * \"stateValue\": \"pump-issue\",\n * \"experienceId\": \"pump-troubleshoot-ui\"\n * },\n * {\n * \"troubleType\": \"pump-pressure-low\",\n * \"stateKey\": \"pumpProblem\", // Same stateKey = same UI\n * \"stateValue\": \"pump-issue\", // Same stateValue = same state\n * \"experienceId\": \"pump-troubleshoot-ui\" // Same troubleshooting flow\n * }\n * ]\n * ```\n *\n * This reduces plugin complexity and provides consistent user experiences for related issues.\n *\n * Replaces the legacy state-action-reducer with the simplified extension point API.\n */\n\nimport {\n createExtensionSchema,\n createViewAwareTransform,\n defineExtensionPoint,\n extensionPointId,\n validateRankIfPresent,\n validateWithSchema,\n type ValidationContext,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\n// Define the Zod schema for Trouble Action contributions using the base schema\nconst TroubleActionSchema = createExtensionSchema(\n {\n type: z\n .literal(\"trouble.action\")\n .describe(\"Extension type, must be 'trouble.action'\"),\n troubleType: z\n .string()\n .min(1, \"Trouble type is required\")\n .describe(\n \"Specific trouble type from TroubleContainer that triggers this action (e.g., 'pump-motor-fault', 'sensor-calibration-error'). \" +\n \"This must match the exact trouble type string emitted by the device/system.\"\n ),\n stateKey: z\n .string()\n .min(1, \"State key is required\")\n .describe(\n \"Normalized state key for grouping related troubles under a common UI experience (e.g., 'pumpProblem', 'sensorIssue'). \" +\n \"Multiple troubleTypes can share the same stateKey to show the same troubleshooting component. \" +\n \"If not provided, defaults to troubleType for 1:1 mapping.\"\n ),\n stateValue: z\n .string()\n .min(1, \"State value is required\")\n .describe(\n \"Value set in the reactive state when this trouble becomes active (e.g., 'pump-failure', 'needs-calibration'). \" +\n \"Used by other components to detect trouble categories and trigger appropriate responses. \" +\n \"If not provided, defaults to troubleType.\"\n ),\n },\n { rankable: true }\n);\n\n// Define the trouble action types locally for self-containment\ntype TroubleActionDefinition = z.infer<typeof TroubleActionSchema>;\n\n// Define the props that trouble action components can accept\ninterface TroubleActionComponentProps {\n trouble?: any;\n [key: string]: unknown;\n}\n\nconst EXTENSION_ID = extensionPointId(\"ddk\", \"trouble\", \"action\");\n\n/**\n * Trouble Action extension point that replaces legacy state-action-reducer behavior\n *\n * Uses explicit registration pattern to avoid circular dependencies\n * and make the extension point system more predictable.\n */\nexport const TroubleActionExtension = defineExtensionPoint<\n TroubleActionDefinition,\n TroubleActionDefinition,\n TroubleActionComponentProps\n>({\n id: EXTENSION_ID,\n contributionKey: \"troubleActions\",\n displayName: \"Trouble Actions\",\n description:\n \"Extension point for trouble action plugin configurations with view support\",\n hasView: true,\n isRankable: true,\n schema: TroubleActionSchema,\n metadata: {\n exportName: \"TroubleActionExtension\",\n category: \"Trouble Management\",\n tags: [\"trouble\", \"action\", \"state\", \"error-handling\"],\n },\n\n validate: (data: TroubleActionDefinition, context: ValidationContext) => {\n // Use Zod validation first\n if (!validateWithSchema(TroubleActionSchema, data, context)) {\n return;\n }\n\n // Additional business logic validation\n validateRankIfPresent(data, context);\n },\n\n transform: createViewAwareTransform<TroubleActionDefinition>(),\n});\n\n// Export constants for backward compatibility with existing code\nexport const EXTENSION_POINT_TROUBLE_ACTION = EXTENSION_ID;\nexport const EXTENSION_POINT_TROUBLE_ACTION_DEF = `${EXTENSION_ID}.def`;\nexport const EXTENSION_POINT_TROUBLE_ACTION_VIEW = `${EXTENSION_ID}.view`;\n","/**\n * View Extension Point with Explicit Registration\n *\n * This extension point enables plugins to contribute UI components to designated regions\n * or sections within existing pages. It provides a flexible way to extend UI layouts\n * without modifying the core page components.\n *\n * ## Architecture Overview\n *\n * 1. **Page Components** define view regions using viewKey identifiers\n * 2. **Plugins** contribute components to specific viewKeys via this extension point\n * 3. **Dynamic Rendering** automatically discovers and renders all contributions for a viewKey\n * 4. **Multiple Contributors** can target the same viewKey for rich, extensible UIs\n *\n * ## Usage Pattern\n *\n * **In Page Components:**\n * ```tsx\n * import { DynamicViewRenderer } from '@kosdev-code/kos-ddk-model-components';\n *\n * export const SettingsPage = () => (\n * <div>\n * <h1>Settings</h1>\n * <DynamicViewRenderer viewKey=\"settings.config\" />\n * </div>\n * );\n * ```\n *\n * **In Plugin Configurations:**\n * ```json\n * {\n * \"views\": [{\n * \"id\": \"my-plugin.network-settings\",\n * \"title\": \"Network Configuration\",\n * \"viewKey\": \"settings.config\",\n * \"namespace\": \"my-plugin\",\n * \"experienceId\": \"my-plugin.network-settings.experience\"\n * }]\n * }\n * ```\n *\n * This replaces the legacy descriptor-based views system with the simplified extension point API.\n */\n\nimport {\n createExtensionSchema,\n createViewAwareTransform,\n defineExtensionPoint,\n extensionPointId,\n validateRankIfPresent,\n validateWithSchema,\n type ValidationContext,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\n// Define the Zod schema for View contributions using the base schema\nconst ViewSchema = createExtensionSchema(\n {\n viewKey: z\n .string()\n .min(1, \"View key is required\")\n .describe(\n \"Key identifying the UI region where this component should be rendered (e.g., 'settings.config', 'dashboard.sidebar'). \" +\n \"Multiple plugins can contribute to the same viewKey, and all will be rendered in the designated region.\"\n ),\n },\n { rankable: true }\n);\n\n// Define the view types locally for self-containment\ntype ViewDefinition = z.infer<typeof ViewSchema>;\n\n// Define the props that view components can accept\ninterface ViewComponentProps {\n viewKey?: string;\n [key: string]: unknown;\n}\n\nconst EXTENSION_ID = extensionPointId(\"ddk\", \"view\");\n\n/**\n * View extension point that replaces legacy descriptor-based views behavior\n *\n * Uses explicit registration pattern to avoid circular dependencies\n * and make the extension point system more predictable.\n */\nexport const ViewExtension = defineExtensionPoint<\n ViewDefinition,\n ViewDefinition,\n ViewComponentProps\n>({\n id: EXTENSION_ID,\n contributionKey: \"views\",\n displayName: \"Views\",\n description:\n \"Extension point for view plugin configurations with regional rendering support\",\n hasView: true,\n isRankable: true,\n schema: ViewSchema,\n metadata: {\n exportName: \"ViewExtension\",\n category: \"UI Layout\",\n tags: [\"views\", \"ui\", \"rendering\", \"layout\", \"regions\"],\n },\n\n validate: (data: ViewDefinition, context: ValidationContext) => {\n // Use Zod validation first\n if (!validateWithSchema(ViewSchema, data, context)) {\n return;\n }\n\n // Additional business logic validation\n if (data.viewKey) {\n // Suggest dot notation for view keys\n if (!data.viewKey.includes(\".\")) {\n context.addInfo(\n `ViewKey '${data.viewKey}' might benefit from dot notation (e.g., 'settings.config', 'dashboard.sidebar') for better organization`\n );\n }\n\n // Warn about very generic view keys\n if ([\"view\", \"content\", \"main\"].includes(data.viewKey)) {\n context.addWarning(\n `ViewKey '${data.viewKey}' is very generic - consider using more specific keys like 'settings.main' or 'dashboard.content'`\n );\n }\n }\n\n validateRankIfPresent(data, context);\n },\n\n transform: createViewAwareTransform<ViewDefinition>(),\n});\n\n// Export constants for backward compatibility with existing code\nexport const EXTENSION_POINT_VIEW = EXTENSION_ID;\nexport const EXTENSION_POINT_VIEW_DEF = `${EXTENSION_ID}.def`;\nexport const EXTENSION_POINT_VIEW_VIEW = `${EXTENSION_ID}.view`;\n","import {\n useKosPluginsContext,\n type BaseViewPluginExtension,\n} from \"@kosdev-code/kos-ui-plugin\";\nimport { useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { CuiExtension, SetupExtension } from \"../../extensions\";\n\n// UtilitiesExtension is now JSON-defined, use constant for ID mapping\nconst UTILITIES_EXTENSION_ID = \"ddk.ncui.utilities\";\n\ninterface Props {\n defaultNamespace: string;\n extensionPoint: string;\n}\n\nconst EXT_KEY = {\n [SetupExtension.id]: \"setupDescriptor\",\n [CuiExtension.id]: \"cuiDescriptor\",\n [UTILITIES_EXTENSION_ID]: \"utilDescriptor\",\n};\nexport const useViewExtensions = ({\n defaultNamespace,\n extensionPoint,\n}: Props) => {\n const { getExtensions } = useKosPluginsContext();\n const setupStepsExt = getExtensions(extensionPoint);\n const namespaces = setupStepsExt.map((ext) => (ext.data as any).namespace) || [];\n const { t } = useKosTranslation([defaultNamespace, ...new Set(namespaces)]);\n\n const contributionMap = setupStepsExt.reduce<Record<string, any>>(\n (acc, _step) => {\n const step = _step as BaseViewPluginExtension;\n const data = step.data as any;\n acc[data[EXT_KEY[extensionPoint]]] = {\n extension: extensionPoint,\n module: step.id,\n namespace: data.namespace,\n title: data.title,\n };\n\n return acc;\n },\n {} as Record<string, BaseViewPluginExtension>\n );\n\n const labelMap = setupStepsExt.reduce((acc, _step) => {\n const step = _step as BaseViewPluginExtension;\n const data = step.data as any;\n acc[\n data[EXT_KEY[extensionPoint]]\n ] = `${data.namespace}:${data.title}`;\n return acc;\n }, {});\n\n return { namespaces, t, labelMap, contributionMap };\n};\n","import type { ExperienceProps } from \"@kosdev-code/kos-ddk-components\";\n\nimport type { HolderModel, PumpModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n FcmPump,\n SpmPump,\n type FcmPumpModel,\n type FreestyleHolderExt,\n type SpmPumpModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\nimport { getKosCompanionModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { useMemo, useState } from \"react\";\nimport {\n AgitatorModal,\n CalibrateModal,\n DiagnosticsModal,\n ReplaceLine,\n ReplacePump,\n RFIDOverride,\n SPMFieldCalibrationModal,\n} from \"../../components\";\n\nexport interface HolderExperienceProps extends ExperienceProps {\n holder: HolderModel<FreestyleHolderExt>;\n pump?: PumpModel;\n}\n\nexport const useHolderExperience = (holder: HolderModel, pump?: PumpModel) => {\n const holderExperiences = useMemo(() => {\n return {\n agitate: AgitatorModal,\n calibrate: ({ holder, pump, onComplete }: HolderExperienceProps) => {\n const pumpCompanionModel = getKosCompanionModel<FcmPumpModel>(\n pump ?? holder.pumps.data[0],\n FcmPump.type\n );\n\n return (\n <CalibrateModal pump={pumpCompanionModel} onComplete={onComplete} />\n );\n },\n calibrateSPM: ({ holder, pump, onComplete }: HolderExperienceProps) => {\n const pumpCompanionModel = getKosCompanionModel<SpmPumpModel>(\n pump ?? holder.pumps.data[0],\n SpmPump.type\n );\n\n return (\n <SPMFieldCalibrationModal\n pump={pumpCompanionModel}\n onComplete={onComplete}\n />\n );\n },\n diagnostics: ({ holder, pump, onComplete }: HolderExperienceProps) => {\n const pumpCompanionModel = getKosCompanionModel<FcmPumpModel>(\n pump ?? holder.pumps.data[0],\n FcmPump.type\n );\n\n return (\n <DiagnosticsModal pump={pumpCompanionModel} onComplete={onComplete} />\n );\n },\n \"replace-pump\": ({ holder, pump, onComplete }: HolderExperienceProps) => (\n <ReplacePump\n pump={pump ?? holder.pumps.data[0]}\n onComplete={onComplete}\n />\n ),\n \"rfid-override\": RFIDOverride,\n \"replace-line\": ({ holder, onComplete }: HolderExperienceProps) => (\n <ReplaceLine holder={holder} onComplete={onComplete} />\n ),\n };\n }, []);\n\n type HolderExperienceID = keyof typeof holderExperiences;\n\n const [holderExperience, setHolderExperience] = useState<\n HolderExperienceID | undefined\n >(undefined);\n\n const HolderExperience = holderExperience\n ? holderExperiences[holderExperience]\n : undefined;\n\n return {\n holderExperience: HolderExperience ? (\n <HolderExperience\n holder={holder}\n pump={pump}\n onComplete={() => {\n setHolderExperience(undefined);\n }}\n />\n ) : undefined,\n setHolderExperience,\n currentExperienceId: holderExperience,\n };\n};\n","import { ModalProps } from \"@kosdev-code/kos-ddk-components\";\nimport { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { FreestyleHolderModelExt } from \"@kosdev-code/kos-freestyle-sdk\";\nimport { PropsWithChildren, createContext, useContext } from \"react\";\n\ninterface Props {\n holder: HolderModel<FreestyleHolderModelExt>;\n onComplete?: () => void;\n}\n\ntype HolderContentFactory = (\n holder: HolderModel,\n modalOptions?: ModalProps\n) => {\n HolderContent: React.FunctionComponent<Props> | undefined;\n modalOptions?: Omit<ModalProps, \"children\">;\n};\n\nexport interface HolderContentType {\n actionFactory: HolderContentFactory;\n}\n\nexport const HolderContentContext = createContext<\n HolderContentType | undefined\n>(undefined);\n\ninterface HolderContentProviderProps {\n value: HolderContentType;\n}\n\nexport const HolderContentProvider: React.FunctionComponent<\n PropsWithChildren<HolderContentProviderProps>\n> = ({ children, value }) => (\n <HolderContentContext.Provider value={value}>\n {children}\n </HolderContentContext.Provider>\n);\n\nconst holderContentFactory = (_holder: HolderModel) => {\n return { HolderContent: undefined };\n};\n\nexport const useHolderContent = (\n holder: HolderModel,\n actionFactory: HolderContentFactory = holderContentFactory\n) => {\n const holderContentContext = useContext(HolderContentContext);\n\n actionFactory = holderContentContext?.actionFactory || actionFactory;\n\n return actionFactory(holder);\n};\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n IngredientSummary,\n IngredientSummaryModel,\n} from \"@kosdev-code/kos-ddk-models\";\n\nexport const useIngredientSummary = () => {\n const modelId = IngredientSummary.type;\n const result = useKosModel<IngredientSummaryModel>({\n modelId,\n modelType: IngredientSummary.type,\n options: {},\n });\n\n return result;\n};\n","import { IngredientSummaryModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useIngredientSummary } from \"./use-ingredient-summary\";\n\ninterface IngredientSummaryProps {\n ingredientSummary: IngredientSummaryModel;\n}\n// react HOC to provide a IngredientSummary to a component\nexport function withIngredientSummary<\n T extends IngredientSummaryProps = IngredientSummaryProps\n>(WrappedComponent: React.ComponentType<T>) {\n return () => (props: Omit<T, keyof IngredientSummaryProps>) => {\n const { model, status, KosModelLoader } = useIngredientSummary();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} ingredientSummary={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n MacroAssignment,\n MacroAssignmentModel,\n} from \"@kosdev-code/kos-ddk-models\";\n\nexport const useMacroAssignment = () => {\n const modelId = MacroAssignment.type;\n const result = useKosModel<MacroAssignmentModel>({\n modelId,\n modelType: MacroAssignment.type,\n options: {},\n });\n\n return result;\n};\n","import { MacroAssignmentModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useMacroAssignment } from \"./use-macro-assignment\";\n\nexport interface MacroAssignmentProps {\n macroAssignment: MacroAssignmentModel;\n}\n// react HOC to provide a MacroAssignment to a component\nexport function withMacroAssignment<\n T extends MacroAssignmentProps = MacroAssignmentProps\n>(WrappedComponent: React.ComponentType<T>) {\n return (props: Omit<T, keyof MacroAssignmentProps>) => {\n const { model, status, KosModelLoader } = useMacroAssignment();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} macroAssignment={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { NetworkTest, NetworkTestModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useNetworkTest = (id: string) => {\n const modelId = id;\n const result = useKosModel<NetworkTestModel>({\n modelId,\n modelType: NetworkTest.type,\n options: {},\n });\n\n return result;\n};\n","import { NetworkTestModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useNetworkTest } from \"./use-network-test\";\n\ninterface NetworkTestProps {\n networkTest: NetworkTestModel;\n}\n// react HOC to provide a NetworkTest to a component\nexport function withNetworkTest<T extends NetworkTestProps = NetworkTestProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (id: string) => (props: Omit<T, keyof NetworkTestProps>) => {\n const { model, status, KosModelLoader } = useNetworkTest(id);\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} networkTest={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n NetworkTestContainer,\n NetworkTestContainerModel,\n} from \"@kosdev-code/kos-ddk-models\";\n\nexport const useNetworkTestContainer = () => {\n const modelId = NetworkTestContainer.type;\n const result = useKosModel<NetworkTestContainerModel>({\n modelId,\n modelType: NetworkTestContainer.type,\n options: {},\n });\n\n return result;\n};\n","import { NetworkTestContainerModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useNetworkTestContainer } from \"./use-network-test-container\";\n\ninterface NetworkTestContainerProps {\n networkTestContainer: NetworkTestContainerModel;\n}\n// react HOC to provide a NetworkTestContainer to a component\nexport function withNetworkTestContainer<\n T extends NetworkTestContainerProps = NetworkTestContainerProps\n>(WrappedComponent: React.ComponentType<T>) {\n return (props: Omit<T, keyof NetworkTestContainerProps>) => {\n const { model, status, KosModelLoader } = useNetworkTestContainer();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} networkTestContainer={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n NutritiveSweetener,\n NutritiveSweetenerModel,\n} from \"@kosdev-code/kos-ddk-models\";\n\nexport const useNutritiveSweetener = () => {\n const modelId = NutritiveSweetener.type;\n const result = useKosModel<NutritiveSweetenerModel>({\n modelId,\n modelType: NutritiveSweetener.type,\n options: {},\n });\n\n return result;\n};\n","import { NutritiveSweetenerModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useNutritiveSweetener } from \"./use-nutritive-sweetener\";\n\ninterface NutritiveSweetenerProps {\n nutritiveSweetener: NutritiveSweetenerModel;\n}\n// react HOC to provide a NutritiveSweetener to a component\nexport function withNutritiveSweetener<\n T extends NutritiveSweetenerProps = NutritiveSweetenerProps\n>(WrappedComponent: React.ComponentType<T>) {\n return (props: Omit<T, keyof NutritiveSweetenerProps>) => {\n const { model, status, KosModelLoader } = useNutritiveSweetener();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} nutritiveSweetener={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { PlainWater } from \"@kosdev-code/kos-ddk-models\";\nimport type { PlainWaterModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const usePlainWater = () => {\n const modelId = PlainWater.type;\n const result = useKosModel<PlainWaterModel>({\n modelId,\n modelType: PlainWater.type,\n options: {},\n destroyOnUnmount: true,\n });\n\n return result;\n};\n","import { PlainWaterModel } from \"@kosdev-code/kos-ddk-models\";\nimport { usePlainWater } from \"./use-plain-water\";\n\nexport interface PlainWaterProps {\n plainWater: PlainWaterModel;\n}\n// react HOC to provide a PlainWater to a component\nexport function withPlainWater<T extends PlainWaterProps = PlainWaterProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (props: Omit<T, keyof PlainWaterProps>) => {\n const { model, status, KosModelLoader } = usePlainWater();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} plainWater={model} />\n </KosModelLoader>\n );\n };\n}\n","import type { PumpModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n CgpPump,\n FcmPump,\n LfcvPump,\n SpmPump,\n} from \"@kosdev-code/kos-freestyle-sdk\";\n\nexport const pumpTypeFactory = (pumpModel: PumpModel) => {\n switch (pumpModel.type) {\n case \"fcm\":\n return FcmPump.type;\n case \"lfcv\":\n return LfcvPump.type;\n case \"micro\":\n return SpmPump.type;\n case \"cgp\":\n return CgpPump.type;\n default:\n return undefined;\n }\n};\n","import { registerExtensionPoint } from \"@kosdev-code/kos-ui-sdk\";\n\nexport const EXTENSION_PLUGIN_VISIBILITY = \"pluginVisibility\";\nexport type PluginVisibilityMapper = <\n T extends Record<string, any> = Record<string, any>\n>(\n id: string,\n context?: T\n) => boolean;\nconst visibilityMappers = new Map<string, PluginVisibilityMapper[]>();\nregisterExtensionPoint(EXTENSION_PLUGIN_VISIBILITY, {\n register: (id: string, mapper: PluginVisibilityMapper) => {\n if (!visibilityMappers.has(id)) {\n visibilityMappers.set(id, []);\n }\n visibilityMappers.get(id)?.push(mapper);\n },\n execute: (id: string, pluginId: string, context?: any) => {\n const mapper = visibilityMappers.get(id);\n if (!mapper) {\n return true;\n }\n const results = mapper.map((m) => m(pluginId, context));\n\n if (results.length === 0) {\n return true;\n }\n return !results.includes(false);\n },\n});\n","import { DispenseExtensionManager } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n CoreExtensionManager,\n ExtensionManager,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n EXTENSION_PLUGIN_VISIBILITY,\n type PluginVisibilityMapper,\n} from \"./plugin-visibility-extension\";\n\nexport class PluginExtensionManager {\n core: CoreExtensionManager;\n dispense: DispenseExtensionManager;\n constructor(core: CoreExtensionManager, dispense: DispenseExtensionManager) {\n this.core = core;\n this.dispense = dispense;\n }\n\n /**\n * Registers a plugin visibility filter\n * */\n registerDashboardVisibilityFilter(props: PluginVisibilityMapper) {\n ExtensionManager[EXTENSION_PLUGIN_VISIBILITY].register(\n EXTENSION_PLUGIN_VISIBILITY,\n props\n );\n\n return this;\n }\n\n registerNavVisibilityFilter(props: PluginVisibilityMapper) {\n ExtensionManager[EXTENSION_PLUGIN_VISIBILITY].register(\n EXTENSION_PLUGIN_VISIBILITY,\n props\n );\n\n return this;\n }\n}\n/**\n * The KosExtensionManager provides access to the extension points that are provided in the SDK for Dispense applications.\n *\n * The extension points are divided into two categories:\n *\n * @param core - The core extension {@link CoreExtensionManager} points are used to extend the base models that are provided by the SDK.\n * @param dispense - The dispense extension {@link DispenseExtensionManager} points are used to extend the models that are specific to the Dispense SDK.\n */\nexport class KosPluginExtensionManager {\n dispense: DispenseExtensionManager;\n core: CoreExtensionManager;\n plugin: PluginExtensionManager;\n constructor() {\n this.dispense = new DispenseExtensionManager();\n this.core = new CoreExtensionManager();\n this.plugin = new PluginExtensionManager(this.core, this.dispense);\n }\n}\n","/**\n * Extension Point IDs for JSON-defined extension points\n *\n * These constants provide type-safe references to JSON-defined extension points\n * and can be used anywhere the extension point ID is needed.\n */\n\nexport const EXTENSION_POINT_IDS = {\n /** Utilities extension point for DDK applications */\n UTILITIES: \"ddk.ncui.utilities\",\n} as const;\n\n// Export individual constants for convenience\nexport const UTILITIES_EXTENSION_ID = EXTENSION_POINT_IDS.UTILITIES;\n","// Import extension point ID for JSON-defined extension point\nimport {\n CuiExtension,\n DashboardDetailExtension,\n DashboardMacroSummaryExtension,\n DashboardPumpDetailExtension,\n DashboardSummaryExtension,\n NavViewExtension,\n SetupExtension,\n TroubleActionExtension,\n // UtilitiesExtension, // Now defined in JSON\n ViewExtension,\n} from \"../../../extensions\";\nimport { UTILITIES_EXTENSION_ID } from \"../constants/extension-points\";\n\n// UtilitiesExtension is now defined in .kos.json and registered automatically\n\n// Explicitly register the dashboard summary extension point\nDashboardSummaryExtension.register();\n\n// Explicitly register the dashboard detail extension point\nDashboardDetailExtension.register();\n\n// Explicitly register the dashboard pump detail extension point\nDashboardPumpDetailExtension.register();\n\n// Explicitly register the dashboard macro summary extension point\nDashboardMacroSummaryExtension.register();\n\n// Explicitly register the CUI extension point\nCuiExtension.register();\n\n// Explicitly register the NavView extension point\nNavViewExtension.register();\n\n// Explicitly register the Setup extension point\nSetupExtension.register();\n\n// Explicitly register the Trouble Action extension point\nTroubleActionExtension.register();\n\n// Explicitly register the View extension point\nViewExtension.register();\n\nconsole.log(`JSON-defined UtilitiesExtension ID:`, UTILITIES_EXTENSION_ID);\nconsole.log(\n `Registered DashboardSummaryExtension:`,\n DashboardSummaryExtension.id\n);\nconsole.log(\n `Registered DashboardDetailExtension:`,\n DashboardDetailExtension.id\n);\nconsole.log(\n `Registered DashboardPumpDetailExtension:`,\n DashboardPumpDetailExtension.id\n);\nconsole.log(\n `Registered DashboardMacroSummaryExtension:`,\n DashboardMacroSummaryExtension.id\n);\nconsole.log(`Registered CuiExtension:`, CuiExtension.id);\nconsole.log(`Registered NavViewExtension:`, NavViewExtension.id);\nconsole.log(`Registered SetupExtension:`, SetupExtension.id);\nconsole.log(`Registered TroubleActionExtension:`, TroubleActionExtension.id);\nconsole.log(`Registered ViewExtension:`, ViewExtension.id);\n","// Import DDK extension points FIRST - before any other initialization\nimport \"./extensions\";\n\nimport {\n AgitationControl,\n Application,\n CopyLogs,\n DDKModels,\n Door,\n Lockout,\n TroubleActionManager,\n} from \"@kosdev-code/kos-ddk-models\";\nimport {\n Assembly,\n Pump,\n type AssemblyModel,\n type HolderModel,\n} from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n Device,\n ExtensionManager,\n getKosCompanionModel,\n KosFeatureFlags,\n registerLegacyModel,\n TroubleContainer,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nimport {\n CarbAgitator,\n FreestyleAssembly,\n KosExtensionManager,\n KosModelRegistry,\n type FreestyleAssemblyModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\n\nimport { initKosProvider } from \"@kosdev-code/kos-ui-sdk\";\nimport { pumpTypeFactory } from \"../companion-utils\";\nimport { KosPluginExtensionManager } from \"../extension-utils\";\n\nexport const initDDKRegistration = () => {\n KosModelRegistry.freestyle\n .models()\n .model(Lockout)\n .model(Device)\n .model(TroubleActionManager)\n .model(CopyLogs)\n .model(Door)\n .model(AgitationControl)\n .companion(Assembly.type, () => {\n if (KosFeatureFlags.isFeatureEnabled(\"carbTank\")) {\n return CarbAgitator.type;\n }\n return undefined;\n })\n .companion(Pump.type, pumpTypeFactory)\n .companion(TroubleContainer.type, AgitationControl.type)\n .preload(Application.type);\n\n Object.keys(DDKModels).forEach((key) => {\n const model = DDKModels[key];\n registerLegacyModel(KosModelRegistry)(key, model);\n });\n\n const ext = new KosExtensionManager();\n ext.freestyle.initializeFreestyleExtension();\n\n const { KosCoreContextProvider } = initKosProvider();\n\n const DEFAULT_DASHBOARD_KEY_FACTORY = {\n rank: 999,\n factory: (holder: HolderModel) => holder.pumps.data[0]?.type,\n };\n ExtensionManager.registerDashboardKeyFactory(DEFAULT_DASHBOARD_KEY_FACTORY);\n\n // This is used to determine if we should display a navigation item for\n // ice-settings...\n interface IcePluginVisibilityMapperContext {\n assembly?: AssemblyModel;\n }\n\n const icePluginVisibilityMapper = (\n id: string,\n context?: IcePluginVisibilityMapperContext\n ) => {\n // Todo: determine the ice settings ID to key off of...\n // If we're not an ice view, return true...\n if (id !== \"settings.ice\") return true;\n\n // If we don't have context here, we can't decide if we should show or hide\n // things, so lets show things by default...\n if (!context) return true;\n\n // We pass down the assembly as context from the NavListView component.\n // Check the assembly to see if we have ice availability, if so, return\n // true!\n\n const { assembly } = context;\n\n // Todo - implement if the assembly has ice availability:\n // - assembly.hasIceAvailability...\n if (!assembly?.supportsIce) {\n return false;\n }\n\n return true;\n };\n\n interface RemoteNNSPluginVisibilityMapperContext {\n assembly?: AssemblyModel;\n }\n\n const remoteNNSVisibilityMapper = (\n id: string,\n context?: RemoteNNSPluginVisibilityMapperContext\n ) => {\n if (id !== \"settings.remoteNNS\" && id !== \"dashboard.remoteNNS\")\n return true;\n if (!context) return true;\n\n const { assembly } = context;\n\n if (!assembly) return true;\n\n const freestyleAssembly = getKosCompanionModel<FreestyleAssemblyModel>(\n assembly,\n FreestyleAssembly.type\n );\n\n return !!freestyleAssembly?.supportsRemoteTrays;\n };\n\n const kosPluginExtensionManager = new KosPluginExtensionManager();\n kosPluginExtensionManager.plugin\n .registerNavVisibilityFilter(icePluginVisibilityMapper)\n .registerNavVisibilityFilter(remoteNNSVisibilityMapper);\n\n return { KosCoreContextProvider };\n};\n","import type { TroubleModel } from \"@kosdev-code/kos-ui-sdk\";\n\nexport const troubleLabelFactory = (trouble?: TroubleModel) =>\n trouble\n ? troubleLabelByType(trouble.type)\n : {\n action: \"\",\n label: \"\",\n progress: \"\",\n summary: \"\",\n };\n\nexport const troubleLabelByType = (type: string) => {\n const key = `troubles:troubles.${type}`;\n return {\n action: `${key}.action`,\n label: `${key}.label`,\n progress: `${key}.progress`,\n summary: `${key}.summary`,\n };\n};\n","import { useReactiveExtensionRegistry } from \"@kosdev-code/kos-ui-plugin\";\nimport { ExtensionManager } from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useEffect, useState } from \"react\";\nimport { EXTENSION_PLUGIN_VISIBILITY } from \"../../utils\";\n\nexport const usePluginExtensions = <\n T extends Record<string, any> = Record<string, any>\n>(\n context?: T\n) => {\n // Access the registry directly instead of subscribing to a specific extension point\n const registry = useReactiveExtensionRegistry();\n\n // Track which extension points we care about and force re-render when they change\n const [, forceUpdate] = useState({});\n const [trackedExtensionPoints] = useState<Set<string>>(new Set());\n\n useEffect(() => {\n // Subscribe to all tracked extension points\n const unsubscribers: (() => void)[] = [];\n\n trackedExtensionPoints.forEach((extensionPointId) => {\n const unsubscribe = registry.subscribe(extensionPointId, () => {\n // Force re-render when any tracked extension point changes\n forceUpdate({});\n });\n unsubscribers.push(unsubscribe);\n });\n\n return () => {\n unsubscribers.forEach((unsub) => unsub());\n };\n }, [registry, trackedExtensionPoints]);\n\n const getExtensions = useCallback(\n (extensionPointId: string) => {\n // Track this extension point for reactivity (only adds if not already tracked)\n trackedExtensionPoints.add(extensionPointId);\n\n // Get extensions - they're already filtered by enabled state\n const extensionData = Object.values(\n registry.getExtensions(extensionPointId, false)\n );\n\n // Apply visibility filtering\n const filtered = extensionData.filter((plugin) => {\n const extensionId = plugin.id;\n const visible = ExtensionManager[EXTENSION_PLUGIN_VISIBILITY].execute(\n EXTENSION_PLUGIN_VISIBILITY,\n extensionId,\n context\n );\n return visible;\n });\n return filtered;\n },\n [registry, context, trackedExtensionPoints]\n );\n\n return {\n getExtensions,\n };\n};\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { Reboot, RebootModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useReboot = () => {\n const modelId = Reboot.type;\n const result = useKosModel<RebootModel>({\n modelId,\n modelType: Reboot.type,\n options: {},\n });\n\n return result;\n};\n","import { RebootModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useReboot } from \"./use-reboot\";\n\ninterface RebootProps {\n reboot: RebootModel;\n}\n// react HOC to provide a Reboot to a component\nexport function withReboot<T extends RebootProps = RebootProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return () => (props: Omit<T, keyof RebootProps>) => {\n const { model, status, KosModelLoader } = useReboot();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} reboot={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { Settings, SettingsModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useSettings = () => {\n const modelId = Settings.type;\n const result = useKosModel<SettingsModel>({\n modelId,\n modelType: Settings.type,\n options: {},\n });\n\n return result;\n};\n","import { SettingsModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useSettings } from \"./use-settings\";\n\nexport interface SettingsProps {\n settings: SettingsModel;\n}\n\nexport function withSettings<T extends SettingsProps = SettingsProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (props: Omit<T, keyof SettingsProps>) => {\n const { model, status, KosModelLoader } = useSettings();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} settings={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { SetupStep, SetupStepModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useSetupStep = (id: string) => {\n const modelId = id;\n const result = useKosModel<SetupStepModel>({\n modelId,\n modelType: SetupStep.type,\n options: {},\n });\n\n return result;\n};\n","import { SetupStepModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useSetupStep } from \"./use-setup-step\";\n\ninterface SetupStepProps {\n setupStep: SetupStepModel;\n}\n// react HOC to provide a SetupStep to a component\nexport function withSetupStep<T extends SetupStepProps = SetupStepProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (id: string) => (props: Omit<T, keyof SetupStepProps>) => {\n const { model, status, KosModelLoader } = useSetupStep(id);\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} setupStep={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n SetupStepContainer,\n SetupStepContainerModel,\n} from \"@kosdev-code/kos-ddk-models\";\n\nexport const useSetupStepContainer = () => {\n const modelId = SetupStepContainer.type;\n const result = useKosModel<SetupStepContainerModel>({\n modelId,\n modelType: SetupStepContainer.type,\n options: {},\n });\n\n return result;\n};\n","import { SetupStepContainerModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useSetupStepContainer } from \"./use-setup-step-container\";\n\nexport interface SetupStepContainerProps {\n setupStepContainer: SetupStepContainerModel;\n}\n// react HOC to provide a SetupStepContainer to a component\nexport function withSetupStepContainer<\n T extends SetupStepContainerProps = SetupStepContainerProps\n>(WrappedComponent: React.ComponentType<T>) {\n return (props: Omit<T, keyof SetupStepContainerProps>) => {\n const { model, status, KosModelLoader } = useSetupStepContainer();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} setupStepContainer={model} />\n </KosModelLoader>\n );\n };\n}\n","/**\n * (C) Copyright 2025, TCCC, All rights reserved.\n */\n\nimport type {\n IntentAware,\n IntentContainer,\n} from \"@kosdev-code/kos-dispense-sdk\";\nimport { useEffect, useState } from \"react\";\nimport { usePumpAction } from \"../actions\";\n\n/**\n * Combined interface representing a model that supports both intent operations\n * and intent volume resolution for calibration purposes.\n *\n * This interface combines {@link IntentAware} for executing intents with\n * {@link IntentContainer} for resolving appropriate volumes, enabling complete\n * calibration workflows that determine the correct volume and execute the operation.\n *\n * @category Hooks - Calibration\n * @see {@link IntentAware} for intent execution capabilities\n * @see {@link IntentContainer} for volume resolution capabilities\n */\nexport type IntentAwareContainer = IntentAware & IntentContainer;\n\n/**\n * React hook for managing pump calibration operations and state.\n *\n * This hook retrieves the calibration volume from the device, tracks whether\n * calibration is possible, and provides an action handler for triggering\n * calibration operations. It combines volume resolution with the pump action\n * pattern for a complete calibration workflow.\n *\n * The hook automatically:\n * - Resolves the appropriate calibration volume from the device based on ingredient type\n * - Updates the volume when the ingredient assignment changes\n * - Tracks calibration readiness state (requires volume > 0 and assigned ingredient)\n * - Provides action handlers integrated with the KOS Future system for progress tracking\n *\n * @param intentContainer - Optional model implementing {@link IntentAware} and {@link IntentContainer}\n * interfaces, typically a holder or pump model. When undefined, the hook\n * returns safe defaults (undefined volume, cannot calibrate).\n *\n * @returns Object containing calibration state and handlers:\n * - `calibrateVolume`: Resolved calibration volume in oz (rounded to integer), or undefined if not yet resolved\n * - `canCalibrate`: Boolean indicating if calibration is ready (volume > 0 and ingredient assigned)\n * - `action`: Current {@link IntentAwareAction} instance or null (for progress tracking)\n * - `handleAction`: Function to trigger pump actions including calibration (accepts {@link PumpAction} type strings)\n *\n * @example\n * Basic calibration button with volume display:\n * ```tsx\n * import { usePumpCalibration } from '@kosdev-code/kos-ddk-model-components';\n *\n * function PumpCard({ holder }: { holder: HolderModel }) {\n * const { calibrateVolume, canCalibrate, action, handleAction } =\n * usePumpCalibration(holder);\n *\n * return (\n * <div>\n * <button\n * disabled={!canCalibrate}\n * onPointerDown={() => handleAction(\"calibrate\")}\n * >\n * Calibrate {canCalibrate && `(${calibrateVolume} oz)`}\n * </button>\n * {action && <FutureProgressBar {...action} />}\n * </div>\n * );\n * }\n * ```\n *\n * @example\n * Handling optional holder (graceful degradation):\n * ```tsx\n * function PumpControls({ holder }: { holder?: HolderModel }) {\n * const { calibrateVolume, canCalibrate, handleAction } =\n * usePumpCalibration(holder);\n *\n * // Hook safely handles undefined holder\n * if (!holder) return <div>No pump selected</div>;\n *\n * return (\n * <button disabled={!canCalibrate} onClick={() => handleAction(\"calibrate\")}>\n * Calibrate ({calibrateVolume ?? '...'} oz)\n * </button>\n * );\n * }\n * ```\n *\n * @category Hooks - Calibration\n * @see {@link usePumpAction} for the underlying action handler\n * @see {@link IntentAware} for intent operation interface\n * @see {@link IntentContainer} for volume resolution interface\n * @see {@link IntentAwareAction} for action execution and progress tracking\n */\nexport const usePumpCalibration = (intentContainer?: IntentAwareContainer) => {\n const [calibrateVolume, setCalibrateVolume] = useState<number | undefined>();\n const [action, handleAction] = usePumpAction(intentContainer);\n const canCalibrate = calibrateVolume && calibrateVolume > 0;\n useEffect(() => {\n async function updateVolume() {\n if (intentContainer?.ingredientId !== undefined) {\n const response = await intentContainer?.resolveIntentVolume(\n \"CALIBRATE\"\n );\n setCalibrateVolume(Math.round(response.volume));\n }\n }\n updateVolume();\n }, [intentContainer, intentContainer?.ingredientId]);\n return { calibrateVolume, canCalibrate, action, handleAction };\n};\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { Start, StartModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useStart = () => {\n const modelId = Start.type;\n const result = useKosModel<StartModel>({\n modelId,\n modelType: Start.type,\n options: {},\n });\n\n return result;\n};\n","import { StartModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useStart } from \"./use-start\";\n\ninterface StartProps {\n start: StartModel;\n}\n\ntype HoCStartProps = StartProps;\n// react HOC to provide a Start to a component\nexport function withStart<T extends HoCStartProps = HoCStartProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (props: Omit<T, keyof StartProps>) => {\n const { model, status, KosModelLoader } = useStart();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} start={model} />\n </KosModelLoader>\n );\n };\n}\n","import {\n TroubleActionManager,\n type TroubleActionManagerModel,\n type TroubleActionManagerOptions,\n} from \"@kosdev-code/kos-ddk-models\";\nimport { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { TroubleActionExtension } from \"../../extensions\";\nimport { usePluginExtensions } from \"../plugin-extensions\";\n\nexport const useTroubleActionState = () => {\n const modelId = TroubleActionManager.type;\n const { getExtensions } = usePluginExtensions();\n\n const troubleActionExtensions = getExtensions(TroubleActionExtension.id).map(\n (ext) => ext.data as any\n );\n const result = useKosModel<\n TroubleActionManagerModel,\n TroubleActionManagerOptions\n >({\n modelId,\n modelType: TroubleActionManager.type,\n options: {\n definitions: troubleActionExtensions,\n },\n });\n\n return result;\n};\n","import { TroubleActionManagerModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useTroubleActionState } from \"./use-trouble-action\";\n\ninterface TroubleActionProps {\n troubleAction: TroubleActionManagerModel;\n}\n\ntype HoCTroubleActionProps = TroubleActionProps;\n// react HOC to provide a TroubleAction to a component\nexport function withTroubleAction<\n T extends HoCTroubleActionProps = HoCTroubleActionProps\n>(WrappedComponent: React.ComponentType<T>) {\n return (props: Omit<T, keyof TroubleActionProps>) => {\n const { model, status, KosModelLoader } = useTroubleActionState();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} troubleAction={model} />\n </KosModelLoader>\n );\n };\n}\n","import { troubleDataFactory, type TroubleModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { useEffect, useState } from \"react\";\n\nexport const useTroubleData = (trouble?: TroubleModel) => {\n const [data, setData] = useState<Record<string, any>>({});\n\n useEffect(() => {\n async function fetchData() {\n if (trouble) {\n const data = await troubleDataFactory(trouble);\n setData(data);\n }\n }\n fetchData();\n }, [trouble]);\n\n return data;\n};\n","import { isTroubleAware, type IKosDataModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { useVisibleTroubles } from \"../../components\";\n\nconst isLightColor = (color?: string) => !color || color === \"white\";\nconst getFontColor = (lightBackground: boolean) =>\n lightBackground ? undefined : \"white\";\n\n/**\n * Hook for applying visual decorations based on trouble states in KOS models.\n *\n * This hook analyzes trouble states associated with a KOS data model and returns\n * styling properties that can be applied to UI components to visually indicate\n * trouble severity and status. It automatically determines appropriate background\n * and text colors based on the highest priority trouble.\n *\n * @category Hooks\n * @subcategory Trouble Management\n *\n * @param model - The KOS data model to check for troubles. Must implement IKosDataModel.\n * If the model is not trouble-aware, an empty object is returned.\n *\n * @returns An object containing styling and trouble information:\n * - `backgroundColor` - The background color derived from the highest priority trouble\n * - `fontColor` - Appropriate text color (white for dark backgrounds, undefined for light)\n * - `highestTrouble` - Reference to the highest priority trouble model\n * - `initialized` - Whether trouble data has been initialized\n * - `troubleCount` - Total number of visible troubles\n * - `hasTroubles` - Boolean indicating if any troubles exist\n *\n * @example\n * ```tsx\n * // Basic usage in a component\n * const MyComponent = ({ model }) => {\n * const { backgroundColor, fontColor, hasTroubles } = useTroubleDecoration(model);\n *\n * return (\n * <div style={{ backgroundColor, color: fontColor }}>\n * {hasTroubles && <TroubleIndicator />}\n * <span>Component content</span>\n * </div>\n * );\n * };\n * ```\n *\n * @example\n * ```tsx\n * // Using trouble count for badges\n * const TroubleCard = ({ dataModel }) => {\n * const {\n * backgroundColor,\n * fontColor,\n * troubleCount,\n * highestTrouble\n * } = useTroubleDecoration(dataModel);\n *\n * return (\n * <Card style={{ borderColor: backgroundColor }}>\n * {troubleCount > 0 && (\n * <Badge color={backgroundColor} textColor={fontColor}>\n * {troubleCount} issue{troubleCount > 1 ? 's' : ''}\n * </Badge>\n * )}\n * {highestTrouble && (\n * <TroubleDetails trouble={highestTrouble} />\n * )}\n * </Card>\n * );\n * };\n * ```\n *\n * @example\n * ```tsx\n * // Conditional rendering based on initialization\n * const SafeTroubleDisplay = ({ model }) => {\n * const { initialized, hasTroubles, backgroundColor } = useTroubleDecoration(model);\n *\n * if (!initialized) {\n * return <LoadingSpinner />;\n * }\n *\n * if (!hasTroubles) {\n * return <SuccessMessage>No issues detected</SuccessMessage>;\n * }\n *\n * return (\n * <Alert severity=\"warning\" style={{ backgroundColor }}>\n * Issues detected - check system status\n * </Alert>\n * );\n * };\n * ```\n *\n * @remarks\n * - This hook only works with trouble-aware models (models that implement the TroubleAware interface)\n * - Colors are automatically adjusted for accessibility (dark text on light backgrounds, light text on dark)\n * - The hook respects role-based visibility filters applied by useVisibleTroubles\n * - Re-renders automatically when trouble states change due to the underlying kosAutoEffect\n *\n * @see {@link useVisibleTroubles} - For accessing the filtered trouble list directly\n * @see {@link isTroubleAware} - For checking if a model supports trouble tracking\n */\nexport const useTroubleDecoration = (\n model?: IKosDataModel\n): {\n /** Background color derived from the highest priority trouble, undefined if no troubles */\n backgroundColor?: string;\n /** Text color optimized for contrast against backgroundColor (white for dark backgrounds) */\n fontColor?: string;\n /** Reference to the highest priority trouble model instance */\n highestTrouble?: any;\n /** Whether trouble data has been loaded and initialized */\n initialized?: boolean;\n /** Total count of visible troubles after role-based filtering */\n troubleCount?: number;\n /** Boolean flag indicating if any troubles are present */\n hasTroubles?: boolean;\n} => {\n if (!isTroubleAware(model)) {\n return {};\n }\n const troubleAware = model;\n const { visibleTroubles, initialized } = useVisibleTroubles(troubleAware);\n const troubleCount = visibleTroubles?.length ?? 0;\n const troubleModel = visibleTroubles?.[0];\n const hasTroubles = troubleCount > 0;\n\n const backgroundColor = hasTroubles ? `${troubleModel?.color}` : undefined;\n const isLight = isLightColor(backgroundColor);\n const fontColor = hasTroubles ? getFontColor(isLight) : undefined;\n\n return {\n backgroundColor,\n fontColor,\n highestTrouble: troubleModel,\n initialized,\n troubleCount,\n hasTroubles,\n };\n};\n","import type { TroubleModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n kosAutoEffect,\n useTroubleContainerModel,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useEffect, useState } from \"react\";\n\ninterface Props {\n troubleType?: string;\n condition?: (trouble: TroubleModel) => boolean;\n}\n\ntype TroubleVisibility = [boolean, TroubleModel | undefined, TroubleModel[]];\nexport const useTroubleVisibility = ({\n troubleType,\n condition,\n}: Props): TroubleVisibility => {\n const { model } = useTroubleContainerModel();\n const [active, setActive] = useState<boolean>(false);\n const [troubles, setTroubles] = useState<TroubleModel[]>([]);\n useEffect(() => {\n const disposer = kosAutoEffect(() => {\n const troublesByType =\n (troubleType\n ? model?.troubles.getIndexByKey(\"byType\", troubleType)\n : model?.troubles.data) || [];\n const activeTroubles = condition\n ? troublesByType.filter(condition)\n : troublesByType;\n setActive(activeTroubles.length > 0);\n setTroubles(activeTroubles);\n });\n return disposer;\n }, [condition, model, troubleType]);\n\n return [active, troubles.length > 0 ? troubles[0] : undefined, troubles];\n};\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { Utilities, UtilitiesModel } from \"@kosdev-code/kos-ddk-models\";\n\nexport const useUtilities = (id: string) => {\n const modelId = id;\n const result = useKosModel<UtilitiesModel>({\n modelId,\n modelType: Utilities.type,\n options: {},\n });\n\n return result;\n};\n","import { UtilitiesModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useUtilities } from \"./use-utilities\";\n\ninterface UtilitiesProps {\n utilities: UtilitiesModel;\n}\n// react HOC to provide a Utilities to a component\nexport function withUtilities<T extends UtilitiesProps = UtilitiesProps>(\n WrappedComponent: React.ComponentType<T>\n) {\n return (id: string) => (props: Omit<T, keyof UtilitiesProps>) => {\n const { model, status, KosModelLoader } = useUtilities(id);\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} utilities={model} />\n </KosModelLoader>\n );\n };\n}\n","import { useKosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n UtilitiesContainer,\n UtilitiesContainerModel,\n} from \"@kosdev-code/kos-ddk-models\";\n\nexport const useUtilitiesContainer = () => {\n const modelId = UtilitiesContainer.type;\n const result = useKosModel<UtilitiesContainerModel>({\n modelId,\n modelType: UtilitiesContainer.type,\n options: {},\n });\n\n return result;\n};\n","import { UtilitiesContainerModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useUtilitiesContainer } from \"./use-utilities-container\";\n\nexport interface UtilitiesContainerProps {\n utilitiesContainer: UtilitiesContainerModel;\n}\n// react HOC to provide a UtilitiesContainer to a component\nexport function withUtilitiesContainer<\n T extends UtilitiesContainerProps = UtilitiesContainerProps\n>(WrappedComponent: React.ComponentType<T>) {\n return (props: Omit<T, keyof UtilitiesContainerProps>) => {\n const { model, status, KosModelLoader } = useUtilitiesContainer();\n\n return (\n <KosModelLoader {...status}>\n <WrappedComponent {...(props as T)} utilitiesContainer={model} />\n </KosModelLoader>\n );\n };\n}\n","import { InfoCard } from \"@kosdev-code/kos-ddk-components\";\nimport type { DeviceModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n kosComponent,\n useKosTranslation,\n withDevice,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nexport interface DispenserSerialNumberProps {\n device: DeviceModel;\n}\n\nexport const DispenserSerialNumber = withDevice(\n kosComponent<DispenserSerialNumberProps>(({ device }) => {\n const { t } = useKosTranslation(\"dispenser-profile\");\n\n const unassigned = device.serialNumber === \"unassigned\";\n const serialNumber = unassigned ? undefined : device.serialNumber;\n\n return <InfoCard label={t(\"dispenser-serial\")} value={serialNumber} />;\n })\n);\n","import { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { DispenserInfoProps, withDispenserInfo } from \"../../hooks\";\nimport { ConfigPropInfoCard } from \"../config-prop-info-card\";\nimport { DispenserSerialNumber } from \"../dispenser-serial-number\";\n\nexport const DispenserInfoSettings = withDispenserInfo(\n kosComponent<DispenserInfoProps>(({ dispenserInfo }) => {\n const { t } = useKosTranslation(\"dispenser-profile\");\n return (\n <>\n <ConfigPropInfoCard\n label={t(\"dispenser-name\", \"Dispenser Name\")}\n configProperty={dispenserInfo.name}\n />\n <DispenserSerialNumber />\n </>\n );\n })\n);\n","import { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n SettingsProps,\n withSettings,\n} from \"../../hooks/settings/with-settings\";\nimport { ConfigPropInputCard } from \"../config-prop-input-card\";\nimport { ConfigPropTimePickerCard } from \"../config-prop-time-picker-card\";\n\nexport const DispenserSettings = withSettings(\n kosComponent<SettingsProps>(({ settings }) => {\n const { t } = useKosTranslation(\"dispenser-profile\");\n\n const isValid = (inputValue?: string) => {\n if (inputValue && inputValue.length >= 25)\n return \"The name shouldn’t exceed 25 characters.\";\n\n return undefined;\n };\n\n return (\n <>\n <ConfigPropInputCard\n closeButtonLabel={t(\"close\", \"Close\") || undefined}\n configProperty={settings?.name}\n isValid={isValid}\n label={t(\"dispenser-name\", \"Dispenser Name\")}\n layout=\"alphanumeric\"\n maxLength={25}\n />\n\n <ConfigPropTimePickerCard\n label={t(\"activate-and-reboot-time\")}\n configProperty={settings.activateAndRebootTime}\n />\n </>\n );\n })\n);\n","import styled from \"@emotion/styled\";\nimport { LabelDate } from \"@kosdev-code/kos-ddk-components\";\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n useFormattedDate,\n useKosRegions,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\n\ntype Size = \"small\" | \"standard\";\n\nconst LabelSmall = styled(LabelDate)`\n color: var(--ddk-generic-color-grey-60);\n font-size: var(--ddk-component-enjoy-by-font-size-small);\n font-weight: var(--ddk-component-enjoy-by-font-weight-small);\n`;\n\nconst EnjoyByWarningLabelDate = styled(LabelDate)`\n color: var(--ddk-component-dashboard-enjoy-by-trouble-warning-color);\n`;\n\nconst EnjoyByWarningLabelDateSmall = styled(LabelSmall)`\n color: var(--ddk-component-dashboard-enjoy-by-trouble-warning-color);\n`;\n\ninterface EnjoyByDateProps {\n holder: HolderModel;\n size?: Size;\n}\n\nexport const EnjoyByDate = ({ holder, size }: EnjoyByDateProps) => {\n const { t } = useKosTranslation(\"common\");\n const { regionModel } = useKosRegions();\n\n const hasEnjoyBy = !!holder.enjoyByDate;\n const enjoyBy = holder.enjoyByDate ?? new Date();\n\n const { formattedDate } = useFormattedDate({\n year: enjoyBy.getFullYear(),\n month: enjoyBy.getMonth(),\n day: enjoyBy.getDate(),\n formatString: regionModel?.selectedDateFormat || \"\",\n });\n\n const DateComponent = holder.hasEnjoyByWarning\n ? size === \"small\"\n ? EnjoyByWarningLabelDateSmall\n : EnjoyByWarningLabelDate\n : size === \"small\"\n ? LabelSmall\n : LabelDate;\n\n return (\n hasEnjoyBy && (\n <DateComponent>\n {t(\"enjoy-by\", { data: { date: formattedDate } })}\n </DateComponent>\n )\n );\n};\n","import styled from \"@emotion/styled\";\nimport {\n getItemData,\n LabelInformationExtraSmall,\n Table,\n type TableData,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { useBoardContainer } from \"@kosdev-code/kos-dispense-sdk\";\n\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\n\nconst BoardCellRenderer = ({ item, valueKey }) => {\n const { t } = useKosTranslation(\"hardware-info\");\n const { linked } = item;\n\n if (valueKey === \"link.serialNum\" && !linked) {\n return (\n <LabelInformationExtraSmall>\n {t(\"not-connected\")}\n </LabelInformationExtraSmall>\n );\n }\n\n const data = getItemData(item, valueKey);\n\n if (!data) return \"—\";\n\n return data;\n};\n\nconst HardwareTable = styled(Table)`\n & ul {\n list-style-type: none;\n margin: 0;\n padding: 0;\n }\n`;\n\nexport const HardwareInfo = kosComponent(() => {\n const { model: boardContainer } = useBoardContainer();\n const { t } = useKosTranslation(\"hardware-info\");\n\n const tableData: TableData[] =\n boardContainer?.boardList.map((data) => {\n return {\n ...data,\n link: {\n ...data.link,\n firmwareVersions:\n data.link?.firmwareVersions &&\n data.link.firmwareVersions.length > 0 ? (\n <ul>\n {data.link?.firmwareVersions?.map((firmwareVersion, index) => (\n <li key={index}>{firmwareVersion}</li>\n ))}\n </ul>\n ) : (\n \"—\"\n ),\n },\n };\n }) || [];\n\n return (\n boardContainer &&\n boardContainer.boardList && (\n <HardwareTable\n CellRenderer={BoardCellRenderer}\n data={tableData}\n dataKeys={[\n \"name\",\n \"type\",\n \"link.hardwareVersion\",\n \"link.serialNum\",\n \"link.firmwareVersions\",\n ]}\n headers={[\n t(\"name\"),\n t(\"type\"),\n t(\"revision\"),\n t(\"serial-number\"),\n t(\"firmware\"),\n ]}\n heading={t(\"tower\") || undefined}\n />\n )\n );\n});\n","import {\n TapAndHoldButton,\n type ButtonProps,\n type TapAndHoldButtonState,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { IntentAware } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosAutoEffect, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\ninterface HoldToPourButtonProps extends Omit<ButtonProps, \"children\"> {\n model: IntentAware;\n onPour?: () => void;\n onPourCancel?: () => void;\n}\n\nexport const HoldToPourButton = ({\n disabled,\n model,\n onPour,\n onPourCancel,\n ...props\n}: HoldToPourButtonProps) => {\n const { t } = useKosTranslation(\"common\");\n const [state, setState] = useState<TapAndHoldButtonState>(\n model.isPouring ? \"halt\" : \"idle\"\n );\n const holdingTimeout = useRef<NodeJS.Timeout | undefined>();\n const holding = useRef(false);\n const holdingTime = 250;\n\n useEffect(() => {\n const disposer = kosAutoEffect(() => {\n if (!model.isPouring) {\n holding.current = false;\n clearTimeout(holdingTimeout.current);\n holdingTimeout.current = undefined;\n setState(\"idle\");\n }\n });\n\n return disposer;\n }, [model]);\n\n useEffect(\n () =>\n // If the model changes, or if the component is unmounted, cancel the\n // pour...\n () => {\n if (model.isPouring) {\n model.cancelPour();\n }\n },\n [model]\n );\n\n const onPointerDown = useCallback(() => {\n if (!model) return;\n // If we're already pouring, we're in tap-to-pour mode and don't want to\n // start pouring again...\n if (disabled || model.isPouring) return;\n // Start pouring...\n model.performIntent(\"HOLD_TO_POUR\");\n // Set a timeout to occur after x milliseconds. If the timeout is fired,\n // treat the event as a hold-to-pour...\n holdingTimeout.current = setTimeout(() => {\n // Indicate that we're holding the button down...\n holding.current = true;\n // Stop storing the timeout instance...\n holdingTimeout.current = undefined;\n // Set the button display to run...\n setState(\"run\");\n }, holdingTime);\n }, [disabled, model]);\n\n const onPointerUp = useCallback(() => {\n if (!model) return;\n\n if (holding.current) {\n // If we've been holding the button down, when we release, cancel the\n // pour...\n model.cancelPour();\n // Indicate that we're no longer holding the button down...\n holding.current = false;\n // Set the button display to idle...\n setState(\"idle\");\n } else if (holdingTimeout.current) {\n // If we tapped the button, clear the timeout...\n clearTimeout(holdingTimeout.current);\n // Stop storing the timeout instance...\n holdingTimeout.current = undefined;\n // Set the button display to halt...\n setState(\"halt\");\n } else {\n // If we've pressed and released the button for a second time, cancel the\n // pour...\n if (model.isPouring) {\n model.cancelPour();\n // Set the button display to idle...\n setState(\"idle\");\n }\n }\n }, [model]);\n\n const onPointerOut = useCallback(() => {\n if (state === \"halt\") return;\n\n onPointerUp();\n }, [onPointerUp, state]);\n\n return (\n <TapAndHoldButton\n disabled={disabled}\n mode=\"primary\"\n onPointerCancel={onPointerUp}\n onPointerDown={onPointerDown}\n // onPointerLeave={onPointerUp}\n onPointerOut={onPointerOut}\n onPointerUp={onPointerUp}\n {...props}\n state={state}\n >\n {t(\n state === \"idle\"\n ? t(\"tapOrHoldToPour\")\n : state === \"run\"\n ? t(\"releaseToStop\")\n : t(\"stop\")\n )}\n </TapAndHoldButton>\n );\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useAnimation } from \"../../hooks/animation/use-animation\";\nimport { AnimationModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface AnimationType {\n model?: AnimationModel;\n}\nexport const AnimationContext = createContext<AnimationType | undefined>(\n undefined\n);\n\ninterface AnimationProviderProps {}\n\nexport const AnimationProvider: React.FunctionComponent<\n PropsWithChildren<AnimationProviderProps>\n> = ({ children }) => {\n const { model, ready } = useAnimation();\n const value: AnimationType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <AnimationContext.Provider value={value}>\n {children}\n </AnimationContext.Provider>\n );\n};\nexport const useAnimationContext = () => {\n const context = useContext(AnimationContext);\n if (!context) {\n throw new Error(\n \"useAnimationContext must be used within a AnimationProvider\"\n );\n }\n return context;\n};\n","import { useEffect, useState, type ReactNode } from \"react\";\nimport { AnimationProps, withAnimation } from \"../../hooks\";\nimport { kosAutoEffect } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n ComponentConfigurationProvider,\n type ComponentMode,\n type ModalMode,\n} from \"@kosdev-code/kos-ddk-components\";\n\ninterface AnimationOverrides {\n disableAll?: boolean;\n enableDial?: boolean;\n enableModal?: boolean;\n enableSideBar?: boolean;\n}\n\ninterface ApplicationComponentConfigurationProviderProps {\n children: ReactNode;\n componentModeOverride?: ComponentMode;\n modalModeOverride?: ModalMode;\n animationOverrides?: AnimationOverrides;\n}\n\nexport const ApplicationComponentConfigurationProvider = withAnimation<\n ApplicationComponentConfigurationProviderProps & AnimationProps\n>(\n ({\n animation,\n animationOverrides,\n children,\n componentModeOverride,\n modalModeOverride,\n }) => {\n const [enableDialAnimation, setEnableDialAnimation] = useState(true);\n const [enableModalAnimation, setEnableModalAnimation] = useState(true);\n const [enableSidebarAnimation, setEnableSidebarAnimation] = useState(true);\n\n useEffect(() => {\n const disposer = kosAutoEffect(() => {\n const enableDial =\n !!(\n !animationOverrides?.disableAll && animationOverrides?.enableDial\n ) && !!(!animation.disableAll.value && animation.enableDial.value);\n\n const enableModal =\n !!(\n !animationOverrides?.disableAll && animationOverrides?.enableModal\n ) && !!(!animation.disableAll.value && animation.enableModal.value);\n\n const enableSideBar =\n !!(\n !animationOverrides?.disableAll && animationOverrides?.enableSideBar\n ) && !!(!animation.disableAll.value && animation.enableSideBar.value);\n\n setEnableDialAnimation(enableDial);\n setEnableModalAnimation(enableModal);\n setEnableSidebarAnimation(enableSideBar);\n });\n\n return () => {\n disposer();\n };\n }, [\n animation,\n animationOverrides?.disableAll,\n animationOverrides?.enableDial,\n animationOverrides?.enableModal,\n animationOverrides?.enableSideBar,\n ]);\n\n return (\n <ComponentConfigurationProvider\n value={{\n componentModeOverride,\n enableDialAnimation: enableDialAnimation,\n enableModalAnimation: enableModalAnimation,\n enableSidebarAnimation: enableSidebarAnimation,\n modalModeOverride,\n }}\n >\n {children}\n </ComponentConfigurationProvider>\n );\n }\n);\n","import { ApplicationModel } from \"@kosdev-code/kos-ddk-models\";\nimport { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useApplication } from \"../../hooks/application/use-application\";\n\ninterface ApplicationType {\n model?: ApplicationModel;\n}\nexport const ApplicationContext = createContext<ApplicationType | undefined>(\n undefined\n);\n\ninterface ApplicationProviderProps {}\n\nexport const ApplicationProvider: React.FunctionComponent<\n PropsWithChildren<ApplicationProviderProps>\n> = ({ children }) => {\n const { model, ready } = useApplication();\n const value: ApplicationType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <ApplicationContext.Provider value={value}>\n {children}\n </ApplicationContext.Provider>\n );\n};\nexport const useApplicationContext = () => {\n const context = useContext(ApplicationContext);\n if (!context) {\n throw new Error(\n \"useApplicationContext must be used within a ApplicationProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useDashboardOperations } from \"../../hooks/dashboard-operations/use-dashboard-operations\";\nimport { DashboardOperationsModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface DashboardOperationsType {\n model?: DashboardOperationsModel;\n}\nexport const DashboardOperationsContext = createContext<\n DashboardOperationsType | undefined\n>(undefined);\n\ninterface DashboardOperationsProviderProps {}\n\nexport const DashboardOperationsProvider: React.FunctionComponent<\n PropsWithChildren<DashboardOperationsProviderProps>\n> = ({ children }) => {\n const { model, ready } = useDashboardOperations();\n const value: DashboardOperationsType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <DashboardOperationsContext.Provider value={value}>\n {children}\n </DashboardOperationsContext.Provider>\n );\n};\nexport const useDashboardOperationsContext = () => {\n const context = useContext(DashboardOperationsContext);\n if (!context) {\n throw new Error(\n \"useDashboardOperationsContext must be used within a DashboardOperationsProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useDispenserInfo } from \"../../hooks/dispenser-info/use-dispenser-info\";\nimport { DispenserInfoModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface DispenserInfoType {\n model?: DispenserInfoModel;\n}\nexport const DispenserInfoContext = createContext<\n DispenserInfoType | undefined\n>(undefined);\n\ninterface DispenserInfoProviderProps {\n id: string;\n}\n\nexport const DispenserInfoProvider: React.FunctionComponent<\n PropsWithChildren<DispenserInfoProviderProps>\n> = ({ children }) => {\n const { model, ready } = useDispenserInfo();\n const value: DispenserInfoType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <DispenserInfoContext.Provider value={value}>\n {children}\n </DispenserInfoContext.Provider>\n );\n};\nexport const useDispenserInfoContext = () => {\n const context = useContext(DispenserInfoContext);\n if (!context) {\n throw new Error(\n \"useDispenserInfoContext must be used within a DispenserInfoProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useIngredientSummary } from \"../../hooks/ingredient-summary/use-ingredient-summary\";\nimport { IngredientSummaryModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface IngredientSummaryType {\n model?: IngredientSummaryModel;\n}\nexport const IngredientSummaryContext = createContext<\n IngredientSummaryType | undefined\n>(undefined);\n\ninterface IngredientSummaryProviderProps {\n id: string;\n}\n\nexport const IngredientSummaryProvider: React.FunctionComponent<\n PropsWithChildren<IngredientSummaryProviderProps>\n> = ({ children }) => {\n const { model, ready } = useIngredientSummary();\n const value: IngredientSummaryType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <IngredientSummaryContext.Provider value={value}>\n {children}\n </IngredientSummaryContext.Provider>\n );\n};\nexport const useIngredientSummaryContext = () => {\n const context = useContext(IngredientSummaryContext);\n if (!context) {\n throw new Error(\n \"useIngredientSummaryContext must be used within a IngredientSummaryProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useMacroAssignment } from \"../../hooks/macro-assignment/use-macro-assignment\";\nimport { MacroAssignmentModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface MacroAssignmentType {\n model?: MacroAssignmentModel;\n}\nexport const MacroAssignmentContext = createContext<\n MacroAssignmentType | undefined\n>(undefined);\n\ninterface MacroAssignmentProviderProps {}\n\nexport const MacroAssignmentProvider: React.FunctionComponent<\n PropsWithChildren<MacroAssignmentProviderProps>\n> = ({ children }) => {\n const { model, ready } = useMacroAssignment();\n const value: MacroAssignmentType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <MacroAssignmentContext.Provider value={value}>\n {children}\n </MacroAssignmentContext.Provider>\n );\n};\nexport const useMacroAssignmentContext = () => {\n const context = useContext(MacroAssignmentContext);\n if (!context) {\n throw new Error(\n \"useMacroAssignmentContext must be used within a MacroAssignmentProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useNetworkTest } from \"../../hooks/network-test/use-network-test\";\nimport { NetworkTestModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface NetworkTestType {\n model?: NetworkTestModel;\n}\nexport const NetworkTestContext = createContext<NetworkTestType | undefined>(\n undefined\n);\n\ninterface NetworkTestProviderProps {\n id: string;\n}\n\nexport const NetworkTestProvider: React.FunctionComponent<\n PropsWithChildren<NetworkTestProviderProps>\n> = ({ children, id }) => {\n const { model, ready } = useNetworkTest(id);\n const value: NetworkTestType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <NetworkTestContext.Provider value={value}>\n {children}\n </NetworkTestContext.Provider>\n );\n};\nexport const useNetworkTestContext = () => {\n const context = useContext(NetworkTestContext);\n if (!context) {\n throw new Error(\n \"useNetworkTestContext must be used within a NetworkTestProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useNetworkTestContainer } from \"../../hooks/network-test-container/use-network-test-container\";\nimport { NetworkTestContainerModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface NetworkTestContainerType {\n model?: NetworkTestContainerModel;\n}\nexport const NetworkTestContainerContext = createContext<\n NetworkTestContainerType | undefined\n>(undefined);\n\ninterface NetworkTestContainerProviderProps {}\n\nexport const NetworkTestContainerProvider: React.FunctionComponent<\n PropsWithChildren<NetworkTestContainerProviderProps>\n> = ({ children }) => {\n const { model, ready } = useNetworkTestContainer();\n const value: NetworkTestContainerType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <NetworkTestContainerContext.Provider value={value}>\n {children}\n </NetworkTestContainerContext.Provider>\n );\n};\nexport const useNetworkTestContainerContext = () => {\n const context = useContext(NetworkTestContainerContext);\n if (!context) {\n throw new Error(\n \"useNetworkTestContainerContext must be used within a NetworkTestContainerProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useReboot } from \"../../hooks/reboot/use-reboot\";\nimport { RebootModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface RebootType {\n model?: RebootModel;\n}\nexport const RebootContext = createContext<RebootType | undefined>(undefined);\n\ninterface RebootProviderProps {\n id: string;\n}\n\nexport const RebootProvider: React.FunctionComponent<\n PropsWithChildren<RebootProviderProps>\n> = ({ children }) => {\n const { model, ready } = useReboot();\n const value: RebootType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <RebootContext.Provider value={value}>{children}</RebootContext.Provider>\n );\n};\nexport const useRebootContext = () => {\n const context = useContext(RebootContext);\n if (!context) {\n throw new Error(\"useRebootContext must be used within a RebootProvider\");\n }\n return context;\n};\n","import { SettingsModel } from \"@kosdev-code/kos-ddk-models\";\nimport { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useSettings } from \"../../hooks/settings/use-settings\";\n\ninterface SettingsType {\n model?: SettingsModel;\n}\nexport const SettingsContext = createContext<SettingsType | undefined>(\n undefined\n);\n\ninterface SettingsProviderProps {}\n\nexport const SettingsProvider: React.FunctionComponent<\n PropsWithChildren<SettingsProviderProps>\n> = ({ children }) => {\n const { model, ready } = useSettings();\n const value: SettingsType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <SettingsContext.Provider value={value}>\n {children}\n </SettingsContext.Provider>\n );\n};\nexport const useSettingsContext = () => {\n const context = useContext(SettingsContext);\n if (!context) {\n throw new Error(\n \"useSettingsContext must be used within a SettingsProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\n\nimport { SetupStepModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useSetupStep } from \"../../hooks/setup-step\";\n\ninterface SetupStepType {\n model?: SetupStepModel;\n}\nexport const SetupStepContext = createContext<SetupStepType | undefined>(\n undefined\n);\n\ninterface SetupStepProviderProps {\n id: string;\n}\n\nexport const SetupStepProvider: React.FunctionComponent<\n PropsWithChildren<SetupStepProviderProps>\n> = ({ children, id }) => {\n const { model, ready } = useSetupStep(id);\n const value: SetupStepType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <SetupStepContext.Provider value={value}>\n {children}\n </SetupStepContext.Provider>\n );\n};\nexport const useSetupStepContext = () => {\n const context = useContext(SetupStepContext);\n if (!context) {\n throw new Error(\n \"useSetupStepContext must be used within a SetupStepProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useSetupStepContainer } from \"../../hooks/setup-step-container/use-setup-step-container\";\nimport { SetupStepContainerModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface SetupStepContainerType {\n model?: SetupStepContainerModel;\n}\nexport const SetupStepContainerContext = createContext<\n SetupStepContainerType | undefined\n>(undefined);\n\ninterface SetupStepContainerProviderProps {}\n\nexport const SetupStepContainerProvider: React.FunctionComponent<\n PropsWithChildren<SetupStepContainerProviderProps>\n> = ({ children }) => {\n const { model, ready } = useSetupStepContainer();\n const value: SetupStepContainerType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <SetupStepContainerContext.Provider value={value}>\n {children}\n </SetupStepContainerContext.Provider>\n );\n};\nexport const useSetupStepContainerContext = () => {\n const context = useContext(SetupStepContainerContext);\n if (!context) {\n throw new Error(\n \"useSetupStepContainerContext must be used within a SetupStepContainerProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useUtilities } from \"../../hooks/utilities/use-utilities\";\nimport { UtilitiesModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface UtilitiesType {\n model?: UtilitiesModel;\n}\nexport const UtilitiesContext = createContext<UtilitiesType | undefined>(\n undefined\n);\n\ninterface UtilitiesProviderProps {\n id: string;\n}\n\nexport const UtilitiesProvider: React.FunctionComponent<\n PropsWithChildren<UtilitiesProviderProps>\n> = ({ children, id }) => {\n const { model, ready } = useUtilities(id);\n const value: UtilitiesType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <UtilitiesContext.Provider value={value}>\n {children}\n </UtilitiesContext.Provider>\n );\n};\nexport const useUtilitiesContext = () => {\n const context = useContext(UtilitiesContext);\n if (!context) {\n throw new Error(\n \"useUtilitiesContext must be used within a UtilitiesProvider\"\n );\n }\n return context;\n};\n","import { PropsWithChildren, createContext, useContext, useMemo } from \"react\";\nimport { useUtilitiesContainer } from \"../../hooks/utilities-container/use-utilities-container\";\nimport { UtilitiesContainerModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface UtilitiesContainerType {\n model?: UtilitiesContainerModel;\n}\nexport const UtilitiesContainerContext = createContext<\n UtilitiesContainerType | undefined\n>(undefined);\n\ninterface UtilitiesContainerProviderProps {}\n\nexport const UtilitiesContainerProvider: React.FunctionComponent<\n PropsWithChildren<UtilitiesContainerProviderProps>\n> = ({ children }) => {\n const { model, ready } = useUtilitiesContainer();\n const value: UtilitiesContainerType = useMemo(() => {\n if (ready && model) {\n return { model };\n }\n return {};\n }, [ready, model]);\n return (\n <UtilitiesContainerContext.Provider value={value}>\n {children}\n </UtilitiesContainerContext.Provider>\n );\n};\nexport const useUtilitiesContainerContext = () => {\n const context = useContext(UtilitiesContainerContext);\n if (!context) {\n throw new Error(\n \"useUtilitiesContainerContext must be used within a UtilitiesContainerProvider\"\n );\n }\n return context;\n};\n","import { troubleVisibilityFilter } from \"@kosdev-code/kos-ddk-models\";\nimport type { TroubleAware, TroubleModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { kosAutoEffect } from \"@kosdev-code/kos-ui-sdk\";\nimport { useLayoutEffect, useState } from \"react\";\nimport { useApplicationContext } from \"../../contexts\";\n\nexport const useVisibleTroubles = (holder: TroubleAware) => {\n const { model: appModel } = useApplicationContext();\n const [visibleTroubles, setVisibleTroubles] = useState<TroubleModel[]>();\n const role = appModel?.currentRole;\n const initialized = !!visibleTroubles;\n useLayoutEffect(() => {\n const disposer = kosAutoEffect(() => {\n const newTroubles = holder.troubles.filter(troubleVisibilityFilter(role));\n setVisibleTroubles((existing) => {\n const existingTroubles = existing ?? [];\n if (newTroubles.length !== existingTroubles.length) {\n return newTroubles;\n } else {\n if (newTroubles.some((t) => !existingTroubles.includes(t))) {\n return newTroubles;\n } else {\n return existingTroubles;\n }\n }\n });\n });\n\n return () => {\n disposer();\n };\n }, [holder, role]);\n return { visibleTroubles, initialized };\n};\n","/* eslint-disable complexity */\nimport styled from \"@emotion/styled\";\n\nimport {\n BackButton,\n FuelGauge,\n getFillColor,\n Header,\n HolderDashboardCard,\n Modal,\n useAbbreviation,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n FreestyleHolder,\n FreestyleHolderExt,\n FreestyleHolderModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\n\nimport { useExtensionComponent } from \"@kosdev-code/kos-ui-plugin\";\nimport {\n ExtensionManager,\n getKosCompanionModel,\n kosComponent,\n KosLog,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { Suspense, useCallback, useMemo, useState } from \"react\";\nimport { DashboardPumpDetailExtension } from \"../../extensions\";\n\nimport {\n useApplication,\n useFutureContainer,\n useHolderContent,\n useHolderExperience,\n usePluginExtensions,\n useTroubleData,\n} from \"../../hooks\";\nimport { troubleLabelFactory } from \"../../utils\";\nimport { EnjoyByDate } from \"../enjoy-by-date\";\nimport { FutureProgressBar } from \"../future-progress-bar\";\nimport { useVisibleTroubles } from \"./use-visible-troubles\";\n\nconst log = KosLog.createLogger({ name: \"holder-group-view\" });\nlog.debug(\"holder-group-view component loaded\");\n\ninterface Props {\n holder: HolderModel<FreestyleHolderExt>;\n onHolderSelect?: (holder: HolderModel) => void;\n showNavIcon?: boolean;\n summaryBody?: React.ReactNode;\n altNamePolicy?: \"replace\" | \"disable\";\n}\n\ninterface TitleProps {\n color?: string;\n}\nconst CardTitle = styled.div<TitleProps>`\n align-items: start;\n\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100%;\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n`;\n\nconst CardAvatar = styled.div<TitleProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n flex-wrap: nowrap;\n white-space: nowrap;\n`;\n\ninterface FooterProps {\n color?: string;\n}\nconst Footer = styled.div<FooterProps>`\n font-size: var(--ddk-component-holder-card-footer-font-size);\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n`;\n\nconst isLightColor = (color?: string) => !color || color === \"white\";\nconst getFontColor = (lightBackground: boolean) =>\n lightBackground ? undefined : \"white\";\nconst getFooterFontColor = (lightBackground: boolean, holder?: HolderModel) => {\n if (!holder) return lightBackground ? undefined : \"white\";\n\n return holder.hasEnjoyByWarning\n ? \"var(--ddk-component-dashboard-enjoy-by-trouble-warning-color)\"\n : lightBackground\n ? undefined\n : \"white\";\n};\n\nexport const HolderCard: React.FunctionComponent<Props> = kosComponent(\n ({\n holder,\n onHolderSelect,\n showNavIcon,\n summaryBody,\n altNamePolicy = \"disable\",\n }) => {\n const { model: appModel } = useApplication();\n const { visibleTroubles, initialized } = useVisibleTroubles(holder);\n const role = appModel?.currentRole;\n const { t } = useKosTranslation(\"troubles\");\n const { t: tCommon } = useKosTranslation(\"common\");\n const { componentModeOverride } = useComponentConfigurationContext();\n const isCompact = componentModeOverride === \"compact\";\n const { getExtensions } = usePluginExtensions();\n\n let disabled = false;\n const companionModel = getKosCompanionModel<FreestyleHolderModel>(\n holder,\n FreestyleHolder.type\n );\n const altName = companionModel?.altName;\n const isRemote = companionModel?.isRemote;\n const isReplace =\n altNamePolicy === \"replace\" && !!altName && companionModel?.isRemote;\n if (companionModel?.isRemote && altNamePolicy === \"disable\") {\n log.warn(\"Holder is remote, skipping rendering\");\n disabled = true;\n }\n const [showModal, setShowModal] = useState(false);\n const assigned = !!holder.ingredientId;\n\n const close = useCallback(() => {\n setShowModal(false);\n }, []);\n\n const troubleCount = visibleTroubles?.length ?? 0;\n const troubleModel = visibleTroubles?.[0];\n const hasTroubles = troubleCount > 0;\n\n const data = useTroubleData(troubleModel);\n\n const hasFuelGuage = holder.hasFuelGuage;\n const fillPercent = holder.fillPercent;\n\n const holderColor = holder.removed\n ? \"var(--ddk-component-dashboard-card-background-color-unassigned)\"\n : disabled\n ? \"var(--ddk-generic-color-grey-50)\"\n : hasTroubles\n ? `${troubleModel?.color}`\n : assigned\n ? undefined\n : \"var(--ddk-component-dashboard-card-background-color-unassigned)\";\n\n const holderHeaderColor = holder.removed\n ? \"var(--ddk-component-dashboard-card-header-background-color)\"\n : undefined;\n\n const isLight = isLightColor(holderColor);\n const fontColor = disabled\n ? \"white\"\n : holder.unassigned\n ? \"var(--ddk-generic-color-grey-30)\"\n : hasTroubles\n ? getFontColor(isLight)\n : assigned\n ? undefined\n : \"var(--ddk-component-dashboard-card-color-unassigned)\";\n\n const footerFontColor = disabled\n ? \"white\"\n : hasTroubles\n ? getFooterFontColor(isLight, holder)\n : assigned\n ? undefined\n : \"var(--ddk-component-dashboard-card-color-unassigned)\";\n\n const abbreviatedName = isReplace\n ? tCommon(altName, { defaultValue: \"Remote NNS Tray\" })\n : useAbbreviation(holder.name, isCompact);\n\n const ingredientName = disabled\n ? tCommon(\"disabled\")\n : isReplace\n ? \"\"\n : holder.removed\n ? tCommon(holder.previousIngredientName)\n : holder.unassigned\n ? tCommon(\"unassigned\")\n : tCommon(holder.ingredientName);\n\n const title = <CardTitle color={fontColor}>{ingredientName}</CardTitle>;\n const avatar = <CardAvatar color={fontColor}>{abbreviatedName}</CardAvatar>;\n const displayName = isReplace\n ? tCommon(altName, { defaultValue: \"Remote NNS Tray\" })\n : holder.name;\n const modalTitle = (\n <CardTitle>\n {displayName} {ingredientName}\n </CardTitle>\n );\n\n const body =\n assigned && hasFuelGuage && !hasTroubles && initialized\n ? summaryBody ?? (\n <FuelGauge\n color={hasTroubles ? \"var(--ddk-generic-color-white)\" : undefined}\n size=\"small\"\n value={fillPercent}\n />\n )\n : null;\n\n const indicatorColor =\n (assigned &&\n hasFuelGuage &&\n !hasTroubles &&\n initialized &&\n getFillColor(fillPercent)) ||\n undefined;\n\n const key = ExtensionManager.executeDashboardKeyFactory(holder) || \"\";\n const exts = useMemo(\n () => getExtensions(DashboardPumpDetailExtension.id),\n [getExtensions]\n );\n const details = useMemo(\n () =>\n exts\n .filter((ext) => !!ext.data)\n .reduce((acc, ext) => {\n const data = ext.data as any;\n acc[data.dashboardKey] = ext.data;\n return acc;\n }, {}),\n [exts]\n );\n const hasExtension = !!details[key];\n const { HolderContent, modalOptions } = useHolderContent(holder);\n\n // Use hook to create component at runtime\n const DashboardPumpDetailComponent = useExtensionComponent(\n DashboardPumpDetailExtension\n );\n\n const Content = useMemo(\n () =>\n HolderContent ? (\n <HolderContent holder={holder} onComplete={close} />\n ) : hasExtension && DashboardPumpDetailComponent ? (\n <DashboardPumpDetailComponent\n module={details[key]?.id}\n holder={holder}\n />\n ) : undefined,\n [\n HolderContent,\n close,\n details,\n hasExtension,\n holder,\n key,\n DashboardPumpDetailComponent,\n ]\n );\n\n const troubleLabels = troubleLabelFactory(troubleModel);\n const showRemote = isRemote && !isReplace;\n const footer = (\n <Footer color={hasTroubles ? fontColor : footerFontColor}>\n {showRemote\n ? tCommon(\"remote-nns-active\")\n : hasTroubles\n ? t(troubleLabels.summary, {\n context: troubleModel?.deferred ? \"queued\" : undefined,\n data: data,\n })\n : !isCompact && <EnjoyByDate size=\"small\" holder={holder} />}\n </Footer>\n );\n\n // This allows us to pop open various holder experiences, like the\n // rfid-override modal...\n const { holderExperience, setHolderExperience } =\n useHolderExperience(holder);\n\n const { future } = useFutureContainer(troubleModel);\n\n const handleSelect = useCallback(() => {\n if (disabled || holder.sortedPumps.length <= 0) return;\n\n if (role === \"technician\") {\n setShowModal(true);\n } else if (holder.unassigned || holder.removed) {\n setHolderExperience(\"rfid-override\");\n } else {\n // resolve highest resolvable trouble\n if (hasTroubles) {\n onHolderSelect?.(holder);\n }\n }\n }, [\n disabled,\n holder,\n role,\n setHolderExperience,\n hasTroubles,\n onHolderSelect,\n ]);\n\n return (\n <>\n <Modal\n contain={!isCompact}\n {...modalOptions}\n show={showModal}\n onClose={close}\n >\n <Header\n contain={isCompact}\n showCloseButton\n title={modalTitle}\n onClose={close}\n CloseButton={isCompact ? BackButton : undefined}\n />\n\n {Content}\n </Modal>\n\n <Suspense>{holderExperience}</Suspense>\n\n <HolderDashboardCard\n key={holder.path}\n avatar={avatar}\n headerBackgroundColor={holderHeaderColor}\n backgroundColor={holderColor}\n footer={footer}\n cardId={holder.path}\n errors={troubleCount}\n title={title}\n indicatorColor={indicatorColor}\n disabled={disabled}\n body={body}\n showNavIcon={showNavIcon}\n onCardSelect={handleSelect}\n />\n\n {troubleModel?.future && (\n <FutureProgressBar\n title={title}\n future={future}\n failureMessage={t(`troubles.${troubleModel.type}.error`, {\n context: future?.reason,\n })}\n />\n )}\n </>\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\nimport { useMemo, type FunctionComponent } from \"react\";\nimport { HolderCard } from \"./holder-card\";\n\ninterface Props {\n holders: HolderModel[];\n showNavIcons?: boolean;\n [key: string]: any;\n}\n\nexport const HolderGroup = styled.div`\n display: flex;\n flex-direction: var(--ddk-component-dashboard-card-flex-direction);\n flex-wrap: nowrap;\n row-gap: var(--ddk-component-dashboard-row-gap);\n column-gap: var(--ddk-component-dashboard-column-gap);\n height: 100%;\n user-select: none;\n overflow: visible;\n`;\n\nconst HolderCardView: FunctionComponent<{\n holder: HolderModel;\n showNavIcons: boolean;\n}> = kosComponent(({ holder, showNavIcons }) => {\n const trouble = holder.troubles[0];\n\n const onHolderSelect = () => {\n if (trouble?.resolvable) trouble.resolve();\n };\n\n return (\n <HolderCard\n key={holder.id}\n holder={holder}\n showNavIcon={showNavIcons}\n onHolderSelect={onHolderSelect}\n ></HolderCard>\n );\n});\nexport const HolderGroupView: React.FunctionComponent<Props> = kosComponent(\n ({ holders, showNavIcons, ...props }) => {\n const holderCards = useMemo(\n () =>\n holders.map((holder) => (\n <HolderCardView\n key={holder.id}\n holder={holder}\n showNavIcons={!!showNavIcons}\n />\n )),\n [holders, showNavIcons]\n );\n\n return <HolderGroup {...props}>{holderCards}</HolderGroup>;\n }\n);\n","import styled from \"@emotion/styled\";\n\nimport {\n BackButton,\n Header,\n HolderDashboardCard,\n Modal,\n StatusIndicator,\n useAbbreviation,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { FreestyleHolderExt } from \"@kosdev-code/kos-freestyle-sdk\";\n\nimport { useExtensionComponent } from \"@kosdev-code/kos-ui-plugin\";\nimport {\n ExtensionManager,\n KosLog,\n kosComponent,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useState } from \"react\";\nimport {\n DashboardMacroSummaryExtension,\n DashboardPumpDetailExtension,\n} from \"../../extensions\";\n\nimport {\n useApplication,\n useHolderContent,\n usePluginExtensions,\n} from \"../../hooks\";\nimport { troubleLabelFactory } from \"../../utils\";\nimport { FutureProgressBar } from \"../future-progress-bar\";\nimport { useVisibleTroubles } from \"./use-visible-troubles\";\n\nconst log = KosLog.createLogger({ name: \"holder-group-view\" });\nlog.debug(\"holder-group-view component loaded\");\n\nconst EXCLUDE_MACROS = [\"water\", \"carb\", \"ns\", \"nns\"];\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n justify-content: space-between;\n height: 100%;\n`;\n\ninterface CardTitleProps {\n color?: string;\n}\nconst CardTitle = styled.div<CardTitleProps>`\n align-items: start;\n\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100%;\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n`;\n\nconst CardAvatar = styled.div<CardTitleProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n`;\n\ninterface FooterProps {\n color?: string;\n}\nconst Footer = styled.div<FooterProps>`\n font-size: var(--ddk-component-holder-card-footer-font-size);\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n`;\n\nconst computeMacroTitleParts = (\n holder: HolderModel<FreestyleHolderExt>,\n assigned: boolean,\n isCompact: boolean,\n t: (key: string) => string\n) => {\n const macroName = t(`common:macros.${holder.name}`);\n const isExcluded = EXCLUDE_MACROS.includes(holder.name);\n const ingredientName = assigned\n ? isExcluded\n ? \"\"\n : ` ${t(`common:${holder.ingredientName}`)}`\n : ` ${t(\"common:macros.unassigned\")}`;\n const titleText = `${macroName}${ingredientName}`;\n const cardTitleText = isCompact\n ? isExcluded\n ? macroName\n : ingredientName\n : `${macroName} ${ingredientName}`;\n return { titleText, cardTitleText };\n};\n\ninterface MacroSummaryBodyProps {\n holder: HolderModel<FreestyleHolderExt>;\n dashboardKey: string;\n fallbackStatus: \"pending\" | \"completed\";\n}\n\nconst MacroSummaryBody = kosComponent(\n ({ holder, dashboardKey, fallbackStatus }: MacroSummaryBodyProps) => {\n const { getExtensions } = usePluginExtensions();\n const exts = getExtensions(DashboardMacroSummaryExtension.id);\n\n // Match precedence:\n // 1. holder.name (e.g. \"ns\", \"water\") — most specific\n // 2. dashboardKey from executeDashboardKeyFactory (default: pump type)\n const findByKey = (k: string) =>\n exts.find((ext) => {\n const data = ext.data as { dashboardKey?: string } | undefined;\n return data?.dashboardKey === k;\n });\n const match = findByKey(holder.name) ?? findByKey(dashboardKey);\n\n const Component = useExtensionComponent(DashboardMacroSummaryExtension);\n if (match && Component) {\n return <Component module={match.id} holder={holder} />;\n }\n return <StatusIndicator size=\"small\" status={fallbackStatus} />;\n }\n);\n\ninterface MacroHolderCardProps {\n holder: HolderModel<FreestyleHolderExt>;\n onHolderSelect?: (holder: HolderModel) => void;\n showNavIcon?: boolean;\n summaryBody?: React.ReactNode;\n}\nconst isLightColor = (color?: string) => !color || color === \"white\";\n\nconst getFontColor = (isLight: boolean) => (isLight ? undefined : \"white\");\nexport const MacroHolderCard = kosComponent(\n ({\n holder,\n onHolderSelect,\n showNavIcon,\n summaryBody,\n }: MacroHolderCardProps) => {\n const { model: appModel } = useApplication();\n const { visibleTroubles, initialized } = useVisibleTroubles(holder);\n const { t } = useKosTranslation([\"troubles\", \"common\"]);\n const { componentModeOverride } = useComponentConfigurationContext();\n const isCompact = componentModeOverride === \"compact\";\n const { getExtensions } = usePluginExtensions();\n const role = appModel?.currentRole?.toLowerCase();\n const [showModal, setShowModal] = useState(false);\n const assigned = !!holder.ingredientId;\n\n const troubleCount = visibleTroubles?.length ?? 0;\n const troubleModel = visibleTroubles?.[0];\n\n const hasTroubles = visibleTroubles ? visibleTroubles.length > 0 : false;\n\n const holderColor = hasTroubles ? `${troubleModel?.color}` : undefined;\n const isLight = isLightColor(holderColor);\n\n const fontColor = hasTroubles\n ? getFontColor(isLight)\n : assigned\n ? undefined\n : \"var(--ddk-component-dashboard-card-color-unassigned)\";\n\n const abbreviatedName = useAbbreviation(\n holder.name,\n componentModeOverride === \"compact\"\n );\n\n const { titleText, cardTitleText } = computeMacroTitleParts(\n holder,\n assigned,\n isCompact,\n t\n );\n\n const avatar = componentModeOverride === \"compact\" && (\n <CardAvatar color={fontColor}>{abbreviatedName}</CardAvatar>\n );\n\n const cardTitle = <CardTitle color={fontColor}>{cardTitleText}</CardTitle>;\n const modalTitle = <CardTitle>{titleText}</CardTitle>;\n\n const key = ExtensionManager.executeDashboardKeyFactory(holder) || \"\";\n const exts = getExtensions(DashboardPumpDetailExtension.id);\n const details = exts\n .filter((ext) => !!ext.data)\n .reduce((acc, ext) => {\n const data = ext.data as any;\n acc[data.dashboardKey] = ext.data;\n return acc;\n }, {});\n const hasExtension = !!details[key];\n const { HolderContent, modalOptions } = useHolderContent(holder);\n\n // Use hook to create component at runtime\n const DashboardPumpDetailComponent = useExtensionComponent(\n DashboardPumpDetailExtension\n );\n\n // The macro summary body falls back through:\n // 1. summaryBody prop (caller-supplied override)\n // 2. DashboardMacroSummaryExtension contribution matching `key`\n // 3. default <StatusIndicator>\n const macroSummaryContent = summaryBody ?? (\n <MacroSummaryBody\n holder={holder}\n dashboardKey={key}\n fallbackStatus={hasTroubles ? \"pending\" : \"completed\"}\n />\n );\n\n // Todo: Have a separate holder card for the macro setup step vs the\n //dashboard macro card...\n\n const MainContent = HolderContent ? (\n <HolderContent holder={holder} onComplete={() => setShowModal(false)} />\n ) : hasExtension && DashboardPumpDetailComponent ? (\n <DashboardPumpDetailComponent module={details[key]?.id} holder={holder} />\n ) : null;\n\n const troubleLabels = troubleLabelFactory(troubleModel);\n const footer = hasTroubles ? (\n <Footer color={fontColor}>{t(troubleLabels.summary)}</Footer>\n ) : null;\n\n const handleCardSelect = useCallback(() => {\n if (holder.sortedPumps.length > 0) {\n if (role === \"technician\") {\n setShowModal(true);\n } else {\n // resolve highest resolvable trouble\n if (hasTroubles) {\n onHolderSelect?.(holder);\n }\n }\n }\n }, [hasTroubles, holder, onHolderSelect, role]);\n\n return (\n <>\n <HolderDashboardCard\n avatar={avatar}\n key={holder.path}\n backgroundColor={holderColor}\n body={hasTroubles ? null : macroSummaryContent}\n footer={footer}\n cardId={holder.path}\n errors={troubleCount}\n title={cardTitle}\n showNavIcon={showNavIcon}\n onCardSelect={handleCardSelect}\n />\n\n <Modal\n contain={componentModeOverride !== \"compact\"}\n {...modalOptions}\n show={showModal}\n onClose={() => setShowModal(false)}\n >\n <Container>\n <Header\n contain={componentModeOverride === \"compact\"}\n showCloseButton\n title={modalTitle}\n onClose={() => setShowModal(false)}\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n />\n\n {MainContent}\n </Container>\n </Modal>\n\n {/* FutureProgressBar - hidden by default... */}\n {troubleModel?.future && (\n <FutureProgressBar title={modalTitle} future={troubleModel?.future} />\n )}\n </>\n );\n }\n);\n","import { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\nimport { MacroHolderCard } from \"./macro-holder-card\";\nimport { HolderGroup } from \"./holder-group-view\";\n\n// Notes:\n// - The MacroHolderGroupView is currently used in the macro-setup-step.tsx\n// file for the macro setup step view. It is also used in the dashboard.tsx\n// file for the macro display in the dashboard view.\n\ninterface MacroHolderGroupViewProps {\n holders: HolderModel[];\n showNavIcons?: boolean;\n [key: string]: any;\n}\n\nexport const MacroHolderGroupView = kosComponent(\n ({ holders, showNavIcons, ...props }: MacroHolderGroupViewProps) => (\n <HolderGroup {...props}>\n {holders.map((holder) => {\n const trouble = holder.troubles[0];\n\n return (\n <MacroHolderCard\n key={holder.id}\n holder={holder}\n showNavIcon={showNavIcons}\n onHolderSelect={() => {\n if (trouble.resolvable) trouble.resolve();\n }}\n />\n );\n })}\n </HolderGroup>\n )\n);\n","import styled from \"@emotion/styled\";\nimport {\n Button,\n Content,\n Footer,\n UtilityModalHeading,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { MessageInformationIconWithBackground } from \"@kosdev-code/kos-ddk-styles\";\nimport { HolderModel, IngredientModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { FreestyleHolderModelExt } from \"@kosdev-code/kos-freestyle-sdk\";\nimport { useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useState } from \"react\";\nimport { withMacroAssignment, type MacroAssignmentProps } from \"../../hooks\";\n\nconst InfoIcon = styled(MessageInformationIconWithBackground)`\n width: var(--ddk-component-macro-card-unavailable-icon-size);\n height: var(--ddk-component-macro-card-unavailable-icon-size);\n`;\n\nconst Heading = styled(UtilityModalHeading)`\n text-align: center;\n font-size: var(--ddk-component-sub-modal-heading-font-size-medium);\n`;\n\nconst IngredientGridContainer = styled.div`\n height: 100%;\n overflow-y: auto;\n width: 100%;\n`;\n\ninterface IngredientGridStylesProps {\n compact?: boolean;\n}\n\nconst IngredientGridStyles = styled.div<IngredientGridStylesProps>`\n display: grid;\n gap: var(--ddk-component-macro-setup-card-gap);\n\n grid-template-columns: ${(props) =>\n props.compact ? \"1fr\" : \"repeat(auto-fit, 145px)\"};\n\n height: ${(props) => !props.compact && \"100%\"};\n justify-content: center;\n width: 100%;\n user-select: none;\n`;\n\nconst IngredientGrid = (props) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n\n return (\n <IngredientGridStyles\n compact={componentModeOverride === \"compact\"}\n {...props}\n />\n );\n};\n\ninterface IngredientCardProps {\n selected: boolean;\n}\n\nconst IngredientCard = styled.div<IngredientCardProps>`\n align-items: center;\n\n background: ${(props) =>\n props.selected\n ? \"var(--ddk-generic-color-grey-5)\"\n : \"var(--ddk-generic-color-white)\"};\n\n border: ${(props) =>\n props.selected\n ? \"1px solid var(--ddk-generic-color-grey-80)\"\n : \"1px solid var(--ddk-generic-color-grey-30)\"};\n\n border-radius: 4px;\n box-sizing: border-box;\n color: var(--ddk-generic-color-grey-70);\n display: flex;\n flex: 1 0 0;\n font-size: var(--ddk-component-macro-card-font-size-small);\n font-style: normal;\n font-weight: var(--ddk-component-macro-card-font-weight);\n gap: var(--ddk-component-macro-setup-card-gap);\n height: var(--ddk-component-macro-card-height);\n justify-content: center;\n letter-spacing: 0.64px;\n line-height: 135%;\n overflow-wrap: anywhere;\n padding: var(--ddk-component-macro-setup-card-header-padding-md);\n text-align: center;\n`;\n\nconst UnavailableContainer = styled.div`\n align-items: center;\n display: flex;\n flex-direction: column;\n gap: 32px;\n height: 100%;\n justify-content: center;\n`;\n\nconst UnavailableText = styled.div`\n color: var(--ddk-component-macro-card-unavailable-font-color);\n font-size: var(--ddk-component-macro-card-unavailable-font-size);\n font-weight: var(--ddk-component-macro-card-unavailable-font-weight);\n`;\n\ninterface MacroSetupStepCardProps {\n holder: HolderModel<FreestyleHolderModelExt>;\n onComplete?: () => void;\n showCloseButton?: boolean;\n}\n\nexport const MacroSetupStepCard = withMacroAssignment<\n MacroAssignmentProps & MacroSetupStepCardProps\n>(({ holder, onComplete, macroAssignment, showCloseButton = true }) => {\n const { t } = useKosTranslation(\"setup\");\n const { t: tCommon } = useKosTranslation(\"common\");\n const { componentModeOverride } = useComponentConfigurationContext();\n const [selectedIngredient, setSelectedIngredient] = useState<\n IngredientModel | undefined\n >(holder.ingredient);\n\n // Todo: Hook this up to a config property to help aid with debugging...\n const unassignableModeEnabled = false;\n\n const Container = styled.div`\n display: flex;\n flex-direction: column;\n gap: 24px;\n height: 100%;\n `;\n\n return (\n <Container>\n <Content>\n {macroAssignment.hasMacroIngredients ? (\n <>\n {componentModeOverride === \"standard\" && (\n <Heading>\n {t(\"select-and-assign-ingredients-for\", {\n data: { name: tCommon(`macros.${holder.name}`) },\n })}\n </Heading>\n )}\n <IngredientGridContainer>\n <IngredientGrid>\n {macroAssignment.macroIngredients.map((macroIngredient) => (\n <IngredientCard\n key={macroIngredient.id}\n selected={selectedIngredient?.id === macroIngredient.id}\n onPointerDown={() => {\n if (selectedIngredient === macroIngredient) {\n if (unassignableModeEnabled)\n setSelectedIngredient(undefined);\n } else {\n setSelectedIngredient(macroIngredient);\n }\n }}\n >\n {macroIngredient.name}\n </IngredientCard>\n ))}\n </IngredientGrid>\n </IngredientGridContainer>\n </>\n ) : (\n <UnavailableContainer>\n <InfoIcon />\n <UnavailableText>\n {t(\"no-ingredients-available-for-assignment\")}\n </UnavailableText>\n </UnavailableContainer>\n )}\n </Content>\n <Footer>\n {macroAssignment.hasMacroIngredients ? (\n <>\n {componentModeOverride === \"standard\" && showCloseButton && (\n <Button\n onPointerDown={() => {\n onComplete?.();\n }}\n >\n {tCommon(\"close\")}\n </Button>\n )}\n <Button\n mode=\"primary\"\n disabled={\n unassignableModeEnabled\n ? selectedIngredient?.id === holder.ingredientId\n : !selectedIngredient ||\n selectedIngredient.id === holder.ingredientId\n }\n onPointerDown={async () => {\n await holder.assignIngredient(selectedIngredient?.id);\n onComplete?.();\n }}\n >\n {unassignableModeEnabled\n ? selectedIngredient\n ? tCommon(\"assignIngredient\")\n : tCommon(\"unassignIngredient\")\n : tCommon(\"assignIngredient\")}\n </Button>\n </>\n ) : (\n showCloseButton !== false && (\n <Button\n mode=\"primary\"\n onPointerDown={() => {\n onComplete?.();\n }}\n >\n {tCommon(\"proceed\")}\n </Button>\n )\n )}\n </Footer>\n </Container>\n );\n});\n","import {\n Button,\n Content,\n Footer,\n FrameBody,\n FrameContainer,\n InfoCard,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type {\n FreestyleAssemblyModel,\n IceAgitatorModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\n\nimport {\n kosComponent,\n KosLog,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nimport { useCallback } from \"react\";\nimport { FutureProgressBar } from \"../../future-progress-bar\";\n\ninterface AgitatorProps {\n assembly: FreestyleAssemblyModel;\n cardModel: IceAgitatorModel;\n}\n\nexport const IceAgitatorDetail: React.FunctionComponent<AgitatorProps> =\n kosComponent(({ cardModel }) => {\n KosLog.debug(`Agitator`, cardModel.path);\n const { t } = useKosTranslation([\"agitator\", \"common\"]);\n\n const handleAction = useCallback(\n (action: string) => {\n if (action === \"agitate\") {\n cardModel?.testAgitate();\n } else if (action === \"gate\") {\n cardModel?.testGate();\n } else if (action === \"pour\") {\n cardModel?.pourIce();\n } else if (action === \"cancelPour\") {\n cardModel?.cancelIceDispense();\n }\n },\n [cardModel]\n );\n\n const data = [\n {\n name: t(\"agitator:agitation-duration\"),\n value: cardModel.durationSec.displayValue,\n },\n {\n name: t(\"agitator:ice-max-dispense\"),\n value: cardModel.maxDispenseSec.displayValue,\n },\n {\n name: t(\"agitator:agitate-after\"),\n value: `${t(\"agitator:agitate-after-inactive\", {\n data: { value: cardModel.inactivitySec.displayValue },\n })},\\n${t(\"agitator:agitate-after-without\", {\n data: { value: cardModel.volWithoutIceMl.displayValue },\n })}`,\n },\n { name: t(\"agitator:ice-type\"), value: cardModel.type.displayValue },\n ];\n\n const actionsDisabled = cardModel.isAgitating || cardModel.isIceChuteOpen;\n const pourDisabled = cardModel.agitateIsRunning || cardModel.gateIsRunning;\n return (\n <>\n <Content>\n <FrameContainer name=\"Ice Properties\">\n <FrameBody keyList={[\"name\", \"value\"]} tableData={data} />\n </FrameContainer>\n <InfoCard\n label=\"Agitating\"\n value={cardModel.isAgitating ? t(\"common:yes\") : t(\"common:no\")}\n />\n <InfoCard\n label=\"Ice Chute Open\"\n value={cardModel.isIceChuteOpen ? t(\"common:yes\") : t(\"common:no\")}\n />\n </Content>\n\n <Footer>\n <Button\n disabled={actionsDisabled}\n onPointerDown={() => handleAction(\"agitate\")}\n >\n {t(\"action.label\", { context: \"agitator\" })}\n </Button>\n\n <Button\n disabled={actionsDisabled}\n onPointerDown={() => handleAction(\"gate\")}\n >\n {t(\"action.label\", { context: \"gate\" })}\n </Button>\n\n <Button\n disabled={pourDisabled}\n onPointerUp={() => handleAction(\"cancelPour\")}\n onPointerDown={() => handleAction(\"pour\")}\n >\n {t(\"action.label\", { context: \"pour\" })}\n </Button>\n </Footer>\n {cardModel.agitateFuture && (\n <FutureProgressBar\n title={t(\"testing\")}\n future={cardModel.agitateFuture}\n ></FutureProgressBar>\n )}\n {cardModel.gateFuture && (\n <FutureProgressBar\n title={t(\"testing\")}\n future={cardModel.gateFuture}\n ></FutureProgressBar>\n )}\n </>\n );\n });\n\nexport default IceAgitatorDetail;\n","import styled from \"@emotion/styled\";\nimport { StatusIndicator } from \"@kosdev-code/kos-ddk-components\";\nimport type {\n FreestyleAssemblyModel,\n IceAgitatorModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\n\nimport {\n kosComponent,\n KosLog,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\n\ninterface AgitatorProps {\n assembly: FreestyleAssemblyModel;\n cardModel: IceAgitatorModel;\n}\n\ninterface FooterProps {\n color?: string;\n}\nconst Footer = styled.div<FooterProps>`\n font-size: var(--ddk-component-holder-card-footer-font-size);\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n`;\nexport const IceAgitatorSummary: React.FunctionComponent<AgitatorProps> =\n kosComponent((props) => {\n KosLog.debug(`summary component loaded for holder ${props}`);\n KosLog.info(`render agitator summary for holder ${props.cardModel.path}`);\n\n const { t } = useKosTranslation(\"common\");\n\n return (\n <>\n <StatusIndicator size=\"small\" status={\"completed\"} />\n <Footer\n style={{\n visibility: props.cardModel.isAgitating ? \"visible\" : \"hidden\",\n }}\n >\n {t(\"agitating\")}\n </Footer>\n </>\n );\n });\n\nexport default IceAgitatorSummary;\n","import styled from \"@emotion/styled\";\nimport {\n Button,\n Footer,\n SettingsSubheading,\n TabContainer,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { AssemblyModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { withAssembly } from \"@kosdev-code/kos-dispense-sdk\";\nimport { IceAgitatorModel } from \"@kosdev-code/kos-freestyle-sdk\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback } from \"react\";\nimport { useLocation } from \"react-router-dom\";\nimport {\n ConfigPropInputRangeCard,\n ConfigPropPickerCard,\n ConfigPropSwitchCard,\n} from \"..\";\n\nexport const IceAgitatorSettingsContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n`;\n\ninterface IProp {\n assembly: AssemblyModel;\n showHeading?: boolean;\n}\n\nexport const IceAgitatorSettingsView = withAssembly(\n ({ assembly, showHeading }: IProp) => (\n <IceAgitatorSettings\n iceAgitator={assembly.iceAgitator}\n showHeading={showHeading}\n />\n )\n);\n\ninterface Props {\n iceAgitator?: IceAgitatorModel;\n showHeading?: boolean;\n}\n\nexport const IceAgitatorSettings: React.FunctionComponent<Props> = kosComponent(\n ({ iceAgitator, showHeading }: Props) => {\n const { t } = useKosTranslation(\"about\");\n const location = useLocation();\n\n const { componentModeOverride } = useComponentConfigurationContext();\n\n const iceTypes =\n iceAgitator?.iceTypes.map((item) => {\n return { id: item, label: item };\n }) || [];\n\n const reset = useCallback(async () => {\n if (iceAgitator?.type.value !== undefined)\n iceAgitator?.updateIceType(iceAgitator.type.value);\n }, [iceAgitator]);\n\n return iceAgitator ? (\n <TabContainer>\n {showHeading && (\n <SettingsSubheading>\n {t(\"ice-settings\", \"Ice Settings\")}\n </SettingsSubheading>\n )}\n {componentModeOverride === \"compact\" ? (\n <ConfigPropSwitchCard\n configProperty={iceAgitator.type}\n onChange={(value) => iceAgitator.updateIceType(value)}\n options={iceTypes}\n label={t(\"ice-type\", \"Ice Type\")}\n />\n ) : (\n <ConfigPropPickerCard\n configProperty={iceAgitator.type}\n onSave={(value) => iceAgitator.updateIceType(value)}\n items={iceTypes}\n label={t(\"ice-type\", \"Ice Type\") || undefined}\n />\n )}\n <ConfigPropInputRangeCard\n configProperty={iceAgitator.durationSec}\n label={t(\"agitation-duration\", \"Agitation duration\") || undefined}\n />\n <ConfigPropInputRangeCard\n configProperty={iceAgitator.inactivitySec}\n label={\n t(\"agitate-inactivity\", \"Agitate after inactivity\") || undefined\n }\n />\n <ConfigPropInputRangeCard\n configProperty={iceAgitator.volWithoutIceMl}\n label={\n t(\"agitate-without-ice\", \"Agitate after poured without ice\") ||\n undefined\n }\n />\n\n {componentModeOverride !== \"compact\" &&\n location?.pathname.includes(\"/settings\") && (\n <Footer>\n <Button onPointerDown={reset}>{t(\"reset\")}</Button>\n </Footer>\n )}\n </TabContainer>\n ) : (\n \"Ice model not loaded...\"\n );\n }\n);\n","import {\n PickerCard,\n SettingsSubheading,\n SwitchCard,\n TabContainer,\n} from \"@kosdev-code/kos-ddk-components\";\nimport {\n kosComponent,\n useKosRegions,\n useKosTranslation,\n useKosTranslationContext,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useMemo } from \"react\";\nimport { useSettings } from \"../../hooks\";\n\ninterface Props {\n showHeading?: boolean;\n}\n\nexport const LocalizationSettings = kosComponent(({ showHeading }: Props) => {\n const { t } = useKosTranslation(\"region\");\n const { allLocales } = useKosTranslationContext();\n const { model: settingModel } = useSettings();\n const { regionModel } = useKosRegions();\n\n const regionMap = useCallback(\n (region: string) => {\n return {\n id: region,\n label: t(`locale.country.${region}`),\n };\n },\n [t]\n );\n\n const localeMap = useMemo(\n () =>\n allLocales.reduce((acc, { locale, label }) => {\n acc[locale] = label;\n return acc;\n }, {} as Record<string, string>),\n [allLocales]\n );\n\n const { selectedRegion, updateRegion, regionSelectProps } =\n useKosRegions(regionMap);\n\n return (\n <TabContainer>\n {showHeading && (\n <SettingsSubheading>\n {t(\"localization\", \"Localization\")}\n </SettingsSubheading>\n )}\n <PickerCard\n cancelButtonLabel={t(\"discard-changes\", \"Discard Changes\") || undefined}\n closeButtonLabel={t(\"close\", \"Close\") || undefined}\n displayValue={t(`locale.country.${selectedRegion}`) || undefined}\n items={regionSelectProps.options}\n label={t(\"country\", \"Country\")}\n loop={false}\n onSave={(selectedId) => updateRegion(selectedId)}\n proceedButtonLabel={t(\"save\", \"Save\") || undefined}\n selectedItemId={selectedRegion}\n />\n\n {regionModel?.unitSystemOptions?.length && (\n <SwitchCard\n label={t(\"units-of-measurement\", \"Units of Measurement\")}\n options={regionModel?.unitSystemOptions?.map((option) => {\n return {\n id: option.id,\n label: `${t(`locale.unit.${option.id}`)}/${t(\n `locale.units.${option.id}`\n )}`,\n };\n })}\n onChange={(val) => regionModel?.setSelectedUnitSystem(String(val))}\n value={String(regionModel?.selectedUnitSystem).toLowerCase()}\n />\n )}\n\n <PickerCard\n cancelButtonLabel={t(\"discard-changes\", \"Discard Changes\") || undefined}\n closeButtonLabel={t(\"close\", \"Close\") || undefined}\n displayValue={\n localeMap[settingModel?.ncuiLanguage?.displayValue ?? \"\"] ??\n settingModel?.ncuiLanguage?.displayValue\n }\n items={allLocales?.map(({ locale, label }) => {\n return {\n id: locale,\n label: label,\n };\n })}\n label={t(\"non-consumer-language\", \"Non-Consumer Language\")}\n loop={false}\n onSave={(id) => settingModel?.ncuiLanguage?.updateProperty(id)}\n proceedButtonLabel={t(\"save\", \"Save\") || undefined}\n selectedItemId={settingModel?.ncuiLanguage?.displayValue}\n />\n </TabContainer>\n );\n});\n","import styled from \"@emotion/styled\";\nimport { StatusCard, Table } from \"@kosdev-code/kos-ddk-components\";\nimport type { NetworkTestContainerModel } from \"@kosdev-code/kos-ddk-models\";\nimport { useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { withNetworkTestContainer } from \"../../hooks\";\n\nconst TestResult = styled.div`\n display: flex;\n font-size: var(--ddk-generic-font-size-x-small);\n font-weight: normal;\n gap: 10px;\n padding-inline-start: 16px;\n row-gap: 8px;\n\n & .label {\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n position: relative;\n padding-right: 4px;\n &::after {\n position: absolute;\n right: 0;\n content: \":\";\n }\n }\n\n & .result {\n flex-grow: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n & .status {\n margin-left: auto;\n align-items: center;\n display: flex;\n justify-content: flex-end;\n }\n`;\n\ninterface NetworkTestResultsComponentProps {\n networkTestContainer: NetworkTestContainerModel;\n groupName: string;\n}\n\nconst Value = styled.div`\n display: flex;\n align-items: center;\n justify-content: flex-end;\n`;\n\nconst InterfaceDataRenderer = ({ item, valueKey }) => {\n const { label, value } = item;\n\n if (valueKey === \"label\") {\n return (\n <div>\n <b>{label}</b>\n </div>\n );\n }\n\n if (valueKey === \"value\") {\n return <Value>{value}</Value>;\n }\n\n return undefined;\n};\n\nconst NetworkTestResultsComponent = ({\n groupName,\n networkTestContainer,\n}: NetworkTestResultsComponentProps) => {\n const { t } = useKosTranslation(\"connectivity\");\n\n return (\n networkTestContainer?.models\n .getIndexByKey(\"group\", groupName)\n ?.map((item) => {\n const isInterfaces = groupName === \"interface\";\n\n const tableData = isInterfaces\n ? item.results.map((result) => {\n return {\n label: result.name,\n value: result.val,\n };\n })\n : [];\n return isInterfaces ? (\n <Table\n CellRenderer={InterfaceDataRenderer}\n data={tableData}\n dataKeys={[\"label\", \"value\"]}\n heading={item.name}\n />\n ) : (\n <StatusCard\n key={item.id}\n leftLabel={t(`${item.name}`)}\n rightLabel={\n item.inProgress\n ? t(\"inProgress\")\n : !item.timestamp\n ? t(\"testNotRun\")\n : item.passed\n ? t(\"success\")\n : t(\"Fail\")\n }\n type={\n item.inProgress\n ? \"InProgress\"\n : !item.timestamp\n ? \"Default\"\n : item.passed\n ? \"Success\"\n : \"Fail\"\n }\n failureMessage={t(\"failureMessage\")}\n lastSuccess={item?.timestamp}\n lastSuccessful={t(\"lastSuccessful\")}\n />\n );\n }) || []\n );\n};\n\nexport const NetworkTestResults = withNetworkTestContainer(\n NetworkTestResultsComponent\n);\n","import { NotificationCard } from \"@kosdev-code/kos-ddk-components\";\nimport { type TroubleModel } from \"@kosdev-code/kos-ui-sdk\";\n\nimport styled from \"@emotion/styled\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport type React from \"react\";\nimport { useApplicationContext } from \"../../contexts\";\nimport { useFutureContainer } from \"../../hooks/future/use-future-container\";\nimport { troubleLabelFactory } from \"../../utils/troubles/trouble-label-factory\";\nimport { FutureProgressBar } from \"../future-progress-bar\";\nimport { useTroubleData } from \"../../hooks\";\n\ninterface Props {\n showAction?: boolean;\n trouble: TroubleModel;\n showHolder?: boolean;\n}\n\nconst PrefixTag = styled.div`\n background-color: var(--ddk-generic-color-grey-80);\n color: var(--ddk-generic-color-grey-5);\n border-radius: 5px;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--ddk-generic-font-size-xx-small);\n`;\nexport const NotificationCardView: React.FunctionComponent<Props> =\n kosComponent(({ showAction = true, trouble, showHolder }) => {\n const { t } = useKosTranslation([\"troubles\"]);\n const { model } = useApplicationContext();\n const role = model?.currentRole;\n const data = useTroubleData(trouble);\n const { action, label, progress } = troubleLabelFactory(trouble);\n\n const isResolvable = trouble.resolvable ?? false;\n const { future } = useFutureContainer(trouble);\n\n const prefix =\n trouble?.data?.holderNames && trouble.data.holderNames.length > 0 ? (\n <PrefixTag>{trouble.data.holderNames[0]}</PrefixTag>\n ) : null;\n const color = trouble?.color ?? \"orange\";\n const shouldDefer = trouble?.shouldDefer ?? false;\n const deferred = trouble?.deferred ?? false;\n return (\n <>\n <NotificationCard\n label={t(label, { context: role?.toLowerCase(), data })}\n indicatorColor={color}\n buttonLabel={\n showAction\n ? deferred\n ? \"Queued\"\n : shouldDefer\n ? \"Queue\"\n : t(action, { context: role, defaultValue: \"\" })\n : undefined\n }\n date={trouble.createTime}\n prefix={showHolder ? prefix : undefined}\n onAction={\n showAction && isResolvable && !deferred\n ? () => {\n trouble.resolve();\n }\n : undefined\n }\n />\n {future && (\n <FutureProgressBar\n title={t(progress, { context: role })}\n future={deferred ? undefined : future}\n failureMessage={t(`troubles.${trouble.type}.error`, {\n context: future?.reason ? \"reason\" : undefined,\n data: {\n reason: future?.reason\n ? `__troubles.errors.${future?.reason}__`\n : undefined,\n },\n })}\n />\n )}\n </>\n );\n });\n","import {\n SettingsSubheading,\n TabContainer,\n TabRouter,\n TabViewLayout,\n type TabRouterProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport {\n DynamicComponent,\n useKosPluginsContext,\n} from \"@kosdev-code/kos-ui-plugin\";\nimport { useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\n\ninterface PluginTabsProps extends TabRouterProps {\n viewContainerId: string;\n extensionPointId: string;\n namespaces?: string[];\n}\n\nexport const PluginTabs = ({\n viewContainerId,\n extensionPointId,\n tabs,\n ...rest\n}: PluginTabsProps) => {\n const { getExtensions } = useKosPluginsContext();\n const extensionDefs = getExtensions(viewContainerId);\n const views = getExtensions(extensionPointId).reduce((acc, ext) => {\n acc[ext.id] = ext;\n return acc;\n }, {});\n const extNamespaces = extensionDefs.map((ext) => (ext.data as any).namespace);\n const { t } = useKosTranslation([\"\", ...new Set(extNamespaces)]);\n\n const additionalTabs = extensionDefs.map((extension) => {\n const extensionData = extension.data as any;\n const sections = [...extensionData.settings].map((section) => {\n const sectionExt = views[section];\n const sectionData = sectionExt.data as any;\n return (\n <TabContainer key={sectionExt.id}>\n <SettingsSubheading>\n {t(`${sectionData.namespace}:${sectionData.title}`)}\n </SettingsSubheading>\n <DynamicComponent\n extension={extensionPointId}\n module={section}\n ></DynamicComponent>\n </TabContainer>\n );\n });\n\n return {\n id: extension.id,\n label: t(`${extensionData.namespace}:${extensionData.title}`),\n content: <TabViewLayout>{sections}</TabViewLayout>,\n };\n });\n const allTabs = [...tabs, ...additionalTabs];\n return <TabRouter {...rest} tabs={allTabs}></TabRouter>;\n};\n","import {\n Button,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, type FC } from \"react\";\nimport { usePumpAction } from \"../../../hooks\";\nimport { FutureProgressBar } from \"../../future-progress-bar\";\nimport { useVisibleTroubles } from \"../../holders/use-visible-troubles\";\n\nexport const HolderActions: FC<{ holder: HolderModel }> = kosComponent(\n ({ holder }) => {\n const { t } = useKosTranslation(\"common\");\n const { componentModeOverride } = useComponentConfigurationContext();\n const isCompact = componentModeOverride === \"compact\";\n\n const { visibleTroubles, initialized } = useVisibleTroubles(holder);\n const troubleCount = visibleTroubles?.length ?? 0;\n const hasTroubles = troubleCount > 0;\n\n const hasFlushTrouble = !!holder.troublesByType[\"FlushTrouble\"];\n const hasPrimeTrouble = !!holder.troublesByType[\"PrimeTrouble\"];\n const hasPurgeTrouble = !!holder.troublesByType[\"PurgeTrouble\"];\n\n const trouble = hasFlushTrouble\n ? holder.troublesByType[\"FlushTrouble\"][0]\n : hasPrimeTrouble\n ? holder.troublesByType[\"PrimeTrouble\"][0]\n : hasPurgeTrouble\n ? holder.troublesByType[\"PurgeTrouble\"][0]\n : null;\n const shouldDefer = trouble?.shouldDefer ?? false;\n const deferred = trouble?.deferred ?? false;\n const [action, handleAction] = usePumpAction(holder);\n\n const handleDeferAction = useCallback(\n (action: \"purge\" | \"prime\" | \"flush\") => {\n if (shouldDefer) {\n trouble?.resolve();\n } else {\n handleAction(action);\n }\n },\n [handleAction, shouldDefer, trouble]\n );\n return hasTroubles && initialized && isCompact ? (\n <>\n {hasFlushTrouble ? (\n <Button\n disabled={deferred}\n mode=\"primary\"\n onPointerDown={() => handleDeferAction(\"flush\")}\n >\n {t(\"flush\", { context: deferred ? \"queued\" : \"\" })}\n </Button>\n ) : hasPurgeTrouble ? (\n <Button\n disabled={deferred}\n mode=\"primary\"\n onPointerDown={() => handleDeferAction(\"purge\")}\n >\n {t(\"purge\", { context: deferred ? \"queued\" : \"\" })}\n </Button>\n ) : hasPrimeTrouble ? (\n <Button\n disabled={deferred}\n mode=\"primary\"\n onPointerDown={() => handleDeferAction(\"prime\")}\n >\n {t(\"prime\", { context: deferred ? \"queued\" : \"\" })}\n </Button>\n ) : null}\n {action && <FutureProgressBar {...action}></FutureProgressBar>}\n </>\n ) : null;\n }\n);\n","import { useComponentConfigurationContext } from \"@kosdev-code/kos-ddk-components\";\nimport type { TroubleAware, TroubleModel } from \"@kosdev-code/kos-ui-sdk\";\nimport { useVisibleTroubles } from \"../../holders/use-visible-troubles\";\nimport { NotificationCardView } from \"../../notification-card-view\";\n\ninterface HolderNotificationsProps {\n holder: TroubleAware;\n filter?: (item: TroubleModel) => boolean;\n}\n\nexport const HolderNotifications = ({\n holder,\n filter,\n}: HolderNotificationsProps) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n const isStandard = componentModeOverride === \"standard\";\n\n const { visibleTroubles, initialized } = useVisibleTroubles(holder);\n const troubles = filter ? visibleTroubles?.filter(filter) : visibleTroubles;\n const troubleCount = troubles?.length ?? 0;\n const hasTroubles = troubleCount > 0;\n\n return (\n hasTroubles &&\n initialized &&\n visibleTroubles?.map((trouble) => (\n <NotificationCardView\n key={trouble.id}\n showAction={isStandard}\n trouble={trouble}\n />\n ))\n );\n};\n","import { Button, Content, Footer } from \"@kosdev-code/kos-ddk-components\";\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n getKosCompanionModel,\n kosComponent,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { Suspense, useEffect, useState, type FunctionComponent } from \"react\";\nimport { usePumpAction } from \"../../../hooks/actions/use-pump-action\";\n\nimport styled from \"@emotion/styled\";\n\nimport { CgpPump, type CgpPumpModel } from \"@kosdev-code/kos-freestyle-sdk\";\nimport { useHolderExperience } from \"../../../hooks/holder-experience\";\nimport { FutureProgressBar } from \"../../future-progress-bar\";\nimport { HoldToPourButton } from \"../../hold-to-pour-button\";\nimport { MacroSetupStepCard } from \"../../holders\";\nimport { ProbeView } from \"../../probe-view\";\nimport { HolderActions } from \"../holder-actions\";\nimport { HolderNotifications } from \"../holder-notifications/holder-notifications\";\n\ninterface Props {\n holder: HolderModel;\n}\n\nexport const CGPPumpCard: FunctionComponent<Props> = kosComponent(\n ({ holder }) => {\n const { t } = useKosTranslation(\"common\");\n const [action, handleAction] = usePumpAction(holder);\n const [calibrateVolume, setCalibrateVolume] = useState<\n number | undefined\n >();\n\n useEffect(() => {\n async function updateVolume() {\n if (holder.ingredientId !== undefined) {\n const response = await holder.resolveIntentVolume(\"CALIBRATE\");\n setCalibrateVolume(Math.round(response.volume));\n }\n }\n updateVolume();\n }, [holder, holder.ingredientId]);\n\n const isAssigned = holder.ingredientId !== undefined;\n const canCalibrate = calibrateVolume && calibrateVolume > 0;\n\n const { holderExperience, setHolderExperience, currentExperienceId } =\n useHolderExperience(holder);\n\n const showCard = isAssigned || currentExperienceId === \"replace-line\";\n const pumpModel = holder.pumps.data[0];\n const cgpPump = getKosCompanionModel<CgpPumpModel>(pumpModel, CgpPump.type);\n\n return showCard ? (\n <>\n <Content contain={true}>\n <HolderNotifications holder={holder} />\n <ProbeContainer>\n <ProbeView probeAware={cgpPump} />\n </ProbeContainer>\n </Content>\n <Footer>\n <Button\n disabled={!canCalibrate}\n onPointerDown={() => handleAction(\"calibrate\")}\n >\n {canCalibrate\n ? t(\"intentPour\", {\n data: {\n volume: calibrateVolume,\n },\n })\n : t(\"calibrate\")}\n </Button>\n <Button onPointerDown={() => setHolderExperience(\"replace-line\")}>\n {t(\"replace-line\")}\n </Button>\n <HoldToPourButton disabled={!isAssigned} model={holder} />\n <HolderActions holder={holder} />\n </Footer>\n <Suspense>{holderExperience}</Suspense>\n {action && <FutureProgressBar {...action}></FutureProgressBar>}\n </>\n ) : (\n <MacroSetupStepCard showCloseButton={false} holder={holder} />\n );\n }\n);\n\nconst ProbeContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 32px 0px;\n`;\n","import { Button, Content, Footer } from \"@kosdev-code/kos-ddk-components\";\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { Suspense, useEffect, useState, type FunctionComponent } from \"react\";\nimport { usePumpAction } from \"../../../hooks/actions/use-pump-action\";\n\nimport { useHolderExperience } from \"../../../hooks/holder-experience\";\nimport { FutureProgressBar } from \"../../future-progress-bar\";\nimport { HoldToPourButton } from \"../../hold-to-pour-button\";\nimport { MacroSetupStepCard } from \"../../holders\";\nimport { HolderActions } from \"../holder-actions\";\nimport { HolderNotifications } from \"../holder-notifications/holder-notifications\";\n\ninterface Props {\n holder: HolderModel;\n}\n\nexport const LFCVPumpCard: FunctionComponent<Props> = kosComponent(\n ({ holder }) => {\n const { t } = useKosTranslation(\"common\");\n const [action, handleAction] = usePumpAction(holder);\n const [calibrateVolume, setCalibrateVolume] = useState<\n number | undefined\n >();\n\n useEffect(() => {\n async function updateVolume() {\n if (holder.ingredientId !== undefined) {\n const response = await holder.resolveIntentVolume(\"CALIBRATE\");\n setCalibrateVolume(Math.round(response.volume));\n }\n }\n updateVolume();\n }, [holder, holder.ingredientId]);\n\n const isAssigned = holder.ingredientId !== undefined;\n const canCalibrate = calibrateVolume && calibrateVolume > 0;\n\n const { holderExperience, setHolderExperience, currentExperienceId } =\n useHolderExperience(holder);\n\n const showCard = isAssigned || currentExperienceId === \"replace-line\";\n\n return showCard ? (\n <>\n <Content contain={true}>\n <HolderNotifications holder={holder} />\n </Content>\n <Footer>\n <Button\n disabled={!canCalibrate}\n onPointerDown={() => handleAction(\"calibrate\")}\n >\n {canCalibrate\n ? t(\"intentPour\", {\n data: {\n volume: calibrateVolume,\n },\n })\n : t(\"calibrate\")}\n </Button>\n <Button onPointerDown={() => setHolderExperience(\"replace-line\")}>\n {t(\"replace-line\")}\n </Button>\n <HoldToPourButton disabled={!isAssigned} model={holder} />\n <HolderActions holder={holder} />\n </Footer>\n <Suspense>{holderExperience}</Suspense>\n {action && <FutureProgressBar {...action}></FutureProgressBar>}\n </>\n ) : (\n <MacroSetupStepCard showCloseButton={false} holder={holder} />\n );\n }\n);\n","import { Button, Content, Footer } from \"@kosdev-code/kos-ddk-components\";\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useEffect, useState, type FunctionComponent } from \"react\";\nimport { usePumpAction } from \"../../../hooks\";\nimport { FutureProgressBar } from \"../../future-progress-bar\";\nimport { HoldToPourButton } from \"../../hold-to-pour-button\";\nimport { MacroSetupStepCard } from \"../../holders\";\nimport { HolderActions } from \"../holder-actions\";\nimport { HolderNotifications } from \"../holder-notifications/holder-notifications\";\n\ninterface Props {\n holder: HolderModel;\n}\n\nexport const MSVPumpCard: FunctionComponent<Props> = kosComponent(\n ({ holder }) => {\n const { t } = useKosTranslation(\"common\");\n const [action, handleAction] = usePumpAction(holder);\n const [calibrateVolume, setCalibrateVolume] = useState<\n number | undefined\n >();\n\n useEffect(() => {\n async function updateVolume() {\n if (holder.ingredientId !== undefined) {\n const response = await holder.resolveIntentVolume(\"CALIBRATE\");\n setCalibrateVolume(Math.round(response.volume));\n }\n }\n updateVolume();\n }, [holder, holder.ingredientId]);\n const isAssigned = holder.ingredientId !== undefined;\n\n const canCalibrate = calibrateVolume && calibrateVolume > 0;\n return isAssigned ? (\n <>\n <Content contain={true}>\n <HolderNotifications holder={holder} />\n </Content>\n <Footer>\n <Button\n disabled={!canCalibrate}\n onPointerDown={() => handleAction(\"calibrate\")}\n >\n {canCalibrate\n ? t(\"intentPour\", {\n data: {\n volume: calibrateVolume,\n },\n })\n : t(\"calibrate\")}\n </Button>\n <HoldToPourButton disabled={!isAssigned} model={holder} />\n <HolderActions holder={holder} />\n </Footer>\n {action && <FutureProgressBar {...action}></FutureProgressBar>}\n </>\n ) : (\n <MacroSetupStepCard showCloseButton={false} holder={holder} />\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport {\n Button,\n Content,\n Footer,\n FuelGauge,\n Tabs,\n} from \"@kosdev-code/kos-ddk-components\";\nimport {\n type HolderModel,\n type PumpModel,\n} from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n FreestyleHolder,\n useFreestyleAssemblyContext,\n type FreestyleHolderExt,\n type FreestyleHolderModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\nimport type { TroubleAware, TroubleModel } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n getKosCompanionModel,\n kosComponent,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nimport { Suspense, useCallback, useState } from \"react\";\nimport { useFutureContainer, useHolderExperience } from \"../../../hooks\";\nimport { usePumpCalibration } from \"../../../hooks/calibration/use-pump-calibration\";\nimport { EnjoyByDate } from \"../../enjoy-by-date\";\nimport { FutureProgressBar } from \"../../future-progress-bar\";\nimport { HoldToPourButton } from \"../../hold-to-pour-button\";\nimport { HolderNotifications } from \"../holder-notifications\";\n\nconst SuperPumpContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: var(--ddk-component-super-pump-container-gap);\n`;\n\nconst CartridgeContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: var(--ddk-component-cartridge-container-gap);\n`;\n\ninterface CANSuperPumpProps {\n holder: HolderModel<FreestyleHolderExt>;\n}\n\nexport const SuperPumpCard: React.FunctionComponent<CANSuperPumpProps> =\n kosComponent(({ holder }) => {\n const context = useFreestyleAssemblyContext();\n const { t } = useKosTranslation(\"common\");\n const [selectedPumpId, setSelectedPumpId] = useState(\"all\");\n\n const cartridgeAgitator = context?.cartridgeAgitatorModels[0];\n const assigned = !!holder.ingredientId;\n const selectedPump = holder.pumps.getModel(selectedPumpId);\n const freestyleHolder = getKosCompanionModel<FreestyleHolderModel>(\n holder,\n FreestyleHolder.type\n );\n const agitated = !!freestyleHolder?.agitated;\n const { holderExperience, setHolderExperience } = useHolderExperience(\n holder,\n selectedPump\n );\n const { calibrateVolume, canCalibrate, action, handleAction } =\n usePumpCalibration(selectedPump);\n\n const tabsOnChange = useCallback((tab) => {\n setSelectedPumpId(tab.id);\n }, []);\n\n const hasFuelGuage = holder.hasFuelGuage;\n const fillPercent = holder.fillPercent;\n const { future: agitatorFuture } = useFutureContainer(cartridgeAgitator);\n\n const pumpFilter = useCallback(\n (trouble: TroubleModel) => trouble.data.pumpPath === selectedPump?.path,\n [selectedPump?.path]\n );\n\n return (\n <>\n <SuperPumpContainer>\n <Content contain={true}>\n {assigned && hasFuelGuage && (\n <CartridgeContainer>\n <FuelGauge\n size=\"large\"\n value={fillPercent}\n showBarsOverride={true}\n />\n <EnjoyByDate holder={holder} />\n </CartridgeContainer>\n )}\n <Tabs\n activeTab={selectedPumpId}\n contain={false}\n tabs={[\n {\n id: \"all\",\n label: t(\"all\"),\n content: <HolderNotifications holder={holder} />,\n },\n ...holder.pumps.data\n .filter((pump) => !pump.virtual)\n .map((pump) => {\n return {\n id: pump.id,\n label: t(`macros.${pump.name}`),\n content: (\n <HolderNotifications\n holder={pump as PumpModel<TroubleAware>}\n filter={pumpFilter}\n />\n ),\n };\n }),\n ]}\n onChange={tabsOnChange}\n showBackground={false}\n />\n </Content>\n\n <Footer>\n {selectedPump ? (\n <>\n <Button\n onPointerDown={() => setHolderExperience(\"replace-pump\")}\n >\n {t(\"replace-pump\")}\n </Button>\n <Button\n onPointerDown={() => setHolderExperience(\"calibrateSPM\")}\n >\n {t(\"calibrate\")}\n </Button>\n {canCalibrate && (\n <Button\n disabled={!canCalibrate}\n onPointerDown={() => handleAction(\"calibrate\")}\n >\n {t(\"intentPour\", {\n data: {\n volume: calibrateVolume,\n },\n })}\n </Button>\n )}\n </>\n ) : (\n <>\n {!assigned && (\n <Button\n onPointerDown={() => setHolderExperience(\"rfid-override\")}\n >\n {t(\"rfid-override\")}\n </Button>\n )}\n <Button\n onPointerDown={() => setHolderExperience(\"replace-line\")}\n >\n {t(\"replace-line\")}\n </Button>\n {agitated && (\n <Button\n onPointerDown={() => cartridgeAgitator?.testAgitate()}\n >\n {t(\"agitate\")}\n </Button>\n )}\n </>\n )}\n\n <HoldToPourButton\n disabled={!assigned}\n model={selectedPump || holder}\n />\n </Footer>\n </SuperPumpContainer>\n <Suspense>{holderExperience}</Suspense>\n {agitatorFuture && (\n <FutureProgressBar title={t(\"agitating\")} future={agitatorFuture} />\n )}\n {action && <FutureProgressBar {...action}></FutureProgressBar>}\n </>\n );\n });\n\nexport default SuperPumpCard;\n","import { Footer } from \"@kosdev-code/kos-ddk-components\";\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\nimport { type FunctionComponent } from \"react\";\nimport { HoldToPourButton } from \"../../hold-to-pour-button\";\nimport { HolderActions } from \"../holder-actions\";\nimport { HolderNotifications } from \"../holder-notifications/holder-notifications\";\n\ninterface Props {\n holder: HolderModel;\n}\n\nexport const ValveCard: FunctionComponent<Props> = kosComponent(\n ({ holder }) => (\n <>\n <HolderNotifications holder={holder} />\n <Footer>\n <HoldToPourButton model={holder} />\n <HolderActions holder={holder} />\n </Footer>\n </>\n )\n);\n","import { Button, Footer } from \"@kosdev-code/kos-ddk-components\";\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { Suspense, type FunctionComponent } from \"react\";\nimport { useHolderExperience } from \"../../../hooks\";\nimport { usePumpAction } from \"../../../hooks/actions\";\nimport { FutureProgressBar } from \"../../future-progress-bar\";\nimport { HoldToPourButton } from \"../../hold-to-pour-button\";\nimport { HolderNotifications } from \"../holder-notifications/holder-notifications\";\n\ninterface Props {\n holder: HolderModel;\n}\n\nexport const WaterPumpCard: FunctionComponent<Props> = kosComponent(\n ({ holder }) => {\n const { t } = useKosTranslation(\"common\");\n const [action, handleAction] = usePumpAction(holder);\n\n const { holderExperience, setHolderExperience } =\n useHolderExperience(holder);\n\n return (\n <>\n <HolderNotifications holder={holder} />\n <Footer>\n <HoldToPourButton model={holder} />\n <Button onPointerDown={() => handleAction(\"high-flow-test\")}>\n {t(\"high-flow-test\")}\n </Button>\n <Button onPointerDown={() => handleAction(\"low-flow-test\")}>\n {t(\"low-flow-test\")}\n </Button>\n <Button onPointerDown={() => setHolderExperience(\"diagnostics\")}>\n {t(\"diagnostics\")}\n </Button>\n <Button onPointerDown={() => setHolderExperience(\"calibrate\")}>\n {t(\"calibrate\")}\n </Button>\n </Footer>\n <Suspense>{holderExperience}</Suspense>\n {action && <FutureProgressBar {...action}></FutureProgressBar>}\n </>\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport {\n CancelProceedFooter,\n CompactCloseButton,\n Experience,\n Header,\n Modal,\n QuestionIconStyle,\n UtilityModalHeading,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useState } from \"react\";\nimport { useReboot } from \"../../hooks\";\n\nconst Container = styled.section`\n align-items: center;\n display: flex;\n flex-direction: column;\n gap: 32px;\n height: 100%;\n justify-content: space-between;\n`;\n\nconst Content = styled.div`\n display: flex;\n gap: 32px;\n flex-direction: column;\n align-items: center;\n padding: 32px;\n`;\n\nconst TextContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 12px;\n text-align: center;\n`;\n\nexport const RebootView: Experience = ({ onComplete }) => {\n const { t } = useKosTranslation(\"reboot\");\n const [closing, setClosing] = useState(false);\n const { model: rebootModel } = useReboot();\n const { componentModeOverride } = useComponentConfigurationContext();\n\n return (\n <Modal\n show={!closing}\n onClose={() => setClosing(true)}\n onClosed={onComplete}\n contain={componentModeOverride !== \"compact\"}\n >\n {componentModeOverride === \"compact\" && (\n <Header\n title={t(\"reboot\")}\n showCloseButton\n onClose={() => setClosing(true)}\n CloseButton={CompactCloseButton}\n />\n )}\n <Container>\n <Content>\n <QuestionIconStyle />\n <TextContainer>\n <UtilityModalHeading>\n {t(\"modal-heading\", \"Are you sure you want to reboot dispenser?\")}\n </UtilityModalHeading>\n </TextContainer>\n </Content>\n <CancelProceedFooter\n cancelLabel={`${t(\"cancel\", \"Cancel\")}`}\n proceedLabel={`${t(\"reboot\", \"Reboot\")}`}\n onCancel={() => setClosing(true)}\n onProceed={() => rebootModel?.completeReboot()}\n />\n </Container>\n </Modal>\n );\n};\n","import styled from \"@emotion/styled\";\nimport {\n Button,\n ErrorInputCard,\n LabelInformation,\n WorkflowModal,\n type ExperienceProps,\n type WorkflowModalProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport {\n FreestylePump,\n type FreestylePumpModel,\n type RemoteTrayModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\nimport {\n getKosCompanionModel,\n kosComponent,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useMemo, useState } from \"react\";\n\ntype State = \"idle\" | \"pump\" | \"progress\" | \"success\" | \"disableSuccess\";\n\nconst LabelInfoCentered = styled(LabelInformation)`\n text-align: center;\n`;\n\ninterface RemoteNNSModalProps extends ExperienceProps {\n remoteTray: RemoteTrayModel;\n}\n\nexport const RemoteNNSModal = kosComponent(\n ({ remoteTray, onComplete }: RemoteNNSModalProps) => {\n const { t } = useKosTranslation(\"common\", { keyPrefix: \"remote-nns\" });\n const [state, setState] = useState<State>(\"idle\");\n const [pumpCodes, setPumpCodes] = useState<Record<string, string>>({});\n const [pumpErrors, setPumpErrors] = useState<Record<string, string>>({});\n\n const holder = remoteTray.holder;\n const pumps = holder.pumps.data.filter((pump) => pump.childPump);\n const disabling = remoteTray.remoteTrayEnabled.value === true;\n\n const readyToSubmit = () =>\n pumps.every((pump) => {\n const value = pumpCodes[pump.name];\n return value !== undefined && value !== null && value !== \"\";\n });\n\n const changePumpCode = useCallback((pumpName: string, pumpCode: string) => {\n setPumpCodes((pumpCodes) => {\n return { ...pumpCodes, [pumpName]: pumpCode };\n });\n }, []);\n\n const handlePumpCodeChange = useCallback(\n (pumpName: string) =>\n (value: string = \"\") => {\n changePumpCode(pumpName, value);\n },\n [changePumpCode]\n );\n\n const toggleRemoteTray = useCallback(async () => {\n remoteTray.remoteTrayEnabled.updateProperty(disabling ? false : true);\n\n setState(disabling ? \"disableSuccess\" : \"success\");\n }, [disabling, remoteTray.remoteTrayEnabled]);\n\n const submit = useCallback(async () => {\n setState(\"progress\");\n setPumpErrors({});\n\n let hasFailure = false;\n\n await Promise.all(\n pumps.map(async (pump) => {\n try {\n const freestylePump = getKosCompanionModel<FreestylePumpModel>(\n pump,\n FreestylePump.type\n );\n\n const [error] = await freestylePump.replacePump(\n pumpCodes[pump.name]\n );\n\n if (error) {\n setPumpErrors((pumpErrors) => {\n return { ...pumpErrors, [pump.name]: error };\n });\n\n hasFailure = true;\n }\n } catch (error) {\n console.error(error);\n\n setPumpErrors((pumpErrors) => {\n return { ...pumpErrors, [pump.name]: \"unknownError\" };\n });\n\n hasFailure = true;\n }\n })\n );\n\n if (!hasFailure) {\n toggleRemoteTray();\n } else {\n setState(\"pump\");\n }\n }, [\n disabling,\n pumpCodes,\n pumps,\n remoteTray.remoteTrayEnabled,\n toggleRemoteTray,\n ]);\n\n const workflow = useMemo((): Record<State, WorkflowModalProps> => {\n return {\n idle: {\n title: disabling ? t(\"disable-title\") : t(\"idle-title\"),\n information: (\n <LabelInfoCentered>\n {disabling ? t(\"disable-info\") : t(\"idle-info\")}\n </LabelInfoCentered>\n ),\n footer: (\n <Button\n onPointerDown={() => {\n if (disabling) {\n // If disabling, short circuit the workflow to just toggle\n // the remote tray setting...\n toggleRemoteTray();\n } else {\n setState(\"pump\");\n }\n }}\n >\n {disabling ? t(\"disable\") : t(\"enable\")}\n </Button>\n ),\n status: \"information\",\n },\n\n pump: {\n title: t(\"pump-title\"),\n information: (\n <>\n <LabelInfoCentered>{t(\"pump-info\")}</LabelInfoCentered>\n {pumps.map((pump) => (\n <ErrorInputCard\n key={pump.name}\n layout=\"hex\"\n description={\n pumpErrors[pump.name]\n ? t(`errors.${pumpErrors[pump.name]}`)\n : \"\"\n }\n value={pumpCodes[pump.name] ?? \"\"}\n label={t(`pumps.${pump.name}`)}\n onChange={handlePumpCodeChange(pump.name)}\n />\n ))}\n </>\n ),\n footer: (\n <>\n <Button disabled={!readyToSubmit()} onPointerDown={submit}>\n {t(\"enter\")}\n </Button>\n <Button onPointerDown={onComplete}>{t(\"cancel\")}</Button>\n </>\n ),\n },\n\n progress: {\n title: t(\"progress-title\"),\n information: (\n <LabelInfoCentered>{t(\"progress-info\")}</LabelInfoCentered>\n ),\n status: \"loading\",\n },\n\n success: {\n title: t(\"success-title\"),\n information: (\n <LabelInfoCentered>{t(\"success-info\")}</LabelInfoCentered>\n ),\n status: \"success\",\n },\n\n disableSuccess: {\n title: t(\"disable-success-title\"),\n information: (\n <LabelInfoCentered>{t(\"disable-success-info\")}</LabelInfoCentered>\n ),\n status: \"success\",\n },\n };\n }, [\n changePumpCode,\n disabling,\n onComplete,\n pumpCodes,\n pumpErrors,\n pumps,\n submit,\n t,\n ]);\n\n return <WorkflowModal {...workflow[state]} onClose={() => onComplete()} />;\n }\n);\n","import type {\n FreestyleAssemblyModel,\n RemoteTrayModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\nimport { kosComponent, KosLog } from \"@kosdev-code/kos-ui-sdk\";\nimport { SuperPumpCard } from \"../../pump-cards\";\n\ninterface RemoteTrayProps {\n assembly: FreestyleAssemblyModel;\n cardModel: RemoteTrayModel;\n}\n\nexport const RemoteTrayDetail: React.FunctionComponent<RemoteTrayProps> =\n kosComponent(({ cardModel }) => {\n KosLog.debug(`RemoteTray`, cardModel.name);\n\n return <SuperPumpCard holder={cardModel.holder} />;\n });\n\nexport default RemoteTrayDetail;\n","import styled from \"@emotion/styled\";\nimport { StatusIndicator } from \"@kosdev-code/kos-ddk-components\";\nimport type {\n FreestyleAssemblyModel,\n RemoteTrayModel,\n} from \"@kosdev-code/kos-freestyle-sdk\";\n\nimport {\n kosComponent,\n KosLog,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useTroubleData, useTroubleDecoration } from \"../../../hooks\";\nimport { troubleLabelFactory } from \"../../../utils\";\n\ninterface RemoteTrayProps {\n assembly: FreestyleAssemblyModel;\n cardModel: RemoteTrayModel;\n}\n\ninterface FooterProps {\n color?: string;\n}\nconst Footer = styled.div<FooterProps>`\n font-size: var(--ddk-component-holder-card-footer-font-size);\n color: ${(props) => props.color ?? \"var(--ddk-generic-color-black)\"};\n position: absolute;\n bottom: 6px;\n`;\n\nexport const RemoteTraySummary: React.FunctionComponent<RemoteTrayProps> =\n kosComponent((props) => {\n KosLog.debug(`summary component loaded for holder ${props}`);\n KosLog.info(`render agitator summary for holder ${props.cardModel.name}`);\n\n const { t } = useKosTranslation(\"troubles\");\n const remoteTray = props.cardModel;\n const { hasTroubles, highestTrouble } = useTroubleDecoration(remoteTray);\n const troubleLabels = troubleLabelFactory(highestTrouble);\n\n const data = useTroubleData(highestTrouble);\n\n return hasTroubles ? (\n <Footer>\n {t(troubleLabels.summary, {\n context: highestTrouble?.deferred ? \"queued\" : undefined,\n data: data,\n })}\n </Footer>\n ) : (\n <StatusIndicator size=\"small\" status={\"completed\"} />\n );\n });\n\nexport default RemoteTraySummary;\n","import {\n StatusBar,\n type ExperienceProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useEffect, useState } from \"react\";\nimport { FailureMessage, SuccessMessage } from \"../future-progress-bar\";\n\ninterface ReplaceLineProps extends ExperienceProps {\n holder: HolderModel;\n}\n\nexport const ReplaceLine = kosComponent(\n ({ holder, onComplete }: ReplaceLineProps) => {\n const { t } = useKosTranslation(\"replace-line\");\n const [status, setStatus] = useState<\"success\" | \"failure\" | undefined>();\n const [error, setError] = useState();\n\n useEffect(() => {\n holder.replaceLine().then(() => {\n setStatus(\"success\");\n });\n }, [holder]);\n\n const close = () => {\n if (error) {\n setStatus(undefined);\n return;\n }\n onComplete();\n };\n\n return (\n <StatusBar show={status !== undefined} onClose={close}>\n {status === \"failure\" ? (\n <FailureMessage>{t(error || \"unknownError\")}</FailureMessage>\n ) : status === \"success\" ? (\n <SuccessMessage>{t(\"success\")}</SuccessMessage>\n ) : null}\n </StatusBar>\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport {\n BackButton,\n Button,\n Content,\n Footer,\n Header,\n InputCard,\n Modal,\n StatusBar,\n useComponentConfigurationContext,\n type ExperienceProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { PumpModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n FreestylePump,\n FreestylePumpModel,\n type FreestylePumpServices,\n} from \"@kosdev-code/kos-freestyle-sdk\";\nimport {\n getKosCompanionModel,\n kosComponent,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useState } from \"react\";\nimport { FailureMessage, SuccessMessage } from \"../future-progress-bar\";\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n gap: 32px;\n height: 100%;\n`;\n\ninterface ReplacePumpProps extends ExperienceProps {\n pump: PumpModel;\n}\n\nexport const ReplacePump = kosComponent(\n ({ pump, onComplete }: ReplacePumpProps) => {\n const [closing, setClosing] = useState(false);\n const { t } = useKosTranslation(\"replace-pump\");\n const { componentModeOverride } = useComponentConfigurationContext();\n const [pumpCalibrationCode, setPumpCalibrationCode] = useState<string>();\n const [status, setStatus] = useState<\"success\" | \"failure\" | undefined>();\n const [error, setError] =\n useState<FreestylePumpServices.ReplacePumpErrorType>();\n const freestylePump = getKosCompanionModel<FreestylePumpModel>(\n pump,\n FreestylePump.type\n );\n const label = pump.name;\n\n const validatePumpCalibrationCode = useCallback(\n (inputValue?: string) => {\n if (inputValue !== undefined && inputValue.length === 0)\n return t(\"pump-calibration-length-error\");\n\n return undefined;\n },\n [t]\n );\n\n const replacePump = useCallback(async () => {\n if (pumpCalibrationCode === undefined) return;\n\n const [error] = await freestylePump.replacePump(pumpCalibrationCode);\n\n if (error) {\n setStatus(\"failure\");\n setError(error);\n } else {\n setStatus(\"success\");\n }\n }, [freestylePump, pumpCalibrationCode]);\n\n const close = () => {\n if (error) {\n setStatus(undefined);\n return;\n }\n setClosing(true);\n };\n\n return (\n <>\n <Modal\n contain={componentModeOverride !== \"compact\"}\n onClosed={onComplete}\n show={!closing}\n >\n <Container>\n <Header\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n title={\n label\n ? t(\"label-replace-pump\", {\n label,\n })\n : t(\"replace-pump\")\n }\n showOpenButton={false}\n onClose={() => setClosing(true)}\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n />\n\n <Content align=\"top\">\n <InputCard\n isValid={validatePumpCalibrationCode}\n label={t(\"enter-pump-calibration-code\")}\n layout=\"hex\"\n value={pumpCalibrationCode}\n onChange={(value) => {\n setError(undefined);\n setPumpCalibrationCode(value);\n }}\n />\n </Content>\n <Footer>\n <Button\n mode=\"primary\"\n disabled={!pumpCalibrationCode || !!error}\n onPointerDown={replacePump}\n >\n {t(\"replace-pump\")}\n </Button>\n </Footer>\n </Container>\n </Modal>\n <StatusBar show={status !== undefined} onClose={close}>\n {status === \"failure\" ? (\n <FailureMessage>{t(error || \"unknownError\")}</FailureMessage>\n ) : status === \"success\" ? (\n <SuccessMessage>{t(\"success\")}</SuccessMessage>\n ) : null}\n </StatusBar>\n </>\n );\n }\n);\n","import styled from \"@emotion/styled\";\nimport {\n BackButton,\n Button,\n Content,\n ErrorInputCard,\n FailureCard,\n Footer,\n Header,\n InfoContainer,\n Modal,\n ProgressBar,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useState } from \"react\";\nimport type { HolderExperienceProps } from \"../../hooks\";\n\nconst hexRegex = /^[0-9a-fA-F]+$/;\n\nconst isHex = (string) => hexRegex.test(string);\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n height: 100%;\n`;\n\nexport const RFIDOverride = kosComponent(\n ({ holder, onComplete }: HolderExperienceProps) => {\n const label = holder.name;\n\n const [closing, setClosing] = useState(false);\n const { t } = useKosTranslation(\"rfid-override\");\n const { componentModeOverride } = useComponentConfigurationContext();\n\n const [cartridgeId, setCartridgeId] = useState<string>();\n const [cartridgeCode, setCartridgeCode] = useState<string>();\n\n const [error, setError] = useState<string>();\n const [cartridgeIdError, setCartridgeIdError] = useState<string>();\n const [cartridgeCodeError, setCartridgeCodeError] = useState<string>();\n\n const validateCartridgeID = (inputValue?: string) => {\n if (inputValue !== undefined && inputValue.length !== 12)\n return t(\"errIdLen\");\n\n // Todo: Validate the ID format - right now we're assuming there is no\n // pattern, but are testing for hex characters...\n if (!isHex(inputValue)) return t(\"errIdFormat\");\n\n return undefined;\n };\n\n const validateCode = (inputValue?: string) => {\n if (inputValue !== undefined && inputValue.length !== 8)\n return t(\"errCodeLen\");\n\n // Todo: Validate the code format - right now we're assuming there is no\n // pattern, but are testing for hex characters...\n if (!isHex(inputValue)) return t(\"errCodeFormat\");\n\n return undefined;\n };\n\n const override = async () => {\n try {\n await holder.overrideRfidCode({\n stickerId: cartridgeId,\n stickerCode: cartridgeCode,\n });\n setClosing(true);\n } catch (error: any) {\n switch (error.type) {\n case \"errIdLen\":\n case \"errIdFormat\":\n setCartridgeIdError(error.type);\n break;\n case \"errCodeLen\":\n case \"errCodeFormat\":\n setCartridgeCodeError(error.type);\n break;\n case \"errVerify\":\n case \"errBadJson\":\n setError(error.type);\n break;\n }\n }\n };\n\n return (\n <Modal\n contain={componentModeOverride !== \"compact\"}\n mode=\"maximized\"\n onClosed={onComplete}\n show={!closing}\n >\n <Header\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n title={\n label\n ? t(\"label-rfid-override\", {\n label,\n })\n : t(\"rfid-override\")\n }\n showOpenButton={false}\n onClose={() => setClosing(true)}\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n />\n <Container>\n <Content align=\"top\">\n <InfoContainer>{t(\"info\")}</InfoContainer>\n <ErrorInputCard\n isValid={validateCartridgeID}\n description={cartridgeIdError ? t(cartridgeIdError) : undefined}\n label={t(\"enter-cartridge-id\")}\n layout=\"hex\"\n value={cartridgeId}\n onChange={(value) => {\n setCartridgeIdError(undefined);\n setCartridgeId(value);\n }}\n />\n <ErrorInputCard\n isValid={validateCode}\n description={\n cartridgeCodeError ? t(cartridgeCodeError) : undefined\n }\n label={t(\"enter-code\")}\n layout=\"hex\"\n value={cartridgeCode}\n onChange={(value) => {\n setCartridgeCodeError(undefined);\n setCartridgeCode(value);\n }}\n />\n </Content>\n <Footer>\n <Button\n mode=\"primary\"\n disabled={!cartridgeId || !cartridgeCode}\n onPointerDown={override}\n >\n {t(\"override\")}\n </Button>\n </Footer>\n {error && (\n <ProgressBar\n onClose={() => setError(undefined)}\n renderFailure={\n <FailureCard\n heading={t(\"rfid-override\")}\n message={t(error, { holder: holder.name })}\n />\n }\n show\n status=\"failure\"\n title=\"\"\n value={0}\n />\n )}\n </Container>\n </Modal>\n );\n }\n);\n","import { useSearchParams } from \"react-router-dom\";\nimport { useApplicationContext } from \"../../contexts\";\nimport { useEffect, useState } from \"react\";\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\nimport { useNavigate } from \"@kosdev-code/kos-ddk-components\";\n\ninterface SetupRequiredProps {\n setupPath: string;\n}\n\nexport const SetupRequired = kosComponent(\n ({ setupPath }: SetupRequiredProps) => {\n const { model: app } = useApplicationContext();\n const [checked, setChecked] = useState(false);\n\n const [searchParams] = useSearchParams();\n const skipSetup = !!searchParams.get(\"skipSetup\");\n\n const navigate = useNavigate();\n\n useEffect(() => {\n if (!checked && app?.setupRequired) {\n setChecked(true);\n if (!skipSetup) navigate(setupPath);\n }\n }, [app?.setupRequired, checked, navigate, setupPath, skipSetup]);\n\n return null;\n }\n);\n","import styled from \"@emotion/styled\";\nimport {\n Sidebar,\n SidebarProps,\n StatusIndicator,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { SetupExtension } from \"../../extensions\";\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\nimport React from \"react\";\nimport { useViewExtensions } from \"../../hooks/extensions\";\nimport {\n SetupStepContainerProps,\n withSetupStepContainer,\n} from \"../../hooks/setup-step-container\";\n\nexport const StepItem = styled.div`\n cursor: pointer;\n display: flex;\n gap: 8px;\n align-items: center;\n`;\n\nexport const StepTitle = styled.div`\n color: var(--ddk-generic-color-grey-100, #171717);\n font-size: var(--ddk-component-sidebar-font-size-medium);\n font-style: normal;\n font-weight: 600;\n line-height: 135%;\n letter-spacing: 0.44px;\n white-space: nowrap;\n overflow: hidden;\n`;\n\ntype SetupSidebarProps = SidebarProps &\n SetupStepContainerProps & { onStepSelected: (stepId: string) => void };\n\nexport const SetupSidebarComp: React.FunctionComponent<SetupSidebarProps> =\n kosComponent(({ setupStepContainer, onStepSelected, ...props }) => {\n const { t, labelMap } = useViewExtensions({\n defaultNamespace: \"setup\",\n extensionPoint: SetupExtension.id,\n });\n const activeStep = setupStepContainer?.currentStep;\n const steps =\n setupStepContainer?.data.map((step) => (\n <StepItem\n key={step.id}\n onPointerDown={() => {\n setupStepContainer.setCurrentStep(step.id);\n onStepSelected(step.id);\n }}\n >\n <StatusIndicator\n size=\"large\"\n status={\n activeStep === step\n ? \"active\"\n : step.complete\n ? \"completed\"\n : \"pending\"\n }\n />\n\n <StepTitle>{t(labelMap[step.name] ?? step.titleKey)}</StepTitle>\n </StepItem>\n )) || [];\n return <Sidebar {...props}>{steps}</Sidebar>;\n });\n\nexport const SetupSidebar = withSetupStepContainer(SetupSidebarComp);\n","import { FrameBody, FrameContainer } from \"@kosdev-code/kos-ddk-components\";\nimport {\n kosComponent,\n useSoftwareInfo,\n type NodeInfoType,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nexport const Software = kosComponent(() => {\n const { model: softwareModel } = useSoftwareInfo();\n\n return (\n softwareModel?.nodes &&\n softwareModel.nodes.map((item: NodeInfoType, index: number) => (\n <FrameContainer key={index} name={item.nodeName}>\n <div key={\"kosVersion\"}>\n <FrameBody\n keyList={[]}\n tableHead={`KOS Release Version: ${item.kosVersion}`}\n tableData={[]}\n tableLayout=\"fixed\"\n />\n </div>\n {Object.keys(item.group).map((el, index) => (\n <div key={index}>\n <FrameBody\n keyList={[\"name\", \"version\"]}\n tableHead={el === \"undefined\" ? \"Apps\" : el}\n tableData={item.group[el] as any[]}\n tableLayout=\"fixed\"\n />\n </div>\n ))}\n </FrameContainer>\n ))\n );\n});\n","import styled from \"@emotion/styled\";\nimport {\n BodyMediumInformation,\n Button,\n InputCard,\n LabelInformation,\n WorkflowModal,\n type ExperienceProps,\n type WorkflowModalProps,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { SpmPumpModel } from \"@kosdev-code/kos-freestyle-sdk\";\nimport { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { useFutureContainer } from \"../../hooks/future/use-future-container\";\nimport { FutureProgressBar } from \"../future-progress-bar\";\n\ntype State =\n | \"preparation-idle\"\n | \"preparation-in-progress\"\n | \"preparation-success\"\n | \"preparation-failed\"\n | \"calibration-idle\"\n | \"calibration-in-progress\"\n | \"calibration-input\"\n | \"calibration-input-confirmation\"\n | \"verification-idle\"\n | \"verification-in-progress\"\n | \"verification-trouble\"\n | \"verification-input\"\n | \"verification-input-confirmation\"\n | \"verification-success\"\n | \"verification-failure\"\n | \"failure\";\n\nconst LabelInformationPreformatted = styled(LabelInformation)`\n white-space: pre-wrap;\n`;\n\ninterface SPMFieldCalibrationModalProps extends ExperienceProps {\n pump: SpmPumpModel;\n}\n\nexport const SPMFieldCalibrationModal = kosComponent(\n ({ pump, onComplete }: SPMFieldCalibrationModalProps) => {\n const { t } = useKosTranslation(\"common\", {\n keyPrefix: \"spm-field-calibration\",\n });\n const [state, setState] = useState<State>(\"preparation-idle\");\n const [error, setError] = useState<string | undefined>();\n const [volume1, setVolume1] = useState<string>();\n const [volume2, setVolume2] = useState<string>();\n\n const { clearFuture, future } = useFutureContainer(pump);\n\n useEffect(() => {\n switch (future?.endState) {\n case \"CANCEL\":\n switch (state) {\n case \"preparation-in-progress\":\n setState(\"preparation-idle\");\n break;\n default:\n setError(\"calibration-canceled\");\n setState(\"failure\");\n }\n break;\n case \"SUCCESS\":\n switch (state) {\n case \"preparation-in-progress\":\n setState(\"preparation-success\");\n break;\n case \"calibration-in-progress\":\n setState(\"calibration-input\");\n break;\n case \"verification-in-progress\":\n setState(\"verification-input\");\n break;\n }\n break;\n case \"FAIL\":\n case \"ABORT\":\n setError(\"\");\n setState(\"failure\");\n break;\n }\n }, [future?.endState, future?.reason, state]);\n\n const workflow = useMemo((): Record<State, WorkflowModalProps> => {\n return {\n \"preparation-idle\": {\n information: (\n <LabelInformationPreformatted>\n {t(\"preparation-idle-info\")}\n </LabelInformationPreformatted>\n ),\n footer: (\n <Button\n onPointerDown={() => {\n clearFuture();\n pump.performPreCalibrate();\n setState(\"preparation-in-progress\");\n }}\n >\n {t(\"preparation-action\")}\n </Button>\n ),\n status: \"information\",\n },\n\n \"preparation-in-progress\": {\n information: (\n <LabelInformation>\n {t(\"preparation-progress-info\")}\n </LabelInformation>\n ),\n footer: <Button disabled>{t(\"preparation-action\")}</Button>,\n status: \"loading\",\n },\n\n \"preparation-success\": {\n information: (\n <LabelInformation>{t(\"preparation-success-info\")}</LabelInformation>\n ),\n footer: (\n <Button onPointerDown={() => setState(\"calibration-idle\")}>\n {t(\"preparation-success-action\")}\n </Button>\n ),\n status: \"success\",\n },\n\n \"preparation-failed\": {},\n\n \"calibration-idle\": {\n information: (\n <LabelInformationPreformatted>\n {t(\"calibration-idle-info\")}\n </LabelInformationPreformatted>\n ),\n footer: (\n <Button\n onPointerDown={() => {\n clearFuture();\n pump.performCalibrate();\n setState(\"calibration-in-progress\");\n }}\n >\n {t(\"calibrate\")}\n </Button>\n ),\n status: \"information\",\n },\n\n \"calibration-in-progress\": {\n information: (\n <LabelInformation>\n {t(\"calibration-progress-info\")}\n </LabelInformation>\n ),\n status: \"loading\",\n },\n\n \"calibration-input\": {\n information: (\n <>\n <LabelInformation>{t(\"calibration-input-info\")}</LabelInformation>\n <InputCard\n label=\"Volume\"\n unitValue=\"ml\"\n layout=\"num\"\n onChange={(value) => {\n if (value === undefined) return;\n setVolume1(value);\n }}\n value={volume1 !== undefined ? volume1 : \"\"}\n />\n </>\n ),\n footer: (\n <Button\n disabled={volume1 === undefined}\n onPointerDown={() => {\n if (volume1 === undefined) return;\n setState(\"verification-idle\");\n }}\n >\n {t(\"proceed\")}\n </Button>\n ),\n status: \"information\",\n },\n\n // Todo: calibration-input-confirmation if necessary...\n \"calibration-input-confirmation\": {},\n\n \"verification-idle\": {\n information: (\n <LabelInformationPreformatted>\n {t(\"verification-idle-info\")}\n </LabelInformationPreformatted>\n ),\n footer: (\n <Button\n onPointerDown={async () => {\n if (volume1 === undefined) return;\n clearFuture();\n pump.performVerify(volume1, future?.clientData);\n setState(\"verification-in-progress\");\n }}\n >\n {t(\"initiate-verification-pour\")}\n </Button>\n ),\n status: \"information\",\n },\n\n \"verification-in-progress\": {\n information: (\n <LabelInformation>\n {t(\"verification-progress-info\")}\n </LabelInformation>\n ),\n status: \"loading\",\n },\n\n \"verification-trouble\": {},\n\n \"verification-input\": {\n information: (\n <>\n <LabelInformation>\n {t(\"verification-input-info\")}\n </LabelInformation>\n <InputCard\n label=\"Volume\"\n unitValue=\"ml\"\n layout=\"num\"\n onChange={(value) => {\n if (value === undefined) return;\n setVolume2(value);\n }}\n value={volume2 !== undefined ? volume2 : \"\"}\n />\n </>\n ),\n footer: (\n <Button\n disabled={volume2 === undefined}\n onPointerDown={async () => {\n if (volume1 === undefined || volume2 === undefined) return;\n\n clearFuture();\n\n const [error, data] = await pump.performComplete(\n volume1,\n volume2,\n future?.clientData\n );\n\n if (error) {\n setError(error);\n setState(\"failure\");\n } else {\n setState(\"verification-success\");\n }\n }}\n >\n {t(\"proceed\")}\n </Button>\n ),\n status: \"information\",\n },\n\n // Todo: verification-input-confirmation if necessary...\n \"verification-input-confirmation\": {},\n\n \"verification-success\": {\n information: (\n <LabelInformation>\n {t(\"verification-success-info\")}\n </LabelInformation>\n ),\n footer: (\n <Button onPointerDown={onComplete}>{t(\"exit-calibration\")}</Button>\n ),\n status: \"success\",\n },\n\n \"verification-failure\": {\n information: (\n <LabelInformation>\n {t(\"verification-failed-info\", {\n data: { ingredient: pump.name },\n })}\n </LabelInformation>\n ),\n footer: (\n <Button onPointerDown={onComplete}>{t(\"exit-calibration\")}</Button>\n ),\n status: \"error\",\n },\n\n failure: {\n information: (\n <>\n <LabelInformation>{t(\"calibration-failed\")}</LabelInformation>\n <BodyMediumInformation>\n {t(`error.${error || \"unknownError\"}`)}\n </BodyMediumInformation>\n </>\n ),\n footer: (\n <Button onPointerDown={onComplete}>{t(\"exit-calibration\")}</Button>\n ),\n status: \"error\",\n },\n };\n }, [\n clearFuture,\n error,\n future?.clientData,\n onComplete,\n pump,\n t,\n volume1,\n volume2,\n ]);\n\n let futureProgressBarTitle;\n switch (state) {\n case \"preparation-in-progress\":\n futureProgressBarTitle = \"preparation-progress-title\";\n break;\n case \"calibration-in-progress\":\n futureProgressBarTitle = \"calibration-progress-title\";\n break;\n case \"verification-in-progress\":\n futureProgressBarTitle = \"verification-progress-title\";\n break;\n default:\n futureProgressBarTitle = \"initiating\";\n }\n\n return (\n <>\n <WorkflowModal\n title={t(\"title\", { data: { ingredient: pump.name } })}\n {...workflow[state]}\n onClose={() => onComplete()}\n />\n {future && (\n <FutureProgressBar\n title={t(futureProgressBarTitle)}\n future={future}\n />\n )}\n </>\n );\n }\n);\n","import styled from \"@emotion/styled\";\n\nimport { DynamicComponent } from \"@kosdev-code/kos-ui-plugin\";\nimport { kosAutoEffect, kosComponent, KosLog } from \"@kosdev-code/kos-ui-sdk\";\nimport { useEffect, useState } from \"react\";\nimport { TroubleActionExtension } from \"../../extensions\";\nimport { usePluginExtensions } from \"../../hooks\";\nimport { useTroubleActionState } from \"../../hooks/trouble-action\";\nconst log = KosLog.createLogger({ name: \"state-experience\" });\nlog.debug(\"state-experience component loaded\");\n\nconst StateExperienceContainer = styled.div``;\n\ninterface Props {}\nexport const StateExperience: React.FunctionComponent<Props> = kosComponent(\n () => {\n const { getExtensions } = usePluginExtensions();\n const { model: troubleAction } = useTroubleActionState();\n\n const [content, setContent] = useState<React.ReactNode | null>(null);\n\n useEffect(() => {\n const dispose = kosAutoEffect(() => {\n const ext = getExtensions(TroubleActionExtension.id);\n\n // Helper function to find stateKey for a given troubleType\n const getStateKeyForTroubleType = (\n troubleType: string\n ): string | undefined => {\n const extension = ext.find(\n (e) => (e.data as any).troubleType === troubleType\n );\n const data = extension?.data as any;\n return extension ? data.stateKey ?? data.troubleType : undefined;\n };\n\n const experienceMap = ext.reduce<Record<string, any>>(\n (acc, extension) => {\n const data = extension.data as any;\n const mapKey = data.stateKey ?? data.troubleType;\n acc[mapKey] = {\n extension: TroubleActionExtension.id,\n module: extension.id,\n namespace: data.namespace,\n title: data.title,\n stateValue: data.stateValue ?? data.troubleType,\n };\n\n return acc;\n },\n {} as Record<string, any>\n );\n\n const currentTroubleType = troubleAction?.activeTroubleType;\n const currentTrouble = troubleAction?.activeTrouble;\n\n // Fix: Use stateKey for lookup to match the mapping logic\n const currentStateKey = currentTroubleType\n ? getStateKeyForTroubleType(currentTroubleType)\n : undefined;\n\n const dynamicComp = currentStateKey\n ? experienceMap[currentStateKey]\n : undefined;\n\n const _content = dynamicComp ? (\n <DynamicComponent\n {...dynamicComp}\n props={{ trouble: currentTrouble }}\n />\n ) : null;\n\n setContent(_content);\n });\n return dispose;\n }, [getExtensions, troubleAction]);\n\n return <StateExperienceContainer>{content}</StateExperienceContainer>;\n }\n);\n\nexport default StateExperience;\n","import {\n useDateProps,\n useKosRegions,\n useKosTime,\n type DaysOfWeekFilter,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useCallback, useState } from \"react\";\nimport { DatePickerCard } from \"../date-picker-card\";\n\nconst daysOfWeekFilter: DaysOfWeekFilter = [0, 6];\n\nexport const SystemDatePickerCard = () => {\n const { regionModel } = useKosRegions();\n const { model: timeModel } = useKosTime();\n const [currentTime, setCurrentTime] = useState<Date>(new Date());\n const currentYear = currentTime.getFullYear();\n\n const dateData = useDateProps({\n formatOptions: {\n dayFormat: \"short\",\n yearFormat: \"long\",\n monthFormat: \"long\",\n formatString: regionModel?.selectedDateFormat || \"yyyy/MM/dd\",\n },\n filterOptions: {\n daysOfWeekFilter: daysOfWeekFilter,\n yearsRange: [currentYear - 10, currentYear + 10],\n },\n });\n\n const dateOnChangeHandler = useCallback(\n (field, value) => {\n switch (field) {\n case \"year\":\n dateData.dateActions.setYear(value.id);\n break;\n case \"month\":\n dateData.dateActions.setMonth(value.id);\n break;\n case \"day\":\n dateData.dateActions.setDay(value.id);\n break;\n }\n },\n [dateData.dateActions]\n );\n\n const dateOnDiscardHandler = useCallback(() => {\n dateData.dateActions.setYear(currentTime.getFullYear());\n dateData.dateActions.setMonth(currentTime.getMonth());\n dateData.dateActions.setDay(currentTime.getDate());\n }, [currentTime, dateData.dateActions]);\n\n const dateOnSaveHandler = useCallback(\n async ({ day, month, year }) => {\n dateData.dateActions.setYear(year);\n dateData.dateActions.setMonth(month);\n dateData.dateActions.setDay(day);\n\n await timeModel?.updateSystemDate({\n day: day,\n month: month,\n year: year,\n });\n\n setCurrentTime(new Date());\n },\n [dateData.dateActions, timeModel]\n );\n\n return (\n <DatePickerCard\n onDiscard={dateOnDiscardHandler}\n onChange={dateOnChangeHandler}\n onSave={dateOnSaveHandler}\n />\n );\n};\n","import {\n SwitchPickerCard,\n type MultiPickerCardProps,\n type SwitchPickerCardItem,\n} from \"@kosdev-code/kos-ddk-components\";\nimport {\n kosComponent,\n useKosRegions,\n useKosTime,\n useKosTranslation,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nexport type TimeZonePickerCardProps = Omit<\n MultiPickerCardProps<number>,\n \"onSave\" | \"data\"\n>;\n\nexport const TimeZonePickerCard = kosComponent(\n ({ ...props }: TimeZonePickerCardProps) => {\n const { regionModel } = useKosRegions();\n const { model: timeModel } = useKosTime();\n const { t } = useKosTranslation(\"common\");\n\n const allTimeZoneData = regionModel?.allTimeZones.map((timeZone) => {\n return { id: timeZone, label: timeZone.replace(/_/g, \" \") };\n });\n\n const timeZoneData = regionModel?.timeZones?.map((timeZone) => {\n return { id: timeZone, label: timeZone.replace(/_/g, \" \") };\n });\n\n const data: SwitchPickerCardItem<string>[] = [\n {\n id: \"region\",\n label: t(\"suggested\"),\n items: timeZoneData || [],\n },\n {\n id: \"all\",\n label: t(\"all\"),\n items: allTimeZoneData || [],\n },\n ];\n\n return (\n <SwitchPickerCard\n {...props}\n label={t(\"time-zone\")}\n data={data}\n displayValue={(timeModel?.timezone as string).replace(\"_\", \" \")}\n loop={false}\n selectedItemId={timeModel?.timezone as string}\n onSave={timeModel?.updateSystemTimezone}\n closeButtonLabel={t(\"close\", \"Close\") || undefined}\n cancelButtonLabel={t(\"discard-changes\", \"Discard Changes\") || undefined}\n proceedButtonLabel={t(\"save\", \"Save\") || undefined}\n />\n );\n }\n);\n","import {\n MultiPickerCard,\n SettingsSubheading,\n SwitchCard,\n TabContainer,\n} from \"@kosdev-code/kos-ddk-components\";\nimport { TimeIcon } from \"@kosdev-code/kos-ddk-styles\";\nimport {\n kosComponent,\n useKosRegions,\n useKosTime,\n useKosTranslation,\n useRegionTimeProps,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { useEffect, useMemo } from \"react\";\nimport { TimeZonePickerCard } from \"../time-zone-picker-card\";\nimport { SystemDatePickerCard } from \"../system-date-picker-card\";\n\ninterface Props {\n showHeading?: boolean;\n}\n\nexport const TimeSettings = kosComponent(({ showHeading }: Props) => {\n const { t } = useKosTranslation(\"region\");\n const { regionModel } = useKosRegions();\n const { model: timeModel } = useKosTime();\n\n const {\n amPmOptions,\n formattedTime,\n hourOptions,\n minuteOptions,\n setTime,\n time,\n } = useRegionTimeProps();\n\n const timeHours = time.getHours();\n\n const hr12Options = useMemo(\n () => [\n {\n id: \"hr\",\n items: hourOptions,\n selectedItemId: timeHours < 12 ? timeHours : timeHours - 12,\n loop: true,\n },\n {\n id: \"min\",\n items: minuteOptions,\n selectedItemId: time.getMinutes(),\n loop: true,\n },\n {\n id: \"ampm\",\n items: amPmOptions,\n selectedItemId: timeHours < 12 ? \"AM\" : \"PM\",\n },\n ],\n [amPmOptions, hourOptions, minuteOptions, time, timeHours]\n );\n\n const hr24Options = useMemo(\n () => [\n {\n id: \"hr\",\n items: hourOptions,\n selectedItemId: timeHours,\n loop: true,\n },\n {\n id: \"min\",\n items: minuteOptions,\n selectedItemId: time.getMinutes(),\n loop: true,\n },\n ],\n [hourOptions, minuteOptions, time, timeHours]\n );\n\n useEffect(() => {\n const interval = setInterval(() => {\n const currentTime = new Date();\n\n setTime(currentTime);\n }, 30000);\n\n return () => {\n clearInterval(interval);\n };\n }, [setTime]);\n\n return (\n <TabContainer>\n {showHeading && (\n <SettingsSubheading>\n {t(\"time-settings\", \"Time Settings\")}\n </SettingsSubheading>\n )}\n\n {regionModel?.dateFormatOptions?.length && (\n <SwitchCard\n label={t(\"date-format\", \"Date Format\")}\n value={\n regionModel?.dateFormatOptions?.find(\n (item) => item.format === regionModel.selectedDateFormat\n )?.id\n }\n options={regionModel?.dateFormatOptions?.map((item) => {\n return { label: item.format.toUpperCase(), ...item };\n })}\n onChange={(val) =>\n val && regionModel?.setSelectedDateFormat(String(val))\n }\n />\n )}\n\n <SystemDatePickerCard />\n\n <TimeZonePickerCard />\n\n {regionModel?.timeFormatOptions?.length && (\n <SwitchCard\n label={t(\"time-format\", \"Time Format\")}\n value={\n regionModel?.timeFormatOptions?.find(\n (item) => item.format === regionModel.selectedTimeFormat\n )?.id\n }\n options={regionModel?.timeFormatOptions\n ?.map((item) => {\n return { label: item?.ampm ? \"12 HR\" : \"24 HR\", ...item };\n })\n .reverse()}\n onChange={(val) =>\n val && regionModel?.setSelectedTimeFormat(String(val))\n }\n />\n )}\n\n <MultiPickerCard<number | string>\n data={regionModel?.is12HourTimeFormat ? hr12Options : hr24Options}\n icon={TimeIcon}\n displayValue={formattedTime}\n label={t(\"current-time\", \"Current Time\")}\n closeButtonLabel={t(\"close\", \"Close\") || undefined}\n cancelButtonLabel={t(\"discard-changes\", \"Discard Changes\") || undefined}\n proceedButtonLabel={t(\"save\", \"Save\") || undefined}\n onSave={(val) => {\n const hours = regionModel?.is12HourTimeFormat\n ? val.ampm === \"AM\"\n ? (val.hr as number)\n : (val.hr as number) + 12\n : (val.hr as number);\n\n const minutes = val.min as number;\n\n const newTime = new Date(time);\n newTime.setHours(hours);\n newTime.setMinutes(minutes);\n\n setTime(newTime);\n\n timeModel?.updateSystemTime({\n hour: hours,\n min: minutes,\n sec: 0,\n });\n }}\n />\n </TabContainer>\n );\n});\n","import { kosComponent, useKosTranslation } from \"@kosdev-code/kos-ui-sdk\";\nimport { withSettings } from \"../../hooks\";\nimport { ConfigPropToggleCard } from \"..\";\nimport {\n SettingsSubheading,\n TabContainer,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { SettingsModel } from \"@kosdev-code/kos-ddk-models\";\n\ninterface WaterSettingsProps {\n settings: SettingsModel;\n showHeading?: boolean;\n}\n\nexport const WaterSettings = withSettings(\n kosComponent<WaterSettingsProps>(({ settings, showHeading }) => {\n const { t } = useKosTranslation(\"dispenser-profile\");\n\n return (\n <TabContainer>\n {showHeading && (\n <SettingsSubheading>\n {t(\"water-settings\", \"Water Settings\")}\n </SettingsSubheading>\n )}\n <ConfigPropToggleCard\n label={t(\"plain-water\", \"Plain Water\")}\n configProperty={settings.hidePlainWaterBev}\n />\n <ConfigPropToggleCard\n label={t(\"carbonated-water\", \"Carbonated Water\")}\n configProperty={settings.hideCarbWaterBev}\n />\n </TabContainer>\n );\n })\n);\n","import styled from \"@emotion/styled\";\nimport { Button } from \"@kosdev-code/kos-ddk-components\";\n\nexport const ActionContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 12px;\n`;\n\nexport const ActionRow = styled.div`\n display: flex;\n flex-direction: row;\n gap: 12px;\n align-items: center;\n justify-content: center;\n`;\n\nexport const ActionButton = styled(Button)`\n display: block;\n`;\n"],"names":["Container","Content","Footer","log","isValid","value","time","daysOfWeekFilter","dateOptions","day","action","labels","pumpActionFactory","troubleLabelFactory","util","objectUtil","defaultErrorMap","errorUtil","errorMap","ctx","result","issues","elements","processed","ZodFirstPartyTypeKind","z.literal","z.string","EXTENSION_ID","z.enum","UTILITIES_EXTENSION_ID","holder","pump","extensionPointId","data","isLightColor","getFontColor","CardTitle","CardAvatar","pumpCodes","pumpErrors","error","index"],"mappings":";;;;;;;;;;;;AAYO,MAAe,aAA0C;AAAA,EAC9D;AAAA,EACU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY,iBAA8B,SAA8B;AACtE,SAAK,kBAAkB;AACvB,SAAK,QAAQ,QAAQ;AACrB,SAAK,YAAY,QAAQ;AACzB,SAAK,SAAS,QAAQ;AACtB,SAAK,iBAAiB,QAAQ;AAC9B,SAAK,iBAAiB,QAAQ;AAC9B,SAAK,cAAc,QAAQ;AAAA,EAC7B;AAAA,EAIA,IAAI,OAAO;AACT,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,gBAAgB;AACpB,UAAM,SAAS,MAAM,KAAK,gBAAgB,cAAc,KAAK,MAAM;AAEnE,QAAI,QAAQ,SAAS;AACnB,WAAK,SAAS,cAAc,UAAU,OAAO,OAAO;AAAA,IACtD;AAAA,EACF;AACF;ACzCO,MAAM,wBAAwB,aAAa;AAAA,EAChD,YAAY,QAAqB;AAC/B,UAAM,QAAQ;AAAA,MACZ,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,IAAA,CACjB;AAAA,EACH;AAAA,EAEA,UAAU;AACR,WAAO;AAAA,EACT;AACF;ACbO,MAAM,8BAA8B,aAAa;AAAA,EACtD,YAAY,QAAqB;AAC/B,UAAM,QAAQ;AAAA,MACZ,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,g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