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,IAAI/oE,EAAS+oE,EAAQzB,EAClC,CAEA,IADGuB,GAA4BA,EAA2BrsE,GACrDgG,EAAImlE,EAASlrE,OAAQ+F,IACzBmmE,EAAUhB,EAASnlE,GAChB8kE,EAAoBa,EAAEO,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOrB,EAAoBI,EAAE1nE,EAAO,EAGjCgpE,EAAqBrE,KAAqC,+BAAIA,KAAqC,gCAAK,GAC5GqE,EAAmBlvD,QAAQ8uD,EAAqB//C,KAAK,KAAM,IAC3DmgD,EAAmBjvD,KAAO6uD,EAAqB//C,KAAK,KAAMmgD,EAAmBjvD,KAAK8O,KAAKmgD,G,KC7CvF,IAAIC,EAAsB3B,EAAoBI,OAAE3rE,EAAW,CAAC,MAAM,IAAOurE,EAAoB,QAC7F2B,EAAsB3B,EAAoBI,EAAEuB,E","sources":["webpack://unattended-showing/webpack/runtime/chunk loaded","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/-internals/metal","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/application/namespace","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/application","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/array/mutable","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/array/proxy","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/array","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/component/helper","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/component/template-only","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/component","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/controller","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/debug/container-debug-adapter","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/debug/data-adapter","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/debug","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/destroyable","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/error","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/helper","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/instrumentation","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/modifier","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object/compat","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object/computed","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object/evented","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object/events","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object/internals","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object/mixin","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object/observers","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object/promise-proxy-mixin","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object/proxy","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/object","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/owner","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/polyfills","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/routing/route","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/routing/router","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/routing","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/runloop","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/service","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/template","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/template-factory","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/test","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember/utils","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@ember-data/store","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@glimmer/tracking","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/@glimmer/validator","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/ember","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/require","webpack://unattended-showing/../../../../../../@embroider/ext-cjs/rsvp","webpack://unattended-showing/../../../../../node_modules/.pnpm/ember-lifeline@7.0.0_@ember+test-helpers@3.1.0_@glint+template@1.4.0_ember-source@4.12.4_@bab_gwthlkopk5nm4tapzqbuz2i52i/node_modules/ember-lifeline/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../addons/adc-ember-utils/package/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-babel.a0ec7257/node_modules/ember-cli-babel/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember/test-waiters.d540532b/node_modules/@ember/test-waiters/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../addons/adc-ajax/package/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@embroider/macros.ca08b3d3/node_modules/@embroider/macros/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-get-config.867fe42e/node_modules/ember-get-config/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-typescript.5e9d2c26/node_modules/ember-cli-typescript/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-auto-import.2ef9e3f1/node_modules/ember-auto-import/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-intl.4169306b/node_modules/ember-intl/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../addons/adc-i18n/package/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/ember-concurrency@4.0.2_@babel+core@7.24.9_@glimmer+tracking@1.1.2_@glint+template@1.4.0_embe_qr3ft4rl5d263ubatz6ugamhza/node_modules/ember-concurrency/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember/string.4a242b9a/node_modules/@ember/string/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember-data/canary-features.5e6ad5c4/node_modules/@ember-data/canary-features/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember-data/private-build-infra.e6066094/node_modules/@ember-data/private-build-infra/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@glimmer/tracking.0f52e106/node_modules/@glimmer/tracking/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-compatibility-helpers.77694edc/node_modules/ember-compatibility-helpers/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cache-primitive-polyfill.3d3ca16b/node_modules/ember-cache-primitive-polyfill/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cached-decorator-polyfill.9e7651c3/node_modules/ember-cached-decorator-polyfill/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember-data/store.d86a0ee2/node_modules/@ember-data/store/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember-data/adapter.8c6a2bf1/node_modules/@ember-data/adapter/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember-data/model.aebb5837/node_modules/@ember-data/model/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember-data/serializer.16f69675/node_modules/@ember-data/serializer/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-modifier-manager-polyfill.c1405200/node_modules/ember-modifier-manager-polyfill/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember/render-modifiers.436a303b/node_modules/@ember/render-modifiers/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-htmlbars.d435b86a/node_modules/ember-cli-htmlbars/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@sentry/ember.1bea4619/node_modules/@sentry/ember/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-inflector.4956360c/node_modules/ember-inflector/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember-data/debug.d79ffbc1/node_modules/@ember-data/debug/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember-data/record-data.68d786d3/node_modules/@ember-data/record-data/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-data.8959dcf6/node_modules/ember-data/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../addons/adc-app-infrastructure/package/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../addons/adc-svg-system/package/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/ember-modifier@4.2.0_@babel+core@7.24.9_ember-source@4.12.4_@babel+core@7.24.9_@glimmer+compo_nbwgqamajkvwznyg3gl6jhs6uu/node_modules/ember-modifier/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-functions-as-helper-polyfill.9e3380ae/node_modules/ember-functions-as-helper-polyfill/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../addons/adc-template-helpers/package/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@embroider/util.9c5279df/node_modules/@embroider/util/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-htmlbars.0983bcda/node_modules/ember-cli-htmlbars/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-modifier.9c93520b/node_modules/ember-modifier/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-click-outside.ccf54f40/node_modules/ember-click-outside/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-event-helpers.6762ce70/node_modules/ember-event-helpers/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-auto-import.039085b0/node_modules/ember-auto-import/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-focus-trap.310c6602/node_modules/ember-focus-trap/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-htmlbars.984f77d8/node_modules/ember-cli-htmlbars/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-noop.ed8e325e/node_modules/ember-noop/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-promise-helpers.93906283/node_modules/ember-promise-helpers/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-responsive.2275ab5c/node_modules/ember-responsive/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../addons/adc-ui-components/package/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/@embroider+router@2.1.8_@embroider+core@3.4.20_@glint+template@1.4.0_bufferutil@4.0.8_utf-8-validate@5.0.10_/node_modules/@embroider/router/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-mirage.0a927c21/node_modules/ember-cli-mirage/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/ember-cookies@1.1.2/node_modules/ember-cookies/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/ember-inflector@5.0.1_@babel+core@7.24.9/node_modules/ember-inflector/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-test-loader.7f1e58ac/node_modules/ember-cli-test-loader/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/ember-qunit@8.1.0_@ember+test-helpers@3.1.0_@glint+template@1.4.0_ember-source@4.12.4_@babel+_mcqj2pizuqktoz5iw4v5gibhii/node_modules/ember-qunit/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/ember-truth-helpers@4.0.3_ember-source@4.12.4_@babel+core@7.24.9_@glimmer+component@1.1.2_@ba_4lapgh4xsuza33sdvftemqngty/node_modules/ember-truth-helpers/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-tracked-storage-polyfill.6202876e/node_modules/ember-tracked-storage-polyfill/-embroider-implicit-modules.js","webpack://unattended-showing/../../../../../node_modules/.pnpm/tracked-built-ins@3.3.0/node_modules/tracked-built-ins/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-inject-live-reload.ff5f4946/node_modules/ember-cli-inject-live-reload/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-typescript.c0ad820a/node_modules/ember-cli-typescript/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember/legacy-built-in-components.d8e9bb4a/node_modules/@ember/legacy-built-in-components/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember/optional-features.8674ec99/node_modules/@ember/optional-features/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@ember/test-helpers.8a927c47/node_modules/@ember/test-helpers/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-typescript.52605166/node_modules/ember-cli-typescript/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/@glimmer/component.b3400e67/node_modules/@glimmer/component/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-code-coverage.ccb3d45a/node_modules/ember-cli-code-coverage/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-app-version.924df200/node_modules/ember-cli-app-version/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-dependency-checker.e999f866/node_modules/ember-cli-dependency-checker/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-test-selectors.9197fe57/node_modules/ember-test-selectors/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-deprecation-workflow.b5f3c73a/node_modules/ember-cli-deprecation-workflow/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-autoprefixer.14a40bfd/node_modules/ember-cli-autoprefixer/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/broccoli-asset-rev.f96faf3d/node_modules/broccoli-asset-rev/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-terser.98ef37aa/node_modules/ember-cli-terser/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-sri.fef9a42d/node_modules/ember-cli-sri/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cli-typescript.ee258c64/node_modules/ember-cli-typescript/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-load-initializers.dd92ac3a/node_modules/ember-load-initializers/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-metrics.267359ad/node_modules/ember-metrics/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-resolver.ee2dc081/node_modules/ember-resolver/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-factory-for-polyfill.fba0e5ea/node_modules/ember-factory-for-polyfill/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-getowner-polyfill.4e50272c/node_modules/ember-getowner-polyfill/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-cookies.7b6a648f/node_modules/ember-cookies/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-simple-auth.5ac941c7/node_modules/ember-simple-auth/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/ember-source.d19c1bfb/node_modules/ember-source/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/loader.js.69170ca1/node_modules/loader.js/-embroider-implicit-modules.js","webpack://unattended-showing/../rewritten-packages/qunit-dom.edbcedce/node_modules/qunit-dom/-embroider-implicit-modules.js","webpack://unattended-showing/./-embroider-implicit-modules.js","webpack://unattended-showing/../../src/enums/AjaxResponseHttpCode.ts","webpack://unattended-showing/../../src/services/adc-ajax.ts","webpack://unattended-showing/../../src/utils/errors.ts","webpack://unattended-showing/../../src/adapters/base-micro-api-adapter.ts","webpack://unattended-showing/../../src/enums/MicroApi.ts","webpack://unattended-showing/../../src/models/micro-api-data-item.ts","webpack://unattended-showing/../../src/models/micro-api-endpoint.ts","webpack://unattended-showing/../../src/routes/base-route.js","webpack://unattended-showing/../../../src/routes/mixins/is-medium-width-page.js","webpack://unattended-showing/../../src/routes/utils.ts","webpack://unattended-showing/../../src/serializers/polymorphic-serializer.js","webpack://unattended-showing/../src/enums/TwoFactorAuthenticationType.ts","webpack://unattended-showing/../src/enums/RecognizedDeviceType.ts","webpack://unattended-showing/../../src/services/base-engine-config.ts","webpack://unattended-showing/../../src/services/browser.ts","webpack://unattended-showing/../../src/services/context-manager.ts","webpack://unattended-showing/../src/samesite-enum.ts","webpack://unattended-showing/../src/cookie.ts","webpack://unattended-showing/../src/essential-cookie.ts","webpack://unattended-showing/../src/cookie-service.ts","webpack://unattended-showing/../../src/services/cookie-manager.ts","webpack://unattended-showing/../../src/services/env-settings.ts","webpack://unattended-showing/../../src/services/locale.ts","webpack://unattended-showing/../../src/utils/rsvp.ts","webpack://unattended-showing/../../src/enums/BluetoothPermissionCategory.ts","webpack://unattended-showing/../../src/services/native-bridge.js","webpack://unattended-showing/../../src/utils/sentry.ts","webpack://unattended-showing/../../src/enums/NativeBridgeFeature.ts","webpack://unattended-showing/../../src/enums/ContextSwitchType.ts","webpack://unattended-showing/../../src/utils/environment.ts","webpack://unattended-showing/../../src/services/performance-monitor.ts","webpack://unattended-showing/../../src/services/session-activity.ts","webpack://unattended-showing/../../../src/websockets/messages/base.ts","webpack://unattended-showing/../../../src/websockets/messages/event.ts","webpack://unattended-showing/../../../src/websockets/messages/monitoringevent.ts","webpack://unattended-showing/../../../src/websockets/messages/propertychange.ts","webpack://unattended-showing/../../../src/websockets/messages/geofencecrossing.ts","webpack://unattended-showing/../../../src/websockets/messages/statusupdate.ts","webpack://unattended-showing/../../../src/websockets/messages/utils.ts","webpack://unattended-showing/../../src/services/websocket.ts","webpack://unattended-showing/../../src/enums/Websockets.ts","webpack://unattended-showing/../../src/transforms/array.ts","webpack://unattended-showing/../../src/transforms/nullable-boolean.ts","webpack://unattended-showing/../../src/adapters/base-adapter.ts","webpack://unattended-showing/../../src/adapters/base-json-api-content-adapter.ts","webpack://unattended-showing/../../src/models/base-model.ts","webpack://unattended-showing/../../src/models/locale.ts","webpack://unattended-showing/../../src/serializers/base-serializer.ts","webpack://unattended-showing/../../src/serializers/common-serializer.ts","webpack://unattended-showing/../../src/services/base-error-reporting.ts","webpack://unattended-showing/../../src/services/dom.ts","webpack://unattended-showing/../../src/utils/a11y.ts","webpack://unattended-showing/../../src/utils/general.ts","webpack://unattended-showing/../../src/utils/browser-helpers.ts","webpack://unattended-showing/../../src/utils/debug.ts","webpack://unattended-showing/../../src/utils/ember-helpers.ts","webpack://unattended-showing/../../src/utils/event-listeners.ts","webpack://unattended-showing/../../src/utils/html-dir-helpers.ts","webpack://unattended-showing/../../src/utils/get-translation.ts","webpack://unattended-showing/../../src/utils/dates.ts","webpack://unattended-showing/../../src/services/adc-intl.ts","webpack://unattended-showing/../../src/components/svg-symbol.hbs","webpack://unattended-showing/../../src/components/svg-symbol.ts","webpack://unattended-showing/../../src/components/svg-sprite-loader.hbs","webpack://unattended-showing/../../src/components/svg-sprite-loader.ts","webpack://unattended-showing/../../src/helpers/guid-for.ts","webpack://unattended-showing/../../src/modifiers/did-resize.ts","webpack://unattended-showing/../../src/helpers/coalesce.ts","webpack://unattended-showing/../../src/components/async-loader.hbs","webpack://unattended-showing/../../src/components/async-loader.ts","webpack://unattended-showing/../../../src/components/button/async-button-icon.hbs","webpack://unattended-showing/../../../src/components/button/async-button-icon.ts","webpack://unattended-showing/../../../src/components/button/async.hbs","webpack://unattended-showing/../../../src/components/button/async.ts","webpack://unattended-showing/../../../src/components/button/icon.hbs","webpack://unattended-showing/../../../src/components/button/icon.ts","webpack://unattended-showing/../../../src/components/checkbox-tree/all-none-selector.hbs","webpack://unattended-showing/../../../src/components/checkbox-tree/all-none-selector.ts","webpack://unattended-showing/../../../src/components/popover/popover-wrapper.hbs","webpack://unattended-showing/../../../src/components/popover/popover-wrapper.js","webpack://unattended-showing/../../../src/components/popover/popover-header.hbs","webpack://unattended-showing/../../../src/components/popover/popover-header.ts","webpack://unattended-showing/../../../src/components/popover/popover-body.hbs","webpack://unattended-showing/../../../src/components/popover/popover-body.ts","webpack://unattended-showing/../../../src/components/popover/popover-footer.hbs","webpack://unattended-showing/../../../src/components/popover/popover-footer.ts","webpack://unattended-showing/../../src/components/popover-menu.hbs","webpack://unattended-showing/../../src/components/popover-menu.js","webpack://unattended-showing/../src/templates/components/base-dropdown/wrapper.hbs","webpack://unattended-showing/../../../src/components/base-dropdown/wrapper.js","webpack://unattended-showing/../../src/components/search-input.hbs","webpack://unattended-showing/../../src/components/search-input.ts","webpack://unattended-showing/../src/components/search-toolbar.hbs","webpack://unattended-showing/../../src/components/search-toolbar.ts","webpack://unattended-showing/../../../../src/components/dropdown-select/multi-select/toolbar.hbs","webpack://unattended-showing/../../../../src/components/dropdown-select/multi-select/toolbar.ts","webpack://unattended-showing/../../../../src/components/dropdown-select/multi-select/tree-wrapper.hbs","webpack://unattended-showing/../../../../src/components/dropdown-select/multi-select/tree-wrapper.ts","webpack://unattended-showing/../../../src/components/dropdown-select/multi-select.hbs","webpack://unattended-showing/../../../src/components/dropdown-select/multi-select.ts","webpack://unattended-showing/../../src/components/dropdown-select.hbs","webpack://unattended-showing/../../src/components/dropdown-select.ts","webpack://unattended-showing/../../../src/components/dropdown-select/single-select.hbs","webpack://unattended-showing/../../../src/components/dropdown-select/single-select.ts","webpack://unattended-showing/../../src/components/form-group.hbs","webpack://unattended-showing/../../src/components/form-group.ts","webpack://unattended-showing/../../../src/components/inline-alert/info.hbs","webpack://unattended-showing/../../../src/components/inline-alert/info.ts","webpack://unattended-showing/../../../src/components/inline-alert/success.hbs","webpack://unattended-showing/../../../src/components/inline-alert/success.ts","webpack://unattended-showing/../../../src/components/inline-alert/warning.hbs","webpack://unattended-showing/../../../src/components/inline-alert/warning.ts","webpack://unattended-showing/../../../src/components/inline-alert/danger.hbs","webpack://unattended-showing/../../../src/components/inline-alert/danger.ts","webpack://unattended-showing/../../src/components/inline-alert.hbs","webpack://unattended-showing/../../src/components/inline-alert.ts","webpack://unattended-showing/../../src/components/modals-host.hbs","webpack://unattended-showing/../../src/components/modals-host.ts","webpack://unattended-showing/../../src/modifiers/add-delayed-css.ts","webpack://unattended-showing/../../../../../src/components/modals/base/header/modal-header.hbs","webpack://unattended-showing/../../../../../src/components/modals/base/header/modal-header.ts","webpack://unattended-showing/../../../../src/components/modals/base/base-modal.hbs","webpack://unattended-showing/../../../../src/components/modals/base/base-modal.ts","webpack://unattended-showing/../../../../../src/components/modals/dialog-modals/simple/simple-dialog.hbs","webpack://unattended-showing/../../../../../src/components/modals/dialog-modals/simple/simple-dialog.ts","webpack://unattended-showing/../../../src/components/notification-manager/app-notification.hbs","webpack://unattended-showing/../../../src/components/notification-manager/app-notification.ts","webpack://unattended-showing/../../src/components/notification-manager.hbs","webpack://unattended-showing/../../src/components/notification-manager.ts","webpack://unattended-showing/../../../src/components/simple-binary/label.hbs","webpack://unattended-showing/../../../src/components/simple-binary/label.ts","webpack://unattended-showing/../../src/components/simple-binary.hbs","webpack://unattended-showing/../../src/components/simple-binary.ts","webpack://unattended-showing/../../../src/components/simple-binary/button.hbs","webpack://unattended-showing/../../../src/components/simple-binary/button.ts","webpack://unattended-showing/../../../src/components/simple-binary/button-list.hbs","webpack://unattended-showing/../../../src/components/simple-binary/button-list.ts","webpack://unattended-showing/../../src/components/base-timezone-control.ts","webpack://unattended-showing/../../src/components/base-time-control.ts","webpack://unattended-showing/../../src/utils/time.ts","webpack://unattended-showing/../../src/components/smart-date.hbs","webpack://unattended-showing/../../src/components/smart-date.ts","webpack://unattended-showing/../src/path.ts","webpack://unattended-showing/../../src/components/spinner-svg.hbs","webpack://unattended-showing/../../src/components/spinner-svg.ts","webpack://unattended-showing/../../src/components/text-input.hbs","webpack://unattended-showing/../../src/components/text-input.ts","webpack://unattended-showing/../../src/helpers/handle-binary-change.ts","webpack://unattended-showing/../../src/helpers/icon-fill.ts","webpack://unattended-showing/../../src/initializers/setup-pikaday.js","webpack://unattended-showing/../../src/initializers/setup-route-view.js","webpack://unattended-showing/../../src/initializers/setup-ui-components.js","webpack://unattended-showing/../../src/services/accessibility.ts","webpack://unattended-showing/../../../../../src/components/modals/dialog-modals/info/info-dialog.hbs","webpack://unattended-showing/../../../../../src/components/modals/dialog-modals/info/info-dialog.ts","webpack://unattended-showing/../../src/helpers/get-modal-button.ts","webpack://unattended-showing/../../../../../src/components/modals/confirmations/edit/edit-confirmations.hbs","webpack://unattended-showing/../../../../../src/components/modals/confirmations/edit/edit-confirmations.ts","webpack://unattended-showing/../../../../../src/components/modals/confirmations/rename/rename-dialog.hbs","webpack://unattended-showing/../../../../../src/components/modals/confirmations/rename/rename-dialog.ts","webpack://unattended-showing/../../../../../src/components/modals/confirmations/delete/confirm-delete.hbs","webpack://unattended-showing/../../../../../src/components/modals/confirmations/delete/confirm-delete.ts","webpack://unattended-showing/../../../../src/components/modals/loading/loading-spinner.hbs","webpack://unattended-showing/../../../../src/components/modals/loading/loading-spinner.ts","webpack://unattended-showing/../../../../../src/components/modals/dialog-modals/promise/promise-dialog.hbs","webpack://unattended-showing/../../../../../src/components/modals/dialog-modals/promise/promise-dialog.ts","webpack://unattended-showing/../../../../../src/components/modals/dialog-modals/confirm/confirmation-dialog.hbs","webpack://unattended-showing/../../../../../src/components/modals/dialog-modals/confirm/confirmation-dialog.ts","webpack://unattended-showing/../../src/services/modals.ts","webpack://unattended-showing/../../src/services/notification-manager.ts","webpack://unattended-showing/../../../src/components/button/simple.hbs","webpack://unattended-showing/../../../src/components/button/simple.ts","webpack://unattended-showing/../../../../src/components/checkbox-tree/detailed-checkbox/content.hbs","webpack://unattended-showing/../../../../src/components/checkbox-tree/detailed-checkbox/content.ts","webpack://unattended-showing/../../src/components/button-adc.hbs","webpack://unattended-showing/../../src/components/button-adc.js","webpack://unattended-showing/../../../../src/components/checkbox-tree/detailed-checkbox/checkbox.hbs","webpack://unattended-showing/../../../../src/components/checkbox-tree/detailed-checkbox/checkbox.ts","webpack://unattended-showing/../../../src/components/checkbox-tree/tree-item.hbs","webpack://unattended-showing/../../../src/components/checkbox-tree/tree-item.ts","webpack://unattended-showing/../../src/components/checkbox-tree.hbs","webpack://unattended-showing/../../src/components/checkbox-tree.ts","webpack://unattended-showing/../../src/utils/generate-popper.js","webpack://unattended-showing/../../src/components/error-tooltip.hbs","webpack://unattended-showing/../../src/components/error-tooltip.ts","webpack://unattended-showing/../../../../../src/components/modals/base/footer/modal-footer.hbs","webpack://unattended-showing/../../../../../src/components/modals/base/footer/modal-footer.ts","webpack://unattended-showing/../../../src/components/simple-binary/list.hbs","webpack://unattended-showing/../../../src/components/simple-binary/list.ts","webpack://unattended-showing/../../src/utils/checkbox-tree-item.js","webpack://unattended-showing/../../src/vendor/qrcode.js","webpack://unattended-showing/webpack/bootstrap","webpack://unattended-showing/webpack/runtime/compat get default export","webpack://unattended-showing/webpack/runtime/define property getters","webpack://unattended-showing/webpack/runtime/hasOwnProperty shorthand","webpack://unattended-showing/webpack/runtime/make namespace object","webpack://unattended-showing/webpack/runtime/jsonp chunk loading","webpack://unattended-showing/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","\nconst m = window.require(\"@ember/-internals/metal\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/application/namespace\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/application\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/array/mutable\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/array/proxy\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/array\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/component/helper\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/component/template-only\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/component\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/controller\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/debug/container-debug-adapter\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/debug/data-adapter\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/debug\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/destroyable\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/error\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/helper\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/instrumentation\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/modifier\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/compat\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/computed\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/evented\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/events\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/internals\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/mixin\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/observers\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/promise-proxy-mixin\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object/proxy\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/object\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/owner\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/polyfills\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/routing/route\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/routing/router\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/routing\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/runloop\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/service\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/template\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/template-factory\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/test\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember/utils\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@ember-data/store\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@glimmer/tracking\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"@glimmer/validator\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"ember\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.requirejs;\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nconst m = window.require(\"rsvp\");\nif (m.default && !m.__esModule) {\n m.__esModule = true;\n}\nmodule.exports = m;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@ember/test-waiters/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-get-config/-embroider-implicit-modules.js\";\nimport \"ember-intl/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"@ember-data/canary-features/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@glimmer/tracking/-embroider-implicit-modules.js\";\nimport \"ember-cache-primitive-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/canary-features/-embroider-implicit-modules.js\";\nimport \"@glimmer/tracking/-embroider-implicit-modules.js\";\nimport \"ember-cached-decorator-polyfill/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/canary-features/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\nimport \"ember-cached-decorator-polyfill/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-modifier-manager-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember-data/canary-features/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"@ember-data/store/index\", function(){ return i(\"@ember-data/store/index.js\");});\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@ember-data/adapter/-embroider-implicit-modules.js\";\nimport \"@ember-data/model/-embroider-implicit-modules.js\";\nimport \"@ember-data/serializer/-embroider-implicit-modules.js\";\nimport \"@ember-data/debug/-embroider-implicit-modules.js\";\nimport \"@ember-data/private-build-infra/-embroider-implicit-modules.js\";\nimport \"@ember-data/record-data/-embroider-implicit-modules.js\";\nimport \"@ember-data/store/-embroider-implicit-modules.js\";\nimport \"ember-inflector/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"@ember-data/adapter/-embroider-implicit-modules.js\";\nimport \"@ember-data/model/-embroider-implicit-modules.js\";\nimport \"@ember-data/serializer/-embroider-implicit-modules.js\";\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\nimport \"@sentry/ember/-embroider-implicit-modules.js\";\nimport \"ember-inflector/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-get-config/-embroider-implicit-modules.js\";\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"ember-modifier/-embroider-implicit-modules.js\";\nimport \"ember-functions-as-helper-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\nimport \"ember-modifier/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-modifier-manager-polyfill/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"@adc/svg-system/-embroider-implicit-modules.js\";\nimport \"@adc/template-helpers/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"ember-modifier/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/svg-system/-embroider-implicit-modules.js\";\nimport \"@adc/template-helpers/-embroider-implicit-modules.js\";\nimport \"@ember/render-modifiers/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\nimport \"ember-functions-as-helper-polyfill/-embroider-implicit-modules.js\";\nimport \"@embroider/util/-embroider-implicit-modules.js\";\nimport \"ember-click-outside/-embroider-implicit-modules.js\";\nimport \"ember-event-helpers/-embroider-implicit-modules.js\";\nimport \"ember-focus-trap/-embroider-implicit-modules.js\";\nimport \"ember-noop/-embroider-implicit-modules.js\";\nimport \"ember-promise-helpers/-embroider-implicit-modules.js\";\nimport \"ember-responsive/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@ember/test-waiters/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-get-config/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"ember-inflector/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-test-loader/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-functions-as-helper-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-tracked-storage-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"@ember/test-waiters/-embroider-implicit-modules.js\";\nimport \"@embroider/macros/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-compatibility-helpers/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-typescript/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-factory-for-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-getowner-polyfill/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cookies/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\n","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nimport \"@adc/ajax/-embroider-implicit-modules.js\";\nimport \"@adc/app-infrastructure/-embroider-implicit-modules.js\";\nimport \"@adc/ember-utils/-embroider-implicit-modules.js\";\nimport \"@adc/i18n/-embroider-implicit-modules.js\";\nimport \"@adc/svg-system/-embroider-implicit-modules.js\";\nimport \"@adc/ui-components/-embroider-implicit-modules.js\";\nimport \"@embroider/router/-embroider-implicit-modules.js\";\nimport \"ember-cli-babel/-embroider-implicit-modules.js\";\nimport \"ember-cli-mirage/-embroider-implicit-modules.js\";\nimport \"ember-cookies/-embroider-implicit-modules.js\";\nimport \"ember-concurrency/-embroider-implicit-modules.js\";\nimport \"ember-inflector/-embroider-implicit-modules.js\";\nimport \"ember-lifeline/-embroider-implicit-modules.js\";\nimport \"ember-modifier/-embroider-implicit-modules.js\";\nimport \"ember-qunit/-embroider-implicit-modules.js\";\nimport \"ember-truth-helpers/-embroider-implicit-modules.js\";\nimport \"tracked-built-ins/-embroider-implicit-modules.js\";\nimport \"ember-cli-inject-live-reload/-embroider-implicit-modules.js\";\nimport \"ember-auto-import/-embroider-implicit-modules.js\";\nimport \"ember-intl/-embroider-implicit-modules.js\";\nimport \"@ember/string/-embroider-implicit-modules.js\";\nimport \"@glimmer/tracking/-embroider-implicit-modules.js\";\nimport \"ember-cli-htmlbars/-embroider-implicit-modules.js\";\nimport \"ember-data/-embroider-implicit-modules.js\";\nimport \"ember-focus-trap/-embroider-implicit-modules.js\";\nimport \"ember-promise-helpers/-embroider-implicit-modules.js\";\nimport \"@ember/legacy-built-in-components/-embroider-implicit-modules.js\";\nimport \"@ember/optional-features/-embroider-implicit-modules.js\";\nimport \"@ember/test-helpers/-embroider-implicit-modules.js\";\nimport \"@glimmer/component/-embroider-implicit-modules.js\";\nimport \"ember-cli-code-coverage/-embroider-implicit-modules.js\";\nimport \"ember-cli-app-version/-embroider-implicit-modules.js\";\nimport \"ember-cli-dependency-checker/-embroider-implicit-modules.js\";\nimport \"ember-test-selectors/-embroider-implicit-modules.js\";\nimport \"ember-cli-deprecation-workflow/-embroider-implicit-modules.js\";\nimport \"ember-cli-autoprefixer/-embroider-implicit-modules.js\";\nimport \"broccoli-asset-rev/-embroider-implicit-modules.js\";\nimport \"ember-cli-terser/-embroider-implicit-modules.js\";\nimport \"ember-cli-sri/-embroider-implicit-modules.js\";\nimport \"ember-load-initializers/-embroider-implicit-modules.js\";\nimport \"ember-metrics/-embroider-implicit-modules.js\";\nimport \"ember-resolver/-embroider-implicit-modules.js\";\nimport \"ember-simple-auth/-embroider-implicit-modules.js\";\nimport \"ember-source/-embroider-implicit-modules.js\";\nimport \"loader.js/-embroider-implicit-modules.js\";\nimport \"qunit-dom/-embroider-implicit-modules.js\";\n","/**\n * This enum is a TS representation of NJsonApi.Common.AjaxResponseHttpCodeEnum and it must be manually kept in sync w/ the C# version.\n *\n * @module\n */\n\nexport const NotLoggedIn = 401;\n\nexport const InvalidAntiForgeryToken = 403;\n\nexport const NoPermissionForEmber = 406;\n\nexport const TwoFactorAuthenticationRequired = 409;\n\nexport const ValidationError = 422;\n\nexport const ProcessingError = 423;\n\nexport const ServerProcessingError = 500;\n\nexport const ServiceUnavailable = 503;\n","import Service from '@ember/service';\nimport { getErrorWithStatusCode, isNoNetworkError } from '../utils/errors.ts';\nimport { computed } from '@ember/object';\nimport { getOwner } from '@ember/owner';\nimport Error from '@ember/error';\nimport { getCookie } from '@adc/ember-utils/utils/browser-helpers';\nimport { TwoFactorAuthenticationRequired } from '../enums/AjaxResponseHttpCode.ts';\nimport isBefore from 'date-fns/isBefore';\n\nimport type { InternalOwner } from '@ember/-internals/owner';\n\n// #region Content Constants\n\nconst APPLICATION_JSON = 'application/json;charset=utf-8';\nconst APPLICATION_JSONAPI = 'application/vnd.api+json;charset=utf-8';\nconst APPLICATION_FORM = 'application/x-www-form-urlencoded;charset=utf-8';\n\n// #endregion\n\n// #region httpVerbs\n\n/**\n * POST httpVerb enum for using in requests.\n *\n * @memberof AdcAjaxService\n */\nexport const POST = 'POST';\n\n/**\n * POST httpVerb enum for using in requests.\n *\n * @memberof AdcAjaxService\n */\nexport const PUT = 'PUT';\n\n/**\n * GET httpVerb enum for using in requests.\n *\n * @memberof AdcAjaxService\n */\nexport const GET = 'GET';\n\n// #endregion\n\ninterface AppConfig {\n apiBaseUrl: string;\n antiForgeryCookieName: string;\n requestJsonApiResponse: boolean;\n}\n\ninterface AjaxHeaders {\n 'content-type': string;\n accept?: string;\n ajaxrequestuniquekey?: string;\n}\n\ninterface ApiErrorSource {\n pointer: string;\n}\n\ninterface MicroApiData {\n included: MicroApiEndpointData[];\n data: {\n attributes: {\n microApiTokenVer: string;\n };\n }[];\n}\n\ninterface MicroApiEndpointData {\n id: number;\n attributes: {\n baseApiEndpoint: string;\n encodedJwtToken: string;\n jwtExpirationDate: string;\n };\n}\n\nexport interface ApiError {\n code: number;\n detail: string;\n source: ApiErrorSource;\n}\n\ninterface SerializableObject {\n serialize(options?: { includeId?: boolean | undefined }): object;\n}\n\nexport type AjaxRequestBody = BodyInit | Record | SerializableObject | unknown[] | null;\n\n// #region data and content types\n\n/**\n * Type enum for JSONAPI request.\n *\n * @memberof AdcAjaxService\n */\nexport const JSONAPI_REQUEST: Partial = {\n headers: {\n 'content-type': APPLICATION_JSON,\n accept: APPLICATION_JSONAPI\n }\n};\n\n/**\n * Type enum for JSON_REQUEST request.\n *\n * @memberof AdcAjaxService\n */\nexport const JSON_REQUEST: Partial = {\n headers: {\n 'content-type': APPLICATION_JSON,\n accept: APPLICATION_JSON\n }\n};\n\n/**\n * Type enum for URL_ENCODED request.\n *\n * @memberof AdcAjaxService\n */\nexport const URL_ENCODED: Partial = {\n headers: {\n 'content-type': APPLICATION_FORM,\n accept: APPLICATION_JSON\n }\n};\n\n/**\n * Type enum for a plain text request.\n *\n * @memberof AdcAjaxService\n */\nexport const CONTENT_TYPE_PLAIN: Partial = {\n headers: {\n 'content-type': 'text/plain;charset=utf-8'\n }\n};\n\n// #endregion\n\nclass EmberAjaxError extends Error {\n code: number;\n type: string;\n name: string;\n errors: ApiError[];\n\n constructor(message: string, code: number, type: string, errors: ApiError[]) {\n super(message);\n\n this.code = code;\n this.type = this.name = type;\n this.errors = errors;\n }\n}\n\nexport type TEmberAjaxError = InstanceType;\n\n/**\n * Gets data from fetch response.\n */\nasync function parseResponse(response: Response, method: string): Promise> {\n let data = await response.text();\n\n try {\n data = JSON.parse(data);\n } catch (error) {\n if (!(error instanceof SyntaxError)) {\n throw error;\n }\n\n const { ok, status } = response;\n\n if (ok && (status === 204 || status === 205 || method === 'HEAD')) {\n return { data: null };\n }\n }\n\n return data as unknown as Record;\n}\n\n/**\n * @classdesc\n * The Ajax service configured to work with the CustomerDotNet/WebApi project.\n */\nexport default class AdcAjaxService extends Service {\n /**\n * Cached list of MicroApi endpoints and the token version\n */\n microApiData?: MicroApiData;\n\n /**\n * The Ember app environment config.\n */\n get environmentConfig(): AppConfig {\n const owner = getOwner(this);\n // We provide a default value because unit tests do not have a config.\n return (owner ? (owner as InternalOwner).resolveRegistration('config:environment') : {}) as AppConfig;\n }\n\n // #region Ajax Config Params\n\n /**\n * Defines headers for all requests. This includes the authenticationHeaders\n */\n get defaultHeaders(): Partial {\n // The cookie name set in the env config.\n const envAntiForgeryCookieName = this.environmentConfig.antiForgeryCookieName,\n /* The cookie name we will actually use. If the env cookie was set to an empty string, we do not include an anti forgery cookie */\n antiForgeryCookieName = envAntiForgeryCookieName === '' ? undefined : envAntiForgeryCookieName || 'afg';\n\n // Default accept headers to fix issues with older Firefox. We explicitly set the content-type to match the `fetch` default to avoid any ambiguity or breaking changes\n // when we leave fetch for the next great thing.\n const headers = {\n ...{ accept: '*/*' },\n ...CONTENT_TYPE_PLAIN.headers\n } as AjaxHeaders;\n\n // Add anti-forgery token if it was defined in application settings.\n if (antiForgeryCookieName) {\n // We use all lower case since this is how it ends up hitting the server anyway.\n headers.ajaxrequestuniquekey = getCookie(antiForgeryCookieName);\n }\n\n return headers;\n }\n\n /**\n * The base URL that should be included on all calls to apiRequest.\n */\n @computed('environmentConfig.apiBaseUrl')\n get apiBaseUrl(): string {\n // Get the host App's config environment variable.\n return this.environmentConfig.apiBaseUrl ?? '';\n }\n\n // #endregion\n\n /**\n * Send request to a WebApi endpoint.\n */\n async apiRequest(\n apiEndpoint: string,\n optionsOrType: RequestInit = {},\n data?: AjaxRequestBody,\n httpVerb = GET,\n useJsonApiFormat?: boolean\n ): Promise {\n // We use a copy of the options passed in. Otherwise we would be mutating the original options, which could be one of our enums like JSON_REQUEST.\n const newOptions = { ...optionsOrType };\n\n // The following block's logic is a little hard to digest. Our intended outcome is:\n // If a user has no ENV setting and does not provide useJsonApiFormat, it will default to true and use JSON API.\n // If a user has an ENV setting and does not provide useJsonApiFormat, it will use the ENV setting.\n // If a user provides a useJsonApiFormat value, it will use that no matter what the ENV setting is.\n const envUseJsonApi = this.environmentConfig.requestJsonApiResponse ?? true;\n\n // These are the headers that this method sets.\n const defaultHeaders = {\n ...this.defaultHeaders,\n ...(useJsonApiFormat ?? envUseJsonApi ? JSONAPI_REQUEST.headers : {})\n };\n\n // We then merge defaultHeaders in with any headers provided by the caller.\n newOptions.headers = {\n ...defaultHeaders,\n ...newOptions.headers\n };\n\n // If apiEndpoint has a leading '/', we don't want to add our own.\n const joinChar = apiEndpoint[0] === '/' ? '' : '/';\n\n return this.request(`${this.apiBaseUrl}${joinChar}${apiEndpoint}`, newOptions, data, httpVerb, true);\n }\n\n /**\n * Send a request to a MicroApi endpoint given the endpoint enum & path.\n */\n async microApiRequest(\n microApiEnum: number,\n apiEndpoint: string,\n data?: AjaxRequestBody,\n httpVerb = GET\n ): Promise {\n if (!this.microApiData) {\n const microApiDataRaw = await this.apiRequest('microApiDataItems', {}, null, GET, true);\n this.microApiData = microApiDataRaw;\n }\n\n const endpointData = this.microApiData?.included.find(\n (item: MicroApiEndpointData) => Number(item.id) === microApiEnum\n )?.attributes;\n\n if (!endpointData) {\n throw 'Micro API endpoint not found';\n }\n\n const now = new Date();\n // We want to give 60 seconds of padding before expiration time to not hit any race conditions\n if (isBefore(new Date(endpointData.jwtExpirationDate), now.setSeconds(now.getSeconds() - 60))) {\n this.microApiData = undefined;\n return await this.microApiRequest(microApiEnum, apiEndpoint, data, httpVerb);\n }\n\n const { pathname, search } = window.location,\n headers = {\n Accept: 'application/vnd.api+json',\n Authorization: `Bearer ${endpointData.encodedJwtToken}`,\n SourcePath: pathname,\n SourceQueryParams: search,\n TokenVersion: this.microApiData?.data?.[0]?.attributes?.microApiTokenVer ?? '',\n 'content-type': 'application/vnd.api+json'\n };\n\n // Avoid automatic route prefixing\n const subEndpoint = `${endpointData.baseApiEndpoint}/${apiEndpoint}`,\n finalEndpoint = subEndpoint.startsWith('https://') ? subEndpoint : `https://${subEndpoint}`;\n\n return this.request(finalEndpoint, { headers }, data, httpVerb, false);\n }\n\n /**\n * Serializes the passed request body.\n */\n private serializeBody(data: AjaxRequestBody): BodyInit | null | undefined {\n if (data === null || typeof data !== 'object') {\n return data;\n }\n\n if ('serialize' in data && typeof data.serialize === 'function') {\n data = data.serialize();\n }\n\n return JSON.stringify(data);\n }\n\n /**\n * Ajax Request method to be used when not accessing api resources.\n */\n async request(\n url: string,\n optionsOrType: RequestInit = {},\n data?: AjaxRequestBody,\n httpVerb = GET,\n includeHeaders = true\n ): Promise {\n try {\n // We use a copy of the options passed in. Otherwise we would be mutating the original options, which could be one of our enums like JSON_REQUEST.\n const newOptions = { ...optionsOrType },\n defaultHeaders = includeHeaders ? this.defaultHeaders : {};\n\n // Build the options. Note that user provided options take priority over others.\n newOptions.headers = {\n ...defaultHeaders,\n ...newOptions.headers\n };\n\n // if the user passed in the method in the option object, we give that priority over the function parameter.\n newOptions.method = newOptions.method || httpVerb;\n\n if (data) {\n newOptions.body = this.serializeBody(data);\n }\n\n const response = await fetch(url, newOptions);\n\n const { status } = response,\n { method } = newOptions,\n result = await parseResponse(response, method);\n\n // If everything was ok or 2FA is required, just resolve the result and return.\n if (response.ok || status == TwoFactorAuthenticationRequired) {\n return result as unknown as T;\n }\n\n // Things went bad, create an Error and throw it.\n const errorData = getErrorWithStatusCode(status);\n\n if (!errorData) {\n throw new Error(`Unhandled HTTP Error Code: ${status}`);\n }\n\n const { code, message, type, title } = errorData;\n throw new EmberAjaxError(\n `${message || title}, url: ${decodeURIComponent(url)}, method: ${method}`,\n code,\n type,\n (result.errors || []) as ApiError[]\n );\n } catch (e) {\n // We don't want to throw error to sentry if it's just no network connection issue.\n if (!this.processNoNetworkError()) {\n throw e;\n }\n\n return {\n data: null\n } as unknown as T;\n }\n }\n\n /**\n * Simple request method which attempts to nullify most of our customization on the request method.\n */\n async simpleRequest(\n url: string,\n optionsOrType?: RequestInit,\n data?: AjaxRequestBody,\n httpVerb?: string\n ): Promise {\n return this.request(url, optionsOrType, data, httpVerb, false);\n }\n\n /**\n * This logic is extracted for testing purposes. To my knowledge, there is currently not a way to mock a network error.\n */\n processNoNetworkError(): boolean {\n if (isNoNetworkError()) {\n this.noInternetConnection();\n return true;\n }\n\n return false;\n }\n\n /**\n * This method is used to indicate when there is a network connection error. It can be overridden in your project to handle this error however you wish.\n */\n noInternetConnection(): unknown | void {\n return null;\n }\n}\n","import {\n NotLoggedIn,\n InvalidAntiForgeryToken,\n ValidationError,\n ProcessingError,\n NoPermissionForEmber,\n ServerProcessingError,\n ServiceUnavailable\n} from '../enums/AjaxResponseHttpCode.ts';\n\nconst NotFound = 404;\n\nexport class AjaxError {\n code: number;\n type: string;\n name: string;\n title: string;\n message: string;\n shouldBeLogged: boolean;\n isUnauthorizedAccess: boolean;\n isValidationError: boolean;\n isProcessingError: boolean;\n isIncorrectSite: boolean;\n\n constructor(\n code: number,\n type: string,\n title = '',\n message = '',\n shouldBeLogged = false,\n isUnauthorizedAccess = false,\n isValidationError = false,\n isProcessingError = false,\n isIncorrectSite = false\n ) {\n this.code = code;\n this.type = type;\n // Name is the same as type, but some places use type and some use name. This simplifies logic in those instances.\n this.name = type;\n this.title = title;\n this.message = message;\n this.shouldBeLogged = shouldBeLogged;\n this.isUnauthorizedAccess = isUnauthorizedAccess;\n this.isValidationError = isValidationError;\n this.isProcessingError = isProcessingError;\n this.isIncorrectSite = isIncorrectSite;\n }\n}\n\nfunction getErrorDetails(): Array<\n [number, string, string?, string?, boolean?, boolean?, boolean?, boolean?, boolean?]\n> {\n return [\n [NotLoggedIn, 'NotLoggedIn', 'User was not logged in.', 'Unauthorized access', false, true],\n [\n InvalidAntiForgeryToken,\n 'InvalidAntiForgeryToken',\n 'Attempted access with invalid token.',\n 'Unauthorized access',\n false,\n true\n ],\n [NotFound, 'NotFound', 'WebApi Controller endpoint not found.', undefined, true],\n [ValidationError, 'ValidationError', undefined, 'Validation error', false, false, true],\n [ProcessingError, 'ProcessingError', undefined, 'Processing error', false, false, false, true],\n [\n NoPermissionForEmber,\n 'NoPermissionForEmber',\n 'No access for site version.',\n 'Incorrect access',\n false,\n false,\n false,\n false,\n true\n ],\n [ServerProcessingError, 'ServerProcessingError', undefined, 'Server processing error'],\n [ServiceUnavailable, 'ServiceUnvailable', undefined, 'Service Unvailable']\n ];\n}\n\n/**\n * Returns error with the specified error status code.\n */\nexport function getErrorWithStatusCode(statusCode: number): AjaxError | undefined {\n const args = getErrorDetails().find((args) => args[0] === statusCode);\n return args && new AjaxError(...args);\n}\n\n/**\n * Returns error status code for specified error type.\n */\nfunction getStatusCodeForErrorType(errorType: string): number | undefined {\n return getErrorDetails().find((args) => args[1] === errorType)?.[0];\n}\n\n/**\n * Should an error with the specified status code not be logged by client side error logging?\n */\nexport function shouldNotLogErrorWithStatusCode(statusCode: number): boolean {\n const error = getErrorWithStatusCode(statusCode);\n\n // Error should not be logged if the error is in the collection and it is marked as not to be logged.\n return !!(error && !error.shouldBeLogged);\n}\n\n/**\n * Should an error with the specified errorType not be logged by client side error logging?\n */\nexport function shouldNotLogErrorWithType(errorType: string): boolean {\n return shouldNotLogErrorWithStatusCode(getStatusCodeForErrorType(errorType) as number);\n}\n\n/**\n * Checks to see if Error is a no network error\n */\nexport function isNoNetworkError(): boolean {\n return !window.navigator.onLine;\n}\n","import BaseJsonApiContentAdapter from './base-json-api-content-adapter.ts';\nimport { inject as service } from '@ember/service';\nimport { NotSet } from '../enums/MicroApi.ts';\nimport { computed } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport isBefore from 'date-fns/isBefore';\nimport RSVP from 'rsvp';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport DS from 'ember-data';\n\nimport type ModelRegistry from 'ember-data/types/registries/model';\nimport type ContextManager from '../services/context-manager';\nimport type MicroApiEndpoint from '../models/micro-api-endpoint';\nimport type Store from '@ember-data/store';\nimport type BaseModel from '../models/base-model';\n\ninterface HeaderProps {\n Accept: string;\n Authorization: string;\n SourcePath: string;\n SourceQueryParams: string;\n TokenVersion: string;\n 'content-type': string;\n}\n\n/**\n * @classdesc\n * Custom Adapter for Micro API services\n */\nexport default class BaseMicroApiAdapter extends BaseJsonApiContentAdapter {\n @service declare contextManager: ContextManager;\n @service declare store: Store;\n\n /**\n * An endpoint item is selected per adapter based on this value\n */\n microApiEnum = NotSet;\n\n /**\n * The MicroApi endpoint path name\n */\n microApiEndpointPath = '';\n\n /**\n * Get the data for this endpoint\n */\n @tracked\n endpointData?: MicroApiEndpoint;\n\n /**\n * The token version\n */\n @tracked\n tokenVer?: string;\n\n /** @override */\n namespace = '';\n\n /** @override */\n host = '';\n\n /** @override */\n @computed('endpointData.encodedJwtToken', 'tokenVer')\n get headers(): HeaderProps {\n return this.buildHeaderProps(this.endpointData?.encodedJwtToken ?? '');\n }\n\n /** @override */\n findAll(\n store: Store,\n type: ModelRegistry[K],\n sinceToken: string,\n snapshot: DS.SnapshotRecordArray\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => {\n resolve(super.findAll(store, type, sinceToken, snapshot).catch(() => reject()));\n })\n .catch(() => reject());\n });\n }\n\n /** @override */\n findRecord(\n store: Store,\n type: ModelRegistry[K],\n id: string,\n snapshot: DS.Snapshot\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => {\n resolve(super.findRecord(store, type, id, snapshot).catch(() => reject()));\n })\n .catch(() => reject());\n });\n }\n\n /** @override */\n query(\n store: Store,\n type: ModelRegistry[K],\n query: Record\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => {\n resolve(super.query(store, type, query).catch(() => reject()));\n })\n .catch(() => reject());\n });\n }\n\n /** @override */\n queryRecord(\n store: Store,\n type: ModelRegistry[K],\n query: Record\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => {\n resolve(super.queryRecord(store, type, query).catch(() => reject()));\n })\n .catch(() => reject());\n });\n }\n\n /** @override */\n updateRecord(\n store: Store,\n type: ModelRegistry[K],\n snapshot: DS.Snapshot\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => {\n resolve(super.updateRecord(store, type, snapshot).catch(() => reject()));\n })\n .catch(() => reject());\n });\n }\n\n /** @override */\n createRecord(\n store: Store,\n type: ModelRegistry[K],\n snapshot: DS.Snapshot\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => {\n resolve(super.createRecord(store, type, snapshot).catch(() => reject()));\n })\n .catch(() => reject());\n });\n }\n\n /** @override */\n deleteRecord(\n store: Store,\n type: ModelRegistry[K],\n snapshot: DS.Snapshot\n ): RSVP.Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => {\n resolve(super.deleteRecord(store, type, snapshot).catch(() => reject()));\n })\n .catch(() => reject());\n });\n }\n\n /** @override */\n submitCustomApiCall(model: BaseModel, verb: string, method = 'POST', rawData: any): Promise {\n return new RSVP.Promise((resolve, reject) => {\n this.ensureEndpointAndToken()\n .then(() => {\n super\n .submitCustomApiCall(model, verb, method, rawData)\n .then((value) => resolve(value))\n .catch(() => reject());\n })\n .catch(() => reject());\n });\n }\n\n /** @override */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pathForType(_modelName: K): string {\n return this.microApiEndpointPath;\n }\n\n /**\n * Check that we have a valid endpoint and token, get them if we don't\n */\n protected async ensureEndpointAndToken(): Promise {\n if (!this.endpointData || !this.tokenVer) {\n const microApiData =\n this.store.peekAll('micro-api-data-item').firstObject ??\n (await this.store.findAll('micro-api-data-item')).firstObject,\n endpointData = microApiData?.microApiEndpoints.find(\n (endpoint: MicroApiEndpoint) => endpoint.id === String(this.microApiEnum)\n );\n\n Object.assign(this, {\n endpointData,\n namespace: this.buildNamespace(endpointData?.namespace ?? ''),\n host: this.buildHost(endpointData?.baseApiEndpoint ?? ''),\n tokenVer: microApiData?.microApiTokenVer\n });\n }\n\n const now = new Date();\n // We want to give 60 seconds of padding before expiration time to not hit any race conditions\n if (this.endpointData && isBefore(this.endpointData.jwtExpirationDate, now.setSeconds(now.getSeconds() - 60))) {\n await this.endpointData.reload();\n }\n }\n\n /**\n * Build the properties for the headers\n */\n private buildHeaderProps(token: string): HeaderProps {\n const { pathname, search } = window.location;\n\n return {\n Accept: 'application/vnd.api+json',\n Authorization: `Bearer ${token}`,\n SourcePath: pathname,\n SourceQueryParams: search,\n TokenVersion: this.tokenVer ?? '',\n 'content-type': 'application/vnd.api+json'\n };\n }\n\n /**\n * Determine the namespace based on if versioning is provided from the endpoint data or overridden manually\n * in the adapter.\n */\n protected buildNamespace(namespaceData: string): string {\n return namespaceData || this.namespace;\n }\n\n /**\n * Determine the host url. Must start with 'https://' to avoid automatic CustomerDotNet route prefixing.\n */\n protected buildHost(hostData: string): string {\n return hostData && !hostData.startsWith('https://') ? `https://${hostData}` : hostData;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your adapters.\ndeclare module 'ember-data/types/registries/adapter' {\n export default interface AdapterRegistry {\n 'base-micro-api-adapter': BaseMicroApiAdapter;\n }\n}\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const PresenceStateApi = 1;\n/**\n * @enum {number}\n */\nexport const DiscoverApi = 7;\n/**\n * @enum {number}\n */\nexport const NotSet = -1;\n/**\n * @enum {number}\n */\nexport const IntercomApi = 11;\n/**\n * @enum {number}\n */\nexport const PointCentralCommunityApi = 16;\n\n/**\n * @enum {number}\n */\nexport const MassNotificationsApi = 17;\n","import BaseModel from './base-model.ts';\nimport { attr, hasMany } from '@ember-data/model';\n\nimport type MicroApiEndpoint from './micro-api-endpoint.ts';\n\n/**\n * @classdesc\n * Holds Micro API endpoint data items and token version\n */\nexport default class MicroApiDataItem extends BaseModel {\n /**\n * List of avialable MicroAPI endpoints\n */\n @hasMany('micro-api-endpoint', { async: false, inverse: null })\n declare microApiEndpoints: MicroApiEndpoint[];\n\n /**\n * The version of the MicroAPI token being used\n */\n @attr('string')\n declare microApiTokenVer: string;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'micro-api-data-item': MicroApiDataItem;\n }\n}\n","import BaseModel from './base-model.ts';\nimport { attr } from '@ember-data/model';\n\n/**\n * @classdesc\n * Endpoint and info for MicroAPI service\n */\nexport default class MicroApiEndpoint extends BaseModel {\n /**\n * URL for the base endpoint\n */\n @attr('string', { defaultValue: '' })\n declare baseApiEndpoint: string;\n\n /**\n * Namespace for the API call\n */\n @attr('string', { defaultValue: '' })\n declare namespace: string;\n\n /**\n * JWT used for authenticating to the MicroAPI service\n */\n @attr('string')\n declare encodedJwtToken: string;\n\n /**\n * JWT expiration datetime\n */\n @attr('date')\n declare jwtExpirationDate: Date;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your models.\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n 'micro-api-endpoint': MicroApiEndpoint;\n }\n}\n","import EmberRoute from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { computed } from '@ember/object';\nimport { once } from '@ember/runloop';\n\n/**\n * Updates the titles for the current route.\n *\n * @private\n * @instance\n * @memberof routes.AdcBaseRoute\n */\nexport function updateRouteInfo() {\n // Assume there is no parent route path.\n let { queryParams, routeItem, routeName, fullRouteName } = this;\n\n // If the routeName is undefined, use the fullRouteName.\n if (routeName !== fullRouteName) {\n routeName = fullRouteName;\n }\n\n // Push new route data to the service.\n this.contextManager.setCurrentRouteData(\n {\n routeItem,\n routeName,\n queryParams,\n route: this,\n pageTitle: this.getRouteItemTitle()\n },\n this.wasReplaceTransition\n );\n}\n\n/**\n * Classes to define the max width of the content on a page.\n *\n * @static\n *\n * @type {string}\n */\nexport const PAGE_MAX_WIDTH_MEDIUM = 'page-max-width-md';\n\n/**\n * Returns a query parameter configuration object.\n *\n * @param {String} [type='number'] Optional query parameter type.\n *\n * @returns {{refreshModel: boolean, replace: boolean, type: String}}\n *\n * @memberof @adc/app-infrastructure/routes/base-route\n */\nexport function getQueryParam(type = 'number') {\n return {\n refreshModel: true,\n replace: true,\n type\n };\n}\n\n/**\n * @classdesc\n * Base route class that every route should extend from.\n *\n * @abstract\n * @class routes.AdcBaseRoute\n * @extends Ember.Route\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes\nexport default EmberRoute.extend(\n /** @lends routes.AdcBaseRoute */ {\n // region Services\n\n contextManager: service(),\n performanceMonitor: service(),\n intl: service(),\n\n // endregion\n\n // region Route Info\n\n /**\n * Defines the id of this route. When defined, the routes.AdcBaseRoute can do a lot of work behind the scenes.\n * However, for some routes this won't be relevant or possible. For those, the canUserAccess function must be overridden.\n *\n * Note: This value corresponds to the CustomerPageUrlEnum.\n *\n * @type {number|undefined}\n */\n routeId: undefined,\n\n /**\n * RouteItem associated with this route.\n *\n * @type {Model}\n */\n get routeItem() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-context-manager-get-route\n return this._routeItem ?? this.contextManager.getRouteItem(this.routeId);\n },\n\n set routeItem(value) {\n this._routeItem = value;\n },\n\n /**\n * Returns the route item title.\n *\n * @returns {String}\n */\n getRouteItemTitle() {\n // Use static page title from i18n.\n return this.routeItem?.pageTitle || this.intl.tc(this, 'pageTitle');\n },\n\n /**\n * Sends information about the current route to the application route.\n */\n sendRouteInfoToApp() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, updateRouteInfo);\n },\n\n // endregion\n\n // region Query Parameter serialization\n\n /** @override */\n serializeQueryParam(value, urlKey, defaultValueType) {\n if (defaultValueType === 'date' && value && value instanceof Date) {\n return value.toISOString();\n }\n\n return this._super(...arguments);\n },\n\n /** @override */\n deserializeQueryParam(value, urlKey, defaultValueType) {\n if (defaultValueType === 'date' && value && !(value instanceof Date)) {\n return new Date(value);\n }\n\n return this._super(...arguments);\n },\n\n // endregion\n\n // region Page Width\n\n /**\n * The name of the class to be added in order to define the max width of the content on a page.\n *\n * @function\n * @type {string}\n */\n pageMaxWidth: computed('isMediumWidthPage', function () {\n return this.isMediumWidthPage ? PAGE_MAX_WIDTH_MEDIUM : '';\n }),\n\n /**\n * Flag indicating whether or not the page content max width class should be added.\n *\n * @type {boolean}\n */\n isMediumWidthPage: false,\n\n // endregion\n\n // region Hooks\n\n beforeModel(transition) {\n // We use transition.targetName because we are not yet in the destination route. Also the router service does not yet have the routeName defined.\n this.performanceMonitor.markRouteInitialized(transition.targetName, transition);\n\n // We shouldn't use kpi threshold metrics unless we separately activate it for a route.\n this.performanceMonitor.setUseKpiThresholdMetrics(false);\n },\n\n // endregion\n\n // region Actions\n\n /** @ignore */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-actions-hash\n actions: /** @lends BaseRoute# */ {\n didTransition() {\n // Update application router with route information.\n this.sendRouteInfoToApp();\n }\n }\n\n // endregion\n }\n);\n","import Mixin from '@ember/object/mixin';\nimport { PAGE_MAX_WIDTH_MEDIUM } from '../utils.ts';\n\n/**\n * @classdesc\n *\n * Sets medium width for page rendering.\n *\n * @mixin IsMediumWidthPage\n * @extends Mixin\n * @memberof routes.mixins\n */\n// TODO: This ignore is an existing deprecation that must be refactored, do not copy this usage\n// eslint-disable-next-line ember/no-new-mixins\nconst IsMediumWidthPage = Mixin.create(\n /** @lends routes.mixins.IsMediumWidthPage# */ {\n /**\n * @override\n */\n pageMaxWidth: PAGE_MAX_WIDTH_MEDIUM\n }\n);\n\nexport default IsMediumWidthPage;\n","/**\n * Route name for the legacy page.\n * @note Making it a constant, because we use it in a bunch of places.\n */\nexport const LEGACY_PAGE_ROUTE_NAME = 'legacy-page';\n\n/**\n * Classes to define the max width of the content on a page.\n */\nexport const PAGE_MAX_WIDTH_MEDIUM = 'page-max-width-md';\n\n/**\n * Parses url into segments.\n *\n * @note Returns undefined if URL was not well formed.\n */\nexport function parseUrl(fullUrl: string): { url: string; search?: string; hash?: string } | undefined {\n // Parse URL into segments.\n const [match, url, search, hash] = fullUrl.match(new RegExp('^(.[^?#]+)([?].[^#]*)?(#.*)?')) || [];\n\n // Is URL malformed?\n if (!match) {\n return undefined;\n }\n\n return {\n url,\n search,\n hash\n };\n}\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport { singularize } from 'ember-inflector';\nimport CommonSerializer from './common-serializer.ts';\n\n/**\n * For classes that have properties that are abstract types that need to be deserialized as polymorphic,\n * this serializer will include those properties using the relations as \"data\" implementation mentioned here:\n * https://www.mediasuite.co.nz/blog/managing-relations-ember-data-json-api/\n *\n * @class serializers.PolymorphicSerializer\n * @extends serializers.CommonSerializer\n * @mixes DS.EmbeddedRecordsMixin\n */\nexport default CommonSerializer.extend(\n EmbeddedRecordsMixin,\n /** @lends serializers.PolymorphicSerializer# */ {\n isEmbeddedRecordsMixinCompatible: true,\n\n /** @override */\n payloadKeyFromModelName(modelName) {\n return singularize(modelName);\n },\n\n /** @override **/\n serialize(snapshot, options = {}) {\n // Make sure ID is included.\n options.includeId = true;\n\n const json = this._super(snapshot, options).data;\n\n // Following the data implementation specified here: https://www.mediasuite.co.nz/blog/managing-relations-ember-data-json-api/\n json.relationships = {};\n\n snapshot.eachRelationship((key) => {\n let relationship = (json.relationships[key] = {});\n relationship.data = json[key];\n });\n\n return json;\n }\n }\n);\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const NotEnabled = 0;\n/**\n * @enum {number}\n */\nexport const Authenticator = 1;\n/**\n * @enum {number}\n */\nexport const SMS = 2;\n/**\n * @enum {number}\n */\nexport const Email = 4;\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const Other = 0;\n/**\n * @enum {number}\n */\nexport const DesktopWeb = 1;\n/**\n * @enum {number}\n */\nexport const MobileWeb = 2;\n/**\n * @enum {number}\n */\nexport const MobileApp = 3;\n/**\n * @enum {number}\n */\nexport const SmartTV = 4;\n/**\n * @enum {number}\n */\nexport const VoiceDevice = 5;\n/**\n * @enum {number}\n */\nexport const Tablet = 6;\n","import Service from '@ember/service';\nimport * as TWO_FACTOR_AUTHENTICATION_TYPES from '../enums/TwoFactorAuthenticationType.ts';\nimport * as RECOGNIZED_DEVICE_TYPES from '../enums/RecognizedDeviceType.ts';\n\n/**\n * @classdesc\n * The base engine config service which can be inherited and extended by consuming applications.\n */\nexport default abstract class BaseEngineConfig extends Service {\n /**\n * A mapping of string keys to the actual route enum values\n */\n abstract customerPageUrlEnums: Record;\n\n /**\n * Returns the enum values for all \"types\" of 2FA authentication (e.g. SMS).\n */\n get twoFactorAuthenticationTypes(): Record {\n return TWO_FACTOR_AUTHENTICATION_TYPES;\n }\n\n /**\n * Returns the enum values for all recognized device types.\n */\n get recognizedDeviceTypes(): Record {\n return RECOGNIZED_DEVICE_TYPES;\n }\n\n /**\n * Given the route name, returns the numerical enum value of the route ID.\n *\n * @note If the value does not exist, it needs to be added to the CustomerPageUrl enum\n *\n * @param key - The name of the route we want the numerical enum value for.\n */\n getRouteIdFromRouteName(key: string): number {\n return this.customerPageUrlEnums[key];\n }\n}\n","import Service from '@ember/service';\nimport { inject as service } from '@ember/service';\n\nimport type NativeBridgeService from './native-bridge';\n\nexport default class BrowserService extends Service {\n @service declare nativeBridge: NativeBridgeService;\n\n /**\n * Copies the given message to the clipboard.\n */\n async copyToClipboard(message: string): Promise {\n // Create a DOM element, add the text, copy it to clipboard, then remove it\n const textArea = document.createElement('textarea');\n textArea.style.visibility = 'hidden';\n if (!message) {\n return false;\n }\n\n textArea.value = message;\n\n document.body.appendChild(textArea);\n textArea.select();\n\n try {\n await navigator.clipboard.writeText(message);\n document.body.removeChild(textArea);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Correctly copies to clipboard depending\n * on what device/platform is in use.\n */\n async universalCopyToClipboard(subject: string, anchorElement: HTMLElement, message: string): Promise {\n // Mainly for iOS.\n // doesSupportLaunchShareActionDialog fulfills the check for isMobileApp.\n if (this.nativeBridge.doesSupportLaunchShareActionDialog) {\n try {\n await this.nativeBridge.launchShareActionDialog(subject, message, anchorElement);\n return true;\n } catch {\n return false;\n }\n }\n\n // Desktop only.\n return (async () => {\n return this.copyToClipboard(message);\n })();\n }\n}\n","import Service from '@ember/service';\nimport { inject as service } from '@ember/service';\nimport { logMissingAbstractMember } from '@adc/ember-utils/utils/debug';\n\nimport type BaseRoute from '../routes/base-route';\nimport type EnvSettingsService from './env-settings.ts';\nimport type RouterService from '@ember/routing/router-service';\n\nexport interface RouteItem {\n pageTitle: string;\n url: string;\n isNative: boolean;\n color: string;\n icon: string;\n isNavigationItem: boolean;\n isHiddenFromNavigation: boolean;\n showOnlyIfChildRoutesExist: boolean;\n}\n\nexport interface RouteData {\n routeItem: RouteItem;\n routeName: string;\n queryParams?: Record;\n route?: BaseRoute;\n pageTitle: string;\n isWizard?: boolean;\n}\n\n/**\n * @classdesc\n * The base context manager service which can be inherited and extended by consuming applications.\n *\n * @abstract\n */\nexport default class ContextManager extends Service {\n @service declare router: RouterService;\n @service declare envSettings: EnvSettingsService;\n\n declare isAdcInternalDevDealer: boolean;\n\n /**\n * Sets the new route data for a transition.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setCurrentRouteData(_routeData: RouteData, _wasReplaceTransition: boolean): void {\n logMissingAbstractMember(this, 'setCurrentRouteData');\n }\n\n /**\n * Sets whether the current route is currently loading data.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setIsLoading(_isLoading: boolean): void {\n logMissingAbstractMember(this, 'setIsLoading');\n }\n\n /**\n * Logout logged in user from the current session.\n *\n * @param {Boolean} useReturnUrl\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n logout(_useReturnUrl: boolean): void {\n logMissingAbstractMember(this, 'logout');\n }\n\n /**\n * Returns the route item matching the specified routeId, or undefined if not found.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getRouteItem(_routeId: number): RouteItem {\n logMissingAbstractMember(this, 'getRouteItem');\n return {} as RouteItem;\n }\n\n /**\n * Redirect to an external URL.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n transitionToUrl(_url: string, _replaceUrl = false): void {\n logMissingAbstractMember(this, 'transitionToUrl');\n }\n\n /**\n * Resets the visited routes stack.\n */\n resetVisitedRoutesStack(): RouteItem[] {\n return [] as RouteItem[];\n }\n\n /**\n * Transitions to the previous route on the stack. Functions as the \"Back\" button.\n *\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function\n transitionToPreviousRoute(_defaultPageIfStackIsEmpty?: number): void {}\n\n /**\n * Gets the length of the visited routes array.\n */\n getVisitedRoutesStackLength(): number {\n return -1;\n }\n\n isSystemInstall(): boolean {\n return this.envSettings.isTestEnvironment()\n ? !(\n this.router.currentURL.includes('login-information') ||\n this.router.currentURL.includes('account-management/login-setup')\n )\n : this.router.rootURL.includes('system-install');\n }\n}\n","enum SameSite {\n Lax,\n Strict,\n None\n}\n\nexport default SameSite;\n","import SameSite from './samesite-enum';\n\nexport default abstract class Cookie {\n name: string | undefined;\n\n value: string | undefined;\n\n expirationDate: Date | undefined;\n\n domain: string | undefined;\n\n sameSite: SameSite | undefined;\n\n /**\n * Is the cookie secure?\n */\n isSecure(): boolean {\n return this.sameSite === SameSite.None;\n }\n\n /**\n * Is user accepting cookies?\n */\n abstract isAllowed(consentCookieValue: string | null): boolean;\n\n protected constructor(\n namePrefix: string,\n name: string,\n value?: string,\n expirationDate?: Date,\n sameSite?: SameSite,\n domain?: string\n ) {\n if (name && name.trim() !== '') {\n this.name = `${namePrefix}_${name.trim()}`;\n\n this.value = value;\n this.expirationDate = expirationDate;\n this.sameSite = sameSite ? sameSite : SameSite.Strict;\n this.domain = domain;\n }\n }\n}\n","import Cookie from './cookie';\nimport SameSite from './samesite-enum';\n\nexport default class EssentialCookie extends Cookie {\n constructor(name: string, value?: string, expirationDate?: Date, sameSite?: SameSite, domain?: string) {\n super('adc_e', name, value, expirationDate, sameSite, domain);\n }\n\n /**\n * Is user accepting cookies?\n */\n isAllowed(): boolean {\n return true;\n }\n}\n","import Cookie from './cookie';\nimport EssentialCookie from './essential-cookie';\nimport SameSite from './samesite-enum';\n\n/**\n * The name of the consent cookie.\n */\nexport const DO_NOT_TRACK_COOKIE = 'donottrack';\n\n/**\n * Sets a cookie.\n */\nfunction setCookie(\n this: CookieService,\n cookieName: string,\n value: string,\n expirationDate?: Date,\n isSecure = false,\n sameSite?: SameSite,\n domain?: string\n): void {\n document.cookie = `${cookieName}=${value}; ${sameSite ? ' SameSite=' + SameSite[sameSite] + ';' : ''} ${\n isSecure ? ' Secure;' : ''\n } ${expirationDate ? ' expires=' + expirationDate.toUTCString() + ';' : ''} path=/; ${\n 'domain=' + domain ? domain : this.getCookieDomain()\n }`;\n}\n\n/**\n * Validates a cookie.\n *\n * @param cookie The cookie.\n *\n * @returns {boolean} Is the cookie valid?\n */\nfunction validateCookie(cookie: Cookie) {\n if (!cookie || !cookie.name || cookie.name?.trim() === '') {\n console.warn('Cookie was not set due to invalid cookie or cookie name.');\n\n return false;\n }\n\n return true;\n}\n\n/**\n * Gets the date for cookie invalidation.\n *\n * @returns {DateTime} The date.\n */\nfunction getCookieInvalidationDate() {\n const expirationDate = new Date();\n expirationDate.setTime(expirationDate.getTime() + -1 * 24 * 60 * 60 * 1000);\n\n return expirationDate;\n}\n\n/**\n * Gets the old, non-prefixed cookie name.\n *\n * @param cookieName The name of the new cookie (with prefix).\n *\n * @returns {string | undefined} The name of the old cookie (without prefix).\n */\nfunction getNonPrefixedCookieName(cookieName: string | undefined): string | undefined {\n if (!cookieName || cookieName?.trim() === '') {\n return undefined;\n }\n\n return cookieName.substring(6);\n}\n\n/**\n * Gets the value of a cookie.\n *\n * @param cookieName The name of the cookie.\n *\n * @returns {string | null} The value of the cookies.\n */\nfunction getCookieValue(cookieName: string | undefined) {\n if (!cookieName || cookieName?.trim() === '') {\n return null;\n }\n\n return (document.cookie || '').split('; ').reduce((value, cookie) => {\n // Extract name and all values (since value may contain equals signs).\n const [name, ...cookieValue] = cookie.split('=');\n\n // Return cookie value\n return name === cookieName ? cookieValue.join('=') : value;\n }, null);\n}\n\nexport default class CookieService {\n /**\n * Returns the value of the cookie.\n *\n * @param cookie The cookie.\n *\n * @returns {string | null} The value of the cookie.\n */\n getCookie(cookie: Cookie): string | null {\n if (!validateCookie(cookie)) {\n return null;\n }\n\n let value = getCookieValue(cookie.name);\n\n // TODO: Remove this code with WEB-11431.\n if (!value) {\n value = getCookieValue(getNonPrefixedCookieName(cookie.name));\n }\n\n return value;\n }\n\n /**\n * Updates / Sets a cookie\n *\n * @param cookie The cookie.\n *\n * @returns {boolean} Was the cookie updated/set?\n */\n setCookie(cookie: Cookie): boolean {\n if (validateCookie(cookie)) {\n // TODO: Remove this code with WEB-11431.\n const trimmedCookie = getNonPrefixedCookieName(cookie.name);\n\n if (trimmedCookie) {\n setCookie.call(this, trimmedCookie, '', getCookieInvalidationDate());\n\n const consentCookieValue = this.getCookie(new EssentialCookie(DO_NOT_TRACK_COOKIE));\n if (cookie.isAllowed(consentCookieValue)) {\n setCookie.call(\n this,\n cookie.name,\n cookie.value,\n cookie.expirationDate,\n cookie.isSecure(),\n cookie.sameSite,\n cookie.domain\n );\n\n return true;\n }\n }\n }\n\n return false;\n }\n\n /**\n * Invalidates a cookie.\n *\n * @param cookie The cookie.\n *\n * @returns {boolean} Was the cookie invalidated?\n */\n deleteCookie(cookie: Cookie): boolean {\n if (validateCookie(cookie)) {\n if (this.getCookie(cookie) != null) {\n setCookie.call(this, cookie.name, '', getCookieInvalidationDate());\n\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Checks the truthy/falsy state for a cookie.\n *\n * @param cookie The cookie.\n *\n * @returns {boolean} The truthy/falsy value of the cookie.\n */\n hasTruthyCookieValue(cookie: Cookie): boolean {\n const cookieValue = this.getCookie(cookie);\n\n return !(\n cookieValue === '0' ||\n cookieValue === 'false' ||\n cookieValue === null ||\n cookieValue === 'null' ||\n cookieValue === 'undefined'\n );\n }\n\n /**\n * Checks the domain of a cookie.\n *\n * @returns {string} The value of the domain.\n */\n getCookieDomain(): string {\n const domain = location.hostname;\n\n if (domain.includes('.alarm.com')) {\n return '.alarm.com';\n }\n\n if (domain.includes('.adcinternal.com')) {\n return '.adcinternal.com';\n }\n\n return domain;\n }\n}\n","import Service from '@ember/service';\nimport CookieService from '@adc/cookie-manager/build/cookie-service';\nimport EssentialCookie from '@adc/cookie-manager/build/essential-cookie';\n\nimport type Cookie from '@adc/cookie-manager/build/cookie';\n\nexport default class CookieManager extends Service {\n /**\n * Base cookie service.\n */\n cookieService: CookieService;\n\n constructor() {\n super();\n\n this.cookieService = new CookieService();\n }\n\n /**\n * Gets the cookie value.\n */\n getCookie(cookie: Cookie): string | null {\n return this.cookieService.getCookie(cookie);\n }\n\n /**\n * Updates / Sets a cookie.\n */\n setCookie(cookie: Cookie): boolean {\n return this.cookieService.setCookie(cookie);\n }\n\n /**\n * Deletes a cookie.\n */\n deleteCookie(cookie: Cookie): boolean {\n return this.cookieService.deleteCookie(cookie);\n }\n\n /**\n * Check the truthy/falsy state for a cookie.\n */\n hasTruthyCookieValue(cookie: Cookie): boolean {\n return this.cookieService.hasTruthyCookieValue(cookie);\n }\n\n /**\n * Gets the essential cookie value.\n */\n getEssentialCookie(cookieName: string): string | null {\n return this.cookieService.getCookie(new EssentialCookie(cookieName));\n }\n\n /**\n * Check the truthy/falsy state for an essential cookie.\n */\n hasEssentialCookieTruthyValue(cookieName: string): boolean {\n return this.cookieService.hasTruthyCookieValue(new EssentialCookie(cookieName));\n }\n\n /**\n * Deletes the essential cookie.\n */\n deleteEssentialCookie(cookieName: string): boolean {\n return this.cookieService.deleteCookie(new EssentialCookie(cookieName));\n }\n\n /**\n * Updates / Sets an essential cookie.\n *\n * @param cookieName The name of the essential cookie.\n * @param cookieValue The value of the essential cookie.\n * @param expirationDate The expiration date of the essential cookie. If undefined, the cookie will expire at the\n * end of the session.\n */\n setEssentialCookie(cookieName: string, cookieValue: string, expirationDate?: Date | undefined): boolean {\n return this.cookieService.setCookie(new EssentialCookie(cookieName, cookieValue, expirationDate));\n }\n}\n","import Service from '@ember/service';\n\nexport interface AppEnvironment {\n environment: string;\n modulePrefix: string;\n podModulePrefix: string;\n locationType: string;\n rootURL: string;\n APP: Record;\n}\n\n/**\n * @classdesc\n * A service for storing/accessing the environment variable.\n */\nexport default class EnvSettingsService extends Service {\n private envSettings?: AppEnvironment;\n\n /**\n * Sets the environment.\n */\n setEnvironment(env: T): void {\n if (!this.envSettings) {\n this.envSettings = env;\n }\n }\n\n /**\n * Returns the environment.\n */\n getEnvironment(): T | undefined {\n if (!this.envSettings) {\n console.error('[@adc/app-infrastructure] Cannot retrieve the environment variable because it was not set.');\n return;\n }\n\n return this.envSettings as T;\n }\n\n /**\n * Helper function for checking if environment is of a specific type.\n */\n private isEnvironmentOfType(value: string): boolean {\n if (!this.envSettings) {\n console.error(\n '[@adc/app-infrastructure] Cannot specify the environment type because the environment variable was not set.'\n );\n }\n\n return this.envSettings?.environment === value ?? false;\n }\n\n /**\n * Determines if the application is running in the development environment.\n */\n isDevelopmentEnvironment(): boolean {\n return this.isEnvironmentOfType('development');\n }\n\n /**\n * Determines if the application is running in the test environment.\n */\n isTestEnvironment(): boolean {\n return this.isEnvironmentOfType('test');\n }\n\n /**\n * Determines if the application is running in the production environment.\n */\n isProductionEnvironment(): boolean {\n return this.isEnvironmentOfType('production');\n }\n}\n","import Service, { inject as service } from '@ember/service';\nimport { computed, set } from '@ember/object';\nimport { alias } from '@ember/object/computed';\nimport { GET } from '@adc/ajax/services/adc-ajax';\nimport { loadScript } from '@adc/ember-utils/utils/browser-helpers';\nimport { isRtl } from '@adc/ember-utils/utils/html-dir-helpers';\nimport { defaultIsoCode } from '../models/locale.ts';\nimport { getOwner } from '@ember/owner';\nimport setDay from 'date-fns/setDay';\nimport setHours from 'date-fns/setHours';\nimport startOfHour from 'date-fns/startOfHour';\nimport setMonth from 'date-fns/setMonth';\n\nimport type EnvSettingsService from './env-settings.ts';\nimport type AdcAjaxService from '@adc/ajax/services/adc-ajax';\nimport type LocaleModel from '../models/locale.ts';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type ContextManager from './context-manager.ts';\nimport type EmberObject from '@ember/object';\n\nconst MONTHS = Array.from({ length: 12 }, (_, idx) => startOfHour(setHours(setMonth(new Date(), idx), 12)));\n\ntype TranslationsPayload = {\n language: string;\n translations: Record;\n};\n\n/**\n * Returns promise that resolves as translations collection, from cache if available, based on the passed culture ID.\n *\n * @private\n */\nfunction getTranslations(\n this: LocaleService,\n cultureId: string,\n translations?: Record\n): Promise {\n if (translations) {\n return Promise.resolve({\n language: cultureId,\n translations\n });\n }\n\n return this.ajax.apiRequest(\n `translations/${cultureId}/${this.envSettings.isDevelopmentEnvironment()}`,\n undefined,\n null,\n GET,\n false\n );\n}\n\n/**\n * @classdesc\n * A service for retrieving locale translations.\n */\nexport default class LocaleService extends Service {\n @service declare ajax: AdcAjaxService;\n @service declare intl: ADCIntlService;\n @service declare envSettings: EnvSettingsService;\n @service declare contextManager: ContextManager;\n\n /**\n * Is the site being displayed RTL?\n */\n @computed('selectedLocale')\n get isRtl(): boolean {\n return isRtl();\n }\n\n /**\n * The current system time zone.\n */\n @alias('contextManager.identityModel.timezone')\n declare timeZone: string;\n\n /**\n * Does the week start on sunday for the current Locale?\n */\n weekStartsOnSunday = true;\n\n /**\n * Refreshes the application in order to refresh the culture.\n *\n * @TODO: Make this happen automatically whenever the culture is changed.\n */\n refreshCulture(): void {\n this.contextManager.transitionToUrl('');\n }\n\n /**\n * Updates the application locale and downloads required translations.\n *\n * @note If no translations are found on the server, english (en) translations are loaded as a fallback.\n */\n async changeLocale(locale: Pick): Promise {\n // Get required services.\n const { intl } = this,\n owner = getOwner(this) as ReturnType & {\n translations: Record>;\n },\n cache = ((app) => (app.translations = app.translations ?? {}))(owner),\n { cultureId, isoCode, weekStartsOnSunday } = locale;\n\n this.weekStartsOnSunday = weekStartsOnSunday;\n\n // Predefine language and translations.\n let language = defaultIsoCode,\n translations;\n\n try {\n // Combine requests into one promise.\n const [data] = await Promise.all([\n // Get translations.\n getTranslations.call(this, String(cultureId), cache[cultureId]),\n\n // Request Intl polyfill script if necessary.\n // All of the other polyfills are loaded from index.html so that they are ready before any code is executed.\n window.Intl\n ? Promise.resolve()\n : loadScript(\n `https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?version=3.25.1&features=Intl.~locale.${isoCode}`\n )\n ]);\n\n // Have to put parentheses around this statement for it to build.\n ({ language, translations } = data);\n\n if (translations) {\n // Did we NOT get the requested locale back?\n if (language !== isoCode) {\n // Log failure.\n console.warn(`Did not find translations for ${isoCode}; falling back to ${language}`);\n }\n\n // Cache language\n cache[language] = translations;\n }\n } catch (e) {\n // Do nothing. We are driving throwing of error of of null translations variable.\n }\n\n // Update application translations and locale.\n intl.addTranslations(language, translations || {});\n intl.setLocale(language);\n\n // Update intl service with timezone for date formatting.\n const { timeZone } = this;\n\n // Using set here to prevent an exception from intl.timeZone not being\n // marked as 'tracked' when coming from certain routes.\n set(intl, 'timeZone', timeZone);\n\n // Update timeZone for ui-components.\n const uiComponents = owner.lookup('@adc/ui-components:appValues') as { timeZone: string };\n if (uiComponents) {\n uiComponents.timeZone = timeZone;\n }\n\n // Is there a \"defaults\" object for this addon?\n const defaults = owner.lookup('pikaday:main') as EmberObject;\n if (defaults) {\n // Always include time zone.\n const props: {\n timeZone: string;\n firstDay: number;\n i18n?: Record;\n } = {\n timeZone,\n firstDay: weekStartsOnSunday ? 0 : 1\n };\n\n const WEEKDAYS = Array.from({ length: 7 }, (_, idx) => setDay(new Date(), idx));\n\n // Add translated descriptions.\n props.i18n = {\n previousMonth: intl.t('generic.calendar.previousMonth'),\n nextMonth: intl.t('generic.calendar.nextMonth'),\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n months: MONTHS.map((d) => intl.formatDate(d, { month: 'long' })),\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n weekdays: WEEKDAYS.map((d) => intl.formatDate(d, { weekday: 'long' })),\n weekdaysShort: WEEKDAYS.map((d) =>\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/require-tz-functions\n intl.formatDate(d, { weekday: language === 'he-IL' ? 'narrow' : 'short' })\n )\n };\n\n // Pass defaults.\n defaults.setProperties(props);\n }\n\n // If we did not get translations then throw an error.\n if (translations === null) {\n throw new Error('Getting translations failed.');\n }\n }\n}\n","/**\n * Utility helper module for RSVP shortcuts and objects.\n *\n * @module\n */\n\nimport { Promise as EmberPromise } from 'rsvp';\n\n/**\n * Returns a promise that will be resolved with the given data object.\n *\n * @deprecated Please use the native Promise.resolve() instead.\n */\nexport function RSVPResolve(data: T): ReturnType> {\n return EmberPromise.resolve(data);\n}\n\n/**\n * Returns a promise that will be rejected with the given error object.\n *\n * @deprecated Please use the native Promise.reject() instead.\n */\nexport function RSVPReject(error: T): EmberPromise {\n return EmberPromise.reject(error);\n}\n\n/**\n * Creates a compound RSVPPromiseType object that contains the promise itself and shortcuts to resolve and reject the promise.\n *\n * @deprecated This is hacky, and nobody understands it, please use the native Promise instead.\n */\nexport function RSVPPromise(): {\n promise: EmberPromise;\n resolve: (value?: T) => void;\n reject: (reason?: any) => void;\n} {\n const fn = () => {};\n let resolve: (value?: T) => void = fn,\n reject: (reason?: any) => void = fn;\n\n const promise = new EmberPromise((fnResolve, fnReject) => {\n resolve = fnResolve;\n reject = fnReject;\n });\n\n return {\n promise,\n resolve,\n reject\n };\n}\n\n/**\n * Checks if the passed in object is a promise.\n *\n * @deprecated This is a pretty naive test and just checks if the object has a .then property.\n */\nexport function isPromise(object?: any): boolean {\n return !!object?.then;\n}\n","export enum BluetoothPermissionEnum {\n Advertising = 1\n}\n","import Service from '@ember/service';\nimport { computed } from '@ember/object';\nimport { guidFor } from '@ember/object/internals';\nimport { isEmpty } from '@ember/utils';\nimport { addWeakListener } from '@adc/ember-utils/utils/event-listeners';\nimport { later, cancel } from '@ember/runloop';\nimport { RSVPPromise, RSVPReject } from '@adc/ember-utils/utils/rsvp';\nimport {\n Initialize,\n SetTitle,\n SetToolbarButtons,\n ShowConfirmationDialog,\n GoBack,\n HandleApplicationError,\n RefreshWebView,\n ReloadAssociatedSystems,\n LaunchShareActionDialog,\n TransitionToNativeView,\n CloseWebView,\n LaunchImportContact,\n LaunchBrowser,\n CloseWebViewV2,\n TerminateAppSession,\n LaunchNewContext,\n PersistAppSession,\n EnablePushNotifications,\n EnableBluetooth,\n CheckBluetoothPermissions,\n StartBleAdvertising,\n StopBleAdvertising\n} from '../enums/NativeBridgeFeature.ts';\nimport { inject as service } from '@ember/service';\nimport { A } from '@ember/array';\nimport { BluetoothPermissionEnum } from '../enums/BluetoothPermissionCategory.ts';\nimport { None } from '../enums/ContextSwitchType.ts';\nimport { sentryWithScopeAndError } from '../utils/sentry.ts';\n\n// region Constants.\n\n/**\n * Type for button that should transition the view back.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nexport const BUTTON_TYPE_BACK = 'back';\n\n/**\n * Type for button that cancels an action, but does not go back to a previous route.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nexport const BUTTON_TYPE_CANCEL = 'cancel';\n\n/**\n * Type for button that confirms an action or saves a form.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nexport const BUTTON_TYPE_CONFIRM = 'confirm';\n\n/**\n * Type for button that triggers a screen to add an item.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nconst BUTTON_TYPE_ADD = 'add';\n/**\n * Key representing the toolbar button action.\n *\n * @ignore\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nexport const RUN_TOOLBAR_BUTTON_ACTION_NAME = 'runToolbarButtonAction';\n\n/**\n * Key representing the modal button action.\n *\n * @ignore\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nconst RUN_MODAL_BUTTON_ACTION_NAME = 'runModalButtonAction';\n\n/**\n * Key representing function for resolving promise.\n *\n * @ignore\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @type {string}\n */\nconst RUN_RESOLVE_PROMISE_ACTION = 'resolvePromise';\n\n// endregion\n// region Helper methods.\n\n/**\n * Executes method on the native bridge.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {Number} featureEnum\n * @param {Object} data\n * @returns {Promise<*>}\n */\nfunction runMethod(featureEnum, data) {\n if (!this.isEnabled) {\n return RSVPReject();\n }\n\n if (!doesSupportFeature.call(this, featureEnum)) {\n return RSVPReject();\n }\n\n // Define new RSVPPromise that we will store in cache.\n const promise = RSVPPromise(),\n // Create id for the new promise.\n returnPromiseId = guidFor(promise);\n\n // Store promise in the cache.\n this.promiseCache[returnPromiseId] = promise;\n\n let content = {\n feature: featureEnum\n };\n\n if (data) {\n content.data = data;\n }\n\n if (returnPromiseId) {\n content.returnPromiseId = returnPromiseId;\n }\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(() => {\n // Pass data to native bridge.\n this.bridge?.postMessage.call(this.bridge, JSON.stringify(content));\n }, 1);\n\n return promise.promise;\n}\n\n/**\n * Returns toolbar button collection with the specified id.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {String} id\n * @returns {NativeToolbarType}\n */\nfunction getButtonCollectionWithId(id) {\n return getCollectionWithId.call(this, 'toolbarsStack', id);\n}\n\n/**\n * Returns collection with collection name and id.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {String} collectionName\n * @param {String} id\n * @returns {*}\n */\nfunction getCollectionWithId(collectionName, id) {\n return this.get(collectionName).findBy('id', id);\n}\n\n/**\n * Returns instance of the native bridge that provides communication between Ember and an app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @returns {Object|undefined}\n */\nfunction getBridge() {\n const { bridgeName } = this;\n let bridge = (window[bridgeName] = window[bridgeName] || ((window.webkit || {}).messageHandlers || {})[bridgeName]);\n\n if (!bridge?.postMessage) {\n bridge = window.NativeBridge = undefined;\n }\n\n return bridge;\n}\n\n/**\n * Does the native application have support for the specified feature?\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {Number} featureEnum Feature to check support for.\n * @returns {boolean}\n */\nfunction doesSupportFeature(featureEnum) {\n return this.isEnabled && (this.supportedNativeBridgeFeatures || []).includes(featureEnum);\n}\n\n/**\n * Does the native application have support for transitioning to the specified view?\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {Number} viewEnum View to check support for.\n * @returns {boolean}\n */\nfunction doesSupportNativeView(viewEnum) {\n return (this.supportedNativeViews || []).includes(viewEnum);\n}\n\n/**\n * Creates a copy of an object with id property.\n *\n * @private\n * @static\n * @memberof services.NativeBridge\n *\n * @param {Object} object\n * @returns {Object}\n */\nfunction getObjectWithoutId(object) {\n // eslint-disable-next-line no-unused-vars\n let { id, ...newObject } = object;\n\n return newObject;\n}\n\n// endregion\n\n// region Bridge interface extensions.\n\n/**\n * Sets up all button actions that will handle clicks of the native buttons.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n */\nfunction setupActionsOnBridge() {\n const { bridge } = this;\n\n // Define how to execute a toolbar button function.\n bridge[RUN_TOOLBAR_BUTTON_ACTION_NAME] = (toolbarId, buttonPath, index) => {\n const toolbar = getButtonCollectionWithId.call(this, toolbarId);\n\n if (!toolbar) {\n console.error(`Tried to access non existing native buttons toolbar, toolbarId=${toolbarId}`);\n return;\n }\n\n const buttons = toolbar[buttonPath];\n\n if (!buttons) {\n console.error(\n `Tried to access non existing buttonPath in a toolbar, toolbarId=${toolbarId}, buttonPath=${buttonPath}`\n );\n return;\n }\n\n const button = buttons[index];\n\n if (!button) {\n console.error(\n `Tried to access non existing button in a toolbar, toolbarId=${toolbarId}, buttonPath=${buttonPath}, index=${index}`\n );\n return;\n }\n\n const action = button.action;\n\n // This should never happen.\n if (!action) {\n console.error(\n `Button does not have an action defined, toolbarId=${toolbarId}, buttonPath=${buttonPath}, index=${index}`\n );\n return;\n }\n\n // Finally run the button action.\n return action();\n };\n\n // Define modal actions.\n // This is much simpler because there is always at most one modal open.\n bridge[RUN_MODAL_BUTTON_ACTION_NAME] = (buttonIndex) => {\n const button = (this.modalButtons || []).objectAt(buttonIndex);\n\n if (!button) {\n console.error(`Tried to access non existing modal button, index=${buttonIndex}`);\n return;\n }\n\n const { action } = button;\n\n // This should never happen.\n if (!action) {\n console.error(`Modal button does not have an action, index=${buttonIndex}`);\n }\n\n // Run button action.\n return action();\n };\n\n // Define method for resolving promises.\n bridge[RUN_RESOLVE_PROMISE_ACTION] = ({ promiseId, data, error } = {}) => {\n if (!promiseId) {\n console.error('No promise id defined when resolving promise from App.');\n return;\n }\n\n // Get promise.\n const promise = this.promiseCache[promiseId];\n\n if (!promise) {\n // Log an error to sentry. Send extra data to help better track the problem.\n const wasPreviouslyResolved = promiseId in this.previouslyResolvedPromiseIds,\n sentryExtras = {\n promiseId,\n wasPreviouslyResolved,\n latestResolvedTime: this.previouslyResolvedPromiseIds[promiseId] ?? '',\n data,\n error\n },\n sentryTags = { wasPreviouslyResolved };\n\n sentryWithScopeAndError(\n 'native-bridge: No promise found when resolving action from App',\n sentryExtras,\n sentryTags\n );\n\n return;\n }\n\n // Resolve or reject promise.\n if (error) {\n console.error(error);\n promise.reject(error);\n } else {\n // If data was not undefined, it should have come as a stringified object.\n // Therefore, try to deserialize it and return as a result of the promise.\n if (data !== undefined) {\n try {\n data = JSON.parse(data);\n } catch (e) {\n // Do nothing; we will just use data as it came in, but log an error so that we can look at it.\n // The reason for logging error is that we expect data to be returned serialized.\n console.error(`Could not deserialize data returned from NativeBridge method, data=${data}`);\n }\n }\n\n promise.resolve(data);\n }\n\n // Remove promise from cache.\n this.previouslyResolvedPromiseIds[promiseId] = new Date().toISOString();\n delete this.promiseCache[promiseId];\n };\n}\n\n// endregion\n\n// region Title processing.\n\n/**\n * Sends the current title to the app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n */\nfunction sendTitleToApp() {\n (async () => runMethod.call(this, SetTitle, getObjectWithoutId(this.titleStack?.lastObject || {})))();\n}\n\n// endregion\n\n// region Buttons processing.\n\n/**\n * Transforms button into a button object that can be passed to the native app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {NativeButtonType} buttonObject\n * @param {Function} bridgeMethodKey Method to run on the bridge when a native button is clicked.\n * @param {Array} params Array of arguments that should be passed into the bridge method to be executed.\n * @returns {{text: String, description: String=, icon: String=, type: String=, promisePending: boolean, actionPath: String}}\n */\nfunction transformButtonObject(buttonObject, bridgeMethodKey, ...params) {\n let { text, description, icon, type, isPromisePending } = buttonObject;\n\n // Predefine params string that will be used for method eval.\n let paramsString = '';\n\n // If we got params then put them in a format consumable by eval.\n if (!isEmpty(params)) {\n paramsString = `'${params.join(\"','\")}'`;\n }\n\n isPromisePending = isPromisePending ? isPromisePending.toString() : 'false';\n\n return {\n text,\n description,\n icon,\n type,\n isPromisePending,\n actionPath: wrapJsInTryCatch(`window.${this.bridgeName}.${bridgeMethodKey}(${paramsString})`)\n };\n}\n\n/**\n * Translates NativeToolbarType to something that is consumable by the native app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param toolbar\n * @returns {*}\n */\nfunction translateToolbarButtons(toolbar) {\n if (!toolbar) {\n return null;\n }\n\n const { id } = toolbar;\n\n // Create object for toolbar buttons that we will be using to communicate to the app.\n const data = {\n id,\n backButtons: [],\n contextButtons: []\n };\n\n // Transform buttons.\n ['backButtons', 'contextButtons'].forEach((buttonPath) => {\n (toolbar[buttonPath] || []).forEach((button, index) => {\n // Skip a button if it does not have an action. This should not happen.\n if (!button.action) {\n console.error(\n `Skipping a button, because it does not have an action. buttonPath=${buttonPath}, index=${index}`\n );\n return;\n }\n\n data[buttonPath].push(\n transformButtonObject.call(this, button, RUN_TOOLBAR_BUTTON_ACTION_NAME, id, buttonPath, index)\n );\n });\n });\n\n return data;\n}\n\n/**\n * Sends the current toolbar button interface to the app.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n */\nfunction sendToolbarButtonsToApp() {\n (async () =>\n runMethod.call(\n this,\n SetToolbarButtons,\n getObjectWithoutId(translateToolbarButtons.call(this, this.toolbarsStack?.lastObject || {}))\n ))();\n}\n\n// endregion\n\n// region Processing collections.\n\n/**\n * Processes update of collection.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {String} stackType Key for the stack name.\n * @param {Object} newCollection Collection to be updated.\n * @param {Function} updateAction Function to be executed to send data to the app.\n * @param {Number} featureEnum Key for checking support for this feature.\n */\nfunction processCollectionUpdate(stackType, newCollection, updateAction, featureEnum) {\n if (!doesSupportFeature.call(this, featureEnum)) {\n return;\n }\n\n if (!newCollection) {\n return;\n }\n\n const { id } = newCollection,\n existingCollection = getCollectionWithId.call(this, stackType, id),\n stack = this.get(stackType);\n\n // Now figure out if we need to push the toolbar to the app or not.\n if (existingCollection) {\n const indexOfExisting = stack.indexOf(existingCollection);\n\n // If the existing collection is the last one, pop it so that it can be re-added.\n // In this case we need to send update.\n if (indexOfExisting === stack.get('length') - 1) {\n stack.popObject();\n } else {\n // Update the object at the index. No update is necessary.\n stack[indexOfExisting] = newCollection;\n\n return;\n }\n }\n\n // Push new set to the stack.\n stack.pushObject(newCollection);\n\n // Send stuff to app.\n updateAction.call(this);\n}\n\n/**\n * Processes disposal of property when it is removed from the view.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @param {String} stackType Key for the stack name.\n * @param {String} id Id of the collection to be disposed.\n * @param {Function} updateAction Function to be executed to send data to the app.\n * @param {Number} featureEnum Key for checking support for this feature.\n */\nfunction processCollectionDispose(stackType, id, updateAction, featureEnum) {\n if (!doesSupportFeature.call(this, featureEnum)) {\n return;\n }\n\n const existingCollection = getCollectionWithId.call(this, stackType, id),\n stack = this.get(stackType);\n\n // If this is the last update, then need to update the collection in the app.\n const needsUpdate = stack.get('lastObject') === existingCollection;\n\n stack.removeObject(existingCollection);\n\n if (needsUpdate) {\n updateAction.call(this);\n }\n}\n\n// endregion\n\n// region Initialization.\n\n/**\n * Threshold for logging initialization duration as warning.\n *\n * @ignore\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @type {number}\n */\nconst INITIALIZATION_WARN_THRESHOLD = 500;\n\n/**\n * Threshold for logging initialization error and stopping the initialization process.\n *\n * @ignore\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @type {number}\n */\nconst INITIALIZATION_ERROR_THRESHOLD_MS = 5000;\n\n/**\n * Initializes bridge and its properties.\n *\n * @private\n * @instance\n * @memberof services.NativeBridge\n *\n * @returns {Promise}\n */\nasync function initializeBridge() {\n const promiseResolveDataReplaceTemplate = '{data}',\n startTime = new Date();\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n const initializationFailSafe = later(() => {\n console.error(\n `NativeBridge initialization took longer than ${INITIALIZATION_ERROR_THRESHOLD_MS}ms, marking as initialized and disabled as fail safe.`\n );\n\n // Only resolve if this is not dev so that we can catch issues.\n if (!this.envSettings.isDevelopmentEnvironment()) {\n this.set('isEnabled', false);\n }\n }, INITIALIZATION_ERROR_THRESHOLD_MS);\n\n try {\n // Start setup. Need to make sure that this completes before anything else.\n await runMethod.call(\n this,\n Initialize,\n {\n promiseResolvePath: wrapJsInTryCatch(\n `window.${this.bridgeName}.${RUN_RESOLVE_PROMISE_ACTION}(${promiseResolveDataReplaceTemplate});`\n ),\n promiseResolveDataReplaceTemplate\n },\n true\n );\n\n // Cancel fail safe because everything went well.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n cancel(initializationFailSafe);\n\n const endTime = new Date(),\n duration = endTime.getTime() - startTime.getTime();\n\n // Log if time was less than a threshold, warn if more.\n (duration > INITIALIZATION_WARN_THRESHOLD ? console.warn : console.log)(\n `NativeBridge initialization took ${duration}ms`\n );\n } catch (e) {\n console.error(e);\n\n this.set('isEnabled', false);\n }\n}\n\n// endregion\n\n/**\n * @classdesc\n *\n * Native bridge functionality between the Ember application and a Native application.\n *\n * @class NativeBridge\n * @extends Service\n * @memberof services\n */\n// TODO: This ignore is an existing deprecation that must be refactored, do not copy this usage\n// eslint-disable-next-line ember/no-classic-classes\nexport default Service.extend(\n /** @lends services.NativeBridge */ {\n envSettings: service(),\n\n /**\n * Name of the bridge.\n *\n * @type {String}\n */\n bridgeName: 'NativeBridge',\n\n /**\n * Variable to hold a cache of promises that will be resolved by the native application.\n *\n * @type {Array}\n */\n promiseCache: (() => [])(),\n\n /**\n * Is the bridge enabled and usable?\n *\n * @type {boolean}\n */\n isEnabled: false,\n\n /**\n * A list of IDs of previously resolved promises.\n *\n * @note Using this to help debug a Sentry error where the promiseId from the app\n * is not within the promiseCache.\n *\n * @type {{ [ id: string ]: timestamp: string }}\n */\n previouslyResolvedPromiseIds: null,\n\n /**\n * Initializes native bridge service with the supported features.\n *\n * @param {Array} supportedNativeBridgeFeatures\n * @param {Array} supportedNativeViews\n * @returns {Promise}\n */\n async initialize(supportedNativeBridgeFeatures, supportedNativeViews) {\n const bridge = getBridge.call(this);\n const isEnabled = bridge && !isEmpty(supportedNativeBridgeFeatures);\n\n this.setProperties({\n isEnabled,\n bridge,\n supportedNativeBridgeFeatures,\n supportedNativeViews,\n previouslyResolvedPromiseIds: {}\n });\n\n if (!isEnabled) {\n // Nothing to initialize, so resolve initialization.\n return;\n }\n\n // Need to setup actions on bridge before we attempt any communication.\n setupActionsOnBridge.call(this);\n\n // Initialize bridge communication.\n await initializeBridge.call(this);\n\n // Make sure that the toolbar gets reset if the page gets unloaded.\n addWeakListener(this, window, 'beforeunload', () => this.resetToolbarButtons());\n },\n\n // region Feature supports.\n\n /**\n * Does the app support changing of the header title?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportTitle: computed(function () {\n return doesSupportFeature.call(this, SetTitle);\n }),\n\n /**\n * Does the app support creation of action buttons?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportToolbarButtons: computed(function () {\n return doesSupportFeature.call(this, SetToolbarButtons);\n }),\n\n /**\n * Does the app support showing a confirmation dialog?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportConfirmationDialog: computed(function () {\n return doesSupportFeature.call(this, ShowConfirmationDialog);\n }),\n\n /**\n * Does the app support telling the app to go back in the App's view stack?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportGoBack: computed(function () {\n return doesSupportFeature.call(this, GoBack);\n }),\n\n /**\n * Does the app support refreshing of the WebView?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportRefreshWebView: computed(function () {\n return doesSupportFeature.call(this, RefreshWebView);\n }),\n\n /**\n * Does the app support refreshing Available Systems?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportReloadAssociatedSystems: computed(function () {\n return doesSupportFeature.call(this, ReloadAssociatedSystems);\n }),\n\n /**\n * Does the app support launching share dialog?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportLaunchShareActionDialog: computed(function () {\n return doesSupportFeature.call(this, LaunchShareActionDialog);\n }),\n\n /**\n * Does the app support transitioning to a native view?\n *\n * NOTE: Consider using doesSupportTransitionToNativeViewWithId instead.\n *\n * @function\n * @returns {boolean}\n */\n doesSupportTransitionToNativeView: computed(function () {\n return doesSupportFeature.call(this, TransitionToNativeView);\n }),\n\n /**\n * Does the app support transitioning to native view with specified id?\n *\n * @function\n * @param viewEnum NativeView to transition to\n * @returns {boolean}\n */\n doesSupportTransitionToNativeViewWithId: function (viewEnum) {\n return doesSupportFeature.call(this, TransitionToNativeView) && doesSupportNativeView.call(this, viewEnum);\n },\n\n /**\n * Does the app support closing the current web view?\n *\n * @function\n * @returns {boolean}\n *\n * @deprecated Use CloseWebViewV2 instead.\n */\n doesSupportCloseWebView: computed(function () {\n return doesSupportFeature.call(this, CloseWebView);\n }),\n\n /**\n * Does the app support importing a contact?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportLaunchImportContact: computed(function () {\n return doesSupportFeature.call(this, LaunchImportContact);\n }),\n\n /**\n * Does the app support launching an external browser?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportLaunchBrowser: computed(function () {\n return doesSupportFeature.call(this, LaunchBrowser);\n }),\n\n /**\n * Does the app support version 2 of closing a webview?\n *\n * CloseWebViewV2 contains a bug fix for CloseWebView.\n *\n * @function\n * @returns {boolean}\n */\n doesSupportCloseWebViewV2: computed(function () {\n return doesSupportFeature.call(this, CloseWebViewV2);\n }),\n\n /**\n * Does the app support terminating a user's session?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportTerminateAppSession: computed(function () {\n return doesSupportFeature.call(this, TerminateAppSession);\n }),\n\n /**\n * Does the app support launching passed content a new fragment (Android) or modal (iOS)?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportLaunchNewContext: computed(function () {\n return doesSupportFeature.call(this, LaunchNewContext);\n }),\n\n /**\n * Does the app support persisting the session?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportPersistAppSession: computed(function () {\n return doesSupportFeature.call(this, PersistAppSession);\n }),\n\n /**\n * Does the app support enabling push notifications on the device?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportEnablePushNotifications: computed(function () {\n return doesSupportFeature.call(this, EnablePushNotifications);\n }),\n\n /**\n * Does the app support enabling bluetooth?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportEnableBluetooth: computed(function () {\n return doesSupportFeature.call(this, EnableBluetooth);\n }),\n\n /**\n * Does the app support checking bluetooth permissions?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportCheckBluetoothPermissions: computed(function () {\n return doesSupportFeature.call(this, CheckBluetoothPermissions);\n }),\n\n /**\n * Does the app support start BLE advertising?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportStartBleAdvertising: computed(function () {\n return doesSupportFeature.call(this, StartBleAdvertising);\n }),\n\n /**\n * Does the app support stop BLE advertising?\n *\n * @function\n * @returns {boolean}\n */\n doesSupportStopBleAdvertising: computed(function () {\n return doesSupportFeature.call(this, StopBleAdvertising);\n }),\n\n // endregion\n\n // region Title.\n\n /**\n * Stack of title that correspond to an id that wants them to be shown.\n *\n * @function\n * @returns {Array}\n */\n titleStack: computed(function () {\n return A();\n }),\n\n /**\n * Sets header title in the app.\n *\n * @param {NativeTitleType} titleCollection\n */\n setTitle(titleCollection) {\n processCollectionUpdate.call(this, 'titleStack', titleCollection, sendTitleToApp, SetTitle);\n },\n\n /**\n * Removes title with the specified id.\n *\n * @param {String} id\n */\n removeTitle(id) {\n processCollectionDispose.call(this, 'titleStack', id, sendTitleToApp, SetTitle);\n },\n\n // endregion\n\n // region Toolbar buttons.\n\n /**\n * Stack of toolbar buttons.\n *\n * @function\n * @returns {Array<{NativeToolbarType}>}\n */\n toolbarsStack: computed(function () {\n return A();\n }),\n\n /**\n * Sets toolbar buttons in the app.\n *\n * @param {NativeToolbarType} toolbar\n */\n setToolbarButtons(toolbar) {\n processCollectionUpdate.call(this, 'toolbarsStack', toolbar, sendToolbarButtonsToApp, SetToolbarButtons);\n },\n\n /**\n * Removes toolbar buttons with the specified component id.\n *\n * @param {String} id\n */\n removeToolbarButtons(id) {\n processCollectionDispose.call(this, 'toolbarsStack', id, sendToolbarButtonsToApp, SetToolbarButtons);\n },\n\n /**\n * Resets all toolbar buttons.\n *\n * This can happen when the Ember application is completely unloaded so that artifacts don't remain on the screen/\n */\n resetToolbarButtons() {\n if (!this.doesSupportToolbarButtons) {\n return;\n }\n\n this.toolbarsStack.clear();\n\n sendToolbarButtonsToApp.call(this);\n },\n\n // endregion\n\n // region Button Type.\n // NOTE: The following getters are used by addons that depend on an injected native bridge service.\n\n /**\n * Returns the back button type.\n */\n getButtonTypeBack() {\n return BUTTON_TYPE_BACK;\n },\n\n /**\n * Returns the cancel button type.\n */\n getButtonTypeCancel() {\n return BUTTON_TYPE_CANCEL;\n },\n\n /**\n * Returns the confirm button type.\n */\n getButtonTypeConfirm() {\n return BUTTON_TYPE_CONFIRM;\n },\n\n /**\n * Returns the add button type.\n */\n getButtonTypeAdd() {\n return BUTTON_TYPE_ADD;\n },\n\n // endregion\n\n // region Confirmation dialog.\n\n /**\n * Shows native confirmation dialog.\n *\n * @param {String} title\n * @param {String} message\n * @param {Array} buttons\n * @returns {Promise}\n */\n async showConfirmationDialog(title, message, buttons) {\n this.set('modalButtons', buttons);\n\n if (isEmpty(buttons)) {\n console.error('No buttons defined for confirmation modal.');\n return;\n }\n\n // Return the promise so that the caller can know whether the modal opening succeeded or not.\n return runMethod.call(this, ShowConfirmationDialog, {\n title,\n message,\n buttons: buttons.map((button, index) =>\n transformButtonObject.call(this, button, RUN_MODAL_BUTTON_ACTION_NAME, index)\n )\n });\n },\n\n /**\n * Shows native share dialog.\n *\n * @param {String} subject\n * @param {String} message\n * @param {HTMLElement} anchorElement - The anchor element where the popover should be positioned. (iPad uses a popover)\n * @returns {Promise}\n */\n async launchShareActionDialog(subject, message, anchorElement) {\n const rect = anchorElement.getBoundingClientRect(),\n buttonWidth = rect.right - rect.left;\n\n return runMethod.call(this, LaunchShareActionDialog, {\n subject,\n message,\n xCoordinate: rect.left + buttonWidth / 2,\n yCoordinate: rect.top\n });\n },\n\n // endregion\n\n // region Import contact alert\n\n /**\n * Launches import contact dialog and recieves contact information when client resolves promise.\n *\n * @returns {Promise<*>}\n */\n async launchImportContact() {\n return runMethod.call(this, LaunchImportContact);\n },\n\n // endregion\n\n // region Application transition.\n\n /**\n * Tells the native application to go back.\n *\n * @returns {Promise}\n */\n async goBack() {\n return runMethod.call(this, GoBack);\n },\n\n /**\n * Tells the native application to handle Ember error.\n *\n * @returns {Promise<*>}\n */\n async handleError() {\n return runMethod.call(this, HandleApplicationError);\n },\n\n /**\n * Tells the native application to refresh the whole WebView.\n *\n * @returns {Promise<*>}\n */\n refreshWebView() {\n return runMethod.call(this, RefreshWebView);\n },\n\n // endregion\n\n // region Reload Associated Systems.\n\n /**\n * Tells the native application to reload the list of associated systems.\n *\n * @returns {Promise<*>}\n */\n reloadAssociatedSystems() {\n return runMethod.call(this, ReloadAssociatedSystems);\n },\n\n // endregion\n\n // region Transition to Native View.\n\n /**\n * Tells the native application to transition to the requested native view.\n *\n * @param nativeViewId {Number} The id of the native view to which we will transition.\n * @param transitionData {NativeViewTransitionDataType} Contains extra data used in determining how to handle the transition.\n *\n * @returns {Promise<*>}\n */\n transitionToNativeView(nativeViewId, transitionData = {}) {\n if (isEmpty(nativeViewId)) {\n console.error(`Could not transition to NativeView, nativeViewId: ${nativeViewId}`);\n return;\n }\n\n return runMethod.call(this, TransitionToNativeView, {\n nativeViewId,\n shouldAvoidReloadingWebView: false,\n deviceID: null,\n macAddress: null,\n showBackArrow: true,\n returnToWebView: true,\n contextSwitchType: None,\n customerId: null,\n groupId: null,\n ...transitionData\n });\n },\n\n // endregion\n\n /**\n * Tells the native application to close the whole WebView.\n *\n * @returns {Promise<*>}\n *\n * @deprecated Use CloseWebViewV2 instead.\n */\n closeWebView() {\n return runMethod.call(this, CloseWebView);\n },\n\n /**\n * Tells the native application to open an external browser with the given url.\n *\n * @param url {String} The url to load.\n * @param isForSso {String} Will this be used for SSO?\n *\n * @returns {Promise<*>}\n */\n launchBrowser(url, isForSso = false) {\n return runMethod.call(this, LaunchBrowser, {\n url,\n isForSso\n });\n },\n\n /**\n * Tells the native application to close the whole WebView.\n * CloseWebViewV2 contains a bug fix from the original CloseWebView and should be used instead.\n *\n * @returns {Promise<*>}\n */\n closeWebViewV2() {\n return runMethod.call(this, CloseWebViewV2);\n },\n\n /**\n * Tells the native application to terminate the user's session and return to the login screen\n *\n * @returns {Promise<*>}\n */\n terminateAppSession() {\n return runMethod.call(this, TerminateAppSession);\n },\n\n /**\n * Tells the native application to open a webView in a new fragment (Android) or modal (iOS)\n *\n * @param emberId {Number} The specific Ember webpage ID to load in the mobile app, takes precedence over URL if set.\n * @param url {String} The hard-coded URL to load in the event we are not loading an Ember page in the new context.\n *\n * @returns {Promise<*>}\n */\n launchNewContext(emberId, url) {\n return runMethod.call(this, LaunchNewContext, { emberId, url });\n },\n\n /**\n * Tells the native application to keep the session alive and terminates all other sessions.\n *\n * @returns {Promise<*>}\n */\n persistAppSession() {\n return runMethod.call(this, PersistAppSession);\n },\n\n /**\n * Tells the native application to prompt the user to enable push notifications.\n * If notification types are provided, save notifications of that type.\n *\n * @param {Number[]} notificationTypes The notification types from CustomerNotificationTypeEnum to save as push notifications.\n *\n * @returns {Promise<{enabled: boolean} | void>}\n */\n enablePushNotifications(notificationTypes) {\n return runMethod.call(this, EnablePushNotifications, { notificationTypes });\n },\n\n /**\n * Tells the native application to enable bluetooth\n *\n * @returns {Promise}\n */\n enableBluetooth() {\n return runMethod.call(this, EnableBluetooth);\n },\n\n /**\n * Tells the native application to check bluetooth permissions\n *\n * @param {number} permissionToCheck The numerical value of BluetoothPermissionCategory, for the permission to check\n *\n * @returns {Promise}\n */\n checkBluetoothPermissions(permissionToCheck) {\n if (!Object.values(BluetoothPermissionEnum).includes(permissionToCheck)) return null;\n return runMethod.call(this, CheckBluetoothPermissions, { permissionToCheck });\n },\n\n /**\n * Tells the native application to start BLE advertising\n *\n * @returns {Promise}\n */\n startBleAdvertising() {\n return runMethod.call(this, StartBleAdvertising);\n },\n\n /**\n * Tells the native application to stop BLE advertising\n *\n * @returns {Promise}\n */\n stopBleAdvertising() {\n return runMethod.call(this, StopBleAdvertising);\n },\n\n willDestroy() {\n this._super();\n\n delete this.bridge;\n delete window.NativeBridge;\n }\n }\n);\n\n/**\n * Wraps javascript in a try/catch block.\n *\n * @param {string} jsString\n */\nexport function wrapJsInTryCatch(jsString) {\n return `try { ${jsString} } catch (e) { console.error(e); }`;\n}\n\n// region Type definitions.\n\n/**\n * Type definition for constructing a native button in App that runs Ember as a WebView.\n *\n * @typedef {{\n * text: String,\n * description: String,\n * icon: String,\n * isPromisePending: boolean,\n * action: Function\n * }} NativeButtonType\n *\n * @property {String} text The text of the button.\n * @property {String=} description Description of the button.\n * @property {String=} icon Icon name that should be rendered in the native app.\n * @property {boolean} isPromisePending Indicates if the button has a promise pending for its action.\n * @property {Function} action Action to be called when button is pressed.\n *\n * @memberof services.NativeBridge\n */\n\n/**\n * Type definition for constructing a native toolbar in App that runs Ember as a WebView.\n *\n * @typedef {{\n * id: String,\n * backButtons: Array,\n * contextButtons: Array\n * }} NativeToolbarType\n *\n * @property {String} id Uniquely identifies this button collection.\n * @property {Array=} backButtons Definition for a button that will be providing a \"cancel\" functionality, or simply going \"back\" functionality. This is defined as a list, but it really should only contain one item at all times.\n * @property {Array=} contextButtons List of context buttons that can trigger a functionality. These are on the right side.\n *\n * @memberof services.NativeBridge\n */\n\n/**\n * Type definition for constructing a native title text in App that runs Ember as WebView.\n *\n * @typedef {{\n * id: String,\n * title: String\n * }} NativeTitleType\n *\n * @property {String} id Uniquely identifies this title collection. Usually a component id.\n * @property {String} title Title to be shown in the App's header.\n *\n * @memberof services.NativeBridge\n */\n\n/**\n * Data to be sent with the TransitionToNativeView feature.\n *\n * @note Updating this Type will require an APP change in order to know what to do with the data.\n *\n * @typedef {{\n * shouldAvoidReloadingWebView: boolean,\n * deviceID: String,\n * macAddress: String,\n * showBackArrow: boolean,\n * returnToWebView: boolean,\n * contextSwitchType: Number,\n * customerId: Number\n * }} NativeViewTransitionDataType\n *\n * @property {boolean} shouldAvoidReloadingWebView - Should the WebView avoid reloading itself if the native view transitions back to the WebView? NOTE: This only affects iOS currently.\n * @property {String} deviceID - The device ID of a Managed Device. The device ID is expected to be split at the '-'.\n * @property {String} macAddress - The MAC address of a Managed Device.\n * @property {boolean} showBackArrow - Should the back arrow be shown on the native view. Used for CarSettingsV2.\n * @property {boolean} returnToWebView - Should the back arrow return the user to the original webview. Used for CarSettingsV2.\n * @property {Number} contextSwitchType - The enum representing the direction of the context switch (e.g. enterprise to single-system).\n * @property {Number} customerId - The ID of the customer we are transitioning to.\n *\n * @memberof services.NativeBridge\n */\n\n// endregion\n","/**\n * Utility helper module for sentry related methods\n * @module\n */\n\nimport { withScope } from '@sentry/ember';\n\nimport type { Extras, Primitive } from '@sentry/types';\n\ntype SentryTags = {\n [key: string]: Primitive;\n};\n\n/**\n * Does a sentry log as a warning.\n *\n * @param warningMessage The warning message to log to sentry\n * @param extras Optional extras to append to the sentry log\n * @param tags Optional tags to append to the sentry log\n */\nexport function sentryWithScopeAndWarn(warningMessage: string, extras?: Extras, tags?: SentryTags): void {\n sentryWithScopeAndErrorOrWarn(warningMessage, extras, tags, false);\n}\n\n/**\n * Does a sentry log as an error.\n *\n * @param errorMessage The warning message to log to sentry\n * @param extras Optional extras to append to the sentry log\n * @param tags Optional tags to append to the sentry log\n */\nexport function sentryWithScopeAndError(errorMessage: string, extras?: Extras, tags?: SentryTags): void {\n sentryWithScopeAndErrorOrWarn(errorMessage, extras, tags, true);\n}\n\n/**\n * Does a sentry log with the passed in message, extras (if provided), tags (if provided).\n *\n * @param message The message to log to sentry\n * @param extras Optional extras to append to the sentry log\n * @param tags Optional tags to append to the sentry log\n * @param isError if we are reporting it as an error, otherwise reporting it as warning\n */\nfunction sentryWithScopeAndErrorOrWarn(message: string, extras?: Extras, tags?: SentryTags, isError?: boolean) {\n withScope((scope) => {\n if (extras) {\n scope.setExtras(extras);\n }\n\n if (tags) {\n scope.setTags(tags);\n }\n\n if (isError) {\n console.error(message);\n } else {\n console.warn(message);\n }\n });\n}\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const Initialize = 1;\n/**\n * @enum {number}\n */\nexport const SetTitle = 2;\n/**\n * @enum {number}\n */\nexport const SetToolbarButtons = 3;\n/**\n * @enum {number}\n */\nexport const ShowConfirmationDialog = 4;\n/**\n * @enum {number}\n */\nexport const GoBack = 5;\n/**\n * @enum {number}\n */\nexport const HandleApplicationError = 6;\n/**\n * @enum {number}\n */\nexport const RefreshWebView = 7;\n/**\n * @enum {number}\n */\nexport const ReloadAssociatedSystems = 8;\n/**\n * @enum {number}\n */\nexport const LaunchShareActionDialog = 9;\n/**\n * @enum {number}\n */\nexport const TransitionToNativeView = 10;\n/**\n * @enum {number}\n *\n * @deprecated Use CloseWebViewV2 instead.\n */\nexport const CloseWebView = 11;\n/**\n * @enum {number}\n */\nexport const LaunchImportContact = 12;\n/**\n * @enum {number}\n */\nexport const LaunchBrowser = 13;\n/**\n * @enum {number}\n */\nexport const CloseWebViewV2 = 14;\n/**\n * @enum {number}\n */\nexport const TerminateAppSession = 15;\n/**\n * @enum {number}\n */\nexport const LaunchNewContext = 16;\n/**\n * @enum {number}\n */\nexport const PersistAppSession = 17;\n/**\n * @enum {number}\n */\nexport const EnablePushNotifications = 18;\n/**\n * @enum {number}\n */\nexport const EnableBluetooth = 19;\n/**\n * @enum {number}\n */\nexport const CheckBluetoothPermissions = 20;\n/**\n * @enum {number}\n */\nexport const StartBleAdvertising = 21;\n/**\n * @enum {number}\n */\nexport const StopBleAdvertising = 22;\n","/**\n * @module\n */\n/**\n * @enum {number}\n */\nexport const None = 0;\n/**\n * @enum {number}\n */\nexport const EnterpriseToSingleSystem = 1;\n/**\n * @enum {number}\n */\nexport const SingleSystemToEnterprise = 2;\n/**\n * @enum {number}\n */\nexport const EnterpriseToGroup = 3;\n/**\n * @enum {number}\n */\nexport const GroupToEnterprise = 4;\n","import { getOwner } from '@ember/owner';\n\nimport type { InternalOwner } from '@ember/-internals/owner';\n\nexport function isTestEnvironment(this: object): boolean {\n const owner = getOwner(this),\n env = owner ? (owner as InternalOwner).resolveRegistration('config:environment') : {};\n\n return (env && 'environment' in env && env.environment === 'test') || false;\n}\n","import { action, computed } from '@ember/object';\nimport { service } from '@ember/service';\nimport Service from '@ember/service';\nimport { A } from '@ember/array';\nimport { registerDestructor } from '@ember/destroyable';\nimport { task, timeout } from 'ember-concurrency';\nimport { isTestEnvironment } from '../utils/environment.ts';\n\nimport type AdcAjaxService from '@adc/ajax/services/adc-ajax';\nimport type ContextManager from './context-manager.ts';\nimport type Transition from '@ember/routing/transition';\nimport type RouterService from '@ember/routing/router-service';\nimport type { Task } from 'ember-concurrency';\n\n// Mark Names\nconst CSS_PARSE_START = 'CSSParseStart';\nconst CSS_PARSE_END = 'CSSParseEnd';\nconst JS_PARSE_START = 'JSParseStart';\nconst JS_PARSE_END = 'JSParseEnd';\nconst TTI_END = 'TTIEnd';\nconst ROUTE_INITIALIZED = 'RouteInitialized';\nconst LAST_RENDER_MARK_RENDERED = 'LastRenderMarkRendered';\nconst CONTEXT_SWITCH_INITIALIZED = 'ContextSwitchInitialized';\nconst CONTEXT_SWITCH_RESOLVED = 'ContextSwitchResolved';\n\n// Measurement Names\nconst TIME_TO_INTERACTIVE = 'TimeToInteractive';\nconst CSS_PARSE_TIME = 'CSSParseTime';\nconst JS_PARSE_TIME = 'JSParseTime';\nconst ROUTE_VIEW_RENDERED = 'RouteViewRendered';\nconst MODEL_RESOLVED = 'ModelResolved';\nconst CONTEXT_SWITCH_TIME = 'ContextSwitchTime';\n\n// KPI Metric Contstants\nconst DEFAULT_KPI_THRESHOLD = 15000;\nconst KPI_API_ENDPOINT = 'swa/performance/metrics/recordKpiThresholdExceeded';\n\n// Telling typescript that the isDisabled boolean might exist on Performance.\ndeclare global {\n interface Performance {\n isDisabled?: boolean;\n }\n}\n\n/**\n * Wrapper for creating a browser performance measurement.\n */\nexport function createMeasurement(measurementName: string, startMark: string, endMark: string): void {\n if (!doAllMarksExist([startMark, endMark])) {\n console.info(`Route potentially has view-container and no route-view. Route=${window.location.pathname}`);\n return;\n }\n\n window.performance.measure(measurementName, startMark, endMark);\n}\n\n/**\n * returns true if all the marks exist in window performance array\n */\nfunction doAllMarksExist(markNames: string[]): boolean {\n // metrics like 'requestStart' are valid and come from the performance timing api\n const browserReadOnlyTimes = getPerformanceTimingApiDefinedEntries(),\n allRecordedMarkNames = A(window.performance.getEntriesByType('mark')).mapBy('name'),\n allPossibleMarks = A(browserReadOnlyTimes.concat(allRecordedMarkNames));\n return markNames.every((markName) => allPossibleMarks.includes(markName));\n}\n\n/**\n * filters all the mark names and returns only the marks that have been created\n */\nfunction filteredMarkNamesByCreated(markNames: string[]): string[] {\n const allRecordedMarkNames = A(window.performance.getEntriesByType('mark')).mapBy('name');\n return markNames.filter((markName) => allRecordedMarkNames.includes(markName));\n}\n\n/**\n * Gets all of the performance timing api defined metrics\n */\nfunction getPerformanceTimingApiDefinedEntries(): string[] {\n // performance.timing generates an object that is not iterable\n // wrapping it in JSON.parse(JSON.stringify() ) makes the object iterable\n return Object.keys(JSON.parse(JSON.stringify(window.performance.timing)));\n}\n\n/**\n * Wrapper for creating a browser performance mark.\n */\nexport function createMark(markName: string): PerformanceMark {\n return window.performance.mark(markName);\n}\n\n/**\n * Clear performance marks for route view.\n */\nfunction clearRouteViewMarks(routeName: string): void {\n clearMarks(\n `${ROUTE_INITIALIZED}-${routeName}`,\n `${ROUTE_VIEW_RENDERED}-${routeName}`,\n `${MODEL_RESOLVED}-${routeName}`,\n `${LAST_RENDER_MARK_RENDERED}-${routeName}`\n );\n}\n\n/**\n * Clear performance marks for context switches.\n */\nfunction clearContextSwitchMarks(): void {\n clearMarks(CONTEXT_SWITCH_INITIALIZED, CONTEXT_SWITCH_RESOLVED);\n}\n\n/**\n * Clear performance marks for the given mark names.\n */\nfunction clearMarks(...markNames: string[]): void {\n // Filter first to make sure mark exists before clearing\n const filtered = filteredMarkNamesByCreated(markNames);\n filtered.forEach((mark) => window.performance.clearMarks(mark));\n}\n\n/**\n * Returns a dictionary of the requested measurements. Clears any measurements that are returned.\n * The value of the dictionary is the measurement value.\n */\nexport function getMeasurements(...measurementNames: string[]): Record {\n const resultDictionary: Record = {};\n window.performance\n .getEntriesByType('measure')\n .filter((performanceEntry) => measurementNames.includes(performanceEntry.name))\n .forEach((performanceEntry) => {\n resultDictionary[performanceEntry.name] = performanceEntry.duration;\n window.performance.clearMeasures(performanceEntry.name);\n });\n\n return resultDictionary;\n}\n\n/**\n * This function accepts a routeName (such as 'access-control.index') and converts it into a path format ('access-control/index').\n */\nfunction convertRouteNameToPath(routeName: string): string {\n // We replace the '.' delimitter w/ '/' because '.' is used as the separator for different pieces of the metric description and we wouldn't be able to tell when the\n // route name started on ended. We can't use '-' because it appears within the route.\n return routeName.replace(/[.]/g, '/');\n}\n\n/**\n * @classdesc A service for managing performance metrics\n * A standard javascript API is used in this class called Performance API including methods mark and measure.\n * Documentation of this API: https://developer.mozilla.org/en-US/docs/Web/API/Performance\n */\nexport default class PerformanceMonitorService extends Service {\n @service declare ajax: AdcAjaxService;\n @service declare contextManager: ContextManager;\n @service declare router: RouterService;\n\n constructor(...args: any[]) {\n super(...args);\n\n // We don't want this to run for every test. For now, it will only operate in non-test enviornments.\n if (!isTestEnvironment.call(this)) {\n this.router.on('routeDidChange', this.startKpiThresholdTask);\n registerDestructor(this, () => {\n this.router.off('routeDidChange', this.startKpiThresholdTask);\n });\n }\n }\n\n /**\n * Should the performance monitor send metrics to the server?\n * NOTE: often used to disable the service during integration tests.\n */\n @computed()\n get enabled(): boolean {\n // If window.performance doesn't have the methods we need, we add isDisabled=true in index.html.\n return !window.performance.isDisabled;\n }\n\n /**\n * Dictionary that tracks what route was active when a given metric was reported.\n * The key is the metric name and the value is the route.\n */\n routeViewMetricPathDictionary: Record = {} as Record;\n\n /**\n * Determines if we are going to use the kpi threshold metric tracking.\n * Should be determined on a route by route basis.\n */\n useKpiThresholdMetrics = false;\n\n /**\n * Holds the id of the context from which the context switch was initiated.\n */\n private contextSwitchPreviousId = '';\n\n /**\n * This task is triggered by a listener on routeDidChange.\n * If the task wakes up before the last component render mark is made,\n * we will log a count for that route, indicating that it took longer than\n * the threshold to load.\n * If the kpiThreshold argument is the default value of 15000ms,\n * we will want to record any routes that take longer than 5000ms, 10000ms, and 15000ms\n * without duplicating records.\n * A kpiThreshold can be set for testing purposes\n */\n kpiThresholdTask: Task = task({ restartable: true }, async (kpiThreshold: number) => {\n let exceededThreshold = 0;\n const thresholdIncrement = kpiThreshold === 1 ? 1 : Math.floor(kpiThreshold / 3);\n\n for (let threshold = thresholdIncrement; threshold <= kpiThreshold; threshold += thresholdIncrement) {\n await timeout(thresholdIncrement);\n\n // If the last component has been rendered, do nothing.\n if (\n !this.useKpiThresholdMetrics ||\n doAllMarksExist([`${LAST_RENDER_MARK_RENDERED}-${this.router.currentRouteName}`])\n ) {\n break;\n }\n\n exceededThreshold = threshold;\n }\n\n // If an exceeded threshold was detected, send the request.\n if (exceededThreshold > 0) {\n const data = {\n routePath: convertRouteNameToPath(this.router.currentRouteName),\n kpiThreshold: exceededThreshold\n };\n\n this.ajax.apiRequest(KPI_API_ENDPOINT, {}, JSON.stringify(data), 'POST');\n }\n });\n\n /**\n * Send metrics in milliseconds of initial page rendering to server\n */\n private sendInitialMetricsToServer(source = ''): Promise {\n if (!this.enabled) {\n return Promise.resolve('');\n }\n\n createMeasurement(CSS_PARSE_TIME, CSS_PARSE_START, CSS_PARSE_END);\n createMeasurement(JS_PARSE_TIME, JS_PARSE_START, JS_PARSE_END);\n // requestStart is a predefined browser mark.\n createMeasurement(TIME_TO_INTERACTIVE, 'requestStart', TTI_END);\n\n // We intentionally do not clear the marks here, as we only expect them to be created once during the entire app/page lifecycle.\n\n const data: Record = getMeasurements(\n CSS_PARSE_TIME,\n JS_PARSE_TIME,\n TIME_TO_INTERACTIVE\n );\n data['source'] = source;\n\n return this.ajax.apiRequest('swa/performance/metrics/recordInitialLoad', {}, JSON.stringify(data), 'POST');\n }\n\n /**\n * Send metrics in milliseconds of routes that use route view to server\n * Only send metrics to server if routeView metrics come from same route. Returns true if successful and false if the route data was bad.\n */\n private sendRouteViewMetricsToServer(routeName = ''): Promise {\n if (!this.enabled) {\n return Promise.resolve(true);\n }\n\n // Grab the metrics which match the path for the routeInitialized metric.\n // In the case where multiple paths use the same route-view component (e.g. locations dashboards), it won't be rerendered,\n // so routeViewRendered will remain set to the previous route path. In that case, we won't record the routeViewRendered time.\n const validMetrics = [ROUTE_VIEW_RENDERED, MODEL_RESOLVED].filter(\n (metricName) =>\n this.routeViewMetricPathDictionary[metricName] === this.routeViewMetricPathDictionary[ROUTE_INITIALIZED]\n );\n let data;\n try {\n if (!validMetrics.length) {\n clearRouteViewMarks(routeName);\n return Promise.resolve(false);\n }\n\n // Record the routePath in our request body.\n const routePath = convertRouteNameToPath(this.routeViewMetricPathDictionary[ROUTE_INITIALIZED]);\n validMetrics.forEach((metricName) =>\n createMeasurement(metricName, `${ROUTE_INITIALIZED}-${routeName}`, `${metricName}-${routeName}`)\n );\n\n data = {\n ...getMeasurements(ROUTE_VIEW_RENDERED, MODEL_RESOLVED),\n routePath\n };\n } catch (err) {\n console.error('Error logging performance metrics.', err);\n return Promise.resolve(false);\n }\n\n // TODO JB: Update to get from the ENV config\n return this.ajax\n .apiRequest('swa/performance/metrics/recordRouteView', {}, JSON.stringify(data), 'POST')\n .then(() => true);\n }\n\n /**\n * Marks the point in which JS finishes parsing by creating a time stamp\n */\n markJSEnd(): void {\n createMark(JS_PARSE_END);\n }\n\n /**\n * Marks the point in which the page becomes interactive by creating a time stamp.\n * Also - flushes the initial load metrics to the server. Resolves after the metrics are sent to the server.\n */\n markTTIEnd(source = ''): Promise {\n createMark(TTI_END);\n return this.sendInitialMetricsToServer(source);\n }\n\n /**\n * Marks the point in which the route is initialized by creating a time stamp\n */\n markRouteInitialized(routeName: string, transition: Transition): void {\n // This could get called for every route along the path and we only want to mark the route once (as early as possible.).\n // For example, with /users/1/contact-information/345, this will get called for users and users.contact-information.\n if (transition.data.routeMarkedAsInitialized) {\n return;\n }\n\n createMark(`${ROUTE_INITIALIZED}-${routeName}`);\n this.routeViewMetricPathDictionary[ROUTE_INITIALIZED] = routeName;\n\n transition.data.routeMarkedAsInitialized = true;\n }\n\n /**\n * Marks the point in which route view renders\n */\n markRouteViewRendered(routeName: string): void {\n createMark(`${ROUTE_VIEW_RENDERED}-${routeName}`);\n this.routeViewMetricPathDictionary[ROUTE_VIEW_RENDERED] = routeName;\n }\n\n /**\n * Marks the point in which the model resolves. Also flushes the route metrics to the server.\n * Resolves when the request is finished.\n */\n markModelResolved(routeName: string): Promise {\n createMark(`${MODEL_RESOLVED}-${routeName}`);\n this.routeViewMetricPathDictionary[MODEL_RESOLVED] = routeName;\n\n return this.sendRouteViewMetricsToServer(routeName);\n }\n\n /**\n * Marks that the LastRenderMark component has rendered. Which should be the last item to render on a route\n */\n @action\n markLastRender(): void {\n createMark(`${LAST_RENDER_MARK_RENDERED}-${this.router.currentRouteName}`);\n }\n\n /**\n * Marks the point in which we initialized the process for switching the current context.\n */\n markContextSwitchInitialized(contextId: string): void {\n createMark(CONTEXT_SWITCH_INITIALIZED);\n this.contextSwitchPreviousId = contextId;\n }\n\n /**\n * Marks the point in which we resolved the context switch.\n */\n async markContextSwitchResolved(contextId: string): Promise {\n createMark(CONTEXT_SWITCH_RESOLVED);\n\n if (!this.enabled) {\n clearContextSwitchMarks();\n return false;\n }\n\n createMeasurement(CONTEXT_SWITCH_TIME, CONTEXT_SWITCH_INITIALIZED, CONTEXT_SWITCH_RESOLVED);\n const data = getMeasurements(CONTEXT_SWITCH_TIME);\n if (Object.keys(data).length === 0) {\n clearContextSwitchMarks();\n return false;\n }\n\n data.originalContextId = this.contextSwitchPreviousId;\n data.newContextId = contextId;\n clearContextSwitchMarks();\n await this.ajax.apiRequest('swa/performance/metrics/recordContextSwitch', {}, JSON.stringify(data), 'POST');\n return true;\n }\n\n /**\n * Sets a boolean indicating if we want to use the kpi threshold metrics.\n */\n setUseKpiThresholdMetrics(value: boolean): void {\n this.useKpiThresholdMetrics = value;\n }\n\n /**\n * This exists for the purpose of testing the KPI threshold metrics.\n */\n private getKpiThreshold(): number {\n const currentURL = this.router.currentURL,\n queryParams = new URL(currentURL, window.location.origin).searchParams,\n kpiThresholdParam = queryParams.get('kpiThreshold');\n let kpiThreshold = Number(kpiThresholdParam);\n\n // If kpiThreshold is not a number or doesn't exist, default to 15 seconds\n if (isNaN(kpiThreshold) || kpiThreshold <= 0) {\n kpiThreshold = DEFAULT_KPI_THRESHOLD;\n }\n\n return kpiThreshold;\n }\n\n /**\n * Starts the kpi threshold task and passes in the threshold.\n */\n @action\n private startKpiThresholdTask(): void {\n const routePath = this.router.currentRouteName,\n kpiThreshold = this.getKpiThreshold();\n\n // first we need to make sure we've cleared all previous marks for this route.\n window.performance.clearMarks(`${LAST_RENDER_MARK_RENDERED}-${routePath}`);\n\n this.kpiThresholdTask.perform(kpiThreshold);\n }\n}\n","import Service from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { set, setProperties } from '@ember/object';\nimport { cancel, debounce, later } from '@ember/runloop';\nimport { A } from '@ember/array';\nimport { logMissingAbstractMember } from '@adc/ember-utils/utils/debug';\nimport { addWeakListener, removeListener } from '@adc/ember-utils/utils/event-listeners';\n\nimport type { EmberRunTimer } from '@ember/runloop/types';\n\nexport interface SessionActivityArgs {\n shouldTimeout: boolean;\n logoutTimeoutMs: number;\n enableKeepAlive: boolean;\n inactivityWarningTimeoutMs?: number;\n keepAliveUrl?: string;\n}\n\n/**\n * Default logout timeout (ms).\n *\n * @private\n */\nconst DEFAULT_LOGOUT_TIMEOUT = 5 * 60 * 1000;\n\n/**\n * Number of consecutive times keepAlive has failed.\n *\n * @private\n */\nlet keepAliveFailures = 0;\n\n/**\n * Number of times keepAlive can fail before we trigger logout.\n *\n * @private\n */\nconst maxKeepAliveFailures = 10;\n\n/**\n * Triggers logout event.\n *\n * @private\n */\nfunction triggerLogoutTimeout(this: SessionActivity): void {\n // Force route transition timeout no matter what the case is.\n this.forceLogoutOnNextTransition = true;\n\n // Trigger log out event only if the route/page allows it.\n if (!this.routeIgnoresSessionTimeout) {\n this.baseLogout();\n }\n}\n\n/**\n * Triggers inactive event.\n *\n * @private\n */\nfunction triggerInactivityWarningTimeout(this: SessionActivity): void {\n // Trigger inactivity warning event only if the route/page allows it.\n if (!this.routeIgnoresSessionTimeout) {\n // Set a flag that the user is inactive.\n this.inactive = true;\n this.triggerInactivityWarning();\n }\n}\n\n/**\n * Cancels passed run timers.\n *\n * @private\n */\nfunction cancelTimers(...timers: Array) {\n // Cancel any running timeouts.\n A(timers)\n .compact()\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n .forEach((timeout) => cancel(timeout));\n}\n\n/**\n * Cancels running logout timeouts.\n *\n * @private\n */\nfunction cancelLogoutTimeouts(this: SessionActivity): void {\n // Cancel any running timeouts.\n cancelTimers(this.logoutTimeoutEvent, this.inactivityWarningTimeoutEvent);\n}\n\n/**\n * Trigger keep-alive sequence.\n *\n * @private\n */\nasync function keepAlive(this: SessionActivity): Promise {\n // If the session is not currently active, we don't want to reactivate it.\n // It must be reactivated deliberately.\n if (this.inactive || !this.enableKeepAlive) {\n return;\n }\n\n try {\n // Run an ajax to ping the session to tell it that the user is still active.\n const stillAlive = await this.keepSessionActive();\n\n // If keepAlive doesn't throw, we reset the counter.\n keepAliveFailures = 0;\n\n if (!stillAlive) {\n this.logout(true);\n }\n } catch (err) {\n console.error(err);\n\n // We keep track of keepAlive failures and trigger a logout if the limit is reached.\n // If keepAlive continuously fails, we're assuming something is messed up w/ the session\n // and log the user out to force a cleanup.\n keepAliveFailures++;\n\n if (keepAliveFailures > maxKeepAliveFailures) {\n keepAliveFailures = 0;\n console.error('KeepAlive reached maximum number of failures. Logging out.');\n\n this.baseLogout();\n return;\n }\n }\n\n cancelTimers(this.keepAliveTimeout);\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n this.keepAliveTimeout = debounce(this, keepAlive, this.keepAliveFrequencyMs);\n}\n\n/**\n * Handles user activity event.\n *\n * @private\n */\nfunction handleUserActivityEvent(this: SessionActivity) {\n const { inactive, doNotTimeoutSession, logoutTimeoutMs, inactivityWarningTimeoutMs } = this;\n\n if (doNotTimeoutSession || inactive) {\n return;\n }\n\n // Clear timeouts.\n cancelLogoutTimeouts.call(this);\n\n // There will always be logout timeout.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n this.logoutTimeoutEvent = later(this, triggerLogoutTimeout, logoutTimeoutMs as number);\n\n // Set inactivity warning timeout if it exists.\n if (inactivityWarningTimeoutMs) {\n set(\n this,\n 'inactivityWarningTimeoutEvent',\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(this, triggerInactivityWarningTimeout, inactivityWarningTimeoutMs)\n );\n }\n}\n\n/**\n * Remove all event listeners.\n *\n * @private\n */\nfunction removeAllListeners(this: SessionActivity) {\n this.listenerIds.forEach((listenerId) => removeListener(listenerId));\n\n // Clear the listener ids.\n this.listenerIds = [];\n}\n\n/**\n * @classdesc\n * Service that handles triggering events based on inactivity timeouts.\n */\nexport default class SessionActivity extends Service {\n /**\n * Is the user inactive? (No action has been triggered within the inactivityWarningTimeoutMs).\n */\n @tracked inactive = false;\n\n /**\n * Does this current route/page ignore the session time out?\n */\n @tracked routeIgnoresSessionTimeout = false;\n\n /**\n * Should we run the Keep Alive process?\n */\n @tracked enableKeepAlive = false;\n\n /**\n * URL to ping if there is a keep alive\n */\n @tracked keepAliveUrl?: string;\n\n /**\n * Force session timeout as soon as the user transitions out of the current route/page.\n */\n @tracked forceLogoutOnNextTransition = false;\n\n /**\n * Timeout to triggering logout event (ms).\n */\n logoutTimeoutMs?: number;\n\n /**\n * Timeout to triggering inactivity warning event (ms).\n */\n inactivityWarningTimeoutMs?: number;\n\n /**\n * Whether to never time out session and keep it alive forever.\n */\n doNotTimeoutSession = false;\n\n /**\n * Time that we should wait between keepAlive pings (in ms).\n */\n keepAliveFrequencyMs = 60000;\n\n listenerIds: string[] = [];\n keepAliveTimeout?: EmberRunTimer;\n logoutTimeoutEvent?: EmberRunTimer;\n inactivityWarningTimeoutEvent?: EmberRunTimer;\n\n /**\n * Cleanup.\n */\n willDestroy(): void {\n super.willDestroy();\n\n removeAllListeners.call(this);\n cancelTimers(this.keepAliveTimeout, this.logoutTimeoutEvent, this.inactivityWarningTimeoutEvent);\n }\n\n /**\n * Sets logout and inactivity timeouts.\n */\n initialize(applicationSessionProperties: SessionActivityArgs): void {\n cancelLogoutTimeouts.call(this);\n removeAllListeners.call(this);\n\n const { shouldTimeout, enableKeepAlive, keepAliveUrl } = applicationSessionProperties,\n doNotTimeoutSession = !shouldTimeout;\n\n let { logoutTimeoutMs, inactivityWarningTimeoutMs } = applicationSessionProperties;\n\n if (doNotTimeoutSession) {\n console.info('Never time out session enabled, continuous keepalive triggered');\n } else {\n if (!logoutTimeoutMs || logoutTimeoutMs < 0) {\n logoutTimeoutMs = DEFAULT_LOGOUT_TIMEOUT;\n console.error(\n 'No timeout provided for session that should timeout, setting to default.',\n logoutTimeoutMs\n );\n }\n\n if (\n inactivityWarningTimeoutMs &&\n (inactivityWarningTimeoutMs > logoutTimeoutMs || inactivityWarningTimeoutMs < 0)\n ) {\n inactivityWarningTimeoutMs = undefined;\n console.error('Inactivity warning timeout not set properly, no warning will be shown.');\n }\n }\n\n setProperties(this, {\n enableKeepAlive,\n doNotTimeoutSession,\n logoutTimeoutMs,\n inactivityWarningTimeoutMs,\n keepAliveUrl\n });\n\n // Set event handler for each event to update the timeouts for logout and inactivity warnings.\n ['keydown', 'mousedown', 'scroll', 'touchstart'].forEach((event) => {\n // Add event listener unless the session should never timeout.\n if (!doNotTimeoutSession) {\n this.listenerIds.push(\n addWeakListener(this, window, event, handleUserActivityEvent.bind(this), false, true, true)\n );\n }\n });\n\n // Start keepAlive.\n (() => keepAlive.call(this))();\n\n // Start activity timeouts.\n handleUserActivityEvent.call(this);\n }\n\n /**\n * Returns the duration between inactivity is detected and logout is triggered.\n */\n getInactivityWarningDuration(): number {\n const { logoutTimeoutMs = -1, inactivityWarningTimeoutMs = -1 } = this;\n if (logoutTimeoutMs === -1 || inactivityWarningTimeoutMs === -1) {\n return 0;\n }\n\n return (logoutTimeoutMs - inactivityWarningTimeoutMs) / 1000;\n }\n\n /**\n * Clears inactive status of the session.\n */\n clearInactiveStatus(): void {\n this.inactive = false;\n\n this.refreshApplication();\n\n (() => keepAlive.call(this))();\n handleUserActivityEvent.call(this);\n }\n\n /**\n * Update session timeout flag.\n */\n updateSessionTimeout(doNotTimeOut: boolean): void {\n // Do we need to force a session time out now due to a page being alive for too long?\n if (this.forceLogout()) {\n this.baseLogout();\n }\n\n // Let the user activity know to turn on/off the session time out event based on this route.\n this.routeIgnoresSessionTimeout = doNotTimeOut;\n }\n\n /**\n * Should we force logout on the next route/page transition?\n */\n forceLogout(): boolean {\n return this.forceLogoutOnNextTransition;\n }\n\n /**\n * Internal logout function. We don't want consumers to need to call super so all internal state keeping should be done here.\n *\n * @private\n */\n baseLogout(): void {\n // We cancel any outstanding timers and set the state to inactive to make sure the service does not make any further state changes.\n this.inactive = true;\n cancelLogoutTimeouts.apply(this);\n this.logout(true);\n }\n /**\n * Handler to trigger any actions that should take place when the user is forced to logout.\n *\n * @abstract\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n logout(_useReturnUrl?: boolean): void {\n logMissingAbstractMember(this, 'logout');\n }\n\n /**\n * Handler to trigger any actions that should take place when the user has gone idle and is near being logged out.\n *\n * @abstract\n */\n triggerInactivityWarning(): void {\n logMissingAbstractMember(this, 'triggerInactivityWarning');\n }\n\n /**\n * Handler called when activity is restored by calling clearInactiveStatus.\n *\n * @abstract\n */\n refreshApplication(): void {\n logMissingAbstractMember(this, 'refreshApplication');\n }\n\n /**\n * Handler called to keep te server session alive.\n *\n * @abstract\n */\n async keepSessionActive(): Promise {\n logMissingAbstractMember(this, 'keepSessionActive');\n return true;\n }\n}\n","export enum WebsocketMessageType {\n event = 'event',\n monitoringEvent = 'monitoringEvent',\n propertyChange = 'propertyChange',\n geofenceCrossing = 'geofenceCrossing',\n statusUpdate = 'statusUpdate'\n}\n\n/**\n * @classdesc\n * Base message class for websockets\n * Base abstract for containing message data to be processed by message handlers\n */\nexport default abstract class BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string) {\n this.unitId = unitId;\n this.deviceId = deviceId;\n }\n\n /**\n * The Unit ID that the message applies to.\n */\n unitId: string;\n\n /**\n * The Device ID that the message applies to.\n */\n deviceId: string;\n\n /**\n * The message type.\n */\n abstract type: string;\n\n /**\n * The message subtype.\n */\n subtype = '';\n\n /**\n * The message value.\n */\n value?: string;\n\n /**\n * Additional message data.\n */\n subvalue?: string;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedEvent websocket message\n */\nexport default class EventWebsocketMessage extends BaseWebsocketMessage {\n constructor(\n unitId: string,\n deviceId: string,\n eventType: string,\n eventValue: string,\n qStringForExtraData: string,\n eventDateUtc: string\n ) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n subtype: eventType,\n value: eventValue,\n subvalue: qStringForExtraData,\n eventDateUtc\n });\n }\n\n type = WebsocketMessageType.event;\n\n /**\n * The timestamp of the event.\n */\n declare eventDateUtc: string;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedMonitoringEvent websocket message\n */\nexport default class MonitoringEventWebsocketMessage extends BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string, eventType: string, correlatedEventId: string) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n subtype: eventType,\n subvalue: correlatedEventId\n });\n }\n\n type = WebsocketMessageType.monitoringEvent;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedPropertyChange websocket message\n */\nexport default class PropertyChangeWebsocketMessage extends BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string, property: string, propertyValue: string) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n subtype: property,\n value: propertyValue\n });\n }\n\n type = WebsocketMessageType.propertyChange;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedGeofenceCrossing websocket message\n */\nexport default class GeofenceCrossingWebsocketMessage extends BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string, fenceId: string, isInsideNow: string) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n value: fenceId,\n subvalue: isInsideNow\n });\n }\n\n type = WebsocketMessageType.geofenceCrossing;\n}\n","import BaseWebsocketMessage, { WebsocketMessageType } from './base.ts';\n\n/**\n * @classdesc\n * Message class for SerializedStatusUpdate websocket message\n */\nexport default class StatusUpdateWebsocketMessage extends BaseWebsocketMessage {\n constructor(unitId: string, deviceId: string, newState: string, flagMask: string) {\n super(unitId, deviceId);\n\n Object.assign(this, {\n value: newState,\n subvalue: flagMask\n });\n }\n\n type = WebsocketMessageType.statusUpdate;\n}\n","import { isPresent } from '@ember/utils';\nimport EventWebsocketMessage from './event.ts';\nimport MonitoringEventWebsocketMessage from './monitoringevent.ts';\nimport PropertyChangeWebsocketMessage from './propertychange.ts';\nimport GeofenceCrossingWebsocketMessage from './geofencecrossing.ts';\nimport StatusUpdateWebsocketMessage from './statusupdate.ts';\n\nimport type { IncomingMessage } from '../../services/websocket.ts';\nimport type BaseWebsocketMessage from './base.ts';\n\n/**\n * Helper function for Ember.NativeArray to determine if a variable's type is not undefined.\n * Differs from isPresent in that it returns true for empty strings, boolean false, etc.\n */\nfunction isDefined(variable: string | undefined): boolean {\n return variable !== undefined;\n}\n\n/**\n * Websocket message factory function.\n * Takes raw websocket data and outputs an internal websocket message object\n */\nexport function getWebsocketMessage(data: IncomingMessage): BaseWebsocketMessage | undefined {\n const { UnitId: unitId } = data,\n deviceId = unitId + '-' + data.DeviceId;\n\n if ([unitId, deviceId].every(isPresent)) {\n const {\n EventType: eventType,\n EventValue: eventValue,\n EventDateUtc: eventDateUtc,\n QstringForExtraData: qStringForExtraData,\n CorrelatedEventId: correlatedEventId,\n Property: property,\n PropertyValue: propertyValue,\n FenceId: fenceId,\n IsInsideNow: isInsideNow,\n NewState: newState,\n FlagMask: flagMask\n } = data;\n\n if ([eventType, eventValue, qStringForExtraData, eventDateUtc].every(isDefined)) {\n return new EventWebsocketMessage(\n unitId,\n deviceId,\n eventType,\n eventValue,\n qStringForExtraData,\n eventDateUtc\n );\n }\n\n if ([eventType, correlatedEventId].every(isDefined)) {\n return new MonitoringEventWebsocketMessage(unitId, deviceId, eventType, correlatedEventId);\n }\n\n if ([property, propertyValue].every(isDefined)) {\n return new PropertyChangeWebsocketMessage(unitId, deviceId, property, propertyValue);\n }\n\n if ([fenceId, isInsideNow].every(isDefined)) {\n return new GeofenceCrossingWebsocketMessage(unitId, deviceId, fenceId, isInsideNow);\n }\n\n if ([newState, flagMask].every(isDefined)) {\n return new StatusUpdateWebsocketMessage(unitId, deviceId, newState, flagMask);\n }\n\n return undefined;\n }\n\n return undefined;\n}\n","import Service, { inject as service } from '@ember/service';\nimport { getWebsocketMessage } from '../websockets/messages/utils.ts';\nimport { GET } from '@adc/ajax/services/adc-ajax';\nimport { later } from '@ember/runloop';\nimport {\n NormalClosure,\n EndpointUnavailable as Establish,\n PolicyViolation as RejectedToken\n} from '../enums/Websockets.ts';\nimport { A } from '@ember/array';\n\nimport type Store from '@ember-data/store';\nimport type EnvSettingsService from './env-settings.ts';\nimport type AjaxService from '@adc/ajax/services/adc-ajax';\nimport type BaseWebsocketMessageHandler from '../websockets/base-handler.ts';\n\nexport interface IncomingMessage {\n UnitId: string;\n DeviceId: string;\n [key: string]: string;\n}\n\n/**\n * Event Code for mock-socket stopping\n */\nconst TestClosure = 0;\n\n/**\n * @classdesc\n *\n * Websocket service for Real Time Updates\n * Handles relaying websocket messages to message handlers for updating device state in data stores\n */\nexport default class WebsocketService extends Service {\n @service declare store: Store;\n @service declare ajax: AjaxService;\n @service declare envSettings: EnvSettingsService;\n\n /**\n * A websocket instance used for connecting to the server\n */\n socket?: WebSocket;\n\n /**\n * Endpoint address for websocket service\n */\n endpoint?: string;\n\n /**\n * Authentication token for websocket service\n */\n authToken?: string;\n\n /**\n * Keeps track of the number of reconnection attempts so the reconnection timeout can be delayed\n * exponentially the longer the websocket server is offline.\n */\n reconnectionAttempts = 0;\n\n /**\n * A list of message handlers that will be passed messages as they are received.\n */\n messageHandlers: BaseWebsocketMessageHandler[] = [];\n\n /**\n * Exponential Backoff Delay\n *\n * Implements exponential backoff delay to randomly space out reconnection attempts between many connected clients\n * so that they don't all hammer the server by using the same predefined set of timeouts.\n */\n static getReconnectionTimeout(attempts: number): number {\n const ceiling = 50,\n initialMax = 10,\n exponentialBase = 1.5,\n exponentialDelay = 5,\n max = Math.min(Math.pow(exponentialBase, attempts - exponentialDelay) + initialMax, ceiling),\n min = 5,\n range = max - min;\n\n // Max here so that we always stay at least above minimum timeout, if somehow the exponential results below that.\n return Math.floor(Math.max(Math.random() * range + min, min) * 1000);\n }\n\n /**\n * Called to start the websocket service.\n */\n async start(messageHandlers: { new (owner: WebsocketService): BaseWebsocketMessageHandler }[]): Promise {\n // Verify that websockets are supported by browser\n if (!window.WebSocket) {\n return;\n }\n\n this.messageHandlers = messageHandlers.map((C) => new C(this));\n // Open Websocket Connection\n await this.establishConnection(Establish);\n }\n\n /**\n * In event of abrupt closure attempt to reconnect the websocket every 15 seconds until limit extends time or\n * websocket connection is re-established\n */\n async establishConnection(eventCode: number): Promise {\n // Destroy websocket object to prevent collecting multiple websockets in memory\n if (this.socket) {\n this.socket.close(NormalClosure);\n }\n\n // Clean close, stop trying to connect\n if (eventCode === NormalClosure || eventCode === TestClosure) {\n return;\n }\n\n // Get a new token if rejected with code 1008\n if (eventCode === RejectedToken) {\n this.authToken = undefined;\n }\n\n await this.socketConnect();\n }\n\n /**\n * Connect the socket and if connection is valid, assign message and onclose handlers\n */\n async socketConnect(): Promise {\n // Make sure we have a valid token\n if (!this.authToken) {\n if (!(await this.retrieveToken())) {\n return;\n }\n }\n\n this.socket = new WebSocket(this.endpoint + '?f=1&auth=' + this.authToken);\n\n this.socket.addEventListener('open', () => {\n this.reconnectionAttempts = 0;\n });\n\n this.socket.addEventListener('close', (event) => {\n this.reconnectionAttempts++;\n\n const delay = WebsocketService.getReconnectionTimeout(this.reconnectionAttempts);\n\n // This is breaking unit tests for some reason without the try catch...\n try {\n if (!this.envSettings.isTestEnvironment()) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(this, this.establishConnection, event.code, delay);\n }\n // eslint-disable-next-line no-empty\n } catch {}\n });\n\n this.socket.addEventListener('message', (event) => {\n this.handleMessage(event);\n });\n }\n\n /**\n * Retrieves JWT token to authenticate against Websocket Server\n */\n private async retrieveToken(): Promise {\n try {\n const tokenResponse = await this.ajax.apiRequest<{\n value: string;\n metaData: {\n endpoint: string;\n };\n }>('websockets/token', undefined, null, GET);\n\n this.authToken = tokenResponse.value;\n this.endpoint = tokenResponse.metaData.endpoint;\n } catch {\n return false;\n }\n\n return this.authToken?.length !== 0 && this.endpoint?.length !== 0;\n }\n\n /**\n * Translates raw data into an internal websocket message, hands message to message handlers\n */\n handleMessage(event: MessageEvent): void {\n let data: IncomingMessage = { UnitId: '', DeviceId: '' };\n\n // Parse JSON data packet, don't explode for malformed JSON\n try {\n data = JSON.parse(event.data);\n } catch {\n // Do nothing, malformed JSON\n return;\n }\n\n /**\n * Internal websocket message format for message handlers\n */\n const message = getWebsocketMessage(data);\n\n if (message) {\n const handlers = A(this.messageHandlers.filter((handler) => handler.willHandle(message)));\n\n // Let each message handler attempt to process the message.\n handlers.invoke('process', message);\n }\n }\n}\n","/**\n * This enum is a TS representation of WebsocketCloseStatusEnum and it must be manually kept in sync w/ the C# version.\n *\n * @module\n */\n\nexport const NormalClosure = 1000;\n\nexport const EndpointUnavailable = 1001;\n\nexport const PolicyViolation = 1008;\n","import Transform from '@ember-data/serializer/transform';\nimport { A } from '@ember/array';\n\n/**\n * @classdesc\n *\n * A transform that allows specifying type 'array' for use with Ember Data.\n */\nexport default class ArrayTransform extends Transform {\n /**\n * Converts the deserialized data to an array.\n */\n serialize(deserialized: ReturnType['deserialize']> | null): T[] | null {\n return deserialized ? deserialized.toArray() : null;\n }\n\n /**\n * Converts an array from a server side response into an {@link Ember.Array}.\n */\n deserialize(array: T[]): ReturnType> {\n return A(array);\n }\n}\n","// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport DS from 'ember-data';\n\n/**\n * @classdesc\n *\n * A transform that allows boolean to have null values.\n */\nexport default class NullableBoolean extends DS.BooleanTransform {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n deserialize(serialized: boolean | null): boolean | null {\n // If the serialized value is null, then deserialize as null.\n if (serialized === null) {\n return null;\n }\n\n // Else wise deserialize it like a normal boolean.\n return super.deserialize(serialized, {});\n }\n\n serialize(deserialized: boolean | null): boolean | null {\n // If the deserialize value is null, then serialize as null.\n if (deserialized === null) {\n return null;\n }\n\n // Else wise serialize it like a normal boolean.\n return super.serialize(deserialized, {});\n }\n}\n","import RESTAdapter from '@ember-data/adapter/rest';\nimport AdapterError, { InvalidError } from '@ember-data/adapter/error';\nimport { typeOf } from '@ember/utils';\nimport { getErrorWithStatusCode } from '@adc/ajax/utils/errors';\nimport { ValidationError } from '@adc/ajax/enums/AjaxResponseHttpCode';\nimport { getCookie } from '@adc/ember-utils/utils/browser-helpers';\n\nimport type BaseModel from '../models/base-model.ts';\n\ninterface HeaderProps {\n Accept: string;\n SourcePath: string;\n SourceQueryParams: string;\n [key: string]: any;\n}\n\n/**\n * @classdesc\n * Alarm.com's base adapter implementation.\n */\nexport default class BaseAdapter extends RESTAdapter {\n // region adapter options for retrieving lists of models\n\n // Tells the adapter that it can bundle up ids in one request, as necessary.\n coalesceFindRequests = true;\n\n // endregion\n\n /**\n * Request headers appended to each request.\n */\n get headers(): HeaderProps {\n const { pathname, search } = window.location;\n\n return {\n Accept: 'application/vnd.api+json',\n AjaxRequestUniqueKey: getCookie('afg'),\n SourcePath: pathname,\n SourceQueryParams: search\n };\n }\n\n /** @override */\n handleResponse(status: number, headers: any, payload: any, requestData: any): any {\n let jsonPayload;\n\n try {\n // Make sure payload is an object (likely remove once https://github.com/emberjs/data/issues/6936 is fixed).\n jsonPayload = typeOf(payload) === 'string' ? JSON.parse(payload) : payload;\n } catch (ex) {\n jsonPayload = payload;\n }\n\n const response = super.handleResponse(status, headers, jsonPayload, requestData) as any;\n\n // Is this an error?\n if (response && response.isAdapterError) {\n const { errors } = jsonPayload;\n\n // Is this a validation error?\n if (status === ValidationError) {\n return new InvalidError(errors);\n }\n\n // Do we care about this error?\n const statusData = getErrorWithStatusCode(status);\n if (statusData) {\n const {\n code = status,\n name = response.name,\n message = response.message,\n title = response.description\n } = statusData;\n\n // Return adapter error with our custom values.\n return Object.assign(\n {\n number: code,\n description: title,\n name,\n errors\n },\n new AdapterError(message)\n );\n }\n }\n\n return response;\n }\n\n /**\n * This method is used to indicate when there is a network connection error. It can be overridden in your project to handle this error however you wish.\n */\n noInternetConnection(): any {\n return null;\n }\n\n /**\n * Submits custom api call that is not the standard REST verb.\n *\n * This serializes `rawData` into JSON, so do not pass in a JSON string for `rawData` or else it will be doubly serialized.\n * Instead, just pass in the un-serialized object itself.\n */\n submitCustomApiCall(model: BaseModel, verb: string, method = 'POST', rawData: any): Promise {\n // Does the raw data have a serialize method?\n if (\n rawData !== null &&\n typeof rawData === 'object' &&\n 'serialize' in rawData &&\n typeof rawData.serialize === 'function'\n ) {\n rawData = rawData.serialize();\n }\n\n // For GET methods, the data gets appended to the URI query string. We don't want JSON there, so just leave the data as is.\n return this.ajax(\n // This is how we fetch the modelName, but we need to cast it due to ember-data type support being far behind\n `${this.buildURL((model.constructor as unknown as { modelName: string }).modelName, model.id)}/${verb}`,\n method,\n rawData !== undefined ? { data: rawData } : undefined\n );\n }\n}\n","import BaseAdapter from './base-adapter.ts';\n\n/**\n * @class adapters.JsonApiContentAdapter\n */\nexport default class BaseJsonApiContentAdapter extends BaseAdapter {\n /** @override */\n get headers() {\n return {\n ...super.headers,\n 'content-type': 'application/vnd.api+json'\n };\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your adapters.\ndeclare module 'ember-data/types/registries/adapter' {\n export default interface AdapterRegistry {\n 'base-json-api-content-adapter': BaseJsonApiContentAdapter;\n }\n}\n","import Model from '@ember-data/model';\nimport { get } from '@ember/object';\nimport { pluralize } from 'ember-inflector';\nimport RSVP from 'rsvp';\n\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport type ModelRegistry from 'ember-data/types/registries/model';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport type AdapterRegistry from 'ember-data/types/registries/adapter';\nimport type Store from '@ember-data/store';\nimport type AjaxService from '@adc/ajax/services/adc-ajax';\nimport type BaseAdapter from '../adapters/base-adapter.ts';\n\ninterface RelationshipInfo {\n kind: 'belongsTo' | 'hasMany';\n}\n\n/**\n * Creates new model with defaults provided by the server. If a modelId is specified, then that will be the ID used for the new model.\n *\n * @param ajax The ADC Ajax service.\n * @param store The ember-data store.\n * @param modelName The name of the model to create.\n * @param [params] Parameters passed to the server.\n * @param [modelId] id of the newly created model if we want to specify it.\n * @param [defaultProperties] properties we want the new model to be initialized with.\n */\nexport async function createRecordWithServerDefaults(\n ajax: AjaxService,\n store: Store,\n modelName: keyof ModelRegistry,\n params: Record = {},\n modelId: number | string = -1,\n defaultProperties: Partial = {}\n): Promise {\n const defaultModel = await ajax.apiRequest<{\n data: {\n attributes: Partial;\n };\n }>(`${pluralize(String(modelName))}/getModelDefaultData`, undefined, params, 'POST');\n\n return store.createRecord(modelName, {\n ...(modelId === -1 ? {} : { id: modelId }),\n ...(defaultModel.data?.attributes ?? {}),\n ...defaultProperties\n });\n}\n\n/**\n * @classdesc\n * BaseModel class with some functionality that can be overridden.\n */\nexport default class BaseModel extends Model {\n /**\n * Should we attempt to rollback relationships on the model when rollbackAttributes() is called?\n */\n get shouldRollbackRelationships(): boolean {\n return false;\n }\n\n /**\n * Can this model be rolled back?\n */\n canBeRolledBack(): boolean {\n // Model cannot be rolled back if it is already destroyed.\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n return !(this.isDestroyed || this.isDestroying);\n }\n\n /** @override */\n reload(options?: { adapterOptions?: object | undefined }): RSVP.Promise {\n // Attempting to reload the record while it is in an empty state will trigger an error in Ember.data.\n // eslint-disable-next-line ember/no-get\n if (get(this, 'isEmpty')) {\n console.warn('Record will not be reloaded while in state root.empty.');\n return RSVP.reject();\n }\n\n // Defer to base.\n return super.reload(options);\n }\n\n /**\n * Rolls back the model.\n *\n * For more complex models, this should be overridden to also roll back child models.\n *\n * @warning If you are overriding this method, you MUST make sure you first check whether the model canBeRolledBack.\n */\n rollback(): void {\n if (this.canBeRolledBack()) {\n this.rollbackAttributes();\n }\n }\n\n /**\n * Returns the model name of this model.\n */\n getModelName(): keyof ModelRegistry {\n return String(this).match(/@model:(.*)::/)?.[1] ?? '';\n }\n\n /**\n * Submits custom api call.\n *\n * @param apiMethod - Method name to call on the controller.\n * @param [httpVerb=POST] - HTTP verb to use for the api call.\n * @param [data] - Additional data to pass in the post request.\n */\n submitCustomApiCall(apiMethod: string, httpVerb = 'POST', data?: any): Promise {\n return (\n this.store.adapterFor(this.getModelName() as keyof AdapterRegistry) as unknown as BaseAdapter\n ).submitCustomApiCall(this, apiMethod, httpVerb, data);\n }\n\n /**\n * Overrides native function to include rollback of relationships\n *\n * @override\n */\n rollbackAttributes() {\n super.rollbackAttributes();\n\n if (this.shouldRollbackRelationships) {\n this.rollbackRelationships();\n }\n }\n\n /**\n * Returns the list of records for a specified relationship property on this model.\n */\n private getRelationshipRecords(name: Exclude, { kind }: RelationshipInfo): Model[] {\n if (kind === 'belongsTo') {\n const value = this.belongsTo(name).value();\n return value ? [value] : [];\n }\n\n return (this.hasMany(name).value() ?? []) as Model[];\n }\n\n /**\n * Rollbacks all the record of the specified relationship property of this model.\n */\n private rollbackRelationship(name: Exclude, relDescriptor: RelationshipInfo): void {\n this.getRelationshipRecords(name, relDescriptor).forEach((record) => {\n // Call rollback for the records which inherit from base-model class.\n if (record instanceof BaseModel) {\n record.rollback();\n return;\n }\n\n // Call rollbackAttributes from the ember model class otherwise.\n record.rollbackAttributes();\n });\n }\n\n /**\n * Rolls back all the fetched relationships on this model.\n */\n rollbackRelationships(): void {\n this.eachRelationship(this.rollbackRelationship, this);\n }\n}\n","import Model from '@ember-data/model';\nimport { attr } from '@ember-data/model';\nimport { computed } from '@ember/object';\n\n/**\n * The default ISO locale code (en-US).\n */\nexport const defaultIsoCode = 'en-US';\n\n/**\n * Notes:\n *
    \n *
  • The id here translates to CultureEnum on the backend, and so does the cultureId
  • \n *
  • Default values are for english culture, so that if something goes terribly wrong, things do not just crap out
  • \n *
\n */\nexport default class LocaleModel extends Model {\n /**\n * CultureId corresponds to CultureEnum on the backend\n */\n @computed('id')\n get cultureId(): string | number {\n return this.id || 1;\n }\n\n /**\n * Name for displaying for this culture\n */\n @attr('string', { defaultValue: 'English' })\n declare displayName: string;\n\n /**\n * ISO code for the locale\n */\n @attr('string', { defaultValue: defaultIsoCode })\n declare isoCode: string;\n\n /**\n * Language for this culture\n */\n @attr('string', { defaultValue: 'en' })\n declare language: string;\n\n /**\n * Does the week start on Sunday for this locale?\n */\n @attr('boolean', { defaultValue: true })\n declare weekStartsOnSunday: boolean;\n}\ndeclare module 'ember-data/types/registries/model' {\n export default interface ModelRegistry {\n locale: LocaleModel;\n }\n}\n","import CommonSerializer from './common-serializer.ts';\n\n/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport type DS from 'ember-data';\nimport type ModelRegistry from 'ember-data/types/registries/model';\n\ninterface PayloadData {\n id: string;\n type: string;\n attributes?: Record;\n relationships?: Record;\n}\n\n/**\n * @classdesc\n * Alarm.com's base serializer implementation to move attributes and relationships to the root node.\n *\n * @note We should change the backend to accept true JSONApi payload so we don't need to do this.\n * We are currently dropping type attribute values because type can't coexist with the model type (which is required).\n */\nexport default class BaseSerializer extends CommonSerializer {\n serialize(snapshot: DS.Snapshot, options = {}): object {\n // Extract data from payload.\n const json = (\n super.serialize(snapshot, Object.assign({}, options, { includeId: true })) as { data: PayloadData }\n ).data,\n { attributes = {}, relationships = {} } = json;\n\n // Blow away a type attribute (if present) because it will override the model type (this demonstrates why our serialization is actually broken).\n delete attributes.type;\n\n // Move attributes to the main node.\n delete json.attributes;\n Object.assign(json, attributes);\n\n // Move relationships to the main node.\n delete json.relationships;\n Object.assign(json, Object.fromEntries(Object.entries(relationships).map(([key, value]) => [key, value.data])));\n\n return json;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your serializers.\ndeclare module 'ember-data/types/registries/serializer' {\n export default interface SerializerRegistry {\n 'base-serializer': BaseSerializer;\n }\n}\n","import JSONAPISerializer from '@ember-data/serializer/json-api';\n\n/**\n * Common serializer attributes to share between ADC's serializer implementations.\n */\nexport default class CommonSerializer extends JSONAPISerializer {\n /** @override **/\n keyForAttribute(key: string): string {\n // Return non-dasherized key.\n return key;\n }\n\n /** @override **/\n keyForRelationship(key: string): string {\n return key;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your serializers.\ndeclare module 'ember-data/types/registries/serializer' {\n export default interface SerializerRegistry {\n 'common-serializer': CommonSerializer;\n }\n}\n","import Service from '@ember/service';\nimport { init as initSentry, configureScope } from '@sentry/ember';\nimport { CaptureConsole } from '@sentry/integrations';\nimport {\n InvalidAntiForgeryToken,\n ValidationError,\n ProcessingError,\n ServerProcessingError,\n TwoFactorAuthenticationRequired\n} from '@adc/ajax/enums/AjaxResponseHttpCode';\nimport { set } from '@ember/object';\nimport { addWeakListener } from '@adc/ember-utils/utils/event-listeners';\n\nimport type {\n Event as SentryEvent,\n EventHint,\n Breadcrumb,\n BreadcrumbHint,\n Extras,\n Primitive,\n SeverityLevel\n} from '@sentry/types';\nimport type { BrowserOptions } from '@sentry/ember';\nimport type { TEmberAjaxError } from '@adc/ajax/services/adc-ajax';\n\ntype SentryTags = {\n [key: string]: Primitive;\n};\n\ntype ADCException =\n | TEmberAjaxError\n | {\n errors: TEmberAjaxError;\n };\n\nexport type ADCEventHint = EventHint & {\n originalException?: ADCException;\n};\n\ninterface ErrorReportingConfig extends BrowserOptions {\n serverName: string;\n showDebugInfo: boolean;\n}\n\nexport interface ErrorsToIgnore {\n propertyType: string;\n value: string;\n}\n\ninterface ErrorReportingContext {\n user: {\n id: string;\n userName?: string;\n email?: string;\n ip_address?: string;\n };\n tags: SentryTags;\n extra?: Extras;\n fingerprint?: string[];\n}\n\nexport interface ErrorReportingConfiguration {\n apiKey: string | null;\n environment: 'dev' | 'test' | 'prod';\n isEnabled: boolean;\n logErrorsToConsole: boolean;\n machineName: string;\n providerName: string;\n redirectToErrorRouteOnUnhandledError: boolean;\n scriptUrl: string | null;\n showNotificationOnError: boolean;\n}\n\ntype FakeConsole = Pick;\n\n/**\n * @note I am on purpose assigning the texts in case the levels will change.\n */\nconst LEVEL_TO_CONSOLE_FN_MAP: Record = {\n fatal: 'error',\n error: 'error',\n warning: 'warn',\n info: 'info',\n debug: 'debug',\n log: 'log'\n};\n\n/**\n * Default config options.\n */\nconst DEFAULT_CONFIG = {\n attachStacktrace: true,\n environment: 'unset',\n serverName: window.location.hostname,\n release: 'untagged'\n};\n\n/**\n * Is this a recognized server error that we should ignore sending to Sentry?\n */\nfunction isRecognizedServerError(this: BaseErrorReporting, hint: ADCEventHint): boolean {\n const code = getErrorCodeFromHint.call(this, hint);\n\n if (!code || isNaN(code)) {\n return false;\n }\n\n return [\n InvalidAntiForgeryToken,\n ValidationError,\n ProcessingError,\n ServerProcessingError,\n TwoFactorAuthenticationRequired\n ].some((errorCode) => errorCode === parseInt(String(code), 10));\n}\n\n/**\n * Attempts to get the HTTP error code from the hint object.\n */\nfunction getErrorCodeFromHint(this: BaseErrorReporting, hint: ADCEventHint): number | undefined {\n const fnLog = (text: string) =>\n logMessage.call(this, `[@adc/app-infrastructure::getErrorCodeFromHint] ${text}.`, hint);\n\n const { originalException } = hint;\n if (!originalException) {\n return;\n }\n\n let { errors } = originalException;\n if (!errors) {\n fnLog('Original exception errors do not exist');\n return;\n }\n if (errors instanceof String || typeof errors === 'string') {\n fnLog(`Original exception errors is a string: ${errors}`);\n return;\n }\n if (!Array.isArray(errors)) {\n if (!('errors' in errors)) {\n fnLog('Original exception errors is not array and does not contain errors collection.');\n return;\n }\n\n errors = errors.errors;\n }\n\n return Array.isArray(errors) && errors.length > 0 ? errors[0].code : undefined;\n}\n\n/**\n * Checks whether a specific event should be ignored or not.\n */\nfunction shouldEventBeIgnored(this: BaseErrorReporting, hint: ADCEventHint): boolean {\n return this.errorsToIgnore.some((errorToIgnore) =>\n this.getExceptionStringValue(hint, errorToIgnore.propertyType)\n .toLowerCase()\n .includes(errorToIgnore.value.toLowerCase())\n );\n}\n\n/**\n * Sets up configuration object for Sentry.\n */\nfunction getConfiguration(\n this: BaseErrorReporting,\n errorReportingConfiguration: ErrorReportingConfig\n): ErrorReportingConfig {\n return Object.assign(DEFAULT_CONFIG, errorReportingConfiguration, {\n debug: false,\n beforeSend: this.beforeSend.bind(this),\n beforeBreadcrumb: this.beforeBreadcrumb.bind(this),\n integrations: [\n new CaptureConsole({\n levels: ['warn', 'error']\n })\n ],\n ignoreErrors: [\n // Random plugins/extensions\n 'top.GLOBALS',\n // See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error.html\n 'originalCreateNotification',\n 'canvas.contentDocument',\n 'MyApp_RemoveAllHighlights',\n 'http://tt.epicplay.com',\n \"Can't find variable: ZiteReader\",\n 'jigsaw is not defined',\n 'ComboSearch is not defined',\n 'http://loading.retry.widdit.com/',\n 'atomicFindClose',\n // Facebook borked\n 'fb_xd_fragment',\n // ISP \"optimizing\" proxy - `Cache-Control: no-transform` seems to\n // reduce this. (thanks @acdha)\n // See http://stackoverflow.com/questions/4113268\n 'bmi_SafeAddOnload',\n 'EBCallBackMessageReceived',\n // See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx\n 'conduitPage',\n // https://forum.sentry.io/t/resizeobserver-loop-limit-exceeded/8402\n 'ResizeObserver loop limit exceeded',\n // https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded/50387233#50387233\n 'ResizeObserver loop completed with undelivered notifications'\n ],\n denyUrls: [\n // Facebook flakiness\n /graph\\.facebook\\.com/i,\n // Facebook blocked\n /connect\\.facebook\\.net\\/en_US\\/all\\.js/i,\n // Woopra flakiness\n /eatdifferent\\.com\\.woopra-ns\\.com/i,\n /static\\.woopra\\.com\\/js\\/woopra\\.js/i,\n // Chrome extensions\n /extensions\\//i,\n /^chrome:\\/\\//i,\n // Other plugins\n /127\\.0\\.0\\.1:4001\\/isrunning/i, // Cacaoweb\n /webappstoolbarba\\.texthelp\\.com\\//i,\n /metrics\\.itunes\\.apple\\.com\\.edgesuite\\.net\\//i\n ]\n });\n}\n\n/**\n * Logs Sentry message to console.\n */\nfunction logMessage(this: BaseErrorReporting, ...args: any[]): void {\n if (this.configuration?.showDebugInfo) {\n console.debug('Sentry:', ...args);\n }\n}\n\n// #endregion\n\n/**\n * @classdesc\n * Client side error reporting service.\n */\nexport default class BaseErrorReporting extends Service {\n console?: FakeConsole;\n\n /**\n * Holds Sentry configuration.\n */\n configuration?: ErrorReportingConfig;\n\n /**\n * Holds current Sentry context setup.\n */\n context?: ErrorReportingContext;\n\n constructor(owner?: object) {\n super(owner);\n\n // For some reason sentry is not catching and logging unhandled promises on its own. So we setup logging for them here.\n // We should probably upgrade Sentry and try to get it to do this on its own.\n addWeakListener(this, window, 'unhandledrejection', (evt: Event) => {\n // Not sure that we should stop propagation, but this is pre-existing behavior that I was scared to change.\n // Again, the best course of action is likely for us to try and remove this entirely and get Sentry to take care of it.\n evt.preventDefault();\n evt.stopPropagation();\n evt.stopImmediatePropagation();\n });\n }\n\n /**\n * Helper method to generate a single \"error to ignore\" configuration.\n */\n protected getETI(value: string, propertyType = 'message'): ErrorsToIgnore {\n return { propertyType, value };\n }\n\n /**\n * List of errors to ignore when processing events.\n */\n get errorsToIgnore(): ErrorsToIgnore[] {\n return [\n this.getETI('NS_ERROR_NOT_INITIALIZED', 'name'),\n this.getETI('AbortError', 'name'),\n this.getETI('The adapter operation was aborted'),\n this.getETI('The Ajax operation was aborted'),\n this.getETI('InvalidAntiForgeryToken'),\n this.getETI('Network request failed'),\n this.getETI(\"Can't execute code from a freed script\"),\n this.getETI('Permission denied'),\n // This happens when there are too many observations occurring in a single animation frame. Note: the website will not break }.\n // Some version of Chrome (i.e. 68) will throw this on the saved clips hero card when playing a saved clip }.\n // More info: https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded }\n this.getETI('ResizeObserver loop limit exceeded'),\n this.getETI('Error when processing route:'),\n // We don't care about any Chrome extension errors. There was one in particular causing lots of errors for a very small number of users:\n // https://sentry.io/organizations/alarmcom-zc/issues/887082368/?project=1377221&query=is%3Aunresolved&sort=freq&statsPeriod=14d\n this.getETI('chrome-extension://', 'stack')\n ];\n }\n\n /**\n * List of xhr requests that we do not want to send breadcrumbs to Sentry.\n *\n * This would include things like keep alive, performance monitoring, etc.\n */\n get xhrRequestsToIgnoreInBreadcrumbs(): string[] {\n return [];\n }\n\n /**\n * Gets the specified string value from the original exception as a lower case string.\n */\n getExceptionStringValue(hint: ADCEventHint = {}, propertyType: string): string {\n const { originalException, data } = hint;\n\n // NOTE: Some \"hints\" (i.e. original error objects) don't contain an originalException.\n // Instead, they have a data object containing a stack that contains the error data.\n const errorData = originalException || (data || {}).stack;\n\n if (!errorData) {\n return '';\n }\n\n // If original exception is a string itself, just return it.\n if (typeof errorData === 'string') {\n return errorData;\n }\n\n return typeof errorData[propertyType] === 'string' ? errorData[propertyType] : '';\n }\n\n /**\n * Configures the error reporting session.\n */\n configure(errorReportingConfiguration: Partial): void {\n if (this.configuration) {\n logMessage.call(this, 'Service was already initialized, skipping duplicate initialization.');\n return;\n }\n\n // Make sure that we are logging messages from the console.\n // Note: We cannot use the Debug integration because I could not figure out how to override Sentry's Logger class so\n // that it does not use console's methods because those get pushed to Sentry.\n // mockErrorReportingForConsole.call(this);\n\n const configuration = getConfiguration.call(this, errorReportingConfiguration);\n\n // Initialize service.\n initSentry(configuration);\n\n set(this, 'configuration', configuration);\n\n logMessage.call(this, 'Configured.', configuration);\n }\n\n /**\n * Set Sentry scope context.\n */\n setContext(context: ErrorReportingContext): void {\n if (!this.configuration) {\n console.error(\n \"Sentry: Service cannot set context because it was not configured yet. Please call 'configure' first.\"\n );\n return;\n }\n\n const { user, tags, extra, fingerprint } = context;\n\n // Configure Sentry scope with attributes.\n configureScope((scope) => {\n // Set default level.\n scope.setLevel('fatal');\n\n // Set user data.\n scope.setUser(user || {});\n\n // Set tags.\n if (tags) {\n scope.setTags(tags);\n }\n\n if (extra) {\n scope.setExtras(extra);\n }\n\n if (fingerprint) {\n scope.setFingerprint(fingerprint);\n }\n });\n\n set(this, 'context', context);\n\n logMessage.call(this, 'Scope context was configured', context);\n }\n\n /**\n * Method called before sending an event to Sentry.\n *\n * @param event - Sentry error event.\n * @param hint - Includes original event that caused the Sentry event.\n *\n * @returns Must return either the original Event or null. If null is returned the event is not sent to Sentry.\n */\n beforeSend(event: SentryEvent, hint: ADCEventHint = {}): SentryEvent | null {\n if (!event) {\n return null;\n }\n\n if (isRecognizedServerError.call(this, hint)) {\n logMessage.call(this, 'Dropping event because it is a processing or validation error.', event, hint);\n return null;\n }\n\n if (shouldEventBeIgnored.call(this, hint)) {\n logMessage.call(this, 'Dropping event because it should be ignored.', event, hint);\n return null;\n }\n\n // If we want to show debug info then log the original error to the console.\n if (this.configuration?.showDebugInfo) {\n logMessage.call(this, event, hint);\n\n const { level } = event;\n if (level) {\n this.console?.[LEVEL_TO_CONSOLE_FN_MAP[level]](hint.originalException);\n }\n }\n\n return event;\n }\n\n /**\n * Method called before Sentry breadcrumb is constructed.\n *\n * @param breadcrumb - Sentry breadcrumb.\n * @param hint - Includes original event that caused the Sentry event.\n *\n * @returns Must return either the original Breadcrumb or null. If null is returned the breadcrumb is not sent to Sentry.\n */\n beforeBreadcrumb(breadcrumb: Breadcrumb, hint: BreadcrumbHint): Breadcrumb | null {\n // Do not log breadcrumbs for some XHR requests.\n if (breadcrumb.category === 'xhr') {\n const url = (breadcrumb.data?.url ?? '').toLowerCase();\n\n if (this.xhrRequestsToIgnoreInBreadcrumbs.some((r) => url.includes(r))) {\n logMessage.call(this, 'Dropping breadcrumb because XHR should be ignored.', breadcrumb);\n\n return null;\n }\n }\n\n // Massage clicked ui elements so that we get better info from them for debugging.\n if (breadcrumb.category === 'ui.click') {\n const { target } = hint.event || {};\n\n if (target) {\n // The original message is a path to the element.\n const path = breadcrumb.message;\n\n const values: string[] = [];\n\n // Try to extract some data.\n [['id'], ['innerText', 'text'], ['title'], ['ariaLabel'], ['className']].forEach(([key, targetKey]) => {\n targetKey = targetKey || key;\n\n const value = target[key];\n\n if (value) {\n values.push(`${targetKey}: ${value}`);\n }\n });\n\n breadcrumb.message = `Clicked: ${target.tagName.toLowerCase()}(${values.join(', ')}) | path: ${path}`;\n }\n }\n\n return breadcrumb;\n }\n}\n","import Service from '@ember/service';\nimport { A } from '@ember/array';\nimport { registerDestructor } from '@ember/destroyable';\nimport { addWeakListener, removeListener } from '../utils/event-listeners.ts';\n\nconst CACHE_NAME = '_adcDomListeners',\n ON_CLOSE_CLICK_LISTENER_KEY = '_adcCloseOnClickListenerId';\n\n/**\n * @classdesc\n * A service for adding/removing/maintaining DOM listeners.\n */\nexport default class DomService extends Service {\n /**\n * Adds new event listener and caches for automatic clearing during tear down.\n *\n * @param destroyable - The object that requested the listener.\n * @param element - The element to attach the listener to.\n * @param event - Event which should trigger function.\n * @param fn - Function to call when event triggers.\n * @param isOnce - Should the event be triggered at most once?\n * @param capture - Should capture method be used?\n * @param passive - Should the event be captured passively?\n */\n addListener(\n destroyable: any,\n element: Node | Window | Document,\n event: string,\n fn: (evt: Event) => void,\n isOnce?: boolean,\n capture?: boolean,\n passive?: boolean\n ): string {\n destroyable[CACHE_NAME] = destroyable[CACHE_NAME] ?? A([]);\n const id = destroyable[CACHE_NAME].pushObject(\n addWeakListener(destroyable, element, event, fn, isOnce, capture, passive)\n );\n\n // Listen for destroy.\n registerDestructor(destroyable, () => this.removeListener(destroyable, id));\n\n return id;\n }\n\n /**\n * Removes listener with specified id.\n *\n * @param destroyable - The object that requested the listener.\n * @param id The ID of the listener to remove.\n */\n removeListener(destroyable: any, id: string): void {\n // Remove the registered listener.\n removeListener(id);\n\n // Remove the id from the local listeners holder.\n destroyable[CACHE_NAME]?.removeObject(id);\n }\n\n /**\n * Cleans up all listeners.\n *\n * @param destroyable - The object that requested the listeners.\n */\n removeAllListeners(destroyable: any): void {\n const domListeners = destroyable[CACHE_NAME];\n\n if (domListeners) {\n // Clear DOM listeners.\n domListeners.forEach(removeListener);\n\n // Clear the listeners array.\n domListeners.clear();\n destroyable[CACHE_NAME] = undefined;\n }\n }\n\n /**\n * Clears the close listener event handler (if it exists).\n *\n * @param destroyable - The object that requested the listener.\n */\n clearCloseClickListener(destroyable: any): void {\n const id = destroyable[ON_CLOSE_CLICK_LISTENER_KEY];\n if (id) {\n // Clear the listener id so that we know if we need to reattach it again.\n this.removeListener(destroyable, id);\n delete destroyable[ON_CLOSE_CLICK_LISTENER_KEY];\n }\n }\n\n /**\n * Attaches a click event listener to the entire document which calls the passed function on execution.\n *\n * @param destroyable - The object that requested the listener.\n * @param fnClose A handler for when the element should be closed.\n * @param fnTestElement An optional function for testing if the close action should proceed.\n */\n attachCloseHandler(destroyable: any, fnClose: () => void, fnTestElement?: (evt: Event) => boolean): void {\n // Does the listener already exist?\n if (destroyable[ON_CLOSE_CLICK_LISTENER_KEY]) {\n // Nothing to do.\n return;\n }\n\n // Create click handler.\n const fnClick = (evt: Event) => {\n // Is there a test function AND does it indicate this should be ignored?\n if (fnTestElement && fnTestElement(evt)) {\n // Ignore this click.\n return;\n }\n\n // Remove event listener (fires one time only).\n this.clearCloseClickListener(destroyable);\n\n // Execute close function.\n fnClose();\n };\n\n // Attach event listener and clear on destroy.\n destroyable[ON_CLOSE_CLICK_LISTENER_KEY] = this.addListener(\n destroyable,\n document,\n 'click',\n fnClick,\n false,\n true\n );\n registerDestructor(destroyable, this.clearCloseClickListener.bind(this, destroyable));\n }\n\n /**\n * Determines if an event occurred within the passed element.\n *\n * @param element The element to test.\n * @param evt The click event.\n * @param selector A CSS selector for the element to test.\n */\n verifyCloseTarget(element: HTMLElement, evt: Event, selector: string): boolean {\n const parent = element.querySelector(selector);\n return parent?.contains((evt.target || evt.srcElement) as Node) ?? false;\n }\n}\n","import { addWeakListener, removeListener } from './event-listeners.ts';\nimport { isDestroyed } from './ember-helpers.ts';\nimport { isFunction } from './general.ts';\nimport { schedule } from '@ember/runloop';\n\n/**\n * Utility module for accessibility code.\n *\n * @module\n */\n\nexport interface FocusSettings {\n scopeSelector: string;\n escapeCallback: () => void;\n treatArrowsAsTabEvents: boolean;\n oldListenerId: string;\n}\n\n// region Key Codes\n\n/**\n * The key code for the shift key.\n */\nexport const SHIFT_KEY = 16;\n\n/**\n * The code for the left shift key.\n */\nexport const SHIFT_LEFT_CODE = 'ShiftLeft';\n\n/**\n * The code for the right shift key.\n */\nexport const SHIFT_RIGHT_CODE = 'ShiftRight';\n\n/**\n * The key code for the control key.\n */\nexport const CONTROL_KEY = 17;\n\n/**\n * The code for the left control key.\n */\nexport const CONTROL_LEFT_CODE = 'ControlLeft';\n\n/**\n * The code for the right control key.\n */\nexport const CONTROL_RIGHT_CODE = 'ControlRight';\n\n/**\n * The key code for the space key.\n */\nexport const SPACE_KEY = 32;\n\n/**\n * The code for the space key.\n */\nexport const SPACE_CODE = 'Space';\n\n/**\n * The key code for the enter key.\n */\nexport const ENTER_KEY = 13;\n\n/**\n * The code for the enter key.\n */\nexport const ENTER_CODE = 'Enter';\n\n/**\n * The code for the numpad enter key.\n */\nexport const NUMPAD_ENTER_CODE = 'NumpadEnter';\n\n/**\n * The key code for the escape key.\n */\nexport const ESCAPE_KEY = 27;\n\n/**\n * The code for the escape key.\n */\nexport const ESCAPE_CODE = 'Escape';\n\n/**\n * The key code for the tab key.\n */\nexport const TAB_KEY = 9;\n\n/**\n * The code for the tab key.\n */\nexport const TAB_CODE = 'Tab';\n\n/**\n * The key code for the down-arrow key.\n */\nexport const DOWN_ARROW_KEY = 40;\n\n/**\n * The code for the down-arrow key.\n */\nexport const ARROW_DOWN_CODE = 'ArrowDown';\n\n/**\n * The key code for the up-arrow key.\n */\nexport const UP_ARROW_KEY = 38;\n\n/**\n * The code for the up-arrow key.\n */\nexport const ARROW_UP_CODE = 'ArrowUp';\n\n/**\n * The key code for the left-arrow key.\n */\nexport const LEFT_ARROW_KEY = 37;\n\n/**\n * The code for the left-arrow key.\n */\nexport const ARROW_LEFT_CODE = 'ArrowLeft';\n\n/**\n * The key code for the right-arrow key.\n */\nexport const RIGHT_ARROW_KEY = 39;\n\n/**\n * The code for the right-arrow key.\n */\nexport const ARROW_RIGHT_CODE = 'ArrowRight';\n\n/**\n * The key code for the Home key.\n */\nexport const HOME_KEY = 36;\n\n/**\n * The code for the Home key.\n */\nexport const HOME_CODE = 'Home';\n\n/**\n * The key code for the End key.\n */\nexport const END_KEY = 35;\n\n/**\n * The code for the End key.\n */\nexport const END_CODE = 'End';\n\n/**\n * The key code for the Backspace key.\n */\nexport const BACKSPACE_KEY = 8;\n\n/**\n * The code for the Backspace key.\n */\nexport const BACKSPACE_CODE = 'Backspace';\n\n/**\n * The key code for the Equals key.\n */\nexport const EQUALS_KEY = 187;\n\n/**\n * The code for the Equals key.\n */\nexport const EQUAL_CODE = 'Equal';\n\n/**\n * The key code for the left-bracket key.\n */\nexport const LEFT_BRACKET_KEY = 219;\n\n/**\n * The code for the left-bracket key.\n */\nexport const BRACKET_LEFT_CODE = 'BracketLeft';\n\n/**\n * The key code for the right-bracket key.\n */\nexport const RIGHT_BRACKET_KEY = 221;\n\n/**\n * The code for the right-bracket key.\n */\nexport const BRACKET_RIGHT_CODE = 'BracketRight';\n\n/**\n * The key code for the b key.\n */\nexport const B_KEY = 66;\n\n/**\n * The code for the b key.\n */\nexport const B_CODE = 'KeyB';\n\n/**\n * The key code for the c key.\n */\nexport const C_KEY = 67;\n\n/**\n * The code for the c key.\n */\nexport const C_CODE = 'KeyC';\n\n/**\n * The key code for the d key.\n */\nexport const D_KEY = 68;\n\n/**\n * The code for the d key.\n */\nexport const D_CODE = 'KeyD';\n\n/**\n * The key code for the e key.\n */\nexport const E_KEY = 69;\n\n/**\n * The code for the e key.\n */\nexport const E_CODE = 'KeyE';\n\n/**\n * The key code for the f key.\n */\nexport const F_KEY = 70;\n\n/**\n * The code for the f key.\n */\nexport const F_CODE = 'KeyF';\n\n/**\n * The key code for the n key.\n */\nexport const N_KEY = 78;\n\n/**\n * The code for the n key.\n */\nexport const N_CODE = 'KeyN';\n\n/**\n * The key code for the s key.\n */\nexport const S_KEY = 83;\n\n/**\n * The code for the s key.\n */\nexport const S_CODE = 'KeyS';\n\n/**\n * The key code for the t key.\n */\nexport const T_KEY = 84;\n\n/**\n * The code for the t key.\n */\nexport const T_CODE = 'KeyT';\n\n// endregion\n\n// region Utility Functions\n\n/**\n * Checks if the given key code is for Enter or Space\n *\n * @param code - the code of the key\n */\nexport function isEnterOrSpaceCode(code: string): boolean {\n return code === ENTER_CODE || code === SPACE_CODE || code === NUMPAD_ENTER_CODE;\n}\n\n/**\n * Checks if the given key code is for arrow right.\n *\n * @param code - the code of the key\n */\nexport function isArrowRightCode(code: string): boolean {\n return code === ARROW_RIGHT_CODE;\n}\n\n/**\n * Checks if the given key code is for arrow left.\n *\n * @param code - the code of the key\n */\nexport function isArrowLeftCode(code: string): boolean {\n return code === ARROW_LEFT_CODE;\n}\n\n/**\n * Checks if the given key code is for arrow down.\n *\n * @param code - the code of the key\n */\nexport function isArrowDownCode(code: string): boolean {\n return code === ARROW_DOWN_CODE;\n}\n\n/**\n * Checks if the given key code is for arrow up.\n *\n * @param code - the code of the key\n */\nexport function isArrowUpCode(code: string): boolean {\n return code === ARROW_UP_CODE;\n}\n\n/**\n * Checks if the given key code is for arrows.\n *\n * @param code - the code of the key\n */\nexport function isArrowCode(code: string): boolean {\n return isArrowDownCode(code) || isArrowUpCode(code) || isArrowLeftCode(code) || isArrowRightCode(code);\n}\n\n/**\n * Checks if the given key code is for tab.\n *\n * @param code - the code of the key\n */\nexport function isTabCode(code: string): boolean {\n return code === TAB_CODE;\n}\n\n/**\n * Checks if the given key code is for enter.\n *\n * @param code - the code of the key\n */\nexport function isEnterCode(code: string): boolean {\n return code === ENTER_CODE || code === NUMPAD_ENTER_CODE;\n}\n\n/**\n * Checks if the given key code is for space.\n *\n * @param code - the code of the key\n */\nexport function isSpaceCode(code: string): boolean {\n return code === SPACE_CODE;\n}\n\n/**\n * Checks if the given key code is for escape.\n *\n * @param code - the code of the key\n */\nexport function isEscapeCode(code: string): boolean {\n return code === ESCAPE_CODE;\n}\n\n/**\n * Checks if the given key code is for home.\n *\n * @param code - the code of the key\n */\nexport function isHomeCode(code: string): boolean {\n return code === HOME_CODE;\n}\n\n/**\n * Checks if the given key code is for backspace.\n *\n * @param code - the code of the key\n */\nexport function isBackspaceCode(code: string): boolean {\n return code === BACKSPACE_CODE;\n}\n\n/**\n * Returns if the node handles some keyboard input by default.\n */\nexport function nodeHandlesKeyboardInput(node: Node): boolean {\n return ['INPUT', 'TEXTAREA', 'SELECT'].includes(node.nodeName);\n}\n\n/**\n * Returns if the node handles some space or enter input by default.\n */\nexport function nodeHandlesSpaceOrEnterInput(node: Node): boolean {\n return ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'VIDEO', 'SELECT'].includes(node.nodeName);\n}\n\n// endregion\n\n// region Trap Focus Listener\n\n/**\n * Creates a key listener to only tab between elements that live within the given DOM scope, which will be destroyed when the passed context is destroyed.\n *\n * @param scopeSelector - The CSS selector that scopes which elements can be focused.\n * @param escapeCallback - A callback method to call if the escape key is pressed.\n * @param treatArrowsAsTabEvents - Should the up/down arrow keys be treated as tab/shift+tab events?\n * @param oldListenerId - An optional listener ID to remove if we are creating a new one.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function addWeakTrapFocusListener(\n destroyable: any,\n { scopeSelector, escapeCallback, treatArrowsAsTabEvents, oldListenerId }: FocusSettings\n): string | undefined {\n if (isDestroyed(destroyable)) {\n return undefined;\n }\n\n const element = document.querySelector(scopeSelector);\n\n if (oldListenerId) {\n removeListener(oldListenerId);\n }\n\n return addWeakListener(destroyable, element ?? window, 'keydown', (event: KeyboardEvent) =>\n trapFocus(event, scopeSelector, escapeCallback, treatArrowsAsTabEvents)\n );\n}\n\n/**\n * First tab is set to TRUE until the second TAB key is pressed\n */\nlet isFirstTabPressInTrapFocusListener = true;\n\n/**\n * Removes the listener with the given ID.\n */\nexport function removeTrapFocusListener(listenerId: string): void {\n removeListener(listenerId);\n isFirstTabPressInTrapFocusListener = true;\n}\n\n/**\n * Ensures only the elements within the scopeSelector can be tabbed between.\n *\n * @param event - The keyboard event to evaluate.\n * @param scopeSelector - The CSS selector that scopes which elements can be accessed by the tab key.\n * @param escapeCallback - A callback method to call if the escape key is pressed.\n * @param treatArrowsAsTabEvents - Should the up/down arrow keys be treated as tab/shift+tab events?\n */\nfunction trapFocus(\n event: KeyboardEvent,\n scopeSelector: string,\n escapeCallback: () => any,\n treatArrowsAsTabEvents: boolean\n) {\n // window.event is available on Firefox from version 63, in previous versions it is not supported.\n // In other browsers and higher versions on Firefox the default window.event is taken and that's why for the Firefox versions where is not supported we need to pass the event.\n\n if (event.code === TAB_CODE) {\n changeElementInFocus(scopeSelector, event.shiftKey, event);\n return;\n }\n\n if (treatArrowsAsTabEvents && [ARROW_UP_CODE, ARROW_DOWN_CODE].includes(event.code)) {\n changeElementInFocus(scopeSelector, event.code === ARROW_UP_CODE, event);\n return;\n }\n\n if (event.code === ESCAPE_CODE && isFunction(escapeCallback)) {\n escapeCallback();\n }\n}\n\n/**\n * Check if element is visible or not (hidden from css)\n *\n * @public\n *\n * @param el - element that needs to be checked\n */\nexport function isVisible(el: Element): boolean {\n const { width, height } = el.getBoundingClientRect();\n\n return width !== 0 && height !== 0;\n}\n\n/**\n * Get all focusable elements from a specific container\n */\nexport function getFocusableElements(baseElement: Element): Element[] {\n return Array.from(baseElement.querySelectorAll('a, button, object, input, iframe, select, [tabindex]')).filter(\n (item) => item.getAttribute('tabindex') !== '-1' && isVisible(item)\n );\n}\n\n/**\n * Cycles through the tabbed elements and selects the next/previous one based on the keyboard event.\n *\n * @param {Object} focusSettings - The settings used to determine which element to focus.\n * @param {String} focusSettings.scopeSelector - The CSS selector that scopes which elements can be focused.\n * @param {String} focusSettings.shouldFocusPreviousElement - Determines the direction for the newly focused item (next or previous).\n *\n * @public\n */\nfunction changeElementInFocus(scopeSelector: string, shouldFocusPreviousElement: boolean, event: KeyboardEvent) {\n const { code } = event,\n baseElement = window.document.body.querySelector(scopeSelector),\n // Some of the elements might have tabindex=\"-1\" and we need to remove these from the list\n focusElements = getFocusableElements(baseElement as Element),\n currentIndex = Array.prototype.indexOf.call(focusElements, document.activeElement),\n elementCount = focusElements.length,\n lastElementIndex = elementCount - 1,\n listContainer = baseElement?.querySelector('ul, ol, [role=\"list\"]');\n\n let listItems;\n\n if (listContainer) {\n listItems = getFocusableElements(listContainer);\n }\n\n if (elementCount) {\n let newIndex = currentIndex + (shouldFocusPreviousElement ? -1 : 1);\n\n // Ensure the edge cases wrap back around to focus the correct element.\n if (shouldFocusPreviousElement) {\n if (currentIndex === 0) {\n newIndex = lastElementIndex;\n }\n } else if (currentIndex === lastElementIndex) {\n newIndex = 0;\n }\n\n // If TAB is pressed for the first time we need to focus the element with aria-selected=\"true\".\n if (isFirstTabPressInTrapFocusListener) {\n for (let i = 0; i < elementCount; i++) {\n if (focusElements[i].getAttribute('aria-selected') === 'true') {\n newIndex = i;\n break;\n }\n }\n\n if (focusElements[newIndex]) {\n if (\n focusElements[newIndex].getAttribute('aria-selected') === 'true' &&\n focusElements[newIndex] === document.activeElement\n ) {\n const step = newIndex + (shouldFocusPreviousElement ? -1 : 1);\n\n newIndex = newIndex === lastElementIndex ? 0 : step;\n }\n }\n }\n\n isFirstTabPressInTrapFocusListener = false;\n\n if (listItems && isArrowCode(code)) {\n const listItemsLastIndex = listItems.length - 1;\n\n if (isArrowDownCode(code) && listItems.indexOf(focusElements[currentIndex]) === listItemsLastIndex) {\n newIndex = focusElements.indexOf(listItems[0]);\n }\n\n if (isArrowUpCode(code)) {\n newIndex = currentIndex - 1;\n\n if (listItems.indexOf(focusElements[currentIndex]) === 0) {\n newIndex = focusElements.indexOf(listItems[listItemsLastIndex]);\n }\n }\n }\n\n if (focusElements[newIndex]) {\n (focusElements[newIndex] as HTMLInputElement).focus();\n }\n\n event.preventDefault();\n }\n}\n\n/**\n * Used for activating a focus trap -- typically used when tab indices are set to -1\n * initially, and the focus trap must be activated for elements to be tabbable.\n *\n * @param targetClass - contains the class for whichever section is controlled by the focus trap.\n * @param updateTrapFocusHandler - should update the trap focus property on the caller and schedule focus on first focusable element in target if needed.\n * @param getElementToFocus - gets the HTML Element to focus on after activating focus trap.\n */\nexport function activateFocusTrap(\n event: KeyboardEvent,\n target: HTMLElement,\n targetClass: string,\n updateTrapFocusHandler: (state: boolean) => void,\n getElementToFocus: () => HTMLElement | null\n): void {\n if (target.classList.contains(targetClass)) {\n event.preventDefault();\n event.stopPropagation();\n\n const { code } = event;\n\n if (isEnterOrSpaceCode(code)) {\n updateTrapFocusHandler(true);\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n schedule('afterRender', () => {\n const focusTarget = getElementToFocus();\n if (focusTarget) {\n const [firstElement] = getFocusableElements(focusTarget);\n (firstElement as HTMLElement)?.focus();\n }\n });\n } else if (isEscapeCode(code)) {\n updateTrapFocusHandler(false);\n }\n }\n}\n\n// endregion\n","/**\n * Utility module for general JS related code.\n * @module\n */\n\n/**\n * Returns true if the given variable is a function.\n *\n * @param functionToCheck - The variable to check is a function.\n *\n * @deprecated Use `typeof functionToCheck === 'function'` instead.\n */\nexport function isFunction(functionToCheck: () => any): boolean {\n return functionToCheck && typeof functionToCheck === 'function';\n}\n","/**\n * Utility helper module for browser related code.\n * @module\n */\n\nimport { Promise as EmberPromise } from 'rsvp';\n\n// region Cookies\n\n/**\n * Expire cookie based on the cookie name.\n *\n * @param name The name of the cookie that will be changed.\n */\nexport function expireCookie(name: string): void {\n const date = new Date();\n date.setTime(date.getTime() + -1 * 24 * 60 * 60 * 1000);\n\n document.cookie = `${name}=''; expires=${date.toUTCString()}; path=/`;\n}\n\n/**\n * Returns a single cookie value.\n *\n * @param cookieName The name of the cookie value to retrieve.\n */\nexport function getCookie(cookieName: string): string {\n return (document.cookie || '').split('; ').reduce((value, cookie) => {\n // Extract name and all values (since value may contain equals signs).\n const [name, ...cookieValue] = cookie.split('=');\n\n // Return cookie values if this is the anti-forgery token.\n return name === cookieName ? cookieValue.join('=') : value;\n }, '');\n}\n\n// endregion\n\n// region DOM Helpers\n\n/**\n * Add or remove specified class from the body element.\n *\n * @param className\n * @param add - When true, the class will be added, when false the class will be removed.\n */\nexport function toggleClassOnBody(className: string, add: boolean): void {\n toggleClassOnElement(document.body, className, add);\n}\n\n/**\n * Add or remove specified class from a specific element.\n *\n * @param element\n * @param className\n * @param add - When true, the class will be added, when false the class will be removed.\n */\nexport function toggleClassOnElement(element: HTMLElement, className: string, add: boolean): void {\n // Cannot use toggle with a forced value, because IE does not support forced value.\n element.classList[add ? 'add' : 'remove'](className);\n}\n\n// endregion\n\ninterface ScrollIntoViewIfNeededOptions {\n centerIfNeeded?: boolean;\n padding?: number;\n animate?: boolean;\n}\n\ntype Area = {\n left: number;\n top: number;\n width: number;\n height: number;\n right: number;\n bottom: number;\n translate(x: number, y: number): Area;\n relativeFromTo(lhs: HTMLElement, rhs: HTMLElement): Area;\n};\n\n/**\n * Scrolls an element into view if it is not in the current viewport.\n *\n * @note Taken from https://github.com/stipsan/scroll-into-view-if-needed . I did not want to just import it because I wanted to modify it a little.\n *\n * @param elem\n * @param [options={}]\n * @param finalElement - Used for stopping recursion.\n */\nexport function scrollIntoViewIfNeeded(\n elem: HTMLElement & {\n scrollIntoViewIfNeeded?: (centerIfNeeded?: boolean) => void;\n },\n options: ScrollIntoViewIfNeededOptions = {},\n finalElement?: HTMLElement\n): void {\n // Webkit has this implemented natively, so use that function it if it available.\n if (elem.scrollIntoViewIfNeeded) {\n elem.scrollIntoViewIfNeeded(options.centerIfNeeded);\n\n return;\n }\n\n const { centerIfNeeded, padding = 0, animate } = options;\n\n if (!elem) {\n throw new Error('Element is required in scrollIntoViewIfNeeded');\n }\n\n function withinBounds(value: number, min: number, max: number, extent: number): number {\n if (false === centerIfNeeded || (max <= value + extent && value <= min + extent)) {\n return Math.min(max, Math.max(min, value));\n }\n\n return (min + max) / 2;\n }\n\n function makeArea(left: number, top: number, width: number, height: number): Area {\n return {\n left,\n top,\n width,\n height,\n right: left + width,\n bottom: top + height,\n translate(x: number, y: number): Area {\n return makeArea(x + left, y + top, width, height);\n },\n relativeFromTo(lhs: HTMLElement, rhs: HTMLElement): Area {\n let newLeft = left,\n newTop = top;\n\n let tempLHS = lhs.offsetParent as HTMLElement,\n tempRHS = rhs.offsetParent as HTMLElement;\n\n if (tempLHS === tempRHS) {\n return area;\n }\n\n for (; tempLHS; tempLHS = tempLHS.offsetParent as HTMLElement) {\n newLeft += tempLHS.offsetLeft + tempLHS.clientLeft;\n newTop += tempLHS.offsetTop + tempLHS.clientTop;\n }\n\n for (; tempRHS; tempRHS = tempRHS.offsetParent as HTMLElement) {\n newLeft -= tempRHS.offsetLeft + tempRHS.clientLeft;\n newTop -= tempRHS.offsetTop + tempRHS.clientTop;\n }\n\n return makeArea(newLeft, newTop, width, height);\n }\n };\n }\n\n const { offsetLeft, offsetTop, offsetWidth, offsetHeight } = elem;\n\n let parent,\n area = makeArea(\n offsetLeft - padding,\n offsetTop - padding,\n offsetWidth + padding * 2,\n offsetHeight + padding * 2\n );\n\n while ((parent = elem.parentNode) instanceof HTMLElement && elem !== finalElement) {\n const clientLeft = parent.offsetLeft + parent.clientLeft;\n const clientTop = parent.offsetTop + parent.clientTop;\n\n // Make area relative to parent's client area.\n area = area.relativeFromTo(elem, parent).translate(-clientLeft, -clientTop);\n\n const scrollLeft = withinBounds(\n parent.scrollLeft,\n area.right - parent.clientWidth,\n area.left,\n parent.clientWidth\n );\n\n const scrollTop = withinBounds(\n parent.scrollTop,\n area.bottom - parent.clientHeight,\n area.top,\n parent.clientHeight\n );\n\n if (animate) {\n // TODO: Figure out how to animate things.\n // animate(parent, {\n // scrollLeft: scrollLeft,\n // scrollTop: scrollTop\n // }, options)\n } else {\n parent.scrollLeft = scrollLeft;\n parent.scrollTop = scrollTop;\n }\n\n // Determine actual scroll amount by reading back scroll properties.\n area = area.translate(clientLeft - parent.scrollLeft, clientTop - parent.scrollTop);\n elem = parent;\n }\n}\n\n/**\n * Loads script that gets immediately executed. Resolves once script has been loaded.\n */\nexport function loadScript(scriptUrl: string): Promise {\n return new EmberPromise((resolve, reject) => {\n const scriptEl = document.createElement('script');\n\n scriptEl.src = scriptUrl;\n\n scriptEl.onload = () => {\n // Remove script element from the body.\n scriptEl.parentNode?.removeChild(scriptEl);\n\n // Resolve promise.\n resolve();\n };\n\n scriptEl.onerror = reject;\n\n // Finally add the script to the body so that it can get loaded up.\n document.body.appendChild(scriptEl);\n });\n}\n\n/**\n * Determines if the browser is running on a mobile device.\n */\nexport function isMobileBrowser(): boolean {\n const userAgent = navigator.userAgent;\n\n /*\n iPad outputs same platform type as a macbook since iOS 13.\n Thus, we now have a secondary check where we confirm that it is MacIntel with multiple touch point since\n iPad is touchscreen whereas a macbook is not.\n https://stackoverflow.com/questions/58019463/how-to-detect-device-name-in-safari-on-ios-13-while-it-doesnt-show-the-correct/58064481#58064481\n */\n return (\n ((/ipad|iphone|ipod/i.test(userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\n (!('MSStream' in window) || !window.MSStream)) ||\n /android|webos|blackberry|iemobile|mpera mini/i.test(userAgent)\n );\n}\n","/**\n * Utility helper module for debugging.\n *\n * @module\n */\n\n/**\n * Logs an error indicating that the supplied context Object must implement the supplied member.\n *\n * @param context The Ember object (route, controller, component, etc) that should implement the abstract member.\n * @param memberName The name of the missing abstract member.\n *\n * @deprecated Please use TypeScript and make methods abstract instead.\n */\nexport function logMissingAbstractMember(context: { toString(): string }, memberName: string): void {\n console.error(`${context.toString()} must implement ${memberName}.`);\n}\n","/**\n * Ember related helpers.\n *\n * @module\n */\n\nimport { get } from '@ember/object';\n\n/**\n * Tests the passed Ember.Object to see if it has been destroyed, or is in the process of being destroyed.\n */\nexport function isDestroyed(object: unknown): boolean {\n return ['isDestroyed', 'isDestroying'].some((name) => get(object || [], name as keyof typeof object));\n}\n\n/**\n * Extracts properties from the passed object and returns their values in an array.\n */\nexport function getObjProperties(obj: T, ...names: K[]): T[K][] {\n return names.map((name) => get(obj, name) as T[K]);\n}\n\n/**\n * Takes a list of [ testCase, className ] pairs and returns a string of all classNames where the testCase passed.\n *\n * @param {Array<{testCase: boolean, String:className}>} classList - An array of testCase/className pairs.\n *\n * @returns {String}\n */\nexport function buildClassListString(classList: (boolean | string)[][]): string {\n const classes = classList.reduce((appliedClasses, [shouldAddClass, className]) => {\n if (shouldAddClass) {\n appliedClasses.push(className);\n }\n\n return appliedClasses;\n }, []);\n\n return classes.join(' ');\n}\n","import { registerDestructor } from '@ember/destroyable';\n\nconst listenerCache = 'appEventListeners';\n\ntype ListenerConfig = {\n id: string;\n element?: Node | Window | Document;\n event: string;\n fnEvent?: EventListener;\n eventOptions: AddEventListenerOptions;\n initialized: number;\n};\n\ndeclare global {\n interface Window {\n [listenerCache]: Record;\n }\n}\n\n/**\n * Returns unix timestamp in seconds. Don't care about the timezone here so this is ok.\n */\nfunction getTimestamp(): number {\n return Math.round(new Date().getTime() / 1000);\n}\n\n/**\n * Schedules garbage collection run.\n */\nfunction runGarbageCollection(): void {\n // Run GC in 20 seconds.\n setTimeout(() => {\n const callback = window.requestIdleCallback || window.requestAnimationFrame;\n\n callback(() => {\n const listeners = getEventListenersObject(),\n keys = Object.keys(listeners),\n count = keys.length,\n timestamp = getTimestamp();\n\n for (let i = 0; i < count; i++) {\n const { id, element, initialized } = listeners[keys[i]];\n\n // Do not check the listener if it was initialized less than 30 seconds ago.\n if (!initialized || timestamp < initialized + 30) {\n continue;\n }\n\n if (!element || element === window || element === document) {\n // Do nothing if the element is window or document, because we cannot collect those.\n continue;\n }\n\n // If the element is still in the DOM, it is all good.\n if (document.body.contains(element as Node)) {\n continue;\n }\n\n // We should garbage collect, remove listener.\n console.warn('Garbage collecting listener for element no longer in DOM', element);\n\n removeListener(id);\n }\n\n // Call yourself again.\n runGarbageCollection();\n });\n }, 20000);\n}\n\n/**\n * Gets event listeners object.\n */\nfunction getEventListenersObject(): Record {\n // Ensure that event listeners object is instantiated.\n if (!window[listenerCache]) {\n window[listenerCache] = {} as Record;\n\n // Initialize garbage collection in case we mess stuff up.\n runGarbageCollection();\n }\n\n return window[listenerCache];\n}\n\n/**\n * Returns a unique id for a new event.\n */\nfunction generateEventId(): string {\n const { crypto } = window,\n values = new Uint32Array(4);\n\n crypto.getRandomValues(values);\n\n const id = Array.from(values).join('-');\n\n // Sanity check to make sure that the id is ok.\n // Not including a stop clause, because the probability of us not getting it right on one or two tries is very low.\n if (getEventListenersObject()[id]) {\n return generateEventId();\n }\n\n return id;\n}\n\n/**\n * Adds new event listener to element with specified properties, that will be destroyed automatically when the passed context is destroyed.\n *\n * @param element\n * @param event - Event which should trigger function.\n * @param fn - Function to call when event triggers.\n * @param isOnce - Should the event be triggered at most once?\n * @param capture - Should capture method be used?\n * @param passive - Should the event be captured passively?\n *\n * @returns The id of the event so that it can be referenced for removal.\n */\nexport function addWeakListener(\n destroyable: any,\n element: Node | Window | Document,\n event: string,\n fn: EventListener,\n isOnce = false,\n capture = false,\n passive?: boolean\n): string {\n // Passive events should be captured passively, if possible.\n if (passive === undefined && ['scroll', 'touchmove', 'touchstart', 'touchend', 'resize'].includes(event)) {\n passive = true;\n }\n\n // Generate id for this listener.\n const id = generateEventId();\n\n // Create options for the event listener.\n const eventOptions: AddEventListenerOptions = {\n capture,\n passive\n };\n\n if (isOnce) {\n eventOptions.once = true;\n }\n\n // If the event should be handled only once, we need to alter the calling function a bit so that we can remove the even after it was called once.\n const fnEvent = isOnce\n ? (evt: Event) => {\n // Remove listener.\n removeListener(id);\n\n // Call original function.\n return fn(evt);\n }\n : fn;\n\n // Add listener to the element.\n element.addEventListener(event, fnEvent, eventOptions);\n\n // Add everything to the events cache.\n getEventListenersObject()[id] = {\n id,\n element,\n event,\n fnEvent,\n eventOptions,\n initialized: getTimestamp()\n };\n\n // Register destructor so listener is removed when context is destroyed.\n registerDestructor(destroyable, () => removeListener(id));\n\n return id;\n}\n\n/**\n * Removes event listener associated with the specified id.\n */\nexport function removeListener(id: string): void {\n let data = getEventListenersObject()[id];\n if (!data) {\n // Listener was probably already removed.\n return;\n }\n\n // Remove listener.\n data.element?.removeEventListener(data.event, data.fnEvent as EventListener, data.eventOptions);\n\n // Clean up.\n delete data.element;\n delete data.fnEvent;\n data = {} as ListenerConfig;\n\n delete getEventListenersObject()[id];\n}\n","/**\n * Utility helper module for HTML direction attribute related code.\n * @module\n */\n\n// region Constants\n\n/**\n * The attribute value used for indicating an RTL language.\n */\nexport const RTL_STRING = 'rtl';\n\n/**\n * The name of our custom event that is fired whenever the HTML element's \"dir\" attribute changes.\n */\nexport const DIR_CHANGED_EVENT_KEY = 'htmlDirChanged';\n\n// endregion\n\n// region DOM Helpers\n\n/**\n * Is the page displayed using a RTL language format?\n *\n * @note By default, we assume the browser is LTR, unless a dir='rtl' attribute exists on the HTML element.\n */\nexport function isRtl(): boolean {\n return document.documentElement.attributes.getNamedItem('dir')?.value === RTL_STRING;\n}\n\n// endregion\n\n// region Mutation Observer\n\n/**\n * Creates the mutation observer that watches for any changes to the HTML element's \"dir\" attribute.\n *\n * @note We start the observer immediately, even though nothing is subscribed to it yet.\n * This should be low impact in terms of performance.\n */\n(function createHtmlDirectionObserver(): void {\n const directionChangedEvent = document.createEvent('Event');\n\n directionChangedEvent.initEvent(DIR_CHANGED_EVENT_KEY, true, true);\n\n const directionObserver = new MutationObserver((mutations) => {\n if (mutations.some((mutation) => mutation.attributeName === 'dir')) {\n document.dispatchEvent(directionChangedEvent);\n }\n });\n\n directionObserver.observe(document.documentElement, { attributes: true });\n})();\n\n// endregion\n","import { isNone } from '@ember/utils';\nimport { assert } from '@ember/debug';\nimport config from 'ember-get-config';\n\nimport type { TOptions } from 'ember-intl/services/intl';\nimport type Component from '@glimmer/component';\nimport type EmberObject from '@ember/object';\nimport type ADCIntlService from '../services/adc-intl';\n\n/** @module GetTranslation */\n\n/**\n * Regex for extracting the module, path, and type from the custom `getIntlPath()` context method.\n *\n * @private\n * @ignore\n */\nconst CUSTOM_TRANSLATION_CONTEXT_REGEX = new RegExp(\n '^<([^:]+)\\\\@(component|controller|route|model|service){1}:([^:]+)(::)'\n);\n\n/**\n * Regex for extracting the path and type from a concrete context object.\n *\n * @private\n * @ignore\n */\nconst TRANSLATION_CONTEXT_REGEX = new RegExp('^<(?:[^:]+)\\\\@(component|controller|route|model|service){1}:([^:]+)(::)');\n\n/**\n * Regex for extracting the path and type from a generated context object.\n *\n * @private\n * @ignore\n */\nconst GENERATED_CONTEXT_REGEX = new RegExp('^\\\\(generated ([^\\\\s]+) ([^\\\\s]+)\\\\)$');\n\n/**\n * These types need to have their type prefixed in the path for translation when using them as context.\n *\n * @private\n * @ignore\n */\nconst TYPES_WITH_PREFIX = ['component', 'model', 'service'];\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type IntlContext = Component | Component<{ Args: { Named: {}; Positional: [] } }> | EmberObject;\n\nexport interface IntlTextOptions extends TOptions {\n links?: string[];\n}\n\ntype IntlPathInfo = {\n path: string[];\n type: string;\n module?: string;\n};\n\n/**\n * Tries to extract the module, path, and type from the context, using known patterns to match against, returning null if unable to extract.\n *\n * @private\n */\nfunction getCustomPath(context: IntlContext): IntlPathInfo | null {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const text = context.getIntlPath?.();\n if (!text) {\n return null;\n }\n\n const concreteMatch = text.match(CUSTOM_TRANSLATION_CONTEXT_REGEX);\n if (!concreteMatch) {\n return null;\n }\n\n const module = concreteMatch[1];\n\n // Return match.\n return {\n module: module !== config.modulePrefix ? module : undefined,\n path: concreteMatch[3].split('/'),\n type: concreteMatch[2]\n };\n}\n\n/**\n * Tries to extract the path and type from the context, using known patterns to match against, returning null if unable to extract.\n *\n * @private\n */\nfunction getStandardPath(context: IntlContext): IntlPathInfo | null {\n // Match against both patterns.\n const text = context.toString?.();\n if (!text) {\n return null;\n }\n\n const concreteMatch = text.match(TRANSLATION_CONTEXT_REGEX),\n generatedMatch = text.match(GENERATED_CONTEXT_REGEX),\n fnCreateResponse = (path: string, type: string) => ({\n path: path.split('/'),\n type\n });\n\n // Is there a concrete match?\n if (concreteMatch) {\n // Return match.\n return fnCreateResponse(concreteMatch[2], concreteMatch[1]);\n }\n\n // Is there a generated match?\n if (generatedMatch) {\n // Return match.\n return fnCreateResponse(generatedMatch[1], generatedMatch[2]);\n }\n\n // No match found 😞.\n return null;\n}\n\n/**\n * Returns dot delimited translation path for Ember class.\n *\n * @private\n */\nfunction getTranslationPathFromContext(context?: IntlContext): string {\n // Was no context supplied?\n if (!context) {\n return '';\n }\n\n // Can we NOT determine the context path and type?\n const contextPath = getCustomPath(context) ?? getStandardPath(context),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n value = context.getIntlPath?.() ?? context.toString?.() ?? '';\n\n assert(\n `[@adc/i18n] The returned i18n context path of the object passed to the intl service tc method (or template helper) does not return a usable value: \"${value}\"`,\n contextPath\n );\n\n const { path, type, module } = contextPath;\n\n // If this is a type that need to be prefixed, add the prefix to the path.\n if (TYPES_WITH_PREFIX.includes(type)) {\n path.unshift(`${type}s`);\n }\n\n // Is there a custom module?\n if (module) {\n // Add custom module to beginning of path.\n path.unshift(module);\n }\n\n // Add element (to get trailing dot).\n path.push('');\n\n // Join and return.\n return path.join('.');\n}\n\n/**\n * Gets the translation key and replacement tokens for the arguments passed into the function.\n *\n * @private\n */\nfunction getTranslationKeyAndTokens(\n contextOrKey: IntlContext | string,\n keyOrReplaceTokens?: string | IntlTextOptions,\n replaceTokensOnly?: IntlTextOptions\n): {\n key: string;\n replaceTokens?: IntlTextOptions;\n} {\n const hasContext = typeof contextOrKey !== 'string',\n context = hasContext ? (contextOrKey as IntlContext) : undefined;\n\n assert(\n '[@adc/i18n] No context was passed to the intl service tc method (or template helper)',\n !hasContext || context\n );\n\n const key = (hasContext ? keyOrReplaceTokens : contextOrKey) as string,\n replaceTokens = (hasContext ? replaceTokensOnly : keyOrReplaceTokens) as IntlTextOptions | undefined;\n\n assert('[@adc/i18n] The passed translation key was empty', key);\n\n return {\n key: `${getTranslationPathFromContext(context)}${key}`,\n replaceTokens\n };\n}\n\n/**\n * Returns the translated string for the context, translation key and replace tokens\n *\n * @example\n * import getTranslation from '@adc/i18n/utils/get-translation';\n *\n * getTranslation(intl, 'home.locks.accessTime', {\n * dateTime: '12:54 PM'\n * }); // \"at 12:54 PM\"\n *\n * @example\n * // If calling this from the home/locks route:\n * import getTranslation from '@adc/i18n/utils/get-translation';\n *\n * getTranslation(this, 'accessTime', {\n * dateTime: '12:54 PM'\n * }); // \"at 12:54 PM\"\n */\nexport default function getTranslation(\n intl: ADCIntlService,\n contextOrKey: IntlContext | string,\n keyOrReplaceTokens?: string | IntlTextOptions,\n replaceTokensOnly?: IntlTextOptions\n): string {\n // Get the full translation key and correct replaceTokens.\n const { key, replaceTokens = {} } = getTranslationKeyAndTokens(contextOrKey, keyOrReplaceTokens, replaceTokensOnly);\n\n // Get translation.\n let text = intl.lookup(key);\n\n const optionKeys = Object.keys(replaceTokens);\n\n // Were replacement tokens passed?\n if (text && optionKeys.length) {\n const options: Record = { ...replaceTokens };\n optionKeys.forEach((k) => {\n if (!['links', 'default', 'htmlSafe', 'locale'].includes(k)) {\n const v = options[k];\n options[k] = String(isNone(v) ? '' : v);\n }\n });\n\n // Replace tokens.\n text = intl.formatMessage(text, options);\n }\n\n return text as string;\n}\n","import type ADCIntlService from '../services/adc-intl.ts';\n\n/** @module dates */\n\ntype DateFormattingOptions = Intl.DateTimeFormatOptions & { format?: string };\n\n/**\n * Adds the global time zone (if defined) to the passed formatting options, if time zone is not already present.\n *\n * @private\n */\nfunction getFormattingOptions(options: DateFormattingOptions = {}, timeZone = ''): DateFormattingOptions {\n // Is there a global timezone AND NO passed timezone?\n if (timeZone && !options.timeZone) {\n // Add global timezone.\n return {\n timeZone,\n ...options\n };\n }\n\n return options;\n}\n\n/**\n * Formats a date, using the optional global timezone if no timezone was supplied in the options.\n */\nexport function formatDateTz(\n intl: ADCIntlService,\n value: Parameters[0],\n options: DateFormattingOptions\n): ReturnType {\n return intl.formatDate(value, getFormattingOptions(options, intl.timeZone));\n}\n\n/**\n * Formats a date, using the optional global timezone if no timezone was supplied in the options.\n */\nexport function formatTimeTz(\n intl: ADCIntlService,\n value: Parameters[0],\n options: DateFormattingOptions\n): ReturnType {\n return intl.formatTime(value, getFormattingOptions(options, intl.timeZone));\n}\n\n/**\n * Checks if the two dates are the same day in the timezone set for @see ADCIntlService\n * @param intl\n * @param date1\n * @param date2\n * @returns True if the two dates are on the same day; otherwise, false\n */\nexport function isSameDayTz(\n intl: ADCIntlService,\n date1: Parameters[0],\n date2: Parameters[0]\n): boolean {\n // using the ADCIntlService, we can determine if the days match\n // for the current user's\n return computeDayKeyTz(intl, date1) === computeDayKeyTz(intl, date2);\n}\n\n/**\n * Converts a date to a key that can be used to match another date\n * in the timezone set for @see ADCIntlService\n * @param intl\n * @param date\n * @returns\n */\nfunction computeDayKeyTz(\n intl: ADCIntlService,\n date: Parameters[0]\n): ReturnType {\n // only need day, month, and year; time doesn't matter for this key\n return formatDateTz(intl, date, {\n month: 'short',\n day: 'numeric',\n year: 'numeric'\n });\n}\n","import IntlService from 'ember-intl/services/intl';\nimport { tracked } from '@glimmer/tracking';\nimport getTranslation from '../utils/get-translation.ts';\nimport { formatDateTz, formatTimeTz, isSameDayTz } from '../utils/dates.ts';\nimport { IntlErrorCode } from '@formatjs/intl';\n\nimport type { IntlContext } from '../utils/get-translation';\n\ntype BaseArgs = Parameters;\n\nexport default class ADCIntlService extends IntlService {\n /**\n * Shortcut for settings locale, translations, and timezone.\n */\n initialize(locale: BaseArgs[0], translations?: BaseArgs[1], timeZone?: string): void {\n this.setLocale(locale);\n\n if (translations) {\n this.addTranslations(locale, translations);\n }\n\n if (timeZone) {\n this.timeZone = timeZone;\n }\n }\n\n /**\n * An optional global timezone.\n */\n @tracked timeZone = '';\n\n /** @override */\n onIntlError(error: Error & { code: string }): void {\n // We ignore MISSING_DATA due to lack of support for eu-es & is-is in Chromium browsers\n // We ignore MISSING_TRANSLATION to maintain functionality with the original service method as it is handled elsewhere\n if (error.code === IntlErrorCode.MISSING_DATA || error.code === IntlErrorCode.MISSING_TRANSLATION) {\n return;\n }\n\n throw error;\n }\n\n /**\n * Formats a date/time, using the optional global timezone if no timezone was supplied in the options.\n */\n formatDateTz(\n value: Parameters[1],\n options: Parameters[2]\n ): ReturnType {\n return formatDateTz(this, value, options);\n }\n\n /**\n * Formats a date/time, using the optional global timezone if no timezone was supplied in the options.\n */\n formatTimeTz(\n value: Parameters[1],\n options: Parameters[2]\n ): ReturnType {\n return formatTimeTz(this, value, options);\n }\n\n /**\n * Returns the translation at the key value, relative to the passed context.\n *\n * @example\n * // en-US.yml\n * components:\n * \"my-component\":\n * successMessage: \"It worked!\"\n * confirmDelete: \"Are you sure you want to delete \\\"{item}\\\"?\"\n *\n * // components/my-component/component.js\n * this.intl.tc(this, 'successMessage');\n *\n * this.intl.tc(this, 'confirmDelete', {\n * item: 'My Item'\n * });\n */\n tc(\n context: IntlContext,\n key: string,\n options?: Parameters[3]\n ): ReturnType {\n return getTranslation(this, context, key, options);\n }\n\n /**\n * Checks if the two dates are the same day in the timezone set for this service\n * @param date1\n * @param date2\n * @returns True if the two dates are on the same day in the timezone set for this service; otherwise, false\n */\n isSameDay(date1: Parameters[1], date2: Parameters[2]): boolean {\n return isSameDayTz(this, date1, date2);\n }\n\n /**\n * Checks if the date is tomorrow in the timezone set for this service\n * @param date The date that you want to check is tomorrow\n * @returns True if the date is tomorrow in the timezone set for this service, otherwise, false\n */\n isTomorrow(date: Parameters[1]): boolean {\n const today = new Date(),\n oneDayAhead = today.setDate(today.getDate() + 1);\n return isSameDayTz(this, date, oneDayAhead);\n }\n\n /**\n * Checks if the date is today in the timezone set for this service\n * @param date The date that you want to check is today\n * @returns True if the date is today in the timezone set for this service, otherwise, false\n */\n isToday(date: Parameters[1]): boolean {\n return isSameDayTz(this, date, new Date());\n }\n\n /**\n * Checks if the date is today in the timezone set for this service\n * @param date The date that you want to check is yesterday\n * @returns True if the date is yesterday in the timezone set for this service, otherwise, false\n */\n isYesterday(date: Parameters[1]): boolean {\n const today = new Date(),\n oneDayBehind = today.setDate(today.getDate() - 1);\n return isSameDayTz(this, date, oneDayBehind);\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your services.\ndeclare module '@ember/service' {\n interface Registry {\n 'adc-intl': ADCIntlService;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n {{#if @title}}{{@title}}{{/if}}\\n {{#if @desc}}{{@desc}}{{/if}}\\n {{! Safari does not render the defs from an svg file when using a tag so we have to copy it here at the root}}\\n {{#if this.hasSvgDefs}}\\n \\n {{/if}}\\n {{! NOTE: Safari still does not support the new href attribute so xlink is required }}\\n \\n\")","import { action, computed } from '@ember/object';\nimport { isEmpty, isNone } from '@ember/utils';\nimport Component from '@glimmer/component';\nimport { getSpriteSelector } from './svg-sprite-loader.ts';\nimport config from 'ember-get-config';\n\nimport '../styles/svg.css';\n\nexport interface SvgSymbolSignature {\n Element: SVGElement;\n Args: {\n /** The name of the icon to render (minus the \"icn-\" prefix). */\n icon: string;\n /** An optional title for the icon, rendered in a `` element. */\n title?: string;\n /** An optional description for the icon, rendered in a `<desc />` element. */\n desc?: string;\n /** Indicates whether the icon can receive focus (this is likely a mistake). */\n isFocusable?: boolean;\n /** Indicates the icon should be hidden from screen readers (defaults to `true` unless `title` or `description` are passed). */\n isHiddenForAccessibility?: boolean;\n /** An optional icon fill color (defaults to gray-80). */\n fillColor?:\n | 'red'\n | 'orange'\n | 'yellow'\n | 'lime'\n | 'green'\n | 'greenblue'\n | 'greencyan'\n | 'cyanblue'\n | 'blue'\n | 'navy'\n | 'purple'\n | 'pink'\n | 'gray-100'\n | 'gray-80'\n | 'gray-60'\n | 'gray-40'\n | 'gray-20'\n | 'gray-10'\n | 'gray-0';\n /** An optional path to the icon SVG sprite (unlikely to be used). */\n path?: string;\n /**\n * Please don't make SVG element clickable, use a button instead.\n * @deprecated\n */\n 'on-click'?: () => void;\n };\n}\n\n/**\n * @classdesc\n * A simple component for showing SVG symbols from global SVG sprites.\n */\nexport default class SvgSymbol extends Component<SvgSymbolSignature> {\n /**\n * Called when the user clicks the SVG.\n */\n get clickHandler(): () => void {\n return this.args['on-click'] ?? (() => {});\n }\n\n /**\n * The path to the SVG sprite as indicated in the application configuration. If path is not present in application configuration\n * it will be assumed that the sprite will be present in the application DOM.\n */\n @computed('args.path')\n get iconPath(): string {\n const { path } = this.args;\n\n if (path) {\n return path;\n }\n\n if (config) {\n return (config as { 'adc-svg-system'?: { path?: string } })['adc-svg-system']?.path ?? '';\n }\n\n return '';\n }\n\n /**\n * The aria-label of the icon, if has one.\n */\n @computed('args.{title,desc}')\n get ariaLabel(): string | undefined {\n const labelText = [this.args.title, this.args.desc].filter((el) => !!el).join(' ');\n return isEmpty(labelText) ? undefined : labelText;\n }\n\n /**\n * Indicate the svg icon should have aria-hidden equal to true.\n */\n @computed('ariaLabel', 'args.isHiddenForAccessibility')\n get hideForAccessibility(): string | undefined {\n return this.args.isHiddenForAccessibility || isEmpty(this.ariaLabel) ? 'true' : undefined;\n }\n\n /**\n * Indicates the icon is interactive.\n */\n @computed('hideForAccessibility', 'args.{isFocusable,on-click}')\n get isInteractive(): boolean {\n const { args } = this;\n return !isEmpty(args['on-click']) || (!!args.isFocusable && isNone(this.hideForAccessibility));\n }\n\n /**\n * A computed CSS class based on icon name and color.\n */\n @computed('args.{icon,fillColor}')\n get iconCss(): string {\n const { icon, fillColor = 'gray-80' } = this.args;\n return [`svg-${icon}`, `adc-${fillColor}-fill`].join(' ');\n }\n\n /**\n * Fix to support safari svg sprite icons.\n * When we use svg icons with a <def> tag they do not render in\n * safari or ios webviews when used with a <use> tag. This method\n * copies the content inside <symbol><defs></defs></symbol> onto\n * the root of the <svg> so that safari can render it properly.\n * @param element The <def> element\n */\n @action\n loadSvgDefs(element: SVGDefsElement): void {\n const { icon } = this.args;\n if (icon) {\n const defsElement = document.querySelector(`svg[id=${getSpriteSelector}] > symbol#icn-${icon} > defs`);\n if (defsElement) {\n element?.replaceWith(defsElement.cloneNode(true));\n }\n }\n }\n\n @computed('args.icon')\n get hasSvgDefs(): boolean {\n // try catch is necessary if query selector doesn't exist in the DOM such as when running the unit tests. Selector should exist in the customer site.\n try {\n const icon = this.args.icon;\n if (icon) {\n const defsElement = document.querySelector(`svg[id=${getSpriteSelector}] > symbol#icn-${icon} > defs`);\n return !!defsElement;\n }\n } catch (_) {\n // do nothing\n }\n return false;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * A simple component for showing SVG symbols from global SVG sprites.\n */\n SvgSymbol: typeof SvgSymbol;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!template-lint-disable no-inline-styles}}\\n<div\\n style=\\\"display:none;\\\"\\n {{did-insert this.loadSprites.perform}}\\n {{did-update this.loadSprites.perform @spriteRootPath}}\\n {{did-update this.loadSprites.perform @spritePaths}}\\n ...attributes\\n>\\n {{#each this.spriteMarkup as |sprite|}}\\n {{sprite}}\\n {{/each}}\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { assert } from '@ember/debug';\nimport { task } from 'ember-concurrency';\nimport { htmlSafe } from '@ember/template';\n\nimport type { Task } from 'ember-concurrency';\n\n/**\n * A helper function for getting a CSS selector for the card that represents the given card Id.\n */\nexport const getSpriteSelector = 'svg-sprite-id';\n\nexport interface SvgSpriteLoaderSignature {\n Element: HTMLDivElement;\n Args: {\n /** The path the server folder that hosts that sprites. */\n spriteRootPath: string;\n /** The collection of sprites to load. */\n spritePaths?: string[];\n };\n}\n\n/**\n * @classdesc\n * A component for requesting and rendering a collection of SVG sprites.\n */\nexport default class SvgSpriteLoader extends Component<SvgSpriteLoaderSignature> {\n /**\n * The retrieved sprite markup.\n */\n @tracked spriteMarkup: ReturnType<typeof htmlSafe>[] = [];\n\n /**\n * Requests required SVG sprites during initialization.\n */\n loadSprites: Task<void, never> = task({ drop: true }, async () => {\n // Initialize SVG sprite collection.\n const { spriteRootPath, spritePaths } = this.args;\n\n assert('[@adc/svg-system] The spriteRootPath must be specified.', spriteRootPath);\n\n // Are there any sprite paths.\n if (spritePaths?.length) {\n // Request all sprites.\n const spritesData: string[] = await Promise.all(\n spritePaths.map(async (name) => {\n const spriteUrl = `${spriteRootPath}/${name}.xml`;\n\n try {\n const response = await window.fetch(spriteUrl, {\n headers: {\n 'Content-Type': 'xml',\n Accept: 'text/xml'\n },\n cache: 'force-cache'\n }),\n text = await response.text();\n\n // filter out the undefined data and strip the xml tags.\n return (text?.replace(/<\\?xml[\\s\\S]*?\\?>/, '') ?? '').replace(\n /{{svg-sprites-id}}/,\n getSpriteSelector\n );\n } catch (err: any) {\n console.error(`Error fetching SVG sprite from ${spriteUrl}. ${err.code} - ${err.message}`);\n return '';\n }\n })\n );\n this.spriteMarkup = spritesData.filter((d) => !!d).map((d) => htmlSafe(d));\n }\n });\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * A component for requesting and rendering a collection of SVG sprites.\n */\n SvgSpriteLoader: typeof SvgSpriteLoader;\n }\n}\n","import { guidFor } from '@ember/object/internals';\n\nexport default function guidForFn(context: any): string {\n return guidFor(context);\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns a unique ID for tied to the passed instance.\n *\n * @example <dd>{{guid-for this}}</dd>\n */\n 'guid-for': typeof guidForFn;\n }\n}\n","import Modifier from 'ember-modifier';\nimport { registerDestructor } from '@ember/destroyable';\nimport { debounce as runloopDebounce, cancel } from '@ember/runloop';\n\nimport type { EmberRunTimer } from '@ember/runloop/types';\nimport type { ArgsFor } from 'ember-modifier';\n\ntype DOMElement = Element | SVGElement;\n\ntype Handler = (el: Element, observer: ResizeObserver) => void;\n\ntype Options = {\n box: 'content-box' | 'device-pixel-content-box' | 'border-box';\n};\n\ninterface DidResizeModifierSignature {\n Element: DOMElement;\n Args: {\n Positional: [Handler];\n Named: {\n debounce?: number;\n options?: Options;\n };\n };\n}\n\nexport default class DidResizeModifier extends Modifier<DidResizeModifierSignature> {\n // Public API\n declare domElement?: DOMElement;\n declare handler: Handler;\n declare options: Options;\n debounce = 0;\n debounceId?: EmberRunTimer;\n\n // Private API\n declare static observer: ResizeObserver;\n declare static handlers: WeakMap<DOMElement, Handler>;\n\n constructor(owner: any, args: ArgsFor<DidResizeModifierSignature>) {\n super(owner, args);\n\n if (!('ResizeObserver' in window)) {\n return;\n }\n\n if (!DidResizeModifier.observer) {\n DidResizeModifier.handlers = new WeakMap<DOMElement, Handler>();\n DidResizeModifier.observer = new ResizeObserver(\n (entries, observer) => {\n window.requestAnimationFrame(() => {\n for (const entry of entries) {\n const handler = DidResizeModifier.handlers.get(\n entry.target\n );\n handler?.(entry.target, observer);\n }\n });\n }\n );\n }\n\n registerDestructor(this, unobserve);\n }\n\n modify(\n element: DOMElement,\n [handler, options]: [Handler, Options?],\n { debounce }: { debounce?: number }\n ) {\n unobserve(this);\n this.domElement = element;\n this.debounce = debounce ?? 0;\n\n // Save arguments for when we need them.\n this.handler = handler;\n this.options = options ?? this.options;\n\n this.observe(element);\n }\n\n observe(element: DOMElement) {\n if (DidResizeModifier.observer) {\n this.addHandler(element);\n DidResizeModifier.observer.observe(element, this.options);\n }\n }\n\n addHandler(element: DOMElement) {\n DidResizeModifier.handlers.set(\n element,\n (el: Element, observer: ResizeObserver) => {\n if (this.debounce !== 0) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n this.debounceId = runloopDebounce(\n element,\n this.handler,\n el,\n observer,\n this.debounce\n );\n } else {\n this.handler(el, observer);\n }\n }\n );\n }\n\n removeHandler(element: DOMElement) {\n DidResizeModifier.handlers.delete(element);\n }\n}\n\n/**\n *\n * @param {DidResizeModifier} instance\n */\nfunction unobserve(instance: DidResizeModifier) {\n if (instance.domElement && DidResizeModifier.observer) {\n if (instance.debounceId) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n cancel(instance.debounceId);\n }\n DidResizeModifier.observer.unobserve(instance.domElement);\n instance.removeHandler(instance.domElement);\n delete instance.domElement;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Calls the passed function whenever the modified element is resized, using debounce if a debounce period is supplied.\n * @note Uses a global instance of ResizeObserver.\n *\n * @example {{did-resize this.onResizeFunction}}\n */\n 'did-resize': typeof DidResizeModifier;\n }\n}\n","export default function coalesce(...args: any[]): any | undefined {\n return args.reduce((value, p) => value || p, undefined);\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Returns the first \"truthy\" value.\n *\n * @example <p>{{coalesce @text (t 'text')}}</p>\n */\n coalesce: typeof coalesce;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (is-pending @promise)}}\\n <div class=\\\"async-loader {{if (has-block \\'skeleton-loading\\') \\'skeleton\\'}}\\\" ...attributes>\\n {{#if (has-block \\\"skeleton-loading\\\")}}\\n {{yield to=\\\"skeleton-loading\\\"}}\\n {{else}}\\n <SpinnerSvg @size={{coalesce @spinnerSize \\\"small\\\"}} @spinning={{true}} />\\n {{#if @showText}}\\n <p>{{t \\\"@adc/ui-components.loading\\\"}}</p>\\n {{/if}}\\n {{/if}}\\n </div>\\n{{else}}\\n {{yield (await @promise)}}\\n{{/if}}\")","import Component from '@glimmer/component';\n\nimport type { SpinnerSvgSignature } from './spinner-svg.ts';\n\nexport interface AsyncLoaderSignature<T> {\n Element: HTMLDivElement;\n Args: {\n /** The promise to resolve. */\n promise: Promise<T> | T;\n /** The spinner size to show (defaults to \"small\"). */\n spinnerSize?: SpinnerSvgSignature['Args']['size'];\n /** Indicates whether to show \"Loading...\" text with the spinner. */\n showText?: boolean;\n };\n Blocks: {\n default: [T];\n 'skeleton-loading': [];\n };\n}\n\n// eslint-disable-next-line ember/no-empty-glimmer-component-classes\nexport default class AsyncLoader<T> extends Component<AsyncLoaderSignature<T>> {}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div ...attributes>\\n <svg\\n class=\\\"svg-{{@icon}} btn-async-icon {{@iconCss}}\\\"\\n role=\\\"img\\\"\\n viewBox=\\\"0 0 24 24\\\"\\n xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n >\\n <title>{{coalesce @title (t (concat \\\"@adc/ui-components.\\\" @icon))}}\\n \\n \\n\")","import Component from '@glimmer/component';\n\nimport type { SafeString } from 'handlebars';\n\nexport interface AsyncButtonIconSignature {\n Element: HTMLDivElement;\n Args: {\n /** Whether to show \"success\" or \"warning\" (all other values ignored). */\n icon: 'success' | 'warning' | string;\n /** Optional CSS class for the SVG element. */\n iconCss?: string;\n /** Optional title rendered into the SVG `` element. */\n title?: string | SafeString;\n };\n}\n\n/**\n * @classdesc\n * A component to provide hardcoded svg icons for button-adc.\n */\nexport default class AsyncButtonIcon extends Component<AsyncButtonIconSignature> {\n get d(): string {\n const { icon } = this.args;\n if (icon === 'success') {\n return 'M19.776 5L8.84 15.935l-5.426-5.424L2 11.925l6.84 6.84.707-.709.707-.705L21.19 6.413z';\n }\n\n if (icon === 'warning') {\n return 'M11 15h2V5h-2v10zm0 4h2v-2h-2v2zm1-17C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2z';\n }\n\n return '';\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @icon}}\\n <Button::Icon\\n class=\\\"is-async {{this.asyncType}}\\\"\\n @icon={{@icon}}\\n @iconOnly={{@iconOnly}}\\n @text={{@text}}\\n @responsiveText={{@responsiveText}}\\n @type={{@type}}\\n @buttonColor={{@buttonColor}}\\n @buttonStyle={{@buttonStyle}}\\n @buttonAction={{this.executeButtonAction.perform}}\\n aria-describedby=\\\"aria_name_{{guid-for this}}\\\"\\n ...attributes\\n {{did-update (fn (coalesce @updateAsyncState (noop)) this.asyncState)}}\\n >\\n {{yield}}\\n\\n {{#if this.isPending}}\\n <SpinnerSvg @spinning={{true}} />\\n {{else if this.isFinished}}\\n <Button::AsyncButtonIcon @icon={{this.asyncType}} class=\\\"async-indicator\\\" />\\n {{/if}}\\n\\n {{! Add span for accessibility title for async buttons }}\\n <span id=\\\"aria_name_{{guid-for this}}\\\" aria-live=\\\"polite\\\" aria-label={{this.ariaLabel}} />\\n </Button::Icon>\\n{{else}}\\n <Button::Simple\\n class=\\\"is-async {{this.asyncType}}\\\"\\n @responsiveText={{@responsiveText}}\\n @type={{@type}}\\n @buttonColor={{@buttonColor}}\\n @buttonStyle={{this.simpleButtonStyle}}\\n @buttonAction={{this.executeButtonAction.perform}}\\n aria-describedby=\\\"aria_name_{{guid-for this}}\\\"\\n ...attributes\\n {{did-update (fn (coalesce @updateAsyncState (noop)) this.asyncState)}}\\n >\\n <span class=\\\"btn-contents\\\">\\n {{#if @text}}\\n {{~@text~}}\\n {{else}}\\n {{~yield~}}\\n {{/if}}\\n </span>\\n\\n {{#if this.isPending}}\\n <SpinnerSvg @spinning={{true}} />\\n {{else if this.isFinished}}\\n <Button::AsyncButtonIcon @icon={{this.asyncType}} class=\\\"async-indicator\\\" />\\n {{/if}}\\n\\n {{! Add span for accessibility title for async buttons }}\\n <span id=\\\"aria_name_{{guid-for this}}\\\" aria-live=\\\"polite\\\" aria-label={{this.ariaLabel}} />\\n </Button::Simple>\\n{{/if}}\")","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { equal } from '@ember/object/computed';\nimport { timeout, task } from 'ember-concurrency';\nimport { getSimpleButtonStyle } from './simple.ts';\nimport { computed } from '@ember/object';\n\nimport type { ButtonSimpleSignature } from './simple';\nimport type { ButtonIconSignature } from './icon';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { Task } from 'ember-concurrency';\n\nexport enum EnumAsyncState {\n idle,\n pending,\n success,\n failure\n}\n\ninterface ButtonAsyncCommonArgs {\n /** A required function called when the button is clicked. If a promise is returned this button will show the status of that button (rejects or success). */\n buttonAction: (buttonAnimation?: Promise<boolean>, e?: MouseEvent) => Promise<any> | any;\n /** Indicates the `buttonAnimation` promise should be resolved immediately instead of waiting (700ms for success, 3000ms for failure). */\n noDelay?: boolean;\n /** Hack used for native buttons, please don't use this. */\n updateAsyncState?: (value: EnumAsyncState) => void;\n}\n\nexport type ButtonAsyncSignature =\n | (Omit<ButtonSimpleSignature, 'Args'> & {\n Args: ButtonAsyncCommonArgs &\n Pick<\n ButtonSimpleSignature['Args'],\n 'text' | 'responsiveText' | 'buttonColor' | 'type' | 'buttonStyle'\n > & {\n icon?: undefined;\n iconOnly?: undefined;\n };\n })\n | (Omit<ButtonIconSignature, 'Args'> & {\n Args: ButtonAsyncCommonArgs &\n Pick<\n ButtonIconSignature['Args'],\n 'icon' | 'iconOnly' | 'text' | 'responsiveText' | 'buttonColor' | 'type' | 'buttonStyle'\n >;\n });\n\n/**\n * A button (icon or simple) that displays async state from promise.\n */\nexport default class ButtonAsync extends Component<ButtonAsyncSignature> {\n @service declare intl: ADCIntlService;\n\n get simpleButtonStyle(): ReturnType<typeof getSimpleButtonStyle> {\n return getSimpleButtonStyle(this.args.buttonStyle);\n }\n /**\n * The current async promise state.\n */\n @tracked asyncState = EnumAsyncState.idle;\n\n /**\n * Indicates the async promise is currently pending.\n */\n @equal('asyncState', EnumAsyncState.pending)\n declare isPending: boolean;\n\n /**\n * Indicates the async promise has completed (success or failure).\n */\n get isFinished(): boolean {\n const { asyncState } = this;\n return asyncState === EnumAsyncState.success || asyncState === EnumAsyncState.failure;\n }\n\n @computed('isPending', 'isFinished', 'asyncType')\n get ariaLabel(): string {\n return this.isPending\n ? this.intl.t('@adc/ui-components.loading')\n : this.isFinished\n ? this.intl.t(`@adc/ui-components.${this.asyncType}`)\n : '';\n }\n\n /**\n * The textual representation of the current async state.\n */\n get asyncType(): string {\n return {\n [EnumAsyncState.idle]: '',\n [EnumAsyncState.pending]: 'pending',\n [EnumAsyncState.success]: 'success',\n [EnumAsyncState.failure]: 'warning'\n }[this.asyncState];\n }\n\n /**\n * A task to animate promise state changes based on promise returned from `onClick` argument.\n */\n executeButtonAction: Task<void, [MouseEvent]> = task({ drop: true }, async (e: MouseEvent) => {\n const { buttonAction } = this.args;\n if (!buttonAction) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let buttonAnimation = (_isSuccess: boolean) => {},\n isPromise = false;\n\n try {\n // Execute button action function.\n const p = buttonAction(\n new Promise((r) => (buttonAnimation = r as unknown as (_isSuccess: boolean) => void)),\n e\n );\n\n // Is the return value a promise?\n if (p && typeof p.then === 'function') {\n isPromise = true;\n this.asyncState = EnumAsyncState.pending;\n await p;\n this.asyncState = EnumAsyncState.success;\n }\n } catch (ex) {\n if (isPromise) {\n this.asyncState = EnumAsyncState.failure;\n }\n } finally {\n if (isPromise) {\n const isSuccess = this.asyncState === EnumAsyncState.success;\n\n if (!this.args.noDelay) {\n await timeout(isSuccess ? 700 : 3000);\n }\n\n this.asyncState = EnumAsyncState.idle;\n\n // Pass success/fail state out with button animation. Considered using promise\n // reject/resolve instead, but unhandled rejects raise application errors.\n buttonAnimation(isSuccess);\n }\n }\n });\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Button::Simple\\n @type={{@type}}\\n @buttonColor={{@buttonColor}}\\n @buttonStyle={{this.simpleButtonStyle}}\\n @buttonAction={{@buttonAction}}\\n class=\\\"is-icon {{if @iconOnly \\'icon-only\\'}} {{this.reversedCss}}\\\"\\n aria-label={{this.buttonText}}\\n ...attributes\\n>\\n <SvgSymbol @icon={{@icon}} @title={{if @iconOnly @text}} class=\\\"icon-btn\\\" aria-hidden=\\\"true\\\" focusable=\\\"false\\\" />\\n <span class=\\\"btn-text\\\">\\n {{this.buttonText}}\\n </span>\\n {{yield}}\\n</Button::Simple>\")","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport { computed } from '@ember/object';\nimport { isPresent } from '@ember/utils';\nimport { assert } from '@ember/debug';\nimport { getAnyButtonStyle, getSimpleButtonStyle } from './simple.ts';\n\nimport type { ButtonSimpleSignature } from './simple';\nimport type { SvgSymbolSignature } from '@adc/svg-system/components/svg-symbol';\n\nexport interface ButtonIconSignature {\n Element: ButtonSimpleSignature['Element'];\n Args: Omit<ButtonSimpleSignature['Args'], 'text' | 'buttonStyle'> & {\n /** Buttons text (required for icon buttons). */\n text: string;\n /** The name of the icon to render (minus the \"icn-\" prefix). */\n icon: SvgSymbolSignature['Args']['icon'];\n /** Indicates if only the icon should be visible in the button. */\n iconOnly?: boolean;\n /** Optional button style. */\n buttonStyle?: 'link' | 'small' | 'reversed' | 'inverted';\n };\n Blocks: ButtonSimpleSignature['Blocks'];\n}\n\n/**\n * A button that includes an icon with the text.\n */\nexport default class ButtonIcon extends Component<ButtonIconSignature> {\n @service declare media: { isMobile: true };\n\n constructor(owner: unknown, args: ButtonIconSignature['Args']) {\n super(owner, args);\n\n ['text', 'icon'].forEach((name: 'text' | 'icon') => {\n assert(\n `[@adc/ui-components] The \"@${name}\" argument is required by the <Button::Icon /> component`,\n isPresent(this.args[name])\n );\n });\n }\n\n /**\n * Removes icon buttons styles.\n */\n get simpleButtonStyle(): ReturnType<typeof getSimpleButtonStyle> {\n return getSimpleButtonStyle(this.args.buttonStyle);\n }\n\n /**\n * Returns the icon \"reversed\" button style if present.\n */\n get reversedCss(): string {\n return (this.args.buttonStyle?.includes('reversed') && getAnyButtonStyle('reversed')) || '';\n }\n\n /**\n * The text to display in the button (varies based on responsiveness).\n */\n @computed('args.{text,responsiveText}', 'media.isMobile')\n get buttonText(): string {\n const { text, responsiveText } = this.args;\n return (responsiveText !== undefined && this.media.isMobile ? responsiveText : text) ?? '';\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"all-none-container\\\">\\n <button type=\\\"button\\\" data-id=\\\"all-{{@index}}\\\" {{on \\\"click\\\" @selectAll}}>\\n {{t \\\"@adc/ui-components.all\\\"}}\\n </button>\\n <p class=\\\"divider\\\"></p>\\n <button type=\\\"button\\\" data-id=\\\"none-{{@index}}\\\" {{on \\\"click\\\" @selectNone}}>\\n {{t \\\"@adc/ui-components.none\\\"}}\\n </button>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface CheckboxTreeAllNoneSelectorSignature {\n Element: HTMLDivElement;\n Args: {\n /** Unique identifier passed to the `data-id` attribute. */\n index: number | string;\n /** Triggered when user selected \"All\". */\n selectAll: VoidFunction;\n /** Triggered when user selected \"None\". */\n selectNone: VoidFunction;\n };\n}\nconst CheckboxTreeAllNoneSelector = templateOnlyComponent<CheckboxTreeAllNoneSelectorSignature>();\nexport default CheckboxTreeAllNoneSelector;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! template-lint-disable no-inline-styles }}\\n<div\\n id={{this.domId}}\\n class=\\\"popover-menu elevated ember-view\\n {{if @isLoading \\'is-loading\\'}}\\n {{if this.isRenderedWithPopper \\'popper-container\\'}}\\\"\\n style={{this.style}}\\n aria-live={{coalesce @ariaLive \\\"assertive\\\"}}\\n role={{coalesce @role \\\"alert\\\"}}\\n tabindex={{if this.isFocusable 0 -1}}\\n {{did-insert this.initPopup}}\\n {{did-update this.togglePopper this.isRenderedWithPopper}}\\n {{did-update this.togglePopper this.shouldRenderWithPopper}}\\n {{did-update this.extraPopperUpdate this.style}}\\n {{on \\\"keydown\\\" this.keyDownOnElement}}\\n {{on-click-outside this.clickOutsidePopup capture=true}}\\n ...attributes\\n>\\n <div class=\\\"arrow\\\"></div>\\n\\n <div class=\\\"content\\\">\\n {{#if @isLoading}}\\n <div class=\\\"spinner-wrapper\\\">\\n <SpinnerSvg @spinning={{true}} />\\n </div>\\n {{else}}\\n {{yield}}\\n {{/if}}\\n </div>\\n</div>\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\nimport Component from '@ember/component';\nimport { inject as service } from '@ember/service';\nimport { guidFor } from '@ember/object/internals';\nimport { once } from '@ember/runloop';\nimport { notEmpty } from '@ember/object/computed';\nimport { dasherize } from '@ember/string';\nimport { action, computed, set } from '@ember/object';\nimport { isRtl, DIR_CHANGED_EVENT_KEY } from '@adc/ember-utils/utils/html-dir-helpers';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { A } from '@ember/array';\nimport { isTestEnvironment } from '../../utils/general.ts';\nimport { ESCAPE_CODE, addWeakTrapFocusListener, removeTrapFocusListener } from '@adc/ember-utils/utils/a11y';\nimport { tracked } from '@glimmer/tracking';\nimport Popper from 'popper.js';\nimport { htmlSafe } from '@ember/template';\n\n// region RTL Support\n\n/**\n * Constants for placement strings.\n *\n * @note\n * These are only the placement options that are used in this file and do not reflect all that are possible for a popover.\n */\nconst LEFT = 'left',\n RIGHT = 'right',\n DEFAULT_PLACEMENT = 'bottom';\n\n/**\n * Helper variable to track if the popover was already focused.\n *\n * @type {Boolean}\n */\nlet focusSet = false;\n\n// endregion\n\n// region Popper Helpers\n\n/**\n * Returns the HTML element the popper should be anchored to.\n *\n * @returns {Element}\n */\nexport function getAnchorElement() {\n let { anchorSelector } = this;\n\n if (isTestEnvironment.call(this)) {\n // For tests, we append the popover to the #ember-testing container\n // so that ember-native-dom-helpers can find and operate on it.\n anchorSelector = '#ember-testing';\n }\n\n return typeof anchorSelector === 'string' ? document.querySelector(anchorSelector) : anchorSelector;\n}\n\n/**\n * Returns the options to use when creating the popper.\n *\n * @param {HTMLElement} el The popover element.\n *\n * @returns {{}}\n */\nfunction getPopperOptions(el) {\n const { placement, boundariesElement = 'viewport' } = this;\n\n return {\n onCreate: () => {\n const onCreateAction = this['on-create'];\n\n if (onCreateAction) {\n onCreateAction(el);\n }\n },\n placement,\n modifiers: {\n flip: {\n boundariesElement\n },\n arrow: {\n element: '.arrow'\n },\n preventOverflow: {\n boundariesElement,\n escapeWithReference: false\n }\n }\n };\n}\n\n/**\n * Creates a new Popper.js instance with the content of this component, and then saves its reference on the context.\n *\n * @param {HTMLElement} el The popper element.\n */\nfunction createAndSetPopper(el) {\n const anchorElement = getAnchorElement.call(this);\n if (!anchorElement) {\n console.error('No anchorSelector defined for popover');\n return;\n }\n\n // Creates a popper instance with the content of this component.\n set(this, 'popper', new Popper(anchorElement, el, getPopperOptions.call(this, el)));\n\n this.dom.addListener(this, document, 'transitionend', updatePopper.bind(this));\n}\n\n/**\n * Destroys the existing Popper.js instance if a reference is found, and then removes the reference from context.\n *\n * @returns undefined\n */\nfunction cleanupAndRemovePopper() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this) || !this.popper) {\n return;\n }\n\n this.popper.destroy();\n set(this, 'popper', null);\n}\n\n/**\n * Schedules an aspect update on the existing Popper.js instance, if a reference is found.\n *\n * @returns undefined\n */\nfunction updatePopper() {\n if (this.popper) {\n this.popper.scheduleUpdate();\n }\n}\n\n/**\n * Handler function for the togglePopper observer. It identifies the moment and does the switch between rendering with Popper.js and direct render.\n *\n * @param {HTMLElement} el The popper element.\n */\nfunction handleTogglePopper(el) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this)) {\n return;\n }\n\n const { isRenderedWithPopper, shouldRenderWithPopper } = this;\n\n if (isRenderedWithPopper && !shouldRenderWithPopper) {\n cleanupAndRemovePopper.call(this);\n } else if (!isRenderedWithPopper && shouldRenderWithPopper) {\n createAndSetPopper.call(this, el);\n }\n}\n\n// endregion\n\n// region Component\n\n/**\n * @classdesc\n *\n * Wrapper for the actual popover\n *\n * @note This could eventually be made into its own addon as a base-popover and we could use it in tooltips as well.\n */\nexport default class PopoverWrapper extends Component {\n tagName = '';\n\n // region Service\n\n @service media;\n @service dom;\n\n // endregion\n\n // region Component state\n\n domId = '';\n\n /**\n * This property will enable arrows to work like TAB or SHIFT + TAB\n *\n * @type {boolean}\n */\n treatArrowsAsTabEvents = true;\n\n /**\n * An optional CSS selector for the element that should have focus after render.\n *\n * @type {string}\n */\n focusSelector = '';\n\n /**\n * The last focused element before the popover was opened.\n *\n * @type {Object}\n * @ignore\n */\n lastFocusedElement;\n\n /**\n * Width for the popover.\n *\n * @type {undefined|number}\n */\n width;\n\n /**\n * Maximum width for the popover.\n *\n * @type {undefined|number}\n */\n maxWidth;\n\n /**\n * Maximum height for the popover.\n *\n * @type {undefined|number}\n */\n maxHeight;\n\n /**\n * Minimum width for the popover.\n *\n * @type {undefined|number}\n */\n minWidth;\n\n /**\n * Minimum height for the popover.\n *\n * @type {undefined|number}\n */\n minHeight;\n\n /**\n * Placement of the popover.\n *\n * @type {String}\n */\n placement = DEFAULT_PLACEMENT;\n\n /**\n * When the popover for this is rendered, we trigger a focus event on the popover. Should we prevent the page from scrolling when this focus is triggered.\n *\n * @type {Boolean}\n */\n preventScroll = false;\n\n /**\n * Is the element focusable?\n *\n * @type {boolean}\n */\n @tracked isFocusable = false;\n\n /**\n * Optional passed function to indicate the popover is handling close detection and wants to close.\n *\n * @function\n */\n willClose() {}\n\n // endregion\n\n // region Hooks\n\n /** @override */\n constructor() {\n super(...arguments);\n\n this.lastFocusedElement = document.activeElement;\n\n const rtlPlacement = () => {\n const { placement = DEFAULT_PLACEMENT } = this;\n\n // Make necessary conversions for RTL.\n if (isRtl()) {\n [\n [LEFT, RIGHT],\n [RIGHT, LEFT]\n ].some(([check, replacement]) => {\n if (placement.includes(check)) {\n this.placement = placement.replace(check, replacement);\n return true;\n }\n\n return false;\n });\n }\n };\n\n this.dom.addListener(this, document, DIR_CHANGED_EVENT_KEY, rtlPlacement);\n\n rtlPlacement();\n\n this.domId = this.id || guidFor(this);\n }\n\n /** @override */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-component-lifecycle-hooks\n didUpdate() {\n focusSet = false;\n\n super.didUpdate();\n }\n\n /**\n * Called to initialize the popover element.\n *\n * @param {HTMLElement} el\n */\n @action initPopup(el) {\n this.trapFocusListener = addWeakTrapFocusListener(this, {\n scopeSelector: '.popover-menu',\n escapeCallback: () => {},\n treatArrowsAsTabEvents: this.treatArrowsAsTabEvents,\n oldListenerId: this.trapFocusListener\n });\n\n if (this.shouldRenderWithPopper) {\n createAndSetPopper.call(this, el);\n }\n }\n\n /** @override */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-component-lifecycle-hooks\n didRender() {\n if (this.isRenderedWithPopper) {\n updatePopper.call(this);\n }\n\n const focusOptions = { preventScroll: this.preventScroll };\n\n if (this.isFocusable && !focusSet) {\n document.querySelector(`#${this.domId}`).focus(focusOptions);\n }\n\n if (this.focusSelector && !focusSet) {\n const elementToFocus = document.querySelector(this.focusSelector);\n\n if (elementToFocus) {\n elementToFocus.focus(focusOptions);\n }\n }\n\n return super.didRender();\n }\n\n /**\n * Cleanup and remove Popper object.\n *\n * @override\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-component-lifecycle-hooks\n willDestroyElement() {\n cleanupAndRemovePopper.call(this);\n\n focusSet = false;\n removeTrapFocusListener(this.trapFocusListener);\n\n super.willDestroyElement(...arguments);\n }\n\n // endregion\n\n // region Computed Properties\n\n /**\n * Calculates css (max/min) height and (max/min) width style. This property is ignored when not rendering with Popper.js.\n *\n * NOTE: Avoid watching 'isRenderedWithPopper'. Changing the styles while the popper container is rendered in the page causes horizontal positioning issues: Wrongly calculated horizontal center and content flickering at initial render due to quick horizontal position correction.\n */\n @computed('{width,maxWidth,maxHeight,minWidth,minHeight}', 'shouldRenderWithPopper')\n get style() {\n // Ignore custom width and height if not rendering within a popper.\n if (!this.shouldRenderWithPopper) {\n return null;\n }\n\n return htmlSafe(\n A(\n ['width', 'maxHeight', 'maxWidth', 'minWidth', 'minHeight'].map((key) => {\n // Dasherize property name.\n let property = dasherize(key);\n\n const value = parseInt(this[key], 10);\n return window.isNaN(value) ? undefined : `${property}:${value}px;`;\n })\n )\n .compact()\n .join('')\n );\n }\n\n /**\n * Whether or not the component should be render with Popper.js.\n *\n * @type {boolean} - true if the component should be rendered with Popper.js.\n */\n @computed('media.isMobile', 'directRenderOnMobile')\n get shouldRenderWithPopper() {\n return this.media.isMobile ? !this.directRenderOnMobile : true;\n }\n\n /**\n * Whether or not the component is currently rendered with Popper.js.\n *\n * @type {boolean} - true if the component is already rendered with Popper.js.\n */\n @notEmpty('popper')\n isRenderedWithPopper;\n\n // endregion\n\n // region Actions\n\n /**\n * Called to switch from Popper.js to direct render and vice-versa. It also executes the necessary transition logic.\n *\n * @param {HTMLElement} el The popper element.\n */\n @action togglePopper(el) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, handleTogglePopper, el);\n }\n\n /**\n * Triggers an additional updatePopper request, besides didRender hook, when style attribute value changes.\n *\n * @note This is used as a bug fix for the wrong popper horizontal positioning bug, which happens when styles change dynamically the time the popper component is already in the page.\n */\n @action extraPopperUpdate() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, updatePopper);\n }\n\n /**\n * Listener for keyDown events.\n *\n * @param {KeyboardEvent} event\n */\n @action keyDownOnElement(event) {\n // Prevents exiting weak trap focus of popover using tab/enter when there are no inner focusable components\n if (event.target?.id === this.domId && event.code !== ESCAPE_CODE) {\n event.preventDefault();\n return;\n }\n\n focusSet = true;\n\n // Does user want to close this popup?\n if (event.code === ESCAPE_CODE) {\n const { lastFocusedElement } = this;\n if (lastFocusedElement) {\n lastFocusedElement.focus();\n }\n\n this['on-close']();\n }\n }\n\n /**\n * Called when the user clicks outside the popup. The willClose method will be called if it was provided.\n */\n @action clickOutsidePopup(event) {\n const path = event.path || (event.composedPath && event.composedPath());\n\n // When a user clicks the anchorSelector (the trigger), the popover toggles its visibility. Therefore we want to ignore clicking outside of the popup\n // here when the user clicks on the anchorSelector/trigger, otherwise it would cause a double toggle (and the popover would remain open).\n if (path.filter((path) => `#${path.id}` === this.anchorSelector).length) {\n return;\n }\n\n this.willClose();\n }\n\n // endregion\n}\n\n// endregion\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<header ...attributes>\\n {{#if @title}}\\n <h4>{{@title}}</h4>\\n {{/if}}\\n\\n {{yield}}\\n</header>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface PopoverHeaderSignature {\n Element: HTMLElement;\n Args: {\n /** The text to render in the popover header. */\n title?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst PopoverHeader = templateOnlyComponent<PopoverHeaderSignature>();\nexport default PopoverHeader;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"body\\\" ...attributes>\\n {{yield}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface PopoverBodySignature {\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\n\nconst PopoverBody = templateOnlyComponent<PopoverBodySignature>();\nexport default PopoverBody;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<footer ...attributes>\\n {{yield}}\\n</footer>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface PopoverFooterSignature {\n Element: HTMLElement;\n Blocks: {\n default: [];\n };\n}\n\nconst PopoverFooter = templateOnlyComponent<PopoverFooterSignature>();\nexport default PopoverFooter;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<span class=\\\"popover-menu-root\\\" {{did-update this.openStateChanged this.isOpen}}></span>\\n{{#if this.showPopover}}\\n <div class=\\\"popover-wormhole-wrapper\\\" ...attributes>\\n {{#in-element this.popoverDestinationElement insertBefore=null}}\\n <Popover::PopoverWrapper\\n @placement={{coalesce @placement \\\"bottom\\\"}}\\n @anchorSelector={{this.anchorSelector}}\\n @width={{this.width}}\\n @maxWidth={{@maxWidth}}\\n @maxHeight={{@maxHeight}}\\n @isFocusable={{@isFocusable}}\\n @minWidth={{@minWidth}}\\n @minHeight={{@minHeight}}\\n @isLoading={{@isLoading}}\\n @focusSelector={{@focusSelector}}\\n @boundariesElement={{this.boundariesElement}}\\n @treatArrowsAsTabEvents={{this.treatArrowsAsTabEvents}}\\n @directRenderOnMobile={{this.directRenderOnMobile}}\\n @id={{@contentId}}\\n @on-create={{@on-create-popover}}\\n @preventScroll={{@preventScroll}}\\n @willClose={{this.willClose}}\\n @on-close={{this.closePopover}}\\n @ariaLive={{@ariaLive}}\\n class={{this.classForPopover}}\\n data-test-component=\\\"menu\\\"\\n >\\n {{yield\\n (hash\\n header=(component \\\"popover/popover-header\\\")\\n body=(component \\\"popover/popover-body\\\")\\n footer=(component \\\"popover/popover-footer\\\")\\n )\\n }}\\n </Popover::PopoverWrapper>\\n {{/in-element}}\\n\\n {{#if this.hasBackdrop}}\\n {{#in-element this.backdropDestinationElement insertBefore=null}}\\n <div\\n class={{this.popoverBackdropClass}}\\n {{on \\\"click\\\" this.popoverBackdropClicked}}\\n role=\\\"button\\\"\\n aria-label={{@backdropLabel}}\\n ></div>\\n {{/in-element}}\\n {{/if}}\\n </div>\\n{{/if}}\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\nimport Component from '@ember/component';\nimport { reads, or, and } from '@ember/object/computed';\nimport { action, computed, get, set } from '@ember/object';\nimport { schedule, scheduleOnce } from '@ember/runloop';\nimport { getAnchorElement } from './popover/popover-wrapper.js';\nimport { inject as service } from '@ember/service';\nimport { isTestEnvironment } from '../utils/general.ts';\n\n/**\n * A CSS class name applied to the popover if it is being displayed in a modal.\n *\n * @type {String}\n */\nconst IN_MODAL_CLASS = 'in-modal';\n\n/**\n * A CSS class name applied to the popover if it is being displayed on a mobile screen.\n *\n * @type {String}\n */\nconst ON_MOBILE_CLASS = 'on-mobile';\n\n/**\n * A CSS class name applied to the popover to be displayed stretched on the entire screen when on mobile.\n *\n * @type {String}\n */\nconst FULL_SCREEN_ON_MOBILE_CLASS = 'full-screen';\n\n/**\n * A CSS class name applied to the popover to be used as a namespace for the mobile screen specific classes, to tell the difference when the popover content was\n * rendered directly or with Popper.js.\n *\n * @type {String}\n */\nconst DIRECT_RENDER_ON_MOBILE_CLASS = 'direct-render';\n\n// region Helper Methods\n\n/**\n * Handle opening and closing of the popover\n */\nfunction handleOpenClose() {\n const { isOpen } = this;\n if (isOpen) {\n if (!getAnchorElement.call(this)) {\n console.error('No element found for popover anchor selector', this.anchorSelector);\n return;\n }\n }\n\n set(this, 'showPopover', isOpen);\n\n // Trigger the action if there is a handler defined.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-get\n get(this, isOpen ? 'on-open' : 'on-close')?.();\n}\n\n/**\n * Takes a list of [ testCase, className ] pairs and returns a string of all classNames where the testCase passed.\n * TODO: In the future, import this function from @adc/ember-utils instead, if it's available.\n *\n * @param {Array<{testCase: boolean, className: String}>} classList - An array of testCase/className pairs.\n *\n * @returns {String}\n */\nfunction buildClassListString(classList) {\n const classes = classList.reduce((appliedClasses, [shouldAddClass, className]) => {\n if (shouldAddClass) {\n appliedClasses.push(className);\n }\n\n return appliedClasses;\n }, []);\n\n return classes.join(' ');\n}\n\n// endregion\n\n/**\n * @classdesc\n *\n * A popover component for displaying other components.\n *\n * The popover positioning is done by [Popper.js]{@link https://popper.js.org}.\n */\nexport default class PopoverMenu extends Component {\n // region Services\n\n @service media;\n\n // endregion\n\n // region Property Overrides\n\n /** @override */\n tagName = '';\n\n /**\n * This property will enable arrows to work like TAB or SHIFT + TAB\n *\n * @type {boolean}\n */\n treatArrowsAsTabEvents = false;\n\n // endregion\n\n // region Hooks\n\n /** @override */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/classic-decorator-hooks\n init(...args) {\n super.init(...args);\n\n if (!this.anchorSelector) {\n console.error('anchorSelector for popover must be defined');\n return;\n }\n\n // Should the popup be open already?\n if (this.isOpen) {\n // Display popover during the next run cycle.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n schedule('afterRender', this, handleOpenClose);\n }\n }\n\n // endregion\n\n // region Properties\n\n /**\n * A HtmlElement or document.querySelectorAll selector for finding the element that anchors this popover.\n *\n * @type {String|HTMLElement}\n */\n anchorSelector = '';\n\n /**\n * CSS class added to the popover element.\n *\n * @type {String}\n */\n popoverClass = '';\n\n /**\n * When the popover for this is rendered, we trigger a focus event on the popover. Should we prevent the page from scrolling when this focus is triggered.\n *\n * @type {Boolean}\n */\n preventScroll = false;\n\n /**\n * The element which will define the boundaries of the popover position,\n * the popover will never be placed outside of the defined boundaries\n *\n * @type {String|HTMLElement}\n */\n boundariesElement = 'viewport';\n\n /**\n * Displays a loading indicator instead of the yield when true.\n *\n * @type {boolean}\n */\n isLoading = false;\n\n /**\n * Indicates the popover is open.\n *\n * @type {boolean}\n */\n isOpen = false;\n\n /**\n * Does the popover have a backdrop on large screens?\n *\n * @type {boolean}\n */\n renderBackdropOnLargeScreen = true;\n\n /**\n * Should the popover close when the backdrop is clicked?\n *\n * @type {boolean}\n */\n closeOnBackdropClick = true;\n\n /**\n * Indicates the popup should not use a backdrop, so users can interact with the background AND close the popover in one action.\n *\n * @type {boolean}\n */\n useImprovedCloseOnClick = false;\n\n /**\n * Whether or not to consider to directly render on mobile screens. Without Popper.js.\n *\n * NOTE: This property should be overridden by components which need their content to stay rendered inside Popper. Like the tool-tip component.\n */\n directRenderOnMobile = true;\n\n /**\n * Should the popover render full screen on mobile devices?\n *\n * @type {boolean}\n */\n fullScreenOnMobile = false;\n\n // endregion\n\n // region Computed Properties\n\n /**\n * Indicates the popover will be hosted within a modal.\n */\n @computed()\n get inModal() {\n const modal = document.body.querySelector('.modal');\n return !!modal?.contains(getAnchorElement.call(this));\n }\n\n /**\n * Returns the element that the backdrop should be appended to.\n *\n * @type {Node}\n */\n @computed()\n get backdropDestinationElement() {\n const { body } = window.document;\n\n if (isTestEnvironment.call(this)) {\n // For tests, we append the popover to the #ember-testing container\n // so that @ember/test-helpers can find and operate on it.\n return body.querySelector('#ember-testing');\n }\n\n return body;\n }\n\n /**\n * Find a DOM node to which the popover should be appended.\n *\n * This should be an offset parent of the last parent that is capable of being scrolled.\n *\n * @type {Element}\n */\n get popoverDestinationElement() {\n let bodyEl = window.document.body,\n goodParent = bodyEl;\n\n if (isTestEnvironment.call(this)) {\n // For tests, we append the popover to the #ember-testing container\n // so that @ember/test-helpers can find and operate on it.\n return bodyEl.querySelector('#ember-testing');\n }\n\n let { parentNode } = getAnchorElement.call(this),\n overflowStyles = ['overflow-x', 'overflow-y', 'overflow'],\n forbiddenStyleValue = ['auto', 'scroll', 'hidden'];\n\n while (parentNode !== bodyEl) {\n let style = getComputedStyle(parentNode);\n\n if (overflowStyles.some((key) => forbiddenStyleValue.some((value) => style[key] === value))) {\n // Move to the next available attachment element\n goodParent = parentNode = parentNode.offsetParent || bodyEl;\n } else {\n // Move to the next parent\n parentNode = parentNode.parentNode;\n }\n }\n\n // If the final element to append is position fixed then just use body as the append to element\n if (getComputedStyle(goodParent).position === 'fixed') {\n goodParent = bodyEl;\n }\n\n return goodParent;\n }\n\n /**\n * Observes opening and closing of the popover and triggers relevant actions if they were defined.\n */\n @action openStateChanged() {\n // Run this just once after render, otherwise it causes issues with dropdown-menu\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce('afterRender', this, handleOpenClose);\n }\n\n /**\n * Class to be applied to the backdrop.\n *\n * @type {String}\n */\n @computed('inModal', 'isMobile')\n get popoverBackdropClass() {\n const classList = [\n [true, 'popover-backdrop'],\n [this.inModal, IN_MODAL_CLASS],\n [this.isMobile, ON_MOBILE_CLASS]\n ];\n\n return buildClassListString(classList);\n }\n\n /**\n * Class to be applied on popover.\n *\n * @type {String}\n */\n @computed('isMobile', 'fullScreenOnMobile', 'directRenderOnMobile', 'inModal', 'popoverClass')\n get classForPopover() {\n const classList = [\n [this.isMobile, ON_MOBILE_CLASS],\n [this.isMobile && this.fullScreenOnMobile, FULL_SCREEN_ON_MOBILE_CLASS],\n [this.directRenderOnMobile, DIRECT_RENDER_ON_MOBILE_CLASS],\n [this.inModal, IN_MODAL_CLASS],\n [this.popoverClass, this.popoverClass]\n ];\n\n return buildClassListString(classList);\n }\n\n /**\n * Defines an reads for media.isMobile so isMobile can be reached directly.\n *\n * @type {boolean}\n */\n @reads('media.isMobile')\n isMobile;\n\n /**\n * Indicates we will be rendering a backdrop.\n *\n * @type {boolean}\n */\n @or('renderBackdropOnLargeScreen', 'isMobile')\n usesBackdrop;\n\n /**\n * Does the popover have a backdrop?\n *\n * @type {boolean}\n */\n @computed('useImprovedCloseOnClick', 'usesBackdrop')\n get hasBackdrop() {\n return !this.useImprovedCloseOnClick && this.usesBackdrop;\n }\n\n /**\n * Indicates the popover should handle close as opposed to a local backdrop element.\n *\n * @type {boolean}\n */\n @and('useImprovedCloseOnClick', 'usesBackdrop')\n enhancedCloseOnClick;\n\n // endregion\n\n // region Actions\n\n /** @ignore */\n @action willClose() {\n if (this.enhancedCloseOnClick) {\n this.popoverBackdropClicked();\n }\n }\n\n /**\n * Toggles the popover\n */\n @action togglePopover() {\n set(this, 'isOpen', !this.isOpen);\n }\n\n /**\n * Closes the popover\n */\n @action closePopover() {\n set(this, 'isOpen', false);\n }\n\n /**\n * When the backdrop of the popover is clicked send the backdrop-clicked\n * action if it exists and then send the closePopover action\n */\n @action popoverBackdropClicked() {\n // If there is a handler, send the action.\n this['on-backdrop-click']?.();\n\n if (this.closeOnBackdropClick) {\n this.closePopover();\n }\n }\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<PopoverMenu\\n @id={{this.contentId}}\\n @isOpen={{this.isOpen}}\\n @anchorSelector={{this.anchorSelectorForPopover}}\\n @boundariesElement={{this.boundariesElement}}\\n @boundariesPadding={{this.boundariesPadding}}\\n @popoverClass={{this.popoverClasses}}\\n @placement={{this.placement}}\\n @focusSelector={{this.focusSelector}}\\n @maxHeight={{this.popoverMaxHeight}}\\n @isFocusable={{this.popoverIsFocusable}}\\n @maxWidth={{this.popoverMaxWidth}}\\n @minWidth={{this.popoverMinWidth}}\\n @preventScroll={{@preventScroll}}\\n @width={{this.popoverWidth}}\\n @fullScreenOnMobile={{this.fullScreenOnMobile}}\\n @useImprovedCloseOnClick={{true}}\\n @on-open={{coalesce @on-dropdown-open (noop)}}\\n @on-close={{coalesce @on-dropdown-close (noop)}}\\n as |popover|\\n>\\n <div class={{if @isLoading \\\"loading\\\"}}>\\n {{#if @isLoading}}\\n <SpinnerSvg @spinning={{true}} @size=\\\"small\\\" />\\n {{else}}\\n {{yield (hash popover=popover)}}\\n {{/if}}\\n </div>\\n</PopoverMenu>\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\nimport Component from '@ember/component';\nimport layout from '../../templates/components/base-dropdown/wrapper.hbs';\nimport { or } from '@ember/object/computed';\nimport { computed, observer } from '@ember/object';\nimport { debounce, once } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { buildClassListString, isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\n\n// region Component\n\n/**\n * @classdesc\n *\n * Wraps the dropdown content in a popover on large screens and a full-screen div on small screens.\n *\n * @class Wrapper\n * @extends Ember.Component\n * @memberof components.base-dropdown\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes, ember/require-tagless-components\nexport default Component.extend(\n /** @lends components.base-dropdown.Wrapper# */ {\n // region Property Overrides\n dom: service(),\n\n /** @override */\n layout,\n\n /** @override */\n classNames: ['dropdown-wrapper'],\n\n /** @override */\n classNameBindings: ['isOpen:open'],\n\n // endregion\n\n // region Internal Properties\n\n /**\n * Whether or not the popover wrapper should adapt to match the the trigger element's width.\n *\n * @type {boolean}\n */\n matchTriggerElementWidth: true,\n\n /**\n * Should the popover be focusable?\n *\n * @type {boolean}\n */\n popoverIsFocusable: true,\n\n /**\n * The selector of the element to be focused.\n *\n * @type {String}\n */\n focusSelector: '',\n\n // endregion\n\n // region Hooks\n\n /** @override */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-component-lifecycle-hooks\n didInsertElement() {\n this._super(...arguments);\n\n // Listen for window size changes to adapt popover width accordingly\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n this.dom.addListener(this, window, 'resize', () => debounce(this, setPopoverWidth, 200));\n\n setPopoverWidth.call(this);\n },\n\n // endregion\n\n // region Computed Properties\n\n /**\n * The CSS selector that matches the dropdown's trigger element.\n *\n * @note Used as the popover's default anchor.\n *\n * @ignore\n * @function\n * @returns {String}\n */\n triggerSelector: computed('triggerId', function () {\n return `#${this.triggerId}`;\n }),\n\n /**\n * The popover's CSS selector used to find the element to anchor to.\n *\n * @ignore\n * @function\n * @returns {String}\n */\n anchorSelectorForPopover: or('popoverAnchor', 'triggerSelector'),\n\n /**\n * Is the popover's anchor selector the same as the default?\n *\n * @ignore\n * @function\n * @returns {boolean}\n */\n isDefaultAnchorSelector: computed('anchorSelectorForPopover', 'triggerSelector', function () {\n return this.anchorSelectorForPopover === this.triggerSelector;\n }),\n\n /**\n * Requests a popover width update when the matchTriggerElementWidth flag changes.\n *\n * @ignore\n * @function\n */\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-observers\n matchTriggerElementWidthObserver: observer('matchTriggerElementWidth', function () {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(this, setPopoverWidth);\n }),\n\n // endregion\n\n // region @adc/popover Properties\n\n /**\n * A HtmlElement or document.querySelectorAll selector for finding the element that anchors this popover.\n *\n * @see @adc/popover\n *\n * @type {String|HTMLElement}\n */\n popoverAnchor: '',\n\n /**\n * Returns the classes that will be applied to the popover.\n * Always includes 'dropdown-content', as well as any classes provided in popoverClass.\n *\n * @see @adc/popover\n *\n * @function\n * @returns {String}\n */\n popoverClasses: computed('popoverClass', function () {\n return buildClassListString([\n [true, 'dropdown-content'],\n [!!this.popoverClass, this.popoverClass]\n ]);\n }),\n\n /**\n * The placement of the popover.\n *\n * @see @adc/popover\n *\n * @function\n * @returns {String}\n */\n placement: computed('popoverPlacement', function () {\n return this.popoverPlacement || 'bottom-start';\n }),\n\n /**\n * The element which will define the boundaries of the popover position.\n * The popover will never be placed outside of the defined boundaries.\n *\n * @see @adc/popover\n *\n * @type {String|HTMLElement}\n */\n boundariesElement: 'viewport',\n\n /**\n * Additional padding for the popover boundaries.\n *\n * @see @adc/popover\n *\n * @type {number}\n */\n boundariesPadding: 8,\n\n /**\n * Is the popover currently open?\n *\n * @see @adc/popover\n *\n * @ignore\n * @type {boolean}\n */\n isOpen: false,\n\n /**\n * The width of the popover.\n *\n * @see @adc/popover\n *\n * @type {undefined|number}\n */\n popoverWidth: undefined,\n\n /**\n * The maximum width of the popover.\n *\n * @see @adc/popover\n *\n * @type {undefined|number}\n */\n popoverMaxWidth: undefined,\n\n /**\n * The maximum height of the popover.\n *\n * @see @adc/popover\n *\n * @type {undefined|number}\n */\n popoverMaxHeight: undefined,\n\n /**\n * When the popover for this is rendered, we trigger a focus event on the popover. Should we prevent the page from scrolling when this focus is triggered.\n *\n * @see @adc/popover\n *\n * @type {boolean}\n */\n preventScroll: false,\n\n /**\n * Whether or not the popover should stretch on the entire screen when on mobile.\n *\n * @see @adc/popover\n *\n * @type {boolean}\n */\n fullScreenOnMobile: true\n\n // endregion\n }\n);\n\n// endregion\n\n// region Popover Width\n\n/**\n * Sets the dimensions of the dropdown's popover to be the correct width for the screen size.\n *\n * @private\n * @instance\n * @memberof components.base-dropdown.Wrapper\n */\nfunction setPopoverWidth() {\n // Do not try to set value if the component is already destroyed. This is necessary because we are calling this function using debounce.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (isDestroyed(this)) {\n return;\n }\n\n if (!this.matchTriggerElementWidth) {\n // At this point, the existing matchTriggerElementWidth value is not wanted anymore.\n this.set('popoverWidth', undefined);\n\n return;\n }\n\n const triggerElement = window.document.querySelector(this.triggerSelector);\n\n if (!triggerElement) {\n return;\n }\n\n // This width is ignored by popover while on mobile screens.\n this.set('popoverWidth', triggerElement.getBoundingClientRect().width);\n}\n\n// endregion\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<TextInput\\n @type=\\\"search\\\"\\n @value={{@value}}\\n disabled={{if @disabled true}}\\n @containerClass=\\\"search-input {{@containerClass}}\\\"\\n @value-change={{@value-change}}\\n aria-label={{coalesce @ariaLabel (t \\\"@adc/ui-components.search\\\")}}\\n ...attributes\\n>\\n <:after-input as |inputValue clearInput|>\\n <SvgSymbol @icon=\\\"search\\\" @title={{t \\\"@adc/ui-components.search\\\"}} @isHiddenForAccessibility={{true}} />\\n\\n {{#if inputValue}}\\n <Button::Icon\\n @iconOnly={{true}}\\n @icon=\\\"close\\\"\\n @text={{t \\\"@adc/ui-components.clearSearch\\\"}}\\n @buttonAction={{clearInput}}\\n @buttonColor=\\\"stealth\\\"\\n class=\\\"clear-search-button\\\"\\n disabled={{@disabled}}\\n />\\n {{/if}}\\n </:after-input>\\n</TextInput>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { TextInputSignature } from './text-input';\n\nexport interface SearchInputSignature {\n Element: TextInputSignature['Element'];\n Args: Pick<TextInputSignature['Args'], 'value' | 'value-change' | 'containerClass'> & {\n /** Indicates the search input should be disabled. */\n disabled?: boolean;\n /** The `aria-label` for the search input (defaults to \"search\"). */\n ariaLabel?: string;\n };\n}\nconst SearchInput = templateOnlyComponent<SearchInputSignature>();\nexport default SearchInput;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"search-toolbar fs-mask {{@containerClass}}\\\">\\n {{#unless @searchBoxHidden}}\\n <SearchInput\\n @value={{@searchString}}\\n @value-change={{@searchValueChange}}\\n @containerClass={{if @searchBoxDisabled \\\"disabled\\\"}}\\n @ariaLabel={{@ariaLabel}}\\n disabled={{@searchBoxDisabled}}\\n ...attributes\\n />\\n {{/unless}}\\n\\n <div class=\\\"content\\\">\\n {{yield}}\\n </div>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SearchInputSignature } from './search-input';\n\ntype SearchInputSignatureArgs = SearchInputSignature['Args'];\n\nexport interface SearchToolbarSignature {\n Element: SearchInputSignature['Element'];\n Args: {\n /** The current search value. */\n searchString?: SearchInputSignatureArgs['value'];\n /** Triggered when the search string changes. */\n searchValueChange?: SearchInputSignatureArgs['value-change'];\n /** Optional CSS class for the search toolbar container element. */\n containerClass?: string;\n /** Indicates the search box should be hidden. */\n searchBoxHidden?: boolean;\n /** Indicates the search box should be disabled. */\n searchBoxDisabled?: boolean;\n /** Optional `aria-label` value. */\n ariaLabel?: SearchInputSignatureArgs['ariaLabel'];\n };\n Blocks: {\n default: [];\n };\n}\nconst SearchToolbar = templateOnlyComponent<SearchToolbarSignature>();\nexport default SearchToolbar;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"toolbar\\\" ...attributes>\\n {{#if (media \\\"isMobile\\\")}}\\n <div class=\\\"label-container\\\">\\n {{#if @placeholder}}\\n <h3>\\n {{@placeholder}}\\n </h3>\\n {{/if}}\\n\\n <Button::Icon\\n @text={{t \\\"@adc/ui-components.close\\\"}}\\n @icon=\\\"close\\\"\\n @iconOnly={{true}}\\n @buttonColor=\\\"stealth\\\"\\n class=\\\"btn-close\\\"\\n {{on \\\"click\\\" @closeDropdown}}\\n />\\n </div>\\n {{/if}}\\n\\n {{#if @hasSearch}}\\n <SearchToolbar\\n placeholder={{t \\\"@adc/ui-components.search\\\"}}\\n @searchString={{@searchString}}\\n @searchValueChange={{@search}}\\n />\\n {{/if}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SearchToolbarSignature } from '../../search-toolbar';\n\ntype SearchToolbarSignatureArgs = SearchToolbarSignature['Args'];\n\nexport interface DropdownMultiSelectToolbarSignature {\n Element: HTMLDivElement;\n Args: Pick<SearchToolbarSignatureArgs, 'searchString'> & {\n /** Optional title for the mobile only view. */\n placeholder?: string;\n /** Trigger when the close button is interacted with. */\n closeDropdown: VoidFunction;\n /** Indicates to show the search toolbar. */\n hasSearch?: boolean;\n search: SearchToolbarSignatureArgs['searchValueChange'];\n };\n}\nconst DropdownMultiSelectToolbar = templateOnlyComponent<DropdownMultiSelectToolbarSignature>();\nexport default DropdownMultiSelectToolbar;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<section class=\\\"dropdown-tree-wrapper\\\" ...attributes>\\n {{#if @tree.showHeader}}\\n <div class=\\\"header\\\">\\n <p>{{@tree.title}}</p>\\n\\n {{#if @tree.showAllNoneSelectors}}\\n <CheckboxTree::AllNoneSelector\\n @index=\\\"selected\\\"\\n @selectAll={{@tree.selectAll}}\\n @selectNone={{@tree.selectNone}}\\n />\\n {{/if}}\\n </div>\\n {{/if}}\\n\\n {{yield}}\\n\\n {{#if @tree.additionalItemCount}}\\n <p class=\\\"limit-results\\\">{{t \\\"@adc/ui-components.additionalResults\\\" count=@tree.additionalItemCount}}</p>\\n {{/if}}\\n\\n {{#if @tree.noResults}}\\n <p class=\\\"no-results\\\">{{t \\\"@adc/ui-components.noSearchResults\\\"}}</p>\\n {{/if}}\\n</section>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { ChecklistTreeInfo } from '../multi-select';\n\nexport interface DropdownMultiSelectTreeWrapperSignature {\n Element: HTMLElement;\n Args: {\n /** Information about the rendered tree. */\n tree: ChecklistTreeInfo;\n };\n Blocks: {\n default: [];\n };\n}\nconst DropdownMultiSelectTreeWrapper = templateOnlyComponent<DropdownMultiSelectTreeWrapperSignature>();\nexport default DropdownMultiSelectTreeWrapper;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"dropdown-select multiselect\\n {{if this.isEmpty \\'empty\\'}}\\n {{if this.isPlaceholderShown \\'placeholder\\'}}\\n {{if @hasCustomTrigger \\'external-trigger\\'}}\\n {{if @errorMessage \\'error\\'}}\\\"\\n ...attributes\\n {{did-update this.updateFocusSelector this.searchString}}\\n {{did-update this.updateFocusSelector this.isOpen}}\\n {{did-update this.updateFocusSelector this.showSearch}}\\n {{did-insert this.resolveItems.perform}}\\n {{did-update this.resolveItems.perform @items}}\\n>\\n {{#if @hasCustomTrigger}}\\n {{yield\\n (concat \\\"dropdown-trigger-\\\" (guid-for this))\\n (concat \\\"dropdown-trigger wrapper\\\" (if this.isPlaceholderShown \\\" placeholder\\\"))\\n this.togglePopoverVisibility\\n }}\\n {{else}}\\n <Button::Simple\\n @buttonAction={{this.togglePopoverVisibility}}\\n id=\\\"dropdown-trigger-{{guid-for this}}\\\"\\n aria-owns={{this.contentId}}\\n aria-haspopup=\\\"true\\\"\\n aria-live=\\\"polite\\\"\\n aria-label={{coalesce @label (t \\\"@adc/ui-components.triggerDropdown\\\")}}\\n tabindex={{if @tabindex \\\"-1\\\" \\\"0\\\"}}\\n class=\\\"dropdown-trigger wrapper btn-select {{if this.isPlaceholderShown \\'placeholder\\'}}\\\"\\n disabled={{@disabled}}\\n {{did-resize this.triggerResized debounce=200}}\\n {{did-update this.triggerTextChanged this.triggerTextHtml}}\\n >\\n {{this.triggerTextHtml}}\\n </Button::Simple>\\n {{/if}}\\n <BaseDropdown::Wrapper\\n @id={{this.contentId}}\\n @isLoading={{this.resolveItems.isRunning}}\\n @isOpen={{this.isOpen}}\\n @focusSelector={{this.focusSelector}}\\n @popoverIsFocusable={{true}}\\n @triggerId={{this.triggerId}}\\n @contentId={{this.contentId}}\\n @popoverPlacement={{coalesce @popoverPlacement \\\"bottom\\\"}}\\n @popoverClass={{@popoverClass}}\\n @popoverMaxHeight={{@popoverMaxHeight}}\\n @popoverMaxWidth={{@popoverMaxWidth}}\\n @popoverMinWidth={{@popoverMinWidth}}\\n @preventScroll={{@preventScroll}}\\n @matchTriggerElementWidth={{@matchTriggerElementWidth}}\\n @on-dropdown-open={{this.onDropdownOpen}}\\n @on-dropdown-close={{this.onDropdownClose}}\\n >\\n <DropdownSelect::MultiSelect::Toolbar\\n @hasSearch={{this.showSearch}}\\n @searchString={{this.searchString}}\\n @placeholder={{@placeholder}}\\n @search={{fn (mut this.searchString)}}\\n @closeDropdown={{this.onDropdownClose}}\\n data-dropdown-id={{guid-for this}}\\n />\\n\\n <div class=\\\"dropdown-body\\\" tabindex=\\\"-1\\\" data-dropdown-id={{guid-for this}}>\\n {{#if this.selectedTree.show}}\\n <DropdownSelect::MultiSelect::TreeWrapper @tree={{this.selectedTree}} class=\\\"selected\\\">\\n <CheckboxTree\\n @items={{this.selectedTree.displayItems}}\\n @idPrefix=\\\"selected\\\"\\n @on-action-execute={{this.updateFocusSelectorForElement}}\\n @isFocusable={{false}}\\n class=\\\"selected-items\\\"\\n />\\n </DropdownSelect::MultiSelect::TreeWrapper>\\n\\n {{#if this.unselectedTree.show}}\\n <div class=\\\"selections-divider\\\"></div>\\n {{/if}}\\n {{/if}}\\n\\n {{#if this.unselectedTree.show}}\\n <DropdownSelect::MultiSelect::TreeWrapper @tree={{this.unselectedTree}} class=\\\"unselected\\\">\\n <CheckboxTree\\n @items={{this.unselectedTree.displayItems}}\\n @showGroupSeparator={{true}}\\n @on-action-execute={{this.updateFocusSelectorForElement}}\\n @isFocusable={{@isFocusable}}\\n />\\n </DropdownSelect::MultiSelect::TreeWrapper>\\n {{/if}}\\n </div>\\n </BaseDropdown::Wrapper>\\n\\n <ErrorTooltip\\n @text={{@errorMessage}}\\n @placement={{@errorTooltipPlace}}\\n @duration={{@errorDuration}}\\n @selector=\\\".dropdown-trigger\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</div>\")","import Component from '@ember/component';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { isEmpty } from '@ember/utils';\nimport { htmlSafe } from '@ember/template';\nimport { computed, action, set, getProperties, setProperties } from '@ember/object';\nimport { bool, or, empty } from '@ember/object/computed';\nimport { once, scheduleOnce } from '@ember/runloop';\nimport { guidFor } from '@ember/object/internals';\nimport { A } from '@ember/array';\nimport CheckboxTreeItem, { SELECTED, UNSELECTED, getAllSelectedItems } from '../../utils/dropdown-select-item.js';\nimport { task } from 'ember-concurrency';\n\nimport type { SafeString } from 'handlebars';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { BaseDropDownWrapperSignature } from '../base-dropdown/wrapper';\nimport type { CommonInputErrorTooltipArgs } from '../error-tooltip';\nimport type { DropdownMultiSelectToolbarSignature } from './multi-select/toolbar';\nimport type { CheckboxTreeSignature } from '../checkbox-tree';\nimport type { Task } from 'ember-concurrency';\n\ntype BaseDropDownWrapperSignatureArgs = BaseDropDownWrapperSignature['Args'];\ntype DropdownMultiSelectToolbarSignatureArgs = DropdownMultiSelectToolbarSignature['Args'];\n\nexport class ChecklistTreeInfo {\n title: string;\n items: CheckboxTreeItem[];\n maxItemCount: number;\n additionalItemCount: number;\n show: boolean;\n noResults: boolean;\n showHeader: boolean;\n showAllNoneSelectors: boolean;\n\n constructor(props: Partial<ChecklistTreeInfo> = {}) {\n this.title = props.title ?? '';\n this.items = props.items ?? [];\n this.maxItemCount = props.maxItemCount ?? 0;\n this.additionalItemCount = props.additionalItemCount ?? 0;\n this.show = props.show ?? true;\n this.noResults = props.noResults ?? false;\n this.showHeader = props.showHeader ?? false;\n this.showAllNoneSelectors = props.showAllNoneSelectors ?? false;\n }\n\n get displayItems(): CheckboxTreeItem[] {\n const { maxItemCount, items } = this;\n return maxItemCount > 0 ? items.slice(0, maxItemCount) : items;\n }\n\n private updateItemState(state: number): void {\n A(this.items.filter((item) => item.isSelectable && !item.disabled)).setEach('state', state);\n }\n\n @action selectAll(): void {\n this.updateItemState(SELECTED);\n }\n\n @action selectNone(): void {\n this.updateItemState(UNSELECTED);\n }\n}\n\nconst VALUE_CHANGE_ACTION = 'value-change';\n\n/**\n * Sets the selector of the focusable element.\n */\nfunction setFocusSelector(this: MultiSelectComponent, elementId?: string): void {\n const fnUpdateFocusSelector = (s = ''): void => {\n set(this, 'focusSelector', `.dropdown-content div[data-dropdown-id='${guidFor(this)}']${s}`);\n };\n\n if (elementId) {\n return fnUpdateFocusSelector(`.dropdown-body input[id='${elementId}']`);\n }\n\n if (this.showSearch) {\n return fnUpdateFocusSelector('.toolbar input[type=\"search\"]');\n }\n\n return fnUpdateFocusSelector();\n}\n\n/**\n * Sets focus back to the trigger of the dropdown if it is closed.\n */\nfunction setFocusBackToTrigger(this: MultiSelectComponent) {\n const triggerElement = (\n this.hasCustomTrigger\n ? document.querySelector(\n `.external-trigger .dropdown-select button[id='${this.triggerId}'].dropdown-trigger div`\n )?.firstElementChild\n : document.querySelector(`.dropdown-select button[aria-owns='${this.contentId}'].btn-select`)\n ) as HTMLElement;\n\n if (!this.isOpen && triggerElement) {\n triggerElement.focus();\n }\n}\n\n/**\n * Schedules clearing of error message\n */\nfunction clearErrorMessageTrigger(this: MultiSelectComponent): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce('afterRender', this, 'clearErrorMessage');\n}\n\n/**\n * Clones the passed items.\n *\n * @param items The items to clone.\n * @param [flatten=false] If true, subitems will be flattened into the same array as their parent.\n */\nfunction cloneItems(items: CheckboxTreeItem[] = [], flatten = false): CheckboxTreeItem[] {\n return items.reduce((items, src) => {\n const subItems = cloneItems(src.subitems, flatten),\n { parent, description } = src;\n\n return [\n ...items,\n CheckboxTreeItem.create({\n ...getProperties(\n src,\n 'name',\n 'value',\n 'disabled',\n 'icon',\n 'state',\n 'action',\n 'isSelectable',\n 'isCollapsible',\n 'showAllNoneSelectors'\n ),\n description: parent ? `(${parent.name}) ${description}` : description,\n subitems: flatten ? [] : subItems,\n src\n })\n ];\n }, []);\n}\n\n/**\n * Synchronizes cloned items with their source item.\n *\n * @param clones The cloned items to synchronize.\n */\nfunction synchronizeItems(clones: CheckboxTreeItem[]) {\n // Iterate clones.\n clones.forEach((clone) => {\n const { src } = clone;\n\n // Is there a source for this clone?\n if (src) {\n // Update state and synchronize subitems.\n src.set('state', clone.state);\n synchronizeItems(clone.subitems);\n }\n });\n}\n\n/**\n * Returns a flattened array of items that match the provided search text.\n *\n * @param items - The items we are matching the search text against.\n * @param searchString - The search string.\n */\nfunction getFilteredItems(items: CheckboxTreeItem[], searchString: string): CheckboxTreeItem[] {\n if (!searchString) {\n return items;\n }\n\n return items.reduce(\n (filteredItems, item) => [\n ...filteredItems,\n ...(item.hasSubitems ? getFilteredItems(item.subitems, searchString) : [])\n ],\n items.filter(doesItemMatchSearch.bind(null, searchString))\n );\n}\n\n/**\n * Returns true if the item's properties contain the searchString.\n *\n * @param searchString - The text we are searching for.\n * @param item - The item we are testing the search text against.\n */\nfunction doesItemMatchSearch(searchString: string, item: CheckboxTreeItem): boolean {\n return ['name', 'description', 'secondaryDescription'].some((property) =>\n (item[property] || '').toLowerCase().includes(searchString.toLowerCase())\n );\n}\n\ntype ItemsCollection = {\n limit: number;\n items: CheckboxTreeItem[];\n};\n\nexport interface MultiSelectSignature {\n Element: HTMLDivElement;\n Args: CommonInputErrorTooltipArgs &\n Pick<\n BaseDropDownWrapperSignatureArgs,\n | 'popoverPlacement'\n | 'popoverClass'\n | 'preventScroll'\n | 'popoverMaxHeight'\n | 'popoverMaxWidth'\n | 'popoverMinWidth'\n | 'matchTriggerElementWidth'\n > &\n Pick<DropdownMultiSelectToolbarSignatureArgs, 'placeholder'> &\n Pick<CheckboxTreeSignature['Args'], 'isFocusable'> & {\n /** The items to render. */\n items: CheckboxTreeItem[] | Promise<CheckboxTreeItem[]>;\n /** Describes the type of items displayed. */\n itemsText?: string;\n /** Indicates we should use the `{{yield}}` template helper to render a custom trigger for this dropdown. */\n hasCustomTrigger?: boolean;\n /** Indicates the dropdown is open. */\n isOpen?: boolean;\n /** Indicates the dropdown search box should be shown, regardless of the number of items present. */\n hasSearch?: boolean;\n /** Indicates the maximum number of items to display before showing search box. */\n maxItemCount?: number;\n /** Always show the \"Please Select All | None\" header, even when items are not limited via maxItemCount. */\n alwaysShowHeaders?: boolean;\n /** The search text. */\n searchString?: string;\n /** Triggered when the user chooses a new value for the drop down. */\n 'value-change'?: (items: CheckboxTreeItem[]) => void;\n /** The aria-label value for the trigger */\n label?: string;\n /** `-1` to indicate non-custom trigger is keyboard accessible. */\n tabindex?: number;\n /** Indicates the non-custom trigger should be disabled. */\n disabled?: boolean;\n };\n Blocks: {\n /** When `@hasCustomTrigger` is `true` this will yield the `id` and CSS classes for the customer trigger, as well as an action for toggling the drop down open/closed. */\n default: [string, string, (event: Event) => void];\n };\n}\n\n/**\n * @classdesc\n * A custom dropdown (i.e. \"select\") allowing multiple items to be selected.\n *\n * @note This component should not be directly rendered in a template. Use dropdown-select\n * with the \"multiselect\" property set to true in order to use this.\n */\nexport default class MultiSelectComponent extends Component<MultiSelectSignature> {\n tagName = '';\n\n @service declare intl: ADCIntlService;\n\n constructor(...args: any[]) {\n super(...args);\n\n this.updateFocusSelector();\n }\n\n /**\n * The passed dropdown items.\n */\n items: CheckboxTreeItem[] | Promise<CheckboxTreeItem[]> = [];\n\n /**\n * The number of items shown before we begin hiding items and force a search to narrow results. Any value less than 1 means we will\n * show all items with no search functionality.\n */\n maxItemCount = -1;\n\n /**\n * Indicates we should always show the \"Please Select All | None\" header, even when items are not limited via `maxItemCount`.\n */\n alwaysShowHeaders = false;\n\n /**\n * Searching is enabled automatically if max item count is exceeded, but if this property is true the search will\n * be displayed even if there aren't too many items.\n */\n hasSearch = false;\n\n /**\n * The dropdown select placeholder.\n */\n placeholder = '';\n\n /**\n * The text to show in the search box.\n */\n searchString = '';\n\n /**\n * Used to describe the items display in the select box.\n */\n itemsText = '';\n\n /**\n * Indicates we should use the yield helper to display a custom trigger.\n */\n hasCustomTrigger = false;\n\n /**\n * When the popover for this is rendered, we trigger a focus event on the popover. Should we prevent the page from scrolling when this focus is triggered.\n */\n preventScroll = false;\n\n /**\n * A copy of the last selected items.\n */\n cachedSelections: CheckboxTreeItem[] = [];\n\n /**\n * A closure function to call when the selected item changes.\n */\n [VALUE_CHANGE_ACTION]?: (value: CheckboxTreeItem[]) => void;\n\n /**\n * Specifies error message to be displayed as a tooltip on the input.\n */\n errorMessage: string | undefined;\n\n /**\n * Indicates the dropdown is open.\n */\n @tracked isOpen = false;\n\n /**\n * The selector of the element which should receive focus after the dropdown opens.\n */\n focusSelector = '';\n\n /**\n * The checkbox items to render (after promise is resolved).\n */\n @tracked resolvedItems: CheckboxTreeItem[] = [];\n\n /**\n * A task for resolving promise items.\n */\n resolveItems: Task<void, never> = task({ restartable: true }, async () => {\n const items = await this.items;\n this.resolvedItems = items ? [...items] : [];\n });\n\n @empty('resolvedItems')\n declare isEmpty: boolean;\n\n /**\n * Indicates we should show the checklist header with title and all/none selectors.\n */\n @computed('resolvedItems.@each.{isSelectable,isCollapsible}')\n get isSimpleList(): boolean {\n const resolvedItems = A(this.resolvedItems);\n return resolvedItems.isEvery('isSelectable', true) && resolvedItems.isEvery('isCollapsible', false);\n }\n\n /**\n * Indicates whether we should limit the displayed items and show search/selected items.\n */\n @computed('resolvedItems.[]', 'maxItemCount')\n get limitItems(): boolean {\n const { maxItemCount } = this;\n return maxItemCount > 0 && this.resolvedItems.length > maxItemCount;\n }\n\n /**\n * Indicates the search box should be visible.\n */\n @or('limitItems', 'hasSearch')\n showSearch!: boolean;\n\n /**\n * Are we displaying a subset of items because of the search string filter?\n */\n @bool('searchString')\n isFiltered!: boolean;\n\n /**\n * The raw items that are currently selected.\n */\n @computed('resolvedItems.@each.{state,isFullySelected,isPartiallySelected,isNotSelected}')\n get selectedItems(): CheckboxTreeItem[] {\n return getAllSelectedItems(this.resolvedItems);\n }\n\n /**\n * The raw items that are currently not selected.\n */\n @computed('resolvedItems.@each.state')\n get unselectedItems(): CheckboxTreeItem[] {\n return A(this.resolvedItems).rejectBy('state', SELECTED);\n }\n\n /**\n * Information about selected and unselected items, including computed limits for each.\n */\n @computed('isSimpleList', 'maxItemCount', 'resolvedItems.length', 'selectedItems.length', 'unselectedItems.length')\n get itemCollections(): {\n selected: ItemsCollection;\n unselected: ItemsCollection;\n } {\n const maxItemCount = Number(this.maxItemCount),\n { selectedItems, unselectedItems, resolvedItems, isSimpleList } = this,\n selected = {\n limit: 0,\n items: cloneItems(selectedItems, true)\n },\n unselected = {\n limit: 0,\n items: cloneItems(unselectedItems, false)\n };\n\n // Do we need to limit items?\n if (isSimpleList && maxItemCount > 0 && resolvedItems.length > maxItemCount) {\n const selectedCount = selectedItems.length,\n unselectedCount = unselectedItems.length;\n\n if (!selectedCount) {\n unselected.limit = maxItemCount;\n } else if (!unselectedCount) {\n selected.limit = maxItemCount;\n } else {\n const selectedMax = Math.floor(maxItemCount / 2);\n\n if (unselectedCount <= selectedMax) {\n selected.limit = maxItemCount - unselectedCount;\n unselected.limit = unselectedCount;\n } else if (selectedCount <= selectedMax) {\n selected.limit = selectedCount;\n unselected.limit = maxItemCount - selectedCount;\n } else {\n selected.limit = selectedMax;\n unselected.limit = maxItemCount - selectedMax;\n }\n }\n }\n\n // Are there no limits to the number of items shown.\n if (!isSimpleList || (selected.limit === 0 && unselected.limit === 0)) {\n // Don't use clones and don't show selected items.\n selected.items = [];\n unselected.items = resolvedItems;\n }\n\n return { selected, unselected };\n }\n\n /**\n * Creates and returns an array of CheckboxTreeItem for the passed items.\n */\n private getCheckList(title: string, itemCollection: ItemsCollection): ChecklistTreeInfo {\n const { items, limit } = itemCollection;\n\n if (isEmpty(items)) {\n // Return empty results.\n return new ChecklistTreeInfo({\n show: false\n });\n }\n\n const { searchString } = this,\n filteredItems = this.showSearch ? getFilteredItems.call(this, items, searchString) : items;\n\n // Are results filtered AND were none found?\n if (searchString && isEmpty(filteredItems)) {\n // Return no results.\n return new ChecklistTreeInfo({\n title,\n showHeader: true,\n noResults: true\n });\n }\n\n return new ChecklistTreeInfo({\n title,\n items: filteredItems,\n maxItemCount: limit,\n additionalItemCount: limit && filteredItems.length > limit ? filteredItems.length - limit : 0,\n showHeader: this.isSimpleList && (this.limitItems || this.alwaysShowHeaders),\n showAllNoneSelectors: true\n });\n }\n\n /**\n * The checklist tree that represents the currently selected items.\n */\n @computed('itemCollections.selected', 'itemsText', 'searchString', 'showSearch')\n get selectedTree(): ChecklistTreeInfo {\n return this.getCheckList(\n this.intl.t('@adc/ui-components.selectedItems', {\n itemsText: this.itemsText\n }),\n this.itemCollections.selected\n );\n }\n\n /**\n * The checklist tree that represents the currently unselected items.\n */\n @computed('itemCollections.unselected', 'searchString', 'showSearch')\n get unselectedTree(): ChecklistTreeInfo {\n return this.getCheckList(this.intl.t('@adc/ui-components.pleaseSelect'), this.itemCollections.unselected);\n }\n\n /**\n * A unique ID for the dropdown trigger to correspond to the content (for ARIA purposes).\n */\n @computed()\n get triggerId(): string {\n return `dropdown-trigger-${guidFor(this)}`;\n }\n\n /**\n * A unique ID so the dropdown trigger can correspond to the content (for ARIA purposes).\n */\n @computed()\n get contentId(): string {\n return `dropdown-content-${guidFor(this)}`;\n }\n\n /**\n * The computed text for the trigger.\n */\n @computed('selectedItems', 'placeholder')\n get triggerText(): string {\n return (\n this.selectedItems\n .map(({ isFullySelected, hasSubitems, name }) =>\n isFullySelected && hasSubitems\n ? this.intl.t('@adc/ui-components.allItems', {\n items: name\n })\n : name\n )\n .join(', ') || this.placeholder\n );\n }\n\n /**\n * The computed text to show in the dropdown trigger.\n */\n @computed('triggerText')\n get triggerTextHtml(): SafeString {\n // Return within a span element so we can manipulate it (if too long) and not break the binding.\n return htmlSafe(`<span>${this.triggerText}</span>`);\n }\n\n /**\n * Is the placeholder currently shown as the trigger text?\n *\n * @note Conditionally adds the \"placeholder\" class so the CSS can modify the placeholder text color.\n *\n * @ignore\n */\n @empty('selectedItems')\n isPlaceholderShown!: boolean;\n\n /**\n * Determines if the selected items have changed.\n */\n hasSelectionChanged(currentSelections: CheckboxTreeItem[], previousSelections: CheckboxTreeItem[]): boolean {\n return (\n currentSelections.length !== previousSelections.length ||\n currentSelections.some(({ value, state, hasSubitems, subitems }) => {\n // Was this item not present in previous selections?\n const previousItem = A(previousSelections).findBy('value', value);\n if (!previousItem) {\n // Selection changed.\n return true;\n }\n\n // Are there sub items?\n if (hasSubitems) {\n // Compare subitems.\n return this.hasSelectionChanged(subitems, previousItem.subitems);\n }\n\n // Compare items.\n return previousItem.state !== state;\n })\n );\n }\n\n /**\n * Updates the calling instance via the change action function , if the selected values have changed.\n */\n saveSelectionChange(\n currentValue: CheckboxTreeItem[],\n previousValue: CheckboxTreeItem[],\n valueChangeParameter: CheckboxTreeItem[] = currentValue\n ): void {\n if (this.hasSelectionChanged(currentValue, previousValue)) {\n clearErrorMessageTrigger.call(this);\n\n const valueChangeAction = this[VALUE_CHANGE_ACTION];\n if (valueChangeAction) {\n valueChangeAction(valueChangeParameter);\n }\n }\n }\n\n /**\n * Called when the dropdown trigger element changes size.\n */\n @action triggerResized(button: HTMLButtonElement): void {\n this.triggerTextChanged(button);\n }\n\n /**\n * Called when the text with the dropdown trigger element changes.\n * Modifies the trigger text to ensure it fits within the trigger.\n */\n @action triggerTextChanged(button: HTMLButtonElement): void {\n const label = button.querySelector('span');\n\n // Is label missing or empty?\n if (!label || isEmpty(label.innerText)) {\n // Nothing to do.\n return;\n }\n\n // Is the label span larger than the parent span (minus 60px for arrow)?\n // This updates the trigger aria-label, also\n if (\n label.getBoundingClientRect().width >=\n (button.parentNode as HTMLElement).getBoundingClientRect().width - 60 &&\n !(this.isDestroyed || this.isDestroying)\n ) {\n label.innerText = `${this.selectedItems.length} ${this.itemsText || this.placeholder}`;\n button.setAttribute('aria-label', label.innerText);\n }\n }\n\n /**\n * Updates the focus selector.\n */\n @action updateFocusSelector(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once<MultiSelectComponent, typeof setFocusSelector>(this, setFocusSelector, undefined);\n }\n\n /**\n * Updates the focus selector to select the active element.\n */\n @action updateFocusSelectorForElement(): void {\n const activeElement = document.activeElement as HTMLElement;\n if (activeElement?.dataset) {\n setFocusSelector.call(this, activeElement.id);\n }\n }\n\n /**\n * Caches the selected items when the drop down opens.\n */\n @action onDropdownOpen(): void {\n // Cache the items selected at time of open.\n this.cachedSelections = cloneItems(this.selectedItems, true);\n }\n\n /**\n * Called when the multiselect dropdown closes, to update selected items.\n */\n @action onDropdownClose(): void {\n // Synchronize items.\n [this.selectedTree, this.unselectedTree].forEach((tree) => synchronizeItems(tree.items));\n\n this.saveSelectionChange(this.selectedItems, this.cachedSelections, this.resolvedItems);\n\n // Reset.\n setProperties(this, {\n isOpen: false,\n searchString: ''\n });\n\n setFocusBackToTrigger.call(this);\n }\n\n @action clearErrorMessage(): void {\n set(this, 'errorMessage', undefined);\n }\n\n @action togglePopoverVisibility(event: Event): void {\n this.isOpen = !this.isOpen;\n event.stopPropagation();\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#unless @multiselect}}\\n <DropdownSelect::SingleSelect\\n @selectId={{@selectId}}\\n @items={{this.itemsInternal}}\\n @value={{this.valueString}}\\n @placeholder={{coalesce @placeholder \\\"\\\"}}\\n @disabled={{@disabled}}\\n @required={{@required}}\\n @errorMessage={{@errorMessage}}\\n @errorTooltipPlace={{@errorTooltipPlace}}\\n @errorDuration={{@errorDuration}}\\n @value-change={{@value-change}}\\n @label={{@label}}\\n tabindex={{if (eq @tabindex -1) -1 0}}\\n ...attributes\\n />\\n{{else}}\\n <DropdownSelect::MultiSelect\\n @items={{this.itemsInternal}}\\n @placeholder={{coalesce @placeholder \\\"\\\"}}\\n @disabled={{@disabled}}\\n @tabindex={{coalesce @tabindex 0}}\\n @errorMessage={{@errorMessage}}\\n @errorTooltipPlace={{@errorTooltipPlace}}\\n @errorDuration={{@errorDuration}}\\n @isOpen={{@isOpen}}\\n @hasSearch={{@hasSearch}}\\n @maxItemCount={{@maxItemCount}}\\n @alwaysShowHeaders={{@alwaysShowHeaders}}\\n @searchString={{@searchString}}\\n @matchTriggerElementWidth={{this.matchTriggerElementWidth}}\\n @hasCustomTrigger={{if (has-block) true}}\\n @popoverClass={{@popoverClass}}\\n @popoverPlacement={{@popoverPlacement}}\\n @popoverMaxHeight={{@maxHeight}}\\n @popoverMaxWidth={{@maxWidth}}\\n @popoverMinWidth={{@minWidth}}\\n @preventScroll={{@preventScroll}}\\n @itemsText={{@itemsText}}\\n @value-change={{@value-change}}\\n @label={{@label}}\\n ...attributes\\n >\\n <:default as |id classes togglePopoverVisibility|>\\n {{yield id classes togglePopoverVisibility}}\\n </:default>\\n </DropdownSelect::MultiSelect>\\n{{/unless}}\")","import Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { isEmpty, isPresent } from '@ember/utils';\nimport { isArray, A } from '@ember/array';\nimport { capitalize } from '@ember/string';\nimport DropdownSelectItem from '../utils/dropdown-select-item.js';\nimport { inject as service } from '@ember/service';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SingleSelectSignature } from './dropdown-select/single-select';\nimport type { MultiSelectSignature } from './dropdown-select/multi-select';\nimport type { CommonInputErrorTooltipArgs } from './error-tooltip';\n\ntype MultiSelectSignatureArgs = MultiSelectSignature['Args'];\ntype SingleSelectSignatureArgs = SingleSelectSignature['Args'];\ntype Items<TItem> = TItem[] | DropdownSelectItem[];\n\ninterface DropdownSelectCommonArgs<TItem> extends CommonInputErrorTooltipArgs {\n /** The Drop down items to render. */\n items: Promise<Items<TItem>> | Items<TItem>;\n /** The current select value (only works for single select). */\n value?: string;\n /** The key of the item used for the item value. */\n itemValueKey?: keyof TItem;\n /** The key of the item used for the item name. */\n itemNameKey?: keyof TItem;\n /** The key of the item used for the item description. */\n itemDescriptionKey?: keyof TItem;\n /** The key of the item used for the item disabled state. */\n itemDisabledKey?: keyof TItem;\n}\n\ninterface DropdownSelectSingleArgs<TItem>\n extends DropdownSelectCommonArgs<TItem>,\n Pick<\n SingleSelectSignatureArgs,\n 'value-change' | 'label' | 'selectId' | 'placeholder' | 'disabled' | 'required'\n > {\n /** Indicates the dropdown should be multi-select. */\n multiselect?: false;\n /** The tab index value for the native select element. */\n tabindex?: number;\n}\n\ninterface DropdownSelectMultiArgs<TItem>\n extends DropdownSelectCommonArgs<TItem>,\n Pick<\n MultiSelectSignatureArgs,\n | 'popoverPlacement'\n | 'popoverClass'\n | 'preventScroll'\n | 'popoverMaxHeight'\n | 'popoverMaxWidth'\n | 'popoverMinWidth'\n | 'matchTriggerElementWidth'\n | 'itemsText'\n | 'isOpen'\n | 'alwaysShowHeaders'\n | 'maxItemCount'\n | 'hasSearch'\n | 'searchString'\n | 'label'\n | 'placeholder'\n | 'disabled'\n | 'tabindex'\n | 'value-change'\n > {\n /** Indicates the dropdown should be multi-select. */\n multiselect: true;\n /** The popover max height, in pixels. */\n maxHeight?: MultiSelectSignatureArgs['popoverMaxHeight'];\n /** The popover max width, in pixels. */\n maxWidth?: MultiSelectSignatureArgs['popoverMaxWidth'];\n /** The popover minimum width, in pixels. */\n minWidth?: MultiSelectSignatureArgs['popoverMinWidth'];\n}\n\ninterface DropdownSelectSignature<TItem> {\n Element: SingleSelectSignature['Element'] | MultiSelectSignature['Element'];\n Args: DropdownSelectMultiArgs<TItem> | DropdownSelectSingleArgs<TItem>;\n Blocks: {\n /** When passing a custom trigger (multiselect only) this will yield the `id` and CSS classes for the customer trigger, as well as an action for toggling the drop down opened/closed. */\n default: [string, string, (event: Event) => void];\n };\n}\n\n/**\n * @classdesc\n *\n * A middle-man component for rendering either a native HTML select element, or a custom multiselect dropdown list.\n */\nexport default class DropdownSelect<TItem> extends Component<DropdownSelectSignature<TItem>> {\n @service declare intl: ADCIntlService;\n\n /**\n * Whether or not the dropdown wrapper should match the trigger element width, with respect to the min-width CSS property value.\n */\n get matchTriggerElementWidth(): boolean {\n const { args } = this;\n return (args.multiselect && args.matchTriggerElementWidth) ?? true;\n }\n\n /**\n * Converts a custom object into a {@link DropdownSelectItem} using the property keys (e.g. itemNameKey).\n */\n private convertToDropdownSelectItem(customItem: TItem): DropdownSelectItem {\n const newItemObject: Partial<DropdownSelectItem> = {};\n\n type CustomKeyArgs = Pick<\n DropdownSelectSignature<TItem>['Args'],\n 'itemNameKey' | 'itemValueKey' | 'itemDescriptionKey' | 'itemDisabledKey'\n >;\n ['name', 'value', 'description', 'disabled'].forEach((dropdownSelectKey) => {\n const customKey = this.args[`item${capitalize(dropdownSelectKey)}Key` as keyof CustomKeyArgs];\n\n // Was a key defined and does the custom object have a value for that key?\n if (customKey && isPresent(customItem[customKey])) {\n newItemObject[dropdownSelectKey] = customItem[customKey];\n }\n });\n\n return DropdownSelectItem.create(newItemObject as DropdownSelectItem);\n }\n\n /**\n * Transforms the items resolved in the promise into the correct format for use in the dropdown-select.\n *\n * @note This allows a developer to define a mapping and then have the dropdown-select component handle the\n * conversion once the promise resolves.\n */\n private transformItemsCollection(items: Items<TItem>): DropdownSelectItem[] {\n // NOTE: The order of checks is important here. The order of precedence is:\n // 1. Value and name mapping\n // 2. No mapping (return the same array)\n\n if (!isArray(items) || isEmpty(items)) {\n return A([]);\n }\n\n // Is there a known mapping of value and name?\n if (this.args.itemValueKey && this.args.itemNameKey) {\n // Create a DropdownSelectItem for each item returned from the promise.\n return A((items as TItem[]).map((item) => this.convertToDropdownSelectItem(item)));\n }\n\n // No mapping was specified. Return the same array.\n return items as DropdownSelectItem[];\n }\n\n /**\n * Ensures that \"items\" are valid, are run through any specified transforms, and are wrapped in a PromiseArray.\n */\n @computed('args.items.[]')\n get itemsInternal(): Promise<DropdownSelectItem[]> {\n return (async () => {\n const items = await this.args.items,\n transformedItems = this.transformItemsCollection(items);\n\n // Does each item have the correct DropdownSelectItem structure?\n transformedItems.forEach((item) => {\n if (!item || item.name === undefined || item.value === undefined) {\n throw new Error(`Item must have value and name properties ${JSON.stringify(item)}`);\n }\n });\n\n return transformedItems;\n })();\n }\n\n /**\n * A string copy of the value since it must be a string for data attribute lookup in the DOM.\n */\n @computed('args.value')\n get valueString(): string | undefined {\n const { value } = this.args;\n return isEmpty(value) ? value : String(value);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"dropdown-select {{if this.isEmpty \\'empty\\'}} {{if this.resolvedErrorMessage \\'error\\'}}\\\"\\n {{did-update this.onErrorMessageChange @errorMessage}}\\n {{did-insert this.resolveItems.perform}}\\n {{did-update this.resolveItems.perform @items}}\\n>\\n <div class=\\\"dropdown-single-select\\\">\\n <select\\n id={{@selectId}}\\n disabled={{@disabled}}\\n required={{@required}}\\n aria-live=\\\"polite\\\"\\n aria-label={{this.label}}\\n ...attributes\\n {{on \\\"change\\\" this.itemClicked}}\\n {{did-insert this.synchronizeSelectedItem}}\\n {{did-update this.synchronizeSelectedItem @value}}\\n {{did-update this.synchronizeSelectedItem this.resolvedItems}}\\n >\\n {{#if @placeholder}}\\n {{! If there are no selected items, mark the placeholder as selected. }}\\n {{#if (eq this.selectedItems.length 0)}}\\n <option selected disabled value=\\\"\\\">\\n {{@placeholder}}\\n </option>\\n {{else}}\\n {{! Do not mark the placeholder as selected to avoid multiple selected options. }}\\n <option disabled value=\\\"\\\">\\n {{@placeholder}}\\n </option>\\n {{/if}}\\n {{/if}}\\n\\n {{#each this.resolvedItems as |item|}}\\n {{#if item.hasSubitems}}\\n <optgroup label={{item.name}}>\\n {{#each item.subitems as |subitem|}}\\n <option\\n value={{subitem.value}}\\n disabled={{subitem.disabled}}\\n selected=\\\"{{if (eq item.state this.dropdownSelectItemEnumSelected) \\'selected\\'}}\\\"\\n {{did-insert (fn this.updateOption subitem)}}\\n {{did-update (fn this.updateOption subitem) subitem.state}}\\n >\\n {{subitem.name}}\\n </option>\\n {{/each}}\\n </optgroup>\\n {{else}}\\n <option\\n value={{item.value}}\\n disabled={{item.disabled}}\\n selected=\\\"{{if (eq item.state this.dropdownSelectItemEnumSelected) \\'selected\\'}}\\\"\\n {{did-insert (fn this.updateOption item)}}\\n {{did-update (fn this.updateOption item) item.state}}\\n >\\n {{item.name}}\\n </option>\\n {{/if}}\\n {{/each}}\\n </select>\\n <svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\">\\n <polygon\\n fill-rule=\\\"evenodd\\\"\\n points=\\\"11.95 16.364 6.293 10.707 7.707 9.293 11.95 13.536 16.193 9.293 17.607 10.707\\\"\\n ></polygon>\\n </svg>\\n </div>\\n <ErrorTooltip\\n @text={{this.resolvedErrorMessage}}\\n @placement={{@errorTooltipPlace}}\\n @duration={{@errorDuration}}\\n @selector=\\\"select\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</div>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action, set } from '@ember/object';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { reads, empty, filterBy } from '@ember/object/computed';\nimport { computed } from '@ember/object';\nimport { once, scheduleOnce } from '@ember/runloop';\nimport DropdownSelectItem, { UNSELECTED, SELECTED } from '../../utils/dropdown-select-item.js';\nimport { A } from '@ember/array';\nimport { task } from 'ember-concurrency';\nimport { inject as service } from '@ember/service';\n\nimport type { CommonInputErrorTooltipArgs } from '../error-tooltip';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { Task } from 'ember-concurrency';\n\nconst VALUE_CHANGE_ACTION = 'value-change';\n\n/**\n * Update the selected item based on the given value.\n *\n * @param value - The value of the item that should be selected.\n * @param [shouldIgnoreAction=false] - Should the action notifying the user of a change in value not be sent?\n */\nfunction updateSelectedValue(this: SingleSelectComponent, value: string, shouldIgnoreAction = false): void {\n if (this.resolvedItems.length) {\n this.selectItem(value, shouldIgnoreAction);\n }\n}\n\n/**\n * Toggles the error message visibility.\n */\nfunction toggleErrorMessageVisibility(this: SingleSelectComponent, errorMessage?: string): void {\n if (!isDestroyed(this)) {\n this.hideErrorMessage = !errorMessage;\n }\n}\n\nexport interface SingleSelectSignature {\n Element: HTMLSelectElement;\n Args: CommonInputErrorTooltipArgs & {\n /** Triggered when the user chooses a new value for the drop down. */\n [VALUE_CHANGE_ACTION]?: (value: string) => void;\n /** The currently selected value. */\n value?: string;\n /** The dropdown items to render. */\n items?: Promise<DropdownSelectItem[]> | DropdownSelectItem[];\n /** Optional ID value for the native select element (should be passed as HTML attribute instead). */\n selectId?: string;\n /** Text for the optional unselectable placeholder option for the native select element. */\n placeholder?: string;\n /** Indicates a selection value is required (should be passed as HTML attribute instead). */\n required?: boolean;\n /** Indicates the native select element should be disabled (should be passed as HTML attribute instead). */\n disabled?: boolean;\n /** Optional aria-label for the select element (should be passed as HTML attribute instead). */\n label?: string;\n };\n}\n\n/**\n * @classdesc\n * ADC's custom version of the native HTML select element. Only one item can be selected from this dropdown.\n *\n * @note This component should not be directly rendered in a template. Use dropdown-select with the\n * \"multiselect\" property set to false in order to use this.\n */\nexport default class SingleSelectComponent extends Component<SingleSelectSignature> {\n @service declare intl: ADCIntlService;\n\n @tracked resolvedItems: DropdownSelectItem[] = [];\n\n /**\n * The dropdown select item enum value for SELECTED.\n */ // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dropdownSelectItemEnumSelected = SELECTED;\n\n /**\n * A task for resolving promise items.\n */\n resolveItems: Task<void, never> = task({ restartable: true }, async () => {\n const items = await this.args.items;\n this.resolvedItems = items ? [...items] : [];\n });\n\n /**\n * Should the error message be hidden?\n */\n @tracked hideErrorMessage = false;\n\n /**\n * The error message for the select.\n */\n get resolvedErrorMessage(): string | undefined {\n return this.hideErrorMessage ? '' : this.args.errorMessage;\n }\n\n /**\n * Are there no items?\n */\n @empty('resolvedItems')\n isEmpty!: boolean;\n\n /**\n * A collection of items that are selected in the dropdown.\n *\n * @note This should only contain one item for the DropdownSelectSingle.\n * Warning: Never bind to this value from the outside. This should\n * be used internally only.\n *\n * @ignore\n */\n @filterBy('resolvedItems', 'state', SELECTED)\n selectedItems!: DropdownSelectItem[];\n\n /**\n * The item that is selected in the dropdown-select.\n *\n * @note This property should only be used in the DropdownSelectSingle component.\n * Warning: never bind to this value from the outside. This should be used\n * internally only.\n */\n @reads('selectedItems.firstObject')\n selectedItem!: DropdownSelectItem;\n\n /**\n * The aria-label attribute to apply. Use whats passed in if passed in, otherwise use default\n */\n @computed('args.label')\n get label(): string {\n return this.args.label || this.intl.t('@adc/ui-components.triggerSelect');\n }\n\n /**\n * Determines if the selected items have changed.\n */\n hasSelectionChanged(currentValue: string, previousValue?: string): boolean {\n try {\n // NOTE: The try/catch was added because there is a circular reference happening in items.\n return JSON.stringify(currentValue) !== JSON.stringify(previousValue);\n } catch (e) {\n return currentValue !== previousValue;\n }\n }\n\n /**\n * Triggers the value-change action if the selections inside the dropdown have changed.\n */\n saveSelectionChange(\n currentValue: string,\n previousValue?: string,\n valueChangeParameter: string = currentValue\n ): void {\n if (this.hasSelectionChanged(currentValue, previousValue)) {\n toggleErrorMessageVisibility.call(this);\n\n const valueChangeAction = this.args[VALUE_CHANGE_ACTION];\n\n if (valueChangeAction) {\n valueChangeAction(valueChangeParameter);\n }\n }\n }\n\n /**\n * Sets the specified item's state to selected.\n *\n * @param selectedValue - The value of the item that was selected.\n * @param [shouldIgnoreAction=false] - Should the action notifying the user of a change in value not be sent?\n */\n selectItem(selectedValue: string, shouldIgnoreAction = false): boolean {\n if (!selectedValue) {\n return false;\n }\n\n const flattenedItems = A<DropdownSelectItem>(\n this.resolvedItems\n .map((item) => (item.hasSubitems ? item.subitems : item))\n .reduce((acc, val) => acc.concat(val), [])\n ),\n previousItem = flattenedItems.findBy('state', SELECTED) ?? ({} as DropdownSelectItem),\n selectedItem = flattenedItems.findBy('value', selectedValue);\n\n if (!selectedItem) {\n return false;\n }\n\n // Ensure only the clicked item is selected.\n flattenedItems.setEach('state', UNSELECTED);\n set(selectedItem, 'state', SELECTED);\n\n if (!shouldIgnoreAction) {\n // Note: Native selects close when an item is selected.\n this.onDropdownClose(selectedItem.value, previousItem.value);\n }\n\n return true;\n }\n\n /**\n * Synchronizes the currently selected item with the current value.\n */\n @action synchronizeSelectedItem(): void {\n // Some parents do not utilize the 'value' arg, and just set the state of the options in the items array directly\n // This can confuse Ember, so to compensate, if this.args.value is undefined, we synchronize by\n // finding the selected item in the array and 'select' it again to ensure Ember updates the UI\n const value = this.args.value ?? this.resolvedItems.find((x) => x.state)?.value ?? '';\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once<SingleSelectComponent, typeof updateSelectedValue>(this, updateSelectedValue, value, true);\n }\n\n /**\n * Called when the user changes the selected item in the UI.\n */\n @action itemClicked(evt: Event): void {\n this.selectItem((evt.target as HTMLSelectElement).value);\n }\n\n /**\n * Calls the saveSelectionChange method.\n */\n @action onDropdownClose(currentValue: string, previousValue?: string, valueChangeParameter?: string): void {\n this.saveSelectionChange(currentValue, previousValue, valueChangeParameter);\n }\n\n /**\n * Triggers when the error message changes.\n */\n @action onErrorMessageChange(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce<SingleSelectComponent, typeof toggleErrorMessageVisibility>(\n 'afterRender',\n this,\n toggleErrorMessageVisibility,\n this.args.errorMessage\n );\n }\n\n /**\n * Sets the attributes on the option element.\n */\n @action updateOption(item: DropdownSelectItem, el: HTMLOptionElement): void {\n if (item.state === SELECTED) {\n el.setAttribute('selected', 'selected');\n } else {\n el.removeAttribute('selected');\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"form-group\\n {{if @error \\'error\\'}}\\n {{if @inline \\'inline\\' \\'stacked\\'}}\\n {{if @required \\'required\\'}}\\n {{unless @label \\'no-label\\'}}\\n {{if (and @label @inline @labelDescription) \\'description\\'}}\\n {{if @labelTextRight \\'text-right\\'}}\\\"\\n ...attributes\\n>\\n {{#if @label}}\\n <label class={{@labelClass}} for=\\\"{{if @formElementId @formElementId}}\\\">\\n <span class=\\\"label\\\">{{@label}}</span>\\n {{#if (and @inline @labelDescription)}}\\n <span class=\\\"description\\\">{{@labelDescription}}</span>\\n {{/if}}\\n </label>\\n {{/if}}\\n\\n {{yield}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SafeString } from 'handlebars';\n\nexport interface FormGroupSignature {\n Element: HTMLDivElement;\n Args: {\n /** Indicates there is a form input validation error. */\n error?: any;\n /** Indicates the form group should be inline with the input, instead of stacked. */\n inline?: boolean;\n /** Indicates the input is required. */\n required?: boolean;\n /** The label text for the input. */\n label?: string | SafeString;\n /** Optional CSS class applied tot he label element. */\n labelClass?: string;\n /** The description text for the input. */\n labelDescription?: string | SafeString;\n /** Indicates the format group should be text-align to the right. */\n labelTextRight?: boolean;\n /** Input ID value so the label/input are accessible (strongly encouraged). */\n formElementId?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst FormGroup = templateOnlyComponent<FormGroupSignature>();\nexport default FormGroup;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" ...attributes>\\n <path d=\\\"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm1,15H11V11h2v6Zm0-8H11V7h2V9Z\\\"></path>\\n</svg>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface InfoIconSignature {\n Element: SVGElement;\n}\n\nconst InfoIcon = templateOnlyComponent<InfoIconSignature>();\nexport default InfoIcon;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" ...attributes>\\n <path d=\\\"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2ZM11.38,16L10,14.62l-3-3,1.41-1.41,3,3L16.59,8,18,9.41Z\\\"></path>\\n</svg>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface SuccessIconSignature {\n Element: SVGElement;\n}\n\nconst SuccessIcon = templateOnlyComponent<SuccessIconSignature>();\nexport default SuccessIcon;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" ...attributes>\\n <path d=\\\"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm1,15H11V11h2v6Zm0-8H11V7h2V9Z\\\"></path>\\n</svg>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface WarningSignature {\n Element: SVGElement;\n}\n\nconst WarningIcon = templateOnlyComponent<WarningSignature>();\nexport default WarningIcon;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\" ...attributes>\\n <path\\n d=\\\"M21.64,17.78L14.32,4.41a2.59,2.59,0,0,0-4.6,0L2.38,17.78A2.81,2.81,0,0,0,4.68,22H19.34A2.81,2.81,0,0,0,21.64,17.78ZM13,20H11V18h2v2Zm0-4H11V8h2v8Z\\\"\\n ></path>\\n</svg>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nexport interface DangerIconSignature {\n Element: SVGElement;\n}\n\nconst DangerIcon = templateOnlyComponent<DangerIconSignature>();\nexport default DangerIcon;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"alert elevated {{this.type}} {{@pointerPlacement}}\\\" ...attributes>\\n <div class=\\\"inline-alert-content\\\">\\n {{#unless @hideLeftIcon}}\\n <div class=\\\"svg-container\\\">\\n <div class=\\\"circle\\\" />\\n {{#if @leftIcon}}\\n <SvgSymbol class=\\\"icon\\\" @icon={{@leftIcon}} />\\n {{else}}\\n {{! @glint-expect-error: Glint does not know what this component is yet}}\\n <this.path class=\\\"icon\\\" />\\n {{/if}}\\n </div>\\n {{/unless}}\\n <div class=\\\"inline-alert-text\\\">\\n {{#if @title}}\\n <h3>{{@title}}</h3>\\n {{/if}}\\n {{#if @text}}\\n <p>{{@text}}</p>\\n {{else}}\\n {{yield}}\\n {{/if}}\\n </div>\\n {{#if @iconButton}}\\n <Button::Icon\\n class=\\\"right-icon-button\\\"\\n @buttonColor=\\\"stealth\\\"\\n @iconOnly={{true}}\\n @text={{@iconButton.text}}\\n @icon={{coalesce @iconButton.icon \\\"close\\\"}}\\n @buttonAction={{@iconButton.action}}\\n />\\n {{/if}}\\n </div>\\n <div class=\\\"alert-confirmation-buttons\\\">\\n {{#if @confirmButton}}\\n <Button::Simple @text={{@confirmButton.text}} @buttonColor=\\\"primary\\\" {{on \\\"click\\\" @confirmButton.action}} />\\n {{/if}}\\n {{#if @cancelButton}}\\n <Button::Simple @text={{@cancelButton.text}} {{on \\\"click\\\" @cancelButton.action}} />\\n {{/if}}\\n </div>\\n</div>\")","import Component from '@glimmer/component';\nimport InfoIcon from './inline-alert/info.ts';\nimport SuccessIcon from './inline-alert/success.ts';\nimport WarningIcon from './inline-alert/warning.ts';\nimport DangerIcon from './inline-alert/danger.ts';\n\nimport type { SafeString } from 'handlebars';\nimport type { TOC } from '@ember/component/template-only';\n\nexport type InlineAlertType = 'info' | 'success' | 'warning' | 'danger';\n\nexport type InlineAlertPointerPlacement = 'top' | 'bottom';\n\n// The button object that is rendered in the inline alert. Will need to pass in a text and an action to render properly.\nexport type InlineAlertButton = {\n icon?: string;\n text: string;\n action: () => any;\n};\n\n/**\n * The different possible types of messages, each colored differently.\n */\nconst TYPES: InlineAlertType[] = ['info', 'success', 'warning', 'danger'];\n\nexport interface InlineAlertSignature {\n Element: HTMLDivElement;\n Args: {\n /** The type of inline alert to show (defaults to 'info'). */\n type?: 'info' | 'success' | 'warning' | 'danger';\n /** Optional pointer type for inline alert to contain a top or bottom pointer, defaults to no pointer */\n pointerPlacement?: 'top' | 'bottom';\n /** Optional flag to hide the icon on the left side */\n hideLeftIcon?: boolean;\n /** Optional text to include within the inline alert (will not yield if present). */\n text?: string | SafeString;\n /** Optional title text to include within the inline alert */\n title?: string;\n /** Optional icon override for the left icon. If nothing is passed in, it will use the icon associated with the alert type */\n leftIcon?: string;\n /** The icon button, will need a text and an action to render properly.*/\n iconButton?: InlineAlertButton;\n /** The confirm button, will need a text and an action to render properly */\n confirmButton?: InlineAlertButton;\n /** The cancel button, will need a text and an action to render properly */\n cancelButton?: InlineAlertButton;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * An inline banner displayed with a configurable message, and including an icon and color indicative of the severity (info, success, warning or danger).\n */\nexport default class InlineAlert extends Component<InlineAlertSignature> {\n /**\n * Validated type.\n */\n get type(): InlineAlertType {\n const { type = TYPES[0] } = this.args;\n return TYPES.includes(type) ? type : TYPES[0];\n }\n\n get path(): typeof Component<any> | TOC<any> {\n return (\n {\n ['info']: InfoIcon,\n ['success']: SuccessIcon,\n ['warning']: WarningIcon,\n ['danger']: DangerIcon\n } as Record<string, typeof Component<any> | TOC<any>>\n )[this.type];\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"modal-host\\\" ...attributes>\\n {{#let this.modals.modalsToRender as |modals|}}\\n <div\\n role=\\\"button\\\"\\n class=\\\"modal-backdrop {{if modals.length \\'active\\'}}\\\"\\n aria-hidden=\\\"true\\\"\\n {{on \\\"click\\\" this.modalBackdropTrigger}}\\n ></div>\\n {{#each modals as |modal|}}\\n {{! template-lint-disable no-array-prototype-extensions }}\\n <div\\n class={{if (eq modal modals.lastObject) \\\"modal-top\\\" \\\"modal-hidden\\\"}}\\n {{focus-trap isActive=(eq modal modals.lastObject) focusTrapOptions=this.focusTrapOptions}}\\n >\\n {{! @glint-ignore: There is no way to tell glint what the modal.type is }}\\n <modal.type tabindex={{if this.focusSelector -1 0}} @model={{modal.model}} />\\n </div>\\n {{/each}}\\n {{/let}}\\n</div>\")","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport type ModalService from '../services/modals.ts';\nimport { action, computed } from '@ember/object';\nimport { addWeakListener } from '@adc/ember-utils/utils/event-listeners';\n\nexport interface ModalsHostSignature {\n Element: HTMLDivElement;\n}\n\n/**\n * @classdesc\n *\n * Component designed to handle rendering of modals\n *\n */\nexport default class ModalsHost extends Component<ModalsHostSignature> {\n @service declare modals: ModalService;\n\n /**\n * option for focus-trap modifier\n */\n focusTrapOptions = {\n escapeDeactivates: false,\n allowOutsideClick: true,\n initialFocus: this.focusSelector,\n preventScroll: true\n };\n\n constructor(owner: unknown, args: any) {\n super(owner, args);\n\n addWeakListener(this, document, 'keyup', this.modalKeyTrigger);\n }\n\n /**\n * Return modal model's focusSelector if it has one\n */\n @computed('modals.modalsToRender')\n get focusSelector(): string | undefined {\n const modals = this.modals.modalsToRender;\n if (!modals.lastObject?.model) {\n return;\n }\n\n return modals.lastObject.model.focusSelector;\n }\n\n /**\n * Close the modal\n */\n @action\n modalBackdropTrigger(): void {\n if (!this.modals.modalsToRender.lastObject?.model?.disableBackdropClose) {\n this.modals.closeModal();\n }\n }\n\n /**\n * Handle keyup events\n */\n @action\n modalKeyTrigger(event: KeyboardEvent): void {\n const { code, target } = event;\n if (code === 'Escape' && (target as HTMLElement).tagName !== 'INPUT') {\n this.modalBackdropTrigger();\n }\n }\n}\n","import { modifier } from 'ember-modifier';\nimport { assert } from '@ember/debug';\nimport { later } from '@ember/runloop';\n\nexport interface AddDelayedCssSignature {\n Element: HTMLElement;\n Args: {\n Positional: [string, number?];\n };\n}\n\n/**\n * Adds the passed CSS class to the passed HTML element (with optional delay) after element is rendered. Useful for animation after rendering.\n */\nconst addDelayedCssSignature: ReturnType<\n typeof modifier<AddDelayedCssSignature>\n> = modifier<AddDelayedCssSignature>(function addDelayedCss(\n element: HTMLElement,\n [css, delay = 0]: [css: string, delay: number]\n): void {\n assert(\n '[@adc/template-helpers] The add-delayed-css modifier expects a CSS class to apply',\n css\n );\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(() => element.classList.add(css), delay);\n});\nexport default addDelayedCssSignature;\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n /**\n * Adds the passes CSS class to the modified element, after render (and using the delay value if passed).\n *\n * @example <div {{add-delayed-css \"is-open\"}} />\n */\n 'add-delayed-css': typeof addDelayedCssSignature;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"ui-modal-header\\\" ...attributes>\\n {{yield}}\\n\\n {{#if @title}}\\n <h4 id={{@titleId}}>\\n {{@title}}\\n </h4>\\n {{/if}}\\n\\n {{#unless @disableCloseButton}}\\n <Button::Icon\\n @icon=\\\"close\\\"\\n @iconOnly={{true}}\\n @text={{t \\\"@adc/ui-components.close\\\"}}\\n @buttonColor=\\\"stealth\\\"\\n @buttonAction={{coalesce @customClose this.modals.closeModal}}\\n class=\\\"modal-close\\\"\\n />\\n {{/unless}}\\n</div>\")","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\n\nimport type ModalService from '../../../../services/modals.ts';\n\nexport interface ModalHeaderSignature {\n Element: HTMLDivElement;\n Args: {\n /** The modal header title. */\n title: string;\n /** The title element ID attribute value, used to label the modal with the title element, for a11y. */\n titleId?: string;\n /** Triggered when the user interacts with the close button. */\n customClose?: () => void;\n /** Indicates the header close button should not be visible. */\n disableCloseButton?: boolean;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * Header for modal component, contains title and close button\n */\nexport default class ModalHeader extends Component<ModalHeaderSignature> {\n @service declare modals: ModalService;\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"base-modal\\\" ...attributes {{add-delayed-css \\\"rendered\\\"}}>\\n <div class=\\\"modal\\\" role=\\\"dialog\\\" aria-labelledby={{this.ariaLabelledBy}}>\\n {{yield (component \\\"modals/base/header/modal-header\\\" titleId=this.ariaLabelledBy) to=\\\"header\\\"}}\\n {{yield}}\\n {{yield (component \\\"modals/base/footer/modal-footer\\\") to=\\\"footer\\\"}}\\n </div>\\n</div>\")","import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { ModalHeaderSignature } from './header/modal-header';\nimport type { ModalFooterSignature } from './footer/modal-footer';\n\nexport interface BaseModalSignature {\n Element: HTMLDivElement;\n Blocks: {\n /** The modal header component. */\n header: [WithBoundArgs<ComponentLike<ModalHeaderSignature>, 'titleId'>];\n /** The body of the modal. */\n default: [];\n /** The modal footer component. */\n footer: [ComponentLike<ModalFooterSignature>];\n };\n}\n\n/**\n * @classdesc\n * Base Modal component\n */\nexport default class BaseModal extends Component<BaseModalSignature> {\n get ariaLabelledBy(): string {\n return `${guidFor(this)}_header`;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"simple-dialog-modal\\\" ...attributes>\\n <Modals::Base::BaseModal>\\n <:header as |DialogHeader|>\\n <DialogHeader @title={{@title}} @disableCloseButton={{@disableHeaderClose}} />\\n </:header>\\n\\n <:default>\\n {{yield}}\\n </:default>\\n\\n <:footer as |DialogFooter|>\\n <DialogFooter\\n @buttons={{@buttons}}\\n @disableCloseButton={{@disableFooterClose}}\\n @closeButtonText={{@footerCloseText}}\\n />\\n </:footer>\\n </Modals::Base::BaseModal>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { ModalHeaderSignature } from '../../base/header/modal-header';\nimport type { ModalFooterSignature } from '../../base/footer/modal-footer';\n\ntype ModalHeaderArgs = ModalHeaderSignature['Args'];\ntype ModalFooterArgs = ModalFooterSignature['Args'];\n\nexport interface SimpleDialogSignature {\n Element: HTMLDivElement;\n Args: Pick<ModalHeaderArgs, 'title'> & {\n /** Indicates the header close button should not be visible. */\n disableHeaderClose?: ModalHeaderArgs['disableCloseButton'];\n /** The buttons to render in the modal footer. */\n buttons?: ModalFooterArgs['buttons'];\n /** Indicates the close button should not be added to the collection of footer buttons. */\n disableFooterClose?: ModalFooterArgs['disableCloseButton'];\n /** Optional text for the automatic close button. */\n footerCloseText?: ModalFooterArgs['closeButtonText'];\n };\n Blocks: {\n default: [];\n };\n}\n\nconst SimpleDialog = templateOnlyComponent<SimpleDialogSignature>();\nexport default SimpleDialog;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"notification elevated {{@notification.type}} {{@notification.cssClass}} {{if @notification.hidden \\'hidden\\'}}\\\"\\n tabindex=\\\"0\\\"\\n aria-live=\\\"{{if @notification.autoCloseDuration \\'polite\\' \\'off\\'}}\\\"\\n aria-describedby=\\\"{{guid-for this}}_text\\\"\\n role=\\\"dialog\\\"\\n {{did-insert this.notificationInserted.perform}}\\n {{on \\\"keyup\\\" this.keyUpHandler}}\\n ...attributes\\n>\\n <SvgSymbol\\n @icon={{@notification.icon}}\\n @title={{@notification.iconTitle}}\\n @fillColor={{@notification.iconFillColor}}\\n @desc={{@notification.iconDesc}}\\n @isHiddenForAccessibility={{@notification.iconIsHiddenForAccessibility}}\\n class=\\\"notification-icon\\\"\\n />\\n\\n <p id=\\\"{{guid-for this}}_text\\\" class=\\\"notification-text\\\">\\n {{@notification.text}}\\n </p>\\n\\n {{#if @notification.buttons}}\\n <div class=\\\"buttons\\\">\\n {{#each @notification.buttons as |button|}}\\n <Button::Async\\n @icon={{coalesce button.icon \\\"\\\"}}\\n @iconOnly={{button.iconOnly}}\\n @text={{button.text}}\\n @buttonColor={{if button.noBackground \\\"stealth\\\"}}\\n @buttonAction={{fn this.buttonClicked button.action}}\\n class={{button.cssClass}}\\n />\\n {{/each}}\\n </div>\\n {{/if}}\\n\\n <Button::Icon\\n @text={{t \\\"@adc/ui-components.close\\\"}}\\n @icon=\\\"close\\\"\\n @iconOnly={{true}}\\n @buttonColor=\\\"stealth\\\"\\n {{on \\\"click\\\" (fn this.closeNotification false)}}\\n class=\\\"close-notification\\\"\\n />\\n</div>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { ESCAPE_CODE } from '@adc/ember-utils/utils/a11y';\nimport { timeout, task } from 'ember-concurrency';\n\nimport type { AppNotification, AppNotificationButton } from '../../services/notification-manager';\nimport type { Task } from 'ember-concurrency';\n\nexport interface ModalInsetOverlaySignature {\n Element: HTMLDivElement;\n Args: {\n /** The notification to render. */\n notification: AppNotification;\n /** Indicates notifications should close immediately (using to improve test performance). */\n isTesting?: boolean;\n /** Triggered when the user clicks the close button to clear the notification. */\n 'close-notification': (notification: AppNotification, elementToFocus?: Element) => void;\n };\n}\n\n/**\n * @classdesc An individual notification that is displayed within the notification manager.\n */\nexport default class AppNotificationComponent extends Component<ModalInsetOverlaySignature> {\n /**\n * The last focused element before the notification was opened.\n */\n lastFocusedElement: Element | null;\n\n /** @override */\n constructor(owner: unknown, args: ModalInsetOverlaySignature['Args']) {\n super(owner, args);\n\n this.lastFocusedElement = document.activeElement;\n }\n\n /**\n * Closes the notification.\n */\n @action closeNotification(restoreFocus = false): void {\n const { lastFocusedElement } = this;\n this.args['close-notification'](\n this.args.notification,\n restoreFocus && lastFocusedElement ? lastFocusedElement : undefined\n );\n }\n\n /**\n * Closes the notification when the user hits the escape key.\n */\n @action keyUpHandler(event: KeyboardEvent): void {\n if (event.code === ESCAPE_CODE) {\n this.closeNotification(true);\n }\n }\n\n /**\n * Called when the notification is inserted so we can schedule animation and auto close.\n */\n notificationInserted: Task<void, [HTMLElement]> = task({ drop: true }, async (el: HTMLElement) => {\n // Let it render and change CSS so it fades in.\n await timeout(0);\n el.classList.add('in');\n\n const { autoCloseDuration } = this.args.notification,\n { isTesting } = this.args;\n\n if (isTesting || autoCloseDuration) {\n // Wait for close duration then clear CSS so it fades out.\n await timeout(isTesting ? 1 : (autoCloseDuration as number));\n el.classList.remove('in');\n\n // Wait a little bit then close the faded animation.\n await timeout(isTesting ? 1 : 300);\n this.closeNotification(false);\n } else {\n el.focus();\n }\n });\n\n /**\n * Button inside notification was clicked.\n */\n @action buttonClicked(\n fn: AppNotificationButton['action'],\n buttonAnimation: Promise<boolean>\n ): Promise<unknown> | unknown {\n // Get the return value from the callback.\n const returnValue = (fn || (() => {}))(buttonAnimation),\n isPromise = !!returnValue?.then;\n\n Promise.resolve(returnValue).then((result) => {\n // If the click handler explicitly returned false then do NOT close the notification.\n if (result !== false) {\n // Close the notification.\n (isPromise ? buttonAnimation : Promise.resolve()).then(() => this.closeNotification(true));\n }\n });\n\n // Return the value to the button addon so it can animate if needed.\n return returnValue;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"notification-manager {{if @isHidden \\'hidden\\'}}\\\" ...attributes>\\n {{#each this.notificationManager.notifications as |notification|}}\\n <NotificationManager::AppNotification\\n @notification={{notification}}\\n @isTesting={{@isTesting}}\\n @close-notification={{fn this.closeNotification notification @lastFocusedElement}}\\n />\\n {{/each}}\\n</div>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\n\nimport type { AppNotification } from '../services/notification-manager';\nimport type NotificationManagerService from '../services/notification-manager';\n\nexport interface NotificationManagerSignature {\n Element: HTMLDivElement;\n Args: {\n /** Indicates automated tests are running, which will disable notification closing delay to speed up tests. */\n isTesting?: boolean;\n /** Indicates all notifications should be hidden. */\n isHidden?: boolean;\n /** Optional element to focus on after notification closes. */\n lastFocusedElement?: HTMLElement;\n };\n}\n\n/**\n * @classdesc\n * A container for the number of notifications that might be displayed within an application.\n */\nexport default class NotificationManager extends Component<NotificationManagerSignature> {\n @service declare notificationManager: NotificationManagerService;\n\n /**\n * Tells the notification-manager service to remove the given notification.\n *\n * @param notification - The notification to close.\n * @param [elementToFocus] - The default element to focus on.\n */\n @action closeNotification(notification: AppNotification, elementToFocus?: HTMLElement): void {\n const element = notification.elementToFocus ?? elementToFocus;\n if (element) {\n element.focus();\n }\n\n if (!isDestroyed(notification)) {\n this.notificationManager.removeNotification(notification);\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @icon}}\\n <SvgSymbol @icon={{@icon}} style={{icon-fill @iconFill}} class=\\\"binary-svg\\\" />\\n{{/if}}\\n<span class=\\\"binary-text\\\">{{@text}}</span>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SafeString } from 'handlebars';\n\nexport interface BinaryLabelSignature {\n Element: HTMLDivElement;\n Args: {\n /** The binary control label text. */\n text?: string | number | SafeString;\n /** Optional name of the icon to render within the label (minus the \"icn-\" prefix). */\n icon?: string;\n /** Optional hex color value for for the icon fill. */\n iconFill?: string;\n };\n}\n\nconst BinaryLabel = templateOnlyComponent<BinaryLabelSignature>();\nexport default BinaryLabel;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class={{this.css}} data-test-is-checked={{if (eq @checked true) \\\"true\\\"}}>\\n <input\\n id={{guid-for this}}\\n type={{this.type}}\\n checked={{eq @checked true}}\\n tabindex=\\\"0\\\"\\n data-checked={{if (eq @checked true) \\\"true\\\" \\\"false\\\"}}\\n class={{if (eq @checked \\\"mixed\\\") \\\"mixed\\\"}}\\n {{did-insert this.updateIndeterminate}}\\n {{did-update this.updateIndeterminate @checked}}\\n ...attributes\\n />\\n <label for={{guid-for this}}>\\n {{#if (has-block)}}\\n {{yield}}\\n {{else}}\\n {{#if (or @icon @label)}}\\n <SimpleBinary::Label @icon={{@icon}} @iconFill={{@iconFill}} @text={{@label}} />\\n {{/if}}\\n {{/if}}\\n </label>\\n <ErrorTooltip\\n @text={{@errorMessage}}\\n @placement={{coalesce @errorTooltipPlace \\\"auto\\\"}}\\n @duration={{@errorDuration}}\\n @selector=\\\"input\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</div>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { A } from '@ember/array';\n\nimport type { CommonInputErrorTooltipArgs } from './error-tooltip';\nimport type { BinaryLabelSignature } from './simple-binary/label';\n\nexport type InputType = 'checkbox' | 'radio';\ntype BinaryLabelSignatureArgs = BinaryLabelSignature['Args'];\n\nexport interface SimpleBinaryArgs\n extends CommonInputErrorTooltipArgs,\n Pick<BinaryLabelSignatureArgs, 'icon' | 'iconFill'> {\n /** The binary type to show (do not use `list`, it's internal). */\n type?: 'checkbox' | 'radio' | 'toggle' | 'list';\n /** The current binary state (defaults to `false`). */\n checked?: true | false | 'mixed';\n /** Text for the input label. */\n label?: BinaryLabelSignatureArgs['text'];\n /** Optional CSS class for the binary input container element. */\n css?: string;\n /** Indicates the positions of the input/icon/label should be reversed. */\n reverse?: boolean;\n /** Indicates the label text should wrap. NOTE this will likely mess up vertical centering. */\n wrap?: boolean;\n}\n\nexport interface SimpleBinarySignature {\n Element: HTMLInputElement;\n Args: SimpleBinaryArgs;\n Blocks: {\n default: [];\n };\n}\n\nexport default class SimpleBinary extends Component<SimpleBinarySignature> {\n get type(): InputType {\n return this.args.type === 'radio' ? 'radio' : 'checkbox';\n }\n\n get css(): string {\n const { args } = this;\n\n return A([\n 'simple-binary',\n args.type === 'toggle' ? 'is-toggle' : undefined,\n args.css,\n args.errorMessage ? 'has-error' : undefined,\n args.reverse ? 'is-reversed' : undefined,\n args.wrap ? 'is-wrapped' : undefined\n ])\n .compact()\n .join(' ');\n }\n\n @action updateIndeterminate(el: HTMLInputElement): void {\n el.indeterminate = this.args.checked === 'mixed';\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<button\\n type=\\\"button\\\"\\n disabled={{or @disabled @item.disabled}}\\n aria-checked={{if @item.state \\\"true\\\" \\\"false\\\"}}\\n role={{if @isMultiSelect \\\"checkbox\\\" \\\"radio\\\"}}\\n data-button-list-item-id={{@item.props.id}}\\n ...attributes\\n>\\n {{yield}}\\n</button>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { BinaryListItem } from './list';\n\nexport interface SimpleBinaryButtonSignature {\n Element: HTMLButtonElement;\n Args: {\n /** The binary list item to render. */\n item: BinaryListItem<any>;\n /** Indicates the button should be disabled. */\n disabled?: boolean;\n /** Indicates the containing list is multi select. */\n isMultiSelect?: boolean;\n };\n Blocks: {\n default: [];\n };\n}\n\nconst SimpleBinaryButton = templateOnlyComponent<SimpleBinaryButtonSignature>();\nexport default SimpleBinaryButton;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<AsyncLoader @promise={{@items}} as |items|>\\n <ul class=\\\"simple-button-list {{if (has-block) \\'is-custom\\'}} {{this.listCss}}\\\" id={{guid-for this}} ...attributes>\\n {{#each items as |item idx|}}\\n <li data-test-button-list-item={{idx}}>\\n {{#if (has-block)}}\\n <SimpleBinary::Button\\n @item={{item}}\\n @disabled={{@disabled}}\\n @isMultiSelect={{this.isMultiSelect}}\\n aria-label={{item.label}}\\n {{on \\\"click\\\" (fn this.buttonClicked item)}}\\n >\\n {{yield item}}\\n </SimpleBinary::Button>\\n {{else}}\\n {{#if this.isLongList}}\\n <SimpleBinary\\n @type={{if this.isMultiSelect \\\"list\\\" \\\"radio\\\"}}\\n @checked={{item.state}}\\n @label={{item.label}}\\n @icon={{item.icon}}\\n @iconFill={{item.color}}\\n @css={{item.css}}\\n data-button-list-item-id={{coalesce item.props.id}}\\n disabled={{coalesce @disabled item.disabled}}\\n aria-label={{item.label}}\\n {{on \\\"change\\\" (fn this.binaryToggled item)}}\\n />\\n {{else}}\\n <SimpleBinary::Button\\n @item={{item}}\\n @disabled={{@disabled}}\\n @isMultiSelect={{this.isMultiSelect}}\\n aria-label={{item.label}}\\n {{on \\\"click\\\" (fn this.buttonClicked item)}}\\n >\\n {{#if item.icon}}\\n <SvgSymbol @icon={{item.icon}} class=\\\"button-list-svg\\\" style={{icon-fill item.color}} />\\n {{/if}}\\n <span>{{item.label}}</span>\\n </SimpleBinary::Button>\\n {{/if}}\\n {{/if}}\\n\\n <div class=\\\"checkmark\\\">\\n <SvgSymbol @icon={{coalesce @selectedIcon \\\"check\\\"}} />\\n </div>\\n </li>\\n {{/each}}\\n </ul>\\n <ErrorTooltip\\n @text={{@errorMessage}}\\n @placement={{coalesce @errorTooltipPlace \\\"top-start\\\"}}\\n @duration={{@errorDuration}}\\n @selector=\\\"#{{guid-for this}}\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</AsyncLoader>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { gt } from '@ember/object/computed';\nimport { A } from '@ember/array';\n\nimport type { SimpleBinaryButtonSignature } from './button';\nimport type { CommonInputErrorTooltipArgs } from '../error-tooltip';\nimport type { BinaryListItem } from './list';\n\ntype BinaryButtonListItem = SimpleBinaryButtonSignature['Args']['item'];\n\nexport interface SimpleBinaryButtonListSignature<T extends BinaryButtonListItem> {\n Element: HTMLUListElement;\n Args: CommonInputErrorTooltipArgs & {\n /** The binary list items to render. */\n items: T[] | Promise<T[]>;\n /** Optional icon name to be used for the selection indicator. */\n selectedIcon?: string;\n /** Indicates the list is multi select. */\n isMultiSelect?: boolean;\n /** Indicates that items can be deselected in single selection mode. */\n allowDeselect?: boolean;\n /** The list orientation (defaults to \"vertical\"). */\n orientation?: 'vertical' | 'horizontal';\n /** Indicates all buttons in the list should be disabled. */\n disabled?: boolean;\n /** Triggered when the user changes the binary list item state. */\n onchange?: (items: T[]) => void;\n };\n Blocks: {\n default: [T];\n };\n}\n\nexport default class SimpleBinaryButtonList<T extends BinaryButtonListItem> extends Component<\n SimpleBinaryButtonListSignature<T>\n> {\n get isMultiSelect(): boolean {\n return this.args.isMultiSelect ?? true;\n }\n\n @gt('args.items.length', 7)\n declare isLongList: boolean;\n\n get listCss(): string {\n return A([`o-${this.args.orientation ?? 'vertical'}`, this.isLongList ? 'is-long' : undefined])\n .compact()\n .join(' ');\n }\n\n private async listItemChanged(item: BinaryListItem, state: boolean): Promise<void> {\n const items = await this.args.items;\n\n // Is this NOT a multiselect list AND is the new state selected?\n if (!this.isMultiSelect && state) {\n // Clear all other selections.\n A(items).setEach('state', false);\n }\n\n item.state = state;\n this.args.onchange?.(items);\n }\n\n @action buttonClicked(item: BinaryListItem): void {\n const { isMultiSelect } = this,\n { allowDeselect } = this.args;\n\n if (isMultiSelect || allowDeselect || !item.state) {\n this.listItemChanged(item, !item.state);\n }\n\n // If not multiselect and not able to deselect, run onchange again on click.\n if (!isMultiSelect && !allowDeselect && item.state === true) {\n this.listItemChanged(item, item.state);\n }\n }\n\n @action binaryToggled(item: BinaryListItem, evt: InputEvent): void {\n this.listItemChanged(item, (evt.target as HTMLInputElement).checked);\n }\n}\n","import Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { getOwner } from '@ember/owner';\nimport { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz';\n\nimport type { InternalOwner } from '@ember/-internals/owner';\n\nexport interface BaseTimezoneControlSignature {\n Args: {\n /** Optional time zone to use for formatted dates. If omitted the global application time zone will be used. */\n timeZone?: string;\n };\n}\n\n/**\n * @classdesc\n * Base class for date/time controls that need to work with time zones.\n */\nexport default class BaseTimezoneControl<\n T extends BaseTimezoneControlSignature = BaseTimezoneControlSignature\n> extends Component<T> {\n /**\n * The computed timezone value to use for date conversions.\n */\n @computed('args.timeZone')\n get zone(): string {\n const { timeZone } = this.args;\n if (timeZone !== undefined) {\n return timeZone;\n }\n\n const owner = getOwner(this),\n cfg = owner && (owner as InternalOwner).lookup('@adc/ui-components:appValues');\n\n if (cfg) {\n return (cfg as { timeZone: string }).timeZone ?? '';\n }\n\n return '';\n }\n\n /**\n * Converts the passed date to be relative to the passed timezone.\n */\n getZonedDate(date: Date): Date {\n const { zone } = this;\n return zone ? utcToZonedTime(date, zone) : date;\n }\n\n /**\n * Converts the passed date to be relative to UTC.\n */\n getUtcDateFromZone(date: Date): Date {\n const { zone } = this;\n return zone ? zonedTimeToUtc(date, zone) : date;\n }\n}\n","import BaseTimezoneControl from './base-timezone-control.ts';\n\nimport type { BaseTimezoneControlSignature } from './base-timezone-control';\n\nexport interface BaseTimeControlSignature {\n Args: BaseTimezoneControlSignature['Args'] & {\n /** The input date/time value. */\n date?: Date;\n /** Optional minimum input date. */\n minDate?: Date;\n /** Optional maximum input date. */\n maxDate?: Date;\n /** Optional label text to appear next to input. */\n label?: string;\n /** Called when the user modifies the date/time value. */\n onchange: (date: Date, evt?: Event) => void;\n };\n}\n\n/**\n * @classdesc\n * A base class for date and time pickers.\n */\nexport default class BaseTimeControl<\n T extends BaseTimeControlSignature = BaseTimeControlSignature\n> extends BaseTimezoneControl<T> {\n /**\n * Indicates we should display native controls for time/date manipulation.\n */\n useNativeControl = false;\n\n /**\n * The passed date, adjusted for computed timezone.\n */\n get zonedDate(): Date | undefined {\n const { date } = this.args;\n return date && this.getZonedDate(date);\n }\n}\n","import { HOURS_IN_DAY } from '@adc/ember-utils/constants/time';\n\nexport const SECONDS_IN_MINUTE = 60;\nexport const MINUTES_IN_HOUR = 60;\nexport const MILLISECONDS_IN_SECOND = 1000;\nexport const MILLISECONDS_IN_MINUTE = SECONDS_IN_MINUTE * MILLISECONDS_IN_SECOND;\nexport const MILLISECONDS_IN_HOUR = MINUTES_IN_HOUR * MILLISECONDS_IN_MINUTE;\nexport const HALF_A_DAY_IN_MILLISECONDS = (HOURS_IN_DAY / 2) * MILLISECONDS_IN_HOUR;\nexport const HALF_HOURS_IN_DAY = HOURS_IN_DAY * 2;\n\n/**\n * Checks the given value to determine if it may be time value or not.\n */\nexport function isValidTimeValue(timeValue: number): boolean {\n return !isNaN(timeValue) && timeValue !== null && timeValue >= 0;\n}\n\n/**\n * Tests to see if a native input type is supported.\n */\nfunction testInputType(type: string): boolean {\n const input = document.createElement('input'),\n value = 'a';\n\n input.setAttribute('type', type);\n input.setAttribute('value', value);\n\n return input.value !== value;\n}\n\n/**\n * Indicates that native date input elements are supported.\n */\nexport const isNativeDateInputSupported = testInputType('date');\n\n/**\n * Indicates that native time input elements are supported.\n */\nexport const isNativeTimeInputSupported = testInputType('time');\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if this.useNativeControl}}\\n {{#let (concat (guid-for this) \\\"_smart_date\\\") as |id|}}\\n {{#if @label}}\\n <label class=\\\"smart-date-label\\\" for={{id}}>\\n {{@label}}\\n </label>\\n {{/if}}\\n <input\\n type=\\\"date\\\"\\n class=\\\"smart-date-input\\\"\\n id={{if @label id}}\\n min={{this.min}}\\n max={{this.max}}\\n value={{this.displayDate}}\\n ...attributes\\n {{on \\\"blur\\\" this.inputBlurred}}\\n {{on \\\"change\\\" this.inputChanged}}\\n />\\n {{/let}}\\n{{/if}}\")","import BaseTimeControl from './base-time-control.ts';\nimport { inject as service } from '@ember/service';\nimport { action } from '@ember/object';\nimport { isNativeDateInputSupported } from '../utils/time.ts';\nimport { getIsTouchDevice } from '../utils/general.ts';\n\nimport format from 'date-fns/format';\nimport isValid from 'date-fns/isValid';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { BaseTimeControlSignature } from './base-time-control';\n\nconst outputFormat = 'yyyy-MM-dd';\n\n/**\n * Notifies the consumer that the date has changed.\n *\n * @private\n */\nfunction emitChangeEvent(this: SmartDateComponent, evt: Event, year: number, month: number, day: number): void {\n const date = new Date(year, month, day, 12);\n if (isValid(date)) {\n this.args.onchange(this.getUtcDateFromZone(date), evt);\n }\n}\n\nexport interface SmartDateSignature {\n Element: HTMLInputElement;\n Args: Omit<BaseTimeControlSignature['Args'], 'onchange'> & {\n /** Called when the user modifies the date/time value. */\n onchange: (date: Date | null, evt: Event) => void;\n /** Whether to allow the control to accept `null` values. */\n allowNull?: boolean;\n };\n}\n\n/**\n * @classdesc\n * A date picker that uses a native control, if possible, or the pikaday component if not possible.\n * export default class SmartTimeComponent extends BaseTimeControl<SmartTimeComponentArgs> {\n */\nexport default class SmartDateComponent extends BaseTimeControl<SmartDateSignature> {\n @service declare intl: ADCIntlService;\n\n hasTouchEvents?: boolean;\n\n constructor(owner: unknown, args: SmartDateSignature['Args']) {\n super(owner, args);\n getIsTouchDevice(this);\n }\n\n // region Component state.\n\n /** @override */\n useNativeControl = isNativeDateInputSupported;\n\n /**\n * The date placeholder.\n */\n get placeholder(): string {\n return 'mm/dd/yyyy';\n }\n\n /**\n * The date pattern for input validation.\n */\n get pattern(): string {\n if (isNativeDateInputSupported) {\n // Only one format for native time input.\n return '^\\\\d{4}-\\\\d{2}-\\\\d{2}$';\n }\n\n return '^(?:(?:31(\\\\/|-|\\\\.)(?:0?[13578]|1[02]))\\\\1|(?:(?:29|30)(\\\\/|-|\\\\.)(?:0?[13-9]|1[0-2])\\\\2))(?:(?:1[6-9]|[2-9]\\\\d)?\\\\d{2})$|^(?:29(\\\\/|-|\\\\.)0?2\\\\3(?:(?:(?:1[6-9]|[2-9]\\\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\\\\d|2[0-8])(\\\\/|-|\\\\.)(?:(?:0?[1-9])|(?:1[0-2]))\\\\4(?:(?:1[6-9]|[2-9]\\\\d)?\\\\d{2})$';\n }\n\n private getFormattedDate(d?: Date): string | undefined {\n return d && format(this.getZonedDate(d), outputFormat);\n }\n\n /**\n * The minimum date value (if passed).\n */\n get min(): string | undefined {\n return this.getFormattedDate(this.args.minDate);\n }\n\n /**\n * The maximum date value (if passed).\n */\n get max(): string | undefined {\n return this.getFormattedDate(this.args.maxDate);\n }\n\n /**\n * The formatted, selected date.\n */\n get displayDate(): string {\n return this.getFormattedDate(this.args.date) ?? '';\n }\n\n // endregion\n\n // region Actions\n\n /**\n * Determines if we should listen to the change event.\n */\n @action inputChanged(evt: Event & { target: HTMLInputElement }): void {\n if (this.hasTouchEvents || !(evt instanceof KeyboardEvent)) {\n this.changeDate(evt);\n }\n }\n\n /**\n * Determines if we should listen to the blur event.\n */\n @action inputBlurred(evt: FocusEvent & { target: HTMLInputElement }): void {\n if (!this.hasTouchEvents) {\n this.changeDate(evt);\n }\n }\n\n /**\n * Updates the date, as indicated by the native date picker.\n */\n private changeDate(evt: Event & { target: HTMLInputElement }): void {\n const { target } = evt,\n { value } = target;\n\n // Did the value change?\n if (value !== this.displayDate) {\n // Clear validity message.\n target.setCustomValidity('');\n\n // Is input value valid?\n if (target.reportValidity()) {\n if (value === '' && this.args.allowNull) {\n this.args.onchange(null, evt);\n }\n const [year, month, day] = value.split('-').map(Number);\n emitChangeEvent.call(this, evt, year, month - 1, day);\n }\n }\n }\n\n // endregion\n}\n","import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { assert } from '@ember/debug';\nimport { isPresent } from '@ember/utils';\nimport config from 'ember-get-config';\n// eslint-disable-next-line ember/no-classic-components\nimport EmberComponent from '@ember/component';\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ntype i18nContextConstructor<T extends {} = {}> = new (...args: any[]) => T;\n\nconst PATH_REG_EXP = new RegExp('^<(?:[^:]+)@(.*)>$');\n\nfunction resolvePath<T>(context: T, path?: string): string {\n // Checking deprecated Ember components until all are removed\n if (context instanceof Component || context instanceof EmberComponent) {\n assert(\n '[@adc/i18n] Use of the @intlPath decorator on a glimmer component requires that the path parameter be passed',\n isPresent(path)\n );\n\n return `component:${path}::${guidFor(context)}`;\n }\n\n const value = String(context),\n m = value.match(PATH_REG_EXP);\n\n assert(`[@adc/i18n] Unable to calculate intl path from context toString value (${value})`, !!m);\n\n return (m && m[1]) ?? '';\n}\n\n/**\n * Class decorator for adding support for `tc` method/helper in glimmer components and addons/engines.\n *\n * @example\n * import Component from '@glimmer/component';\n * import { intlPath } from '@adc/i18n/path';\n *\n * ‎@intlPath({ module: '@adc/ui-components' path: 'path/to/component/foo' })\n * export default class Foo extends Component {\n * ...\n * }\n */\nexport function intlPath({\n module,\n path\n}: {\n path?: string;\n module?: string;\n}): (context: i18nContextConstructor) => void {\n const { modulePrefix } = config;\n\n assert(\n `[@adc/i18n] The module value passed to the @intlPath decorator is identical to the application module prefix (${modulePrefix})`,\n module !== modulePrefix\n );\n\n return function (context: i18nContextConstructor): void {\n context.prototype.getIntlPath = function () {\n return `<${module ?? modulePrefix}@${resolvePath(this, path)}>`;\n };\n };\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<svg\\n class=\\\"spinner {{this.size}} {{if this.spinning \\'spinning\\'}}\\\"\\n xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n viewBox=\\\"0 0 18 18\\\"\\n aria-label={{this.ariaLabel}}\\n role=\\\"status\\\"\\n aria-live=\\\"polite\\\"\\n ...attributes\\n>\\n {{#if this.iconTitle}}<title>{{this.iconTitle}}{{/if}}\\n {{#if @desc}}{{@desc}}{{/if}}\\n \\n\")","import Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { isEmpty } from '@ember/utils';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\n\n/**\n * Allowed sizes for the spinner\n */\nconst ALLOWED_SIZES: ('small' | 'medium' | 'large' | 'x-large')[] = ['small', 'medium', 'large', 'x-large'];\n\nexport interface SpinnerSvgSignature {\n Element: SVGElement;\n Args: {\n /** Indicates the spinner is spinning (defaults to `false`). */\n spinning?: boolean;\n /** Optional spinner size. */\n size?: 'small' | 'medium' | 'large' | 'x-large';\n /** Optional title rendered into a `` element. */\n title?: string;\n /** Optional description rendered into a `<desc />` element. */\n desc?: string;\n };\n}\n\n/**\n * @classdesc\n * Component for showing a spinner.\n */\n@intlPath({ module: '@adc/ui-components', path: 'spinner-svg' })\nexport default class SpinnerSvg extends Component<SpinnerSvgSignature> {\n @service declare intl: ADCIntlService;\n\n /**\n * Indicates that the spinner is spinning (defaults to `true`).\n */\n get spinning(): boolean {\n return this.args.spinning ?? true;\n }\n\n /**\n * Computed CSS class for size.\n */\n @computed('args.size')\n get size(): string {\n const { size = 'medium' } = this.args;\n return size === 'medium' || ALLOWED_SIZES.indexOf(size) < 0 ? '' : size;\n }\n\n /**\n * If the title was not specified, use a default title.\n */\n @computed('args.title')\n get iconTitle(): string {\n const { title } = this.args;\n\n if (isEmpty(title)) {\n return this.intl.tc(this, 'loading');\n }\n\n return title as string;\n }\n\n /**\n * The aria-label of the icon, if there is one.\n */\n @computed('iconTitle', 'args.desc')\n get ariaLabel(): string {\n return [this.iconTitle, this.args.desc].filter((el) => !!el).join(' ');\n }\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"text-input\\n {{@containerClass}}\\n {{if this.resolvedErrorMessage \\'error\\'}}\\n {{if @showErrorIcon \\'show-error-icon\\'}}\\\"\\n {{did-update this.onExternalValueChange @value}}\\n {{did-update this.onErrorMessageChange @errorMessage}}\\n {{did-insert this.onComponentInsert}}\\n>\\n {{#if (has-block)}}\\n {{yield this.internalValue this.clearInput}}\\n {{/if}}\\n <Input\\n @value={{this.internalValue}}\\n @type={{coalesce @type \\\"text\\\"}}\\n dir={{if (eq @type \\\"tel\\\") \\\"ltr\\\"}}\\n @escape-press={{@escape-press}}\\n @enter={{@enter}}\\n ...attributes\\n {{on \\\"input\\\" this.handleInputChange}}\\n {{on \\\"keydown\\\" (fn this.onKeyDownNonDebounced this.internalValue)}}\\n {{on \\\"keyup\\\" (fn this.onKeyUpNonDebounced this.internalValue)}}\\n {{on \\\"focusin\\\" (fn (coalesce @on-focus-in (noop)) this.internalValue)}}\\n {{on \\\"focusout\\\" (fn (coalesce @on-focus-out (noop)) this.internalValue)}}\\n {{did-insert (coalesce @didInsert (noop))}}\\n {{will-destroy (coalesce @willDestroy (noop))}}\\n />\\n\\n {{#if (and this.resolvedErrorMessage @showErrorIcon)}}\\n <div class=\\\"error-icon-wrapper\\\">\\n <SvgSymbol @icon=\\\"issue\\\" @title={{this.resolvedErrorMessage}} class=\\\"error-icon\\\" />\\n </div>\\n {{/if}}\\n\\n {{#if (has-block \\\"after-input\\\")}}\\n {{yield this.internalValue this.clearInput to=\\\"after-input\\\"}}\\n {{/if}}\\n\\n {{#unless @showErrorIcon}}\\n <ErrorTooltip\\n @text={{this.resolvedErrorMessage}}\\n @placement={{@errorTooltipPlace}}\\n @duration={{this.errorDuration}}\\n @selector=\\\".ember-text-field\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n {{/unless}}\\n</div>\")","import { debounce } from '@ember/runloop';\nimport { computed, action } from '@ember/object';\nimport { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { convertAutoDestroyToDuration } from './error-tooltip.ts';\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { scheduleOnce } from '@ember/runloop';\n\nimport type DomService from '@adc/ember-utils/services/dom';\nimport type { CommonInputErrorTooltipArgs } from './error-tooltip';\n\nexport interface TextInputSignature {\n Element: HTMLInputElement;\n Args: Pick<CommonInputErrorTooltipArgs, 'errorMessage' | 'errorTooltipPlace'> & {\n /** the text input value. */\n value?: any;\n /** Indicates the input should only allow number. */\n onlyAllowNumbers?: boolean;\n /** Optional CSS class for the input container element. */\n containerClass?: string;\n /** Optional number of milliseconds before closing tooltip (defaults to zero so tooltip won't close). */\n autoDestroy?: CommonInputErrorTooltipArgs['errorDuration'];\n /** Indicates whether to show an error icon when there is an error message. */\n showErrorIcon?: boolean;\n /** Optional input type (defaults to \"text\"). */\n type?: string;\n /** Called when the users presses the ESC key. */\n 'escape-press'?: (v: string, e: KeyboardEvent) => any;\n /** Called on user key down. */\n 'key-down'?: (v: string, e: KeyboardEvent) => any;\n /** Called on user key up. */\n 'key-up'?: (v: string, e: KeyboardEvent) => any;\n /** Called when the user changes the input value. */\n 'value-change'?: (internalValue?: string, value?: string) => any;\n /** Called when teh user presses the enter key. */\n enter?: (v?: string) => any;\n /** Called on user key down, with no debounce delay. */\n 'key-down-non-debounced'?: (v: string, e: KeyboardEvent) => any;\n /** Called on user key up, with no debounce delay. */\n 'key-up-non-debounced'?: (v: string, e: KeyboardEvent) => any;\n /** Called when the input receives focus. */\n 'on-focus-in'?: (v: string, e: FocusEvent) => any;\n /** Called when the input loses focus. */\n 'on-focus-out'?: (v: string, e: FocusEvent) => any;\n /** Action that get's called when component is created */\n didInsert?: () => void;\n /** Action that get's called when component is destroyed */\n willDestroy?: () => void;\n };\n Blocks: {\n /** Renders above the input element, and yields the current value as well as an action for clearing the input. */\n default: [string | undefined, VoidFunction];\n /** Renders below the input element, and yields the current value as well as an action for clearing the input. */\n 'after-input': [string | undefined, VoidFunction];\n };\n}\n\n/**\n * Debounce delay for triggering typing actions.\n */\nconst DEBOUNCE_ACTION_DELAY = 200;\n\n/**\n * Triggers a value change action.\n *\n * @private\n */\nfunction valueChangeTrigger(this: TextInput): void {\n if (isDestroyed(this)) {\n return;\n }\n\n const { internalValue } = this;\n const { value } = this.args;\n\n const onValueChange = this.args['value-change'];\n\n // Send value change action up the chain\n if (onValueChange) {\n onValueChange(internalValue, value);\n }\n}\n\n/**\n * Triggers the key-up action.\n *\n * @private\n */\nfunction keyUpTrigger(this: TextInput, value: string, e: KeyboardEvent): void {\n const onKeyUp = this.args['key-up'];\n\n // Send value change action up the chain\n if (onKeyUp) {\n onKeyUp(value, e);\n }\n}\n\n/**\n * Triggers the key-down action.\n *\n * @private\n */\nfunction keyDownTrigger(this: TextInput, value: string, e: KeyboardEvent): void {\n const onKeyDown = this.args['key-down'];\n\n // Send value change action up the chain\n if (onKeyDown) {\n onKeyDown(value, e);\n }\n}\n\n/**\n * Toggles the error message visibility.\n *\n * @private\n */\nfunction toggleErrorMessageVisibility(this: TextInput, errorMessage?: string): void {\n if (!isDestroyed(this)) {\n this.hideErrorMessage = !errorMessage;\n }\n}\n\n/**\n * Restricts input for the given input to the given filter function.\n * @note This handles drag and drop, copy/paste, typing, etc.\n *\n * @private\n */\nfunction setInputFilter(this: TextInput, textInput: HTMLInputElement, inputFilter: (v: string) => boolean) {\n type TextInputElement = HTMLInputElement & {\n oldValue: string;\n oldSelectionStart: number;\n oldSelectionEnd: number;\n };\n\n ['input', 'keydown', 'keyup', 'mousedown', 'mouseup', 'select', 'contextmenu', 'drop'].forEach((event) => {\n this.dom.addListener(this, textInput, event, function (e: InputEvent & { target: TextInputElement }) {\n const input = e.target;\n if (inputFilter(input.value)) {\n Object.assign(input, {\n oldValue: input.value,\n oldSelectionStart: input.selectionStart,\n oldSelectionEnd: input.selectionEnd\n });\n } else if (Object.prototype.hasOwnProperty.call(input, 'oldValue')) {\n input.value = input.oldValue;\n input.setSelectionRange(input.oldSelectionStart, input.oldSelectionEnd);\n } else {\n input.value = '';\n }\n });\n });\n}\n\n/**\n * Component that wraps input text element in an ADC specific instance so that we can utilize all the styles and positioning.\n */\nexport default class TextInput extends Component<TextInputSignature> {\n @service declare dom: DomService;\n\n constructor(owner: unknown, args: TextInputSignature['Args']) {\n super(owner, args);\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce('afterRender', this, this.onExternalValueChange);\n }\n\n /**\n * The internal value of the input.\n */\n @tracked internalValue?: string;\n\n /**\n * Should the error message be hidden?\n */\n @tracked hideErrorMessage = false;\n\n /**\n * The value of the maxLength attribute on the input element.\n */\n @tracked maxLength = -1;\n /**\n * The error message for the current input value.\n */\n get resolvedErrorMessage(): string | undefined {\n return this.hideErrorMessage ? '' : this.args.errorMessage;\n }\n\n /**\n * Converts the autoDestroy value to be used as the ErrorTooltip components duration property.\n */\n @computed('args.autoDestroy')\n get errorDuration(): number | undefined {\n return convertAutoDestroyToDuration(this.args.autoDestroy);\n }\n\n /**\n * Reacts on changes in text box value change.\n */\n updateInternalValue(value: string, sendUpdate = true): void {\n const { internalValue, maxLength } = this;\n\n if (internalValue === value) {\n return;\n }\n\n // If the input element has a maxLength attribute set,\n // then do not allow the input to exceed the character limit.\n // The Android Mobile App does not use the maxLength attribute.\n if (maxLength > 0 && value.length > maxLength) {\n value = value.slice(0, maxLength);\n }\n\n this.internalValue = value;\n\n // Clear any possible error messages\n toggleErrorMessageVisibility.call(this);\n\n // If there is a value change action mapped, then trigger debounced call\n if (sendUpdate && this.args['value-change']) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n debounce<TextInput, typeof valueChangeTrigger>(this, valueChangeTrigger, DEBOUNCE_ACTION_DELAY);\n }\n }\n\n // region actions\n\n /**\n * Reacts on changes in value passed into the addon.\n */\n @action onExternalValueChange(): void {\n // Set internal value to be a copy of the passed in value\n let stringValue = '';\n const { value } = this.args;\n\n if (value || value === 0 || typeof value === 'boolean') {\n stringValue = String(value);\n }\n\n if (this.args.onlyAllowNumbers) {\n stringValue = /^-?\\d*$/.test(stringValue) ? stringValue : '';\n }\n\n this.updateInternalValue(stringValue, false);\n }\n\n /**\n * Reacts to the input value changes.\n */\n @action handleInputChange(e: InputEvent & { target: HTMLInputElement }): void {\n this.updateInternalValue(e.target.value);\n }\n\n /**\n * Clears the error message, which in turn hides the tooltip and ads the listeners.\n */\n @action onComponentInsert(element: HTMLDivElement): void {\n toggleErrorMessageVisibility.call(this);\n\n const input = element.querySelector<HTMLInputElement>('.ember-text-field');\n\n if (!input) {\n return;\n }\n\n this.maxLength = input.maxLength;\n\n if (this.args.onlyAllowNumbers) {\n setInputFilter.call(this, input, function (value: string) {\n return /^-?\\d*$/.test(value);\n });\n }\n }\n\n /**\n * Triggers a non-debounced keydown action.\n *\n * <strong>WARNING:</strong> Non debounced, bind to it only if absolutely necessary.\n */\n @action onKeyDownNonDebounced(currentValue: string, event: KeyboardEvent): void {\n const onKeyDownNonDebounced = this.args['key-down-non-debounced'];\n\n // Trigger non-debounced action\n if (onKeyDownNonDebounced) {\n onKeyDownNonDebounced(currentValue, event);\n }\n\n // Trigger debounced action\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n debounce<TextInput, typeof keyDownTrigger>(this, keyDownTrigger, currentValue, event, DEBOUNCE_ACTION_DELAY);\n }\n\n /**\n * Triggers a non-debounced keyup action.\n *\n * <strong>WARNING:</strong> Non debounced, bind to it only if absolutely necessary.\n */\n @action onKeyUpNonDebounced(currentValue: string, event: KeyboardEvent): void {\n const onKeyUpNonDebounced = this.args['key-up-non-debounced'];\n\n // Trigger non-debounced action\n if (onKeyUpNonDebounced) {\n onKeyUpNonDebounced(currentValue, event);\n }\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n debounce<TextInput, typeof keyUpTrigger>(this, keyUpTrigger, currentValue, event, DEBOUNCE_ACTION_DELAY);\n }\n\n /**\n * Clears the input value.\n */\n @action clearInput(): void {\n this.updateInternalValue('');\n\n // Trigger an enter action to update the search, if an enter action is provided.\n if (this.args.enter) {\n this.args.enter('');\n }\n }\n\n /**\n * Triggers when the error message changes.\n */\n @action onErrorMessageChange(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce<TextInput, typeof toggleErrorMessageVisibility>(\n 'afterRender',\n this,\n toggleErrorMessageVisibility,\n this.args.errorMessage\n );\n }\n\n // endregion\n}\n","import { set } from '@ember/object';\n\ntype EventToHandle = Event & { target: HTMLInputElement };\n\nexport default function handleBinaryChange<T extends object>(context: T, name: keyof T): (evt: EventToHandle) => void {\n return (evt: EventToHandle): void => {\n set(context, name, !!evt.target.checked as any);\n };\n}\n","import { htmlSafe } from '@ember/template';\n\nexport default function iconFill(color?: string): ReturnType<typeof htmlSafe> {\n return htmlSafe(color ? `fill:${color};` : '');\n}\n","import EmberObject from '@ember/object';\n\n/**\n * ADC pikaday component initializer for injecting property values.\n *\n * @param {Ember.Application} application\n */\nexport function initialize(application) {\n // Create object to hold translations values that will be populated once we know the locale (see locale service).\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-classic-classes\n const defaults = EmberObject.extend({});\n\n application.register('pikaday:main', defaults, { singleton: true });\n}\n\nexport default {\n name: 'setup-pikaday',\n initialize\n};\n","import EmberObject from '@ember/object';\nimport { assert } from '@ember/debug';\n\n/**\n * ADC route-view component initializer for injecting property values.\n *\n * @param {Ember.Application} application\n */\nexport function initialize(application) {\n class AbstractNavigationApi extends EmberObject {\n getVisitedRoutesStackLength() {\n assert('[@adc/ui-components] RouteView component missing navigationApi', false);\n return 0;\n }\n\n transitionToPreviousRoute() {\n assert('[@adc/ui-components] RouteView component missing navigationApi', false);\n }\n }\n\n application.register('route-view:main', AbstractNavigationApi, {\n singleton: true\n });\n}\n\nexport default {\n name: 'setup-route-view',\n initialize\n};\n","import EmberObject from '@ember/object';\n\nexport function initialize(application) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-classic-classes\n application.register('@adc/ui-components:appValues', EmberObject.extend({}), { singleton: true });\n}\n\nexport default {\n name: '@adc/ui-components-initializer',\n initialize\n};\n","import Service from '@ember/service';\nimport { classify, dasherize } from '@ember/string';\n\ninterface ColorDescriptorObject {\n light: string;\n dark: string;\n highContrast: string;\n darkHighContrast: string;\n lightText: string;\n highContrastText: string;\n}\n\n/**\n * Class to be added on the body to activate the dark mode.\n */\nexport const DARK_MODE_CLASS = 'dark';\n\n/**\n * Class to be added on the body to activate the high-contrast mode.\n */\nexport const HIGH_CONTRAST_MODE_CLASS = 'hc';\n\n/**\n * High Contrast mode enum\n *\n * @private\n * @memberof AccessibilityService\n */\nconst HIGH_CONTRAST = 0;\n\n/**\n * Dark mode enum\n *\n * @private\n * @memberof AccessibilityService\n */\nconst DARK_MODE = 1;\n\n/**\n * Updates the root custom variables.\n *\n * @private\n * @memberof AccessibilityService\n */\nfunction updateRootVariable(color: ColorDescriptorObject, type: string) {\n if (color) {\n const rootStyle = document.documentElement.style;\n\n [\n ['light', ''],\n ['highContrast', 'hc'],\n ['dark', 'dark'],\n ['darkHighContrast', 'dark-hc']\n ].forEach(([key, css]: [keyof ColorDescriptorObject, string]) => {\n const description = dasherize(classify(css) + classify(type)),\n code = color[key];\n\n if (code) {\n rootStyle.setProperty(`--${description}-color`, code);\n }\n\n if (key === 'light' || key === 'highContrast') {\n const textColor = color[`${key}Text`];\n if (textColor) {\n rootStyle.setProperty(`--${description}-text-color`, textColor);\n }\n }\n });\n }\n}\n\n/**\n * Generates the corresponding class names for the given list of display mode features.\n *\n * @private\n * @memberof AccessibilityService\n */\nfunction getDisplayModeClasses(featuresList: Array<number> = []): Array<string> {\n const list: string[] = [];\n\n featuresList.forEach((feature) => {\n switch (feature) {\n case DARK_MODE:\n list.push(DARK_MODE_CLASS);\n break;\n case HIGH_CONTRAST:\n list.push(HIGH_CONTRAST_MODE_CLASS);\n break;\n default:\n break;\n }\n });\n\n return list;\n}\n\n/**\n * @classdesc\n * A service for accessibility.\n */\nexport default class AccessibilityService extends Service {\n /**\n * The last focused element on the page.\n */\n private lastFocusedElement?: HTMLElement;\n\n /**\n * Caches the focused element.\n */\n saveFocusedElement(): void {\n this.lastFocusedElement = document.activeElement as HTMLElement;\n }\n\n /**\n * Restores the focus on the cached element.\n */\n restoreFocus(): void {\n this.lastFocusedElement?.focus();\n }\n\n /**\n * Sets the focus on the specified element.\n */\n focusElement(selector: string, context: Element | Document = document): boolean {\n const element = context.querySelector(selector) as HTMLElement;\n if (element) {\n element.focus();\n return true;\n }\n\n return false;\n }\n\n /**\n * Updates the custom variables with the dealer colors.\n */\n updateDealerColors(\n headerColor: ColorDescriptorObject,\n navColor: ColorDescriptorObject,\n highlightColor: ColorDescriptorObject\n ): void {\n updateRootVariable(headerColor, 'header');\n updateRootVariable(navColor, 'nav-highlight');\n updateRootVariable(highlightColor, 'highlight');\n }\n\n /**\n * Activates dark and/or high-contrast for the entire app.\n */\n activateDisplayMode(featuresList: Array<number>): void {\n if (!featuresList) {\n return;\n }\n\n const displayModeClasses = getDisplayModeClasses(featuresList);\n\n displayModeClasses.forEach((className) => {\n document.body.classList.add(className);\n });\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"info-dialog-modal {{coalesce @model.css \\'\\'}} {{if @model.resizableOnMobile \\'resizable\\'}}\\\">\\n <Modals::DialogModals::Simple::SimpleDialog\\n @title={{@model.title}}\\n @buttons={{@model.buttons}}\\n @disableHeaderClose={{@model.disableHeaderClose}}\\n @disableFooterClose={{@model.disableFooterClose}}\\n >\\n <div\\n class=\\\"info-dialog-body\\\"\\n {{on \\\"scroll\\\" this.handleScroll}}\\n {{did-resize this.updateScrollIndicator debounce=250}}\\n >\\n {{#if @model.svg}}\\n <div class=\\\"icon-container\\\">\\n <div class=\\\"icon\\\">\\n <SvgSymbol @icon={{@model.svg}} />\\n </div>\\n </div>\\n {{/if}}\\n {{@model.info}}\\n </div>\\n </Modals::DialogModals::Simple::SimpleDialog>\\n</div>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nimport type { ModalModel } from '../../../../services/modals.ts';\nimport type { SimpleDialogSignature } from '../simple/simple-dialog';\nimport type { SafeString } from 'handlebars';\n\nexport interface InfoDialogModel\n extends ModalModel,\n Pick<SimpleDialogSignature['Args'], 'title' | 'buttons' | 'disableHeaderClose' | 'disableFooterClose'> {\n /** The text to display in the info dialog. */\n info: string | SafeString;\n /** Optional SVG to display in the info dialog. */\n svg?: string;\n /** Optional CSS class applied to info dialog element. */\n css?: string;\n /** Optional bool to allow the modal to resize on mobile screens. */\n resizableOnMobile?: boolean;\n}\n\nexport interface InfoDialogSignature {\n Element: HTMLDivElement;\n Args: {\n model: InfoDialogModel;\n };\n}\n\n/**\n * @classdesc\n * A simple info dialog for displaying a string (or HTML) with custom buttons and title.\n */\nexport default class InfoDialog extends Component<InfoDialogSignature> {\n @action updateScrollIndicator(el: HTMLDivElement): void {\n const dialog = el.closest('.simple-dialog-modal');\n if (dialog) {\n dialog.classList.toggle('has-scroll-indicator', el.scrollHeight > el.offsetHeight);\n }\n }\n\n @action handleScroll(evt: MouseEvent & { target: HTMLDivElement }): void {\n const el = evt.target;\n el.classList.toggle('scrolled', !!el.scrollTop);\n }\n}\n","import Helper from '@ember/component/helper';\nimport { getModalFooterButton } from '../components/modals/base/footer/modal-footer.ts';\nimport { isTestEnvironment } from '../utils/general.ts';\n\nimport type { ModalButtonConfig } from '../components/modals/base/footer/modal-footer';\n\nexport interface GetModalButtonSignature {\n Args: {\n Named: Partial<ModalButtonConfig> & {\n isPrimary?: boolean;\n };\n };\n Return: ModalButtonConfig & {\n toString?: () => string;\n };\n}\n\n/**\n * A template helper for generating modal footer button configuration objects (ModalButtonConfig).\n */\nexport default class GetModalButton extends Helper<GetModalButtonSignature> {\n compute(\n _: [],\n { text = '', action, css, disabled, isPrimary }: GetModalButtonSignature['Args']['Named']\n ): GetModalButtonSignature['Return'] {\n const cfg = getModalFooterButton(text, action, css, disabled, isPrimary);\n\n if (isTestEnvironment.call(this)) {\n cfg.toString = function () {\n return JSON.stringify(this);\n };\n }\n\n return cfg;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Modals::DialogModals::Simple::SimpleDialog\\n @title={{@title}}\\n @buttons={{array\\n (get-modal-button text=(t \\\"@adc/ui-components.cancel\\\") css=\\\"cancel-btn\\\" action=(coalesce @editCancelled (noop)))\\n (get-modal-button text=@buttonText css=(coalesce @buttonCss \\\"confirm-btn\\\") action=this.confirmAction)\\n }}\\n @disableFooterClose={{true}}\\n @disableHeaderClose={{true}}\\n class=\\\"edit-confirmation-modal\\\"\\n ...attributes\\n>\\n {{#if this.errorMessage}}\\n <p class=\\\"error\\\">\\n <SvgSymbol @icon=\\\"issue\\\" />\\n {{this.errorMessage}}\\n </p>\\n {{else}}\\n <div class=\\\"edit-confirm-body\\\">\\n {{yield}}\\n </div>\\n {{/if}}\\n</Modals::DialogModals::Simple::SimpleDialog>\")","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nimport type ModalService from '../../../../services/modals.ts';\nimport type { SimpleDialogSignature } from '../../dialog-modals/simple/simple-dialog';\n\nexport interface EditConfirmationModalSignature {\n Element: HTMLDivElement;\n Args: Pick<SimpleDialogSignature['Args'], 'title'> & {\n /** Text for the confirm button. */\n buttonText: string;\n /** Triggered when the user interacts with the confirm button. */\n editConfirmed: () => boolean | Promise<any> | void;\n /** Optional CSS class for the confirm button. */\n buttonCss?: string;\n /** Called when the user interacts with the cancel button. */\n editCancelled?: () => any;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * Base modal for making confirmation modals such as rename or delete\n */\nexport default class EditConfirmationModal extends Component<EditConfirmationModalSignature> {\n @service declare modals: ModalService;\n\n /**\n * Message to display to user if an error is encountered during operation\n */\n @tracked errorMessage = '';\n\n @action async confirmAction(): Promise<boolean> {\n try {\n const result = await this.args.editConfirmed();\n if (result === false) {\n return Promise.reject();\n }\n\n return true;\n } catch (ex) {\n this.errorMessage = ex;\n return false;\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Modals::Confirmations::Edit::EditConfirmations\\n @title={{coalesce @model.title (t \\\"@adc/ui-components.rename\\\")}}\\n @buttonCss=\\\"btn-color-primary\\\"\\n @buttonText={{t \\\"@adc/ui-components.ok\\\"}}\\n @editConfirmed={{this.saveChanges}}\\n class=\\\"rename-dialog-modal\\\"\\n ...attributes\\n>\\n {{#if @model.message}}\\n <label for=\\\"{{guid-for this}}_rename\\\">\\n {{@model.message}}\\n </label>\\n {{/if}}\\n\\n <TextInput\\n @errorMessage={{@model.output.error}}\\n @type=\\\"text\\\"\\n @value={{@model.output.value}}\\n @errorTooltipPlace=\\\"top\\\"\\n id=\\\"{{guid-for this}}_rename\\\"\\n maxlength={{@model.maxLength}}\\n {{on \\\"change\\\" this.changeInputValue}}\\n {{on \\\"keyup\\\" this.keyInput}}\\n />\\n</Modals::Confirmations::Edit::EditConfirmations>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { isEnterCode } from '@adc/ember-utils/utils/a11y';\n\nimport type { ModalModel } from '../../../../services/modals.ts';\nimport type { EditConfirmationModalSignature } from '../edit/edit-confirmations';\n\nexport interface RenameDialogModel extends ModalModel {\n title: EditConfirmationModalSignature['Args']['title'];\n maxLength?: number;\n rename: (value: string) => boolean | Promise<boolean>;\n message?: string;\n output: { value: string; error?: string };\n}\n\nexport interface RenameDialogSignature {\n Element: EditConfirmationModalSignature['Element'];\n Args: {\n /** The rename dialog model. */\n model: RenameDialogModel;\n };\n}\n\n/**\n * @classdesc\n * A dialog for renaming an item\n */\nexport default class RenameDialog extends Component<RenameDialogSignature> {\n /**\n * Stored value to replace model's value\n */\n cachedValue?: string;\n\n /**\n * Saves the cached value.\n */\n @action\n saveChanges(): boolean | Promise<boolean> {\n return this.args.model.rename(this.cachedValue ?? this.args.model.output.value);\n }\n\n /**\n * Updates the cached value.\n */\n @action\n changeInputValue(evt: KeyboardEvent & { target: HTMLInputElement }): void {\n this.cachedValue = evt.target.value ?? this.args.model.output.value;\n }\n\n /**\n * Handles keydown for escape and enter.\n */\n @action\n keyInput(evt: KeyboardEvent & { target: HTMLInputElement }): void {\n if (!isEnterCode(evt.code)) {\n return;\n }\n\n this.changeInputValue(evt);\n const closeBtn = evt.target\n .closest('.rename-dialog-modal')\n ?.querySelector<HTMLElement>('.ui-modal-footer .btn-color-primary');\n\n // Cache new value, then trigger save using button so progress is shown.\n if (closeBtn) {\n closeBtn.click();\n } else {\n this.saveChanges();\n }\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Modals::Confirmations::Edit::EditConfirmations\\n @title={{coalesce @model.title (t \\\"@adc/ui-components.delete\\\")}}\\n @buttonCss=\\\"btn-color-danger\\\"\\n @buttonText={{t \\\"@adc/ui-components.delete\\\"}}\\n @editConfirmed={{@model.delete}}\\n @editCancelled={{this.modals.closeModal}}\\n class=\\\"confirm-delete-modal\\\"\\n ...attributes\\n>\\n <p>\\n {{coalesce @model.message (t \\\"@adc/ui-components.deleteMessage\\\")}}\\n </p>\\n</Modals::Confirmations::Edit::EditConfirmations>\")","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\n\nimport type ModalService from '../../../../services/modals.ts';\nimport type { ModalModel } from '../../../../services/modals.ts';\nimport type { EditConfirmationModalSignature } from '../edit/edit-confirmations';\n\nexport interface ConfirmDeleteModel extends ModalModel {\n title?: EditConfirmationModalSignature['Args']['title'];\n message?: string;\n delete: VoidFunction;\n}\n\nexport interface ConfirmDeleteDialogSignature {\n Element: EditConfirmationModalSignature['Element'];\n Args: {\n /** The `ConfirmDeleteModel`. */\n model: ConfirmDeleteModel;\n };\n}\n\n/**\n * @classdesc\n * A dialog to confirm deleting of an item\n */\nexport default class ConfirmDeleteDialog extends Component<ConfirmDeleteDialogSignature> {\n @service declare modals: ModalService;\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"loading-spinner\\\">\\n <div class=\\\"spinner\\\" tabindex={{0}}>\\n <SpinnerSvg @spinning={{true}} />\\n </div>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nconst LoadingDialog = templateOnlyComponent();\nexport default LoadingDialog;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"promise-dialog-modal {{coalesce @model.css \\'\\'}}\\\">\\n <Modals::DialogModals::Simple::SimpleDialog\\n @title={{@model.title}}\\n @buttons={{this.buttons}}\\n @disableFooterClose={{true}}\\n @disableHeaderClose={{true}}\\n >\\n <div class=\\\"promise-body\\\">\\n {{yield}}\\n <div class=\\\"icon\\\">\\n {{#if this.displayIconType}}\\n <SvgSymbol @icon={{this.displayIconType}} />\\n {{else if this.showSpinner}}\\n <SpinnerSvg @spinning={{true}} />\\n {{/if}}\\n </div>\\n\\n {{#if this.errorMessage}}\\n <p class=\\\"body-text\\\">\\n {{this.errorMessage}}\\n </p>\\n {{/if}}\\n\\n <p class=\\\"body-text\\\">\\n {{this.currentStateValues.bodyText}}\\n </p>\\n\\n {{#if (or this.currentStateValues.footerImagePath this.currentStateValues.footerText)}}\\n <div class=\\\"footer\\\">\\n {{#if this.currentStateValues.footerImagePath}}\\n <img\\n alt={{this.currentStateValues.footerImageAlt}}\\n class=\\\"footer-image\\\"\\n src={{this.currentStateValues.footerImagePath}}\\n />\\n {{/if}}\\n {{#if this.currentStateValues.footerText}}\\n <p class=\\\"footer-text\\\">\\n {{this.currentStateValues.footerText}}\\n </p>\\n {{/if}}\\n </div>\\n {{/if}}\\n </div>\\n </Modals::DialogModals::Simple::SimpleDialog>\\n</div>\")","import Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport { equal } from '@ember/object/computed';\nimport { computed, action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { getModalFooterButton } from '../../../modals/base/footer/modal-footer.ts';\n\nimport type ModalService from '../../../../services/modals.ts';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { ModalModel } from '../../../../services/modals.ts';\nimport type { SimpleDialogSignature } from '../simple/simple-dialog.ts';\n\ntype SimpleDialogSignatureArgs = SimpleDialogSignature['Args'];\n\nexport interface PromiseStep {\n bodyText: string;\n buttonText?: string;\n buttonCss?: string;\n displayCancel?: boolean;\n\n footerText?: string;\n footerImagePath?: string;\n footerImageAlt?: string;\n\n cancelOnClickFunction?: () => void;\n successOnClickFunction?: () => void;\n\n showError?: boolean;\n allowRetry?: boolean;\n}\n\nexport interface PromiseDialogModel extends ModalModel, Pick<SimpleDialogSignatureArgs, 'title'> {\n promiseFn: () => Promise<unknown>;\n stepConfirm: PromiseStep;\n stepPromise: PromiseStep;\n stepSuccess: PromiseStep;\n stepFailure: PromiseStep;\n css?: string;\n}\n\n/**\n * Constants for the different possible states.\n */\nenum State {\n Confirm,\n Promise,\n Success,\n Failure\n}\n\nexport interface PromiseDialogSignature {\n Args: {\n /** The promise dialog model. */\n model: PromiseDialogModel;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * A simple dialog for handling data while a promise resolves\n */\nexport default class PromiseDialog extends Component<PromiseDialogSignature> {\n @service declare intl: ADCIntlService;\n @service declare modals: ModalService;\n\n /**\n * Current promise state\n */\n @tracked private state = State.Confirm;\n\n /**\n * Message to display to user if an error is encountered during operation\n */\n @tracked errorMessage = '';\n\n /**\n * Should a spinner be displayed to indicate a pending promise\n */\n @equal('state', State.Promise)\n declare showSpinner: boolean;\n\n /**\n * Get the icon type based on the promise state\n */\n @computed('state')\n get displayIconType(): string {\n const { state } = this;\n\n if (state === State.Success) {\n return 'circle-check';\n }\n\n if (state === State.Failure) {\n return 'circle-x';\n }\n\n return '';\n }\n\n /**\n * Return the current promise state step\n */\n @computed('args.model', 'state')\n get currentStateValues(): PromiseStep {\n const { model } = this.args;\n return {\n [State.Confirm]: model.stepConfirm,\n [State.Promise]: model.stepPromise,\n [State.Success]: model.stepSuccess,\n [State.Failure]: model.stepFailure\n }[this.state];\n }\n\n /**\n * Return the buttons for the footer.\n */\n @computed('currentStateValues', 'processPromise', 'state')\n get buttons(): SimpleDialogSignatureArgs['buttons'] {\n const buttons = [],\n { state, currentStateValues } = this,\n { cancelOnClickFunction } = currentStateValues,\n showSuccess = state === State.Success,\n showRetry = state === State.Failure && currentStateValues.allowRetry;\n\n if (!showSuccess && currentStateValues.displayCancel) {\n buttons.push(\n getModalFooterButton(\n this.intl.t('@adc/ui-components.cancel'),\n cancelOnClickFunction && ([State.Promise, State.Confirm].includes(state) || showRetry)\n ? cancelOnClickFunction\n : () => {\n this.modals.closeModal();\n }\n )\n );\n }\n\n // Display an action button for stepConfirm and stepSuccess, and for stepFailure if promise retry is allowed.\n const displayPromiseButton = state === State.Confirm || showRetry;\n\n if (displayPromiseButton || showSuccess) {\n buttons.push(\n getModalFooterButton(\n currentStateValues.buttonText ?? '',\n displayPromiseButton ? this.processPromise : currentStateValues.successOnClickFunction,\n currentStateValues.buttonCss ?? ''\n )\n );\n }\n\n return buttons;\n }\n\n /**\n * Process the model's promise, changing state and handling errors\n */\n @action\n processPromise(): boolean {\n this.state = State.Promise;\n\n (async () => {\n const { model } = this.args;\n\n try {\n await model.promiseFn();\n this.state = State.Success;\n } catch (error) {\n this.state = State.Failure;\n\n if (model.stepFailure.showError) {\n this.errorMessage = this.intl.t('@adc/ui-components.promiseFailed', { error });\n }\n }\n })();\n\n return false;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"confirmation-modal {{coalesce @model.cssClass \\'\\'}}\\\" ...attributes>\\n <Modals::DialogModals::Simple::SimpleDialog\\n @title={{@model.title}}\\n @disableHeaderClose={{true}}\\n @disableFooterClose={{true}}\\n @buttons={{@model.buttons}}\\n >\\n <p class=\\\"confirm-desc\\\">\\n {{@model.description}}\\n </p>\\n </Modals::DialogModals::Simple::SimpleDialog>\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type { SimpleDialogSignature } from '../simple/simple-dialog';\n\nexport interface ConfirmationDialogSignature {\n Element: HTMLDivElement;\n Args: {\n model: Pick<SimpleDialogSignature['Args'], 'title' | 'buttons'> & {\n /** The text to display in the confirmation modal body. */\n description: string;\n /** Optional CSS class applied to the modal `<div />`. */\n cssClass?: string;\n };\n };\n}\n\nconst ConfirmationDialog = templateOnlyComponent<ConfirmationDialogSignature>();\nexport default ConfirmationDialog;\n","import Service, { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { computed, action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { A } from '@ember/array';\nimport { isEmpty } from '@ember/utils';\nimport { getModalFooterButton } from '../components/modals/base/footer/modal-footer.ts';\nimport { isHTMLSafe } from '@ember/template';\nimport { hasHTML } from '../utils/general.ts';\nimport InfoDialog from '../components/modals/dialog-modals/info/info-dialog.ts';\nimport RenameDialog from '../components/modals/confirmations/rename/rename-dialog.ts';\nimport ConfirmDeleteDialog from '../components/modals/confirmations/delete/confirm-delete.ts';\nimport LoadingDialog from '../components/modals/loading/loading-spinner.ts';\nimport PromiseDialog from '../components/modals/dialog-modals/promise/promise-dialog.ts';\nimport ConfirmationDialog from '../components/modals/dialog-modals/confirm/confirmation-dialog.ts';\n\nimport type { ModalButtonConfig } from '../components/modals/base/footer/modal-footer';\nimport type { SafeString } from 'handlebars';\nimport type AccessibilityService from './accessibility';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type NotificationManagerService from './notification-manager';\nimport type NativeBridgeService from '@adc/app-infrastructure/services/native-bridge';\nimport type { NativeButton } from '@adc/app-infrastructure/services/native-bridge';\nimport type { InfoDialogModel } from '../components/modals/dialog-modals/info/info-dialog';\nimport type { RenameDialogModel } from '../components/modals/confirmations/rename/rename-dialog';\nimport type { ConfirmDeleteModel } from '../components/modals/confirmations/delete/confirm-delete';\nimport type { PromiseDialogModel } from '../components/modals/dialog-modals/promise/promise-dialog';\nimport type Component from '@glimmer/component';\nimport type { TOC } from '@ember/component/template-only';\n// eslint-disable-next-line ember/no-classic-components\nimport type EmberComponent from '@ember/component';\n\n/**\n * The private collection of modal objects.\n *\n * @private\n */\nconst activeModals: ReturnType<typeof A<Modal>> = A<Modal>([]);\n\nexport type ModalComponent = TOC<any> | typeof Component<any> | typeof EmberComponent<any>;\n\nexport interface ModalModel {\n disableBackdropClose?: boolean;\n}\n\ninterface VariableModalModal extends ModalModel {\n [key: string]: any;\n}\n\ntype CloseFn = () => boolean | void;\n\n/**\n * The modal configuration object.\n *\n * @inner\n */\nclass Modal {\n /**\n * The path to the modal component to render\n */\n type: ModalComponent;\n\n /**\n * Contains any specific data for a modal by its caller\n */\n @tracked model: VariableModalModal;\n\n /**\n * An optional handler called when the dialog closes\n */\n onClose: () => boolean | void | undefined;\n\n /**\n * Modal Constructor\n */\n constructor(type: ModalComponent, model: VariableModalModal = {}, onClose: () => boolean | void = () => true) {\n assert('[@adc/ui-components] Modal object \"type\" parameter required', !isEmpty(type));\n\n this.type = type;\n this.model = model;\n this.onClose = onClose;\n }\n}\n\ninterface ModalNativeButton extends NativeButton {\n css?: string;\n}\n\n/**\n * @classdesc\n * Modal Manager service to handle opening and closing of modals\n */\nexport default class ModalService extends Service {\n @service declare accessibility: AccessibilityService;\n @service declare notificationManager: NotificationManagerService;\n @service declare intl: ADCIntlService;\n @service declare nativeBridge: NativeBridgeService;\n\n /**\n * Returns readable array of activeModals\n */\n @computed()\n get modalsToRender(): typeof activeModals {\n return activeModals;\n }\n\n /**\n * Checks if the top-most modal matches the given type\n */\n modalIsOpen(type: ModalComponent): boolean {\n const { modalsToRender } = this;\n return modalsToRender[modalsToRender.length - 1]?.type === type;\n }\n\n /**\n * Render a confirmation dialog modal.\n */\n async showConfirmationDialog(\n title: string,\n desc: string | SafeString,\n confirmButtonProperties: ModalButtonConfig = {},\n cancelButtonProperties: ModalButtonConfig | null = {},\n cssClass?: string\n ): Promise<void> {\n const { nativeBridge } = this,\n buttons = [\n [confirmButtonProperties, 'confirm', nativeBridge.getButtonTypeConfirm(), () => {}, 'btn-color-primary']\n ];\n\n if (cancelButtonProperties) {\n buttons.unshift([cancelButtonProperties, 'cancel', nativeBridge.getButtonTypeCancel(), () => {}, '']);\n }\n\n const nativeButtons = buttons.map(\n ([props, text, nativeButtonType, fn, css]: [\n ModalButtonConfig,\n string,\n string,\n () => unknown,\n string\n ]): ModalNativeButton =>\n ({\n text: this.intl.t(`@adc/ui-components.${text}`),\n type: nativeButtonType,\n action: fn,\n renderAsNative: true,\n css,\n ...props\n } as ModalNativeButton)\n );\n\n if (nativeBridge.doesSupportConfirmationDialog) {\n try {\n await nativeBridge.showConfirmationDialog(title, String(desc), nativeButtons);\n return;\n } catch (e) {\n // Do nothing\n }\n }\n\n if (!isHTMLSafe(desc) && hasHTML(desc)) {\n console.warn('The confirmation dialog displayed a description containing HTML characters.');\n assert(\n '[@adc/ui-components] The confirmation dialog displayed a description containing HTML characters.',\n false\n );\n }\n\n this.showModal(ConfirmationDialog, {\n title,\n description: desc,\n buttons: nativeButtons.map(({ css, text, action }) => getModalFooterButton(text, action, css)),\n cssClass\n });\n }\n\n /**\n * Opens a new modal dialog, transferring focus and hiding notifications\n */\n @action\n showModal(type: ModalComponent, model?: VariableModalModal, onClose?: CloseFn): void {\n // Hide open notifications and save current focused element.\n this.notificationManager.hideNotifications();\n this.accessibility.saveFocusedElement();\n\n // Create and display modal\n this.modalsToRender.pushObject(new Modal(type, model, onClose));\n }\n\n /**\n * Opens a new informational modal dialog, transferring focus and hiding notifications.\n */\n @action\n showInfoModal(model: InfoDialogModel, onClose?: CloseFn): void {\n this.showModal(InfoDialog, model, onClose);\n }\n\n /**\n * Opens a dialog used to rename things.\n */\n @action\n showRenameModal(model: RenameDialogModel, onClose?: CloseFn): void {\n this.showModal(RenameDialog, model, onClose);\n }\n\n /**\n * Opens a dialog used to delete things.\n */\n @action\n showDeleteModal(model: ConfirmDeleteModel, onClose?: CloseFn): void {\n this.showModal(ConfirmDeleteDialog, model, onClose);\n }\n\n /**\n * Render the loading screen\n */\n @action\n showLoadingModal(promise: Promise<any>): void {\n this.showModal(LoadingDialog, { disableBackdropClose: true });\n\n // Close modal once promise resolves\n promise.finally(() => this.closeModal());\n }\n\n /**\n * Render a promise dialog.\n */\n @action\n showPromiseModal(model: PromiseDialogModel, onClose?: CloseFn): void {\n this.showModal(\n PromiseDialog,\n {\n ...model,\n disableBackdropClose: true\n },\n onClose\n );\n }\n\n /**\n * Hides and destroys the last open modal.\n */\n @action\n closeModal(keepNotificationsHidden?: boolean): void {\n const modals = this.modalsToRender;\n let lastModal = modals.lastObject;\n\n // Abort closing if we should not close\n if (!lastModal || lastModal.onClose() === false) {\n return;\n }\n\n lastModal = undefined;\n this.modalsToRender.popObject();\n\n if (!keepNotificationsHidden) {\n this.notificationManager.showNotifications();\n }\n\n this.accessibility.restoreFocus();\n }\n\n @action\n closeAllModals(): void {\n this.modalsToRender.clear();\n\n this.accessibility.restoreFocus();\n }\n}\n","import Service from '@ember/service';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { getOwner } from '@ember/owner';\nimport { A } from '@ember/array';\nimport { camelize } from '@ember/string';\nimport { isHTMLSafe } from '@ember/template';\nimport { assert } from '@ember/debug';\nimport { hasHTML } from '../utils/general.ts';\n\nimport type { SafeString } from 'handlebars';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SvgSymbolSignature } from '@adc/svg-system/components/svg-symbol';\nimport type { InternalOwner } from '@ember/-internals/owner';\nimport type { ButtonAsyncSignature } from '../components/button/async.ts';\n\ntype NotificationType = 'info' | 'success' | 'warning' | 'error' | 'session-ended' | 'custom';\nexport type AddNotificationMethodType = 'addInfo' | 'addSuccess' | 'addWarning' | 'addError' | 'addSessionEnded';\n\nexport interface AppNotificationButton extends Pick<ButtonAsyncSignature['Args'], 'icon' | 'iconOnly'> {\n text: string;\n cssClass?: string;\n noBackground?: boolean;\n elementToFocus?: HTMLElement;\n action?: (buttonAnimation?: Promise<boolean>) => any;\n}\n\nexport interface AppNotification {\n type: NotificationType;\n icon: string;\n text: string | SafeString;\n hidden: boolean;\n iconTitle?: string;\n iconFillColor?: SvgSymbolSignature['Args']['fillColor'];\n persistent?: boolean;\n autoCloseDuration?: number;\n iconDesc?: string;\n iconIsHiddenForAccessibility?: boolean;\n buttons?: AppNotificationButton[];\n cssClass?: string;\n elementToFocus?: HTMLElement;\n}\n\ntype NotificationManagerConfig = Record<NotificationType, Partial<AppNotification>>;\n\n/**\n * Creates a notification type.\n *\n * @private\n */\nfunction createNotificationType(\n this: NotificationManager,\n type: NotificationType,\n icon: string,\n persistent = false,\n autoCloseDuration?: number\n): AppNotification {\n // Create default notification config.\n const n = {\n type,\n icon,\n iconTitle: this.intl.t(`@adc/ui-components.${camelize(type)}`),\n persistent,\n autoCloseDuration\n },\n owner = getOwner(this),\n config = (owner && (owner as InternalOwner).resolveRegistration('config:environment')) ?? {};\n\n if ('notificationManager' in config) {\n Object.assign(n, (config.notificationManager as NotificationManagerConfig)[type] ?? {});\n }\n\n return n as AppNotification;\n}\n\n/**\n * Adds notification from predefined notification type.\n *\n * @private\n */\nfunction addNotificationFromType(\n this: NotificationManager,\n text: string | SafeString,\n notificationType: AppNotification,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n): AppNotification | undefined {\n if (autoCloseDurationOverride !== undefined && isNaN(autoCloseDurationOverride)) {\n autoCloseDurationOverride = undefined;\n }\n\n if (elementToFocus && !(elementToFocus instanceof Element)) {\n elementToFocus = undefined;\n }\n\n return addNotification.call(this, text, {\n ...notificationType,\n autoCloseDuration:\n autoCloseDurationOverride !== undefined ? autoCloseDurationOverride : notificationType.autoCloseDuration,\n hidden: false,\n elementToFocus\n });\n}\n\n/**\n * Deletes any duplicates of the given notification.\n *\n * @private\n */\nfunction returnDedupedNotifications(this: NotificationManager, newNotification: AppNotification): AppNotification[] {\n const { text, type } = newNotification;\n\n if (text && type) {\n // Remove the duplicate notifications. Non-mutating returns a new array\n return this.notifications.reject((notification) => {\n // Note: have to compare SafeStrings here so using string property.\n return notification.text.toString() === text.toString() && notification.type === type;\n });\n }\n return this.notifications;\n}\n\n/**\n * Adds a notification to the notification manager by triggering a trigger.\n *\n * @private\n */\nfunction addNotification(\n this: NotificationManager,\n text: string | SafeString,\n appNotification: Omit<AppNotification, 'text'>\n): AppNotification | undefined {\n // Are notifications currently muted?\n if (this.isMuted) {\n // Is this DEV environment?\n const owner = getOwner(this),\n config = (owner && (owner as InternalOwner).resolveRegistration('config:environment')) ?? {};\n\n if ('environment' in config && config.environment === 'development') {\n // Log the muted notification.\n console.log(`Muted ${appNotification.type} notification: ${text}`);\n }\n\n // Do not add the notification.\n return;\n }\n\n if (!isHTMLSafe(text) && hasHTML(text)) {\n const msg =\n '[@adc/ui-components] The notification text contains HTML characters but is not HTML safe. Please mark text as safe, but only if it does not include any user entered data.';\n console.log(msg);\n console.log('failing text:', text);\n assert(msg, false);\n }\n\n const newNotification: AppNotification = {\n ...appNotification,\n text,\n // Convert false to 0ms to keep notification open until dismissed.\n autoCloseDuration: appNotification.autoCloseDuration ?? 0\n };\n\n // If there are duplicates that already exist, remove them.\n // Add the notification to the array.\n this.notifications = A([...returnDedupedNotifications.call(this, newNotification), newNotification]);\n return newNotification;\n}\n\n/**\n * @classdesc\n * Service that manages adding/removing notifications for an application.\n */\nexport default class NotificationManager extends Service {\n @service declare intl: ADCIntlService;\n\n // region Notification Types\n\n private get infoType(): AppNotification {\n return createNotificationType.call(this, 'info', 'info');\n }\n\n private get successType(): AppNotification {\n return createNotificationType.call(this, 'success', 'circle-o-check', true, 5000);\n }\n\n private get warningType(): AppNotification {\n return createNotificationType.call(this, 'warning', 'warning');\n }\n\n private get errorType(): AppNotification {\n return createNotificationType.call(this, 'error', 'issue');\n }\n\n private get sessionEndedType(): AppNotification {\n return createNotificationType.call(this, 'session-ended', 'issue', true, 0);\n }\n\n // endregion\n\n // region Properties\n\n /**\n * A list of currently displayed notifications.\n */\n @tracked notifications: ReturnType<typeof A<AppNotification>> = A<AppNotification>([]);\n\n /**\n * Determines if the notifications should be ignored.\n *\n * @note If the session is ended, this flag should be set to false using the addSessionEnded() method so no new notifications will be added.\n * New notifications are likely errors caused by the lack of session, and we don't want multiple of these to display during the logout process.\n */\n @tracked isMuted = false;\n\n // endregion\n\n // region Add/Remove Notification Methods\n\n /**\n * Adds an 'info' notification to the notification manager.\n */\n @action addInfo(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotificationFromType.call(this, text, this.infoType, autoCloseDurationOverride, elementToFocus);\n }\n\n /**\n * Adds a 'success' notification to the notification manager.\n */\n @action addSuccess(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotificationFromType.call(this, text, this.successType, autoCloseDurationOverride, elementToFocus);\n }\n\n /**\n * Adds a 'warning' notification to the notification manager.\n */\n @action addWarning(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotificationFromType.call(this, text, this.warningType, autoCloseDurationOverride, elementToFocus);\n }\n\n /**\n * Adds an 'error' notification to the notification manager.\n */\n @action addError(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotificationFromType.call(this, text, this.errorType, autoCloseDurationOverride, elementToFocus);\n }\n\n /**\n * Adds a notification telling the user that their session has ended.\n *\n * @note This sets a flag that does not allow any more notifications to be added.\n */\n @action addSessionEnded(\n text: string | SafeString,\n autoCloseDurationOverride?: number,\n elementToFocus?: HTMLElement\n ): void {\n addNotificationFromType.call(this, text, this.sessionEndedType, autoCloseDurationOverride, elementToFocus);\n\n // Mute notifications so service knows not to show any more application notifications.\n this.mute();\n }\n\n /**\n * Adds a notification to the notification manager.\n *\n * @param text - Text to show in the notification.\n * @param icon - Icon for the notification.\n * @param buttons - Buttons to render in the notification\n * @param [autoCloseDuration] - How long should the notification stay open? (in ms)\n * @param [hidden] - Determines if the notification persists is currently shown or hidden.\n * @param [persistent] - Determines if the notification persists through route transitions or is cleared.\n * @param [cssClass] - Css class to be added to the notification.\n * @param [iconTitle] - The icon's title for the notification.\n * @param [iconDesc] - The icon's description for the notification.\n * @param [iconIsHiddenForAccessibility] - Is the icon for the notification hidden for screen readers.\n * @param [elementToFocus] - The element to focus after the notification is closed.\n */\n @action addNotification(\n text: string | SafeString,\n icon: string,\n buttons?: AppNotificationButton[],\n autoCloseDuration?: number,\n persistent?: boolean,\n hidden?: boolean,\n cssClass?: string,\n iconTitle?: string,\n iconDesc?: string,\n iconIsHiddenForAccessibility?: boolean,\n elementToFocus?: HTMLElement\n ): AppNotification | undefined {\n return addNotification.call(this, text, {\n icon,\n type: 'custom',\n buttons,\n autoCloseDuration,\n persistent,\n hidden: !!hidden,\n cssClass,\n iconTitle,\n iconDesc,\n iconIsHiddenForAccessibility,\n elementToFocus\n });\n }\n\n /**\n * Removes the given notification from the list of notifications.\n */\n @action removeNotification(notification: AppNotification): void {\n this.notifications.removeObject(notification);\n }\n\n /**\n * Clears any notifications that are NOT persistent.\n */\n @action clearNonPersistentNotifications(): void {\n this.notifications = A<AppNotification>(this.notifications.rejectBy('persistent', false));\n }\n\n /**\n * Clears all notifications.\n */\n @action clearNotifications(): void {\n this.notifications = A<AppNotification>([]);\n }\n\n // endregion\n\n // region Methods to Update Properties\n\n /**\n * Hides any currently shown notifications.\n */\n @action hideNotifications(): void {\n this.notifications.setEach('hidden', true);\n }\n\n /**\n * Shows any currently hidden notifications.\n */\n @action showNotifications(): void {\n this.notifications.setEach('hidden', false);\n }\n\n /**\n * Mutes (i.e. ignores) notifications so they do not render on screen.\n */\n @action mute(): void {\n this.isMuted = true;\n }\n\n /**\n * Disabled notification muting.\n */\n @action unMute(): void {\n this.isMuted = false;\n }\n\n // endregion\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<button\\n class=\\\"simple-btn {{this.buttonCss}}\\\"\\n type={{coalesce @type \\\"button\\\"}}\\n {{on \\\"click\\\" this.handleClick}}\\n data-responsive-text={{@responsiveText}}\\n ...attributes\\n>\\n {{#if (has-block)}}\\n {{~yield~}}\\n {{else}}\\n <span>{{~@text~}}</span>\\n {{/if}}\\n</button>\")","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { isPresent } from '@ember/utils';\nimport { A } from '@ember/array';\n\nexport type SimpleButtonColor = 'primary' | 'safe' | 'danger' | 'stealth' | 'dark';\nexport type SimpleButtonStyle = 'link' | 'small';\n\nexport interface ButtonSimpleSignature {\n Element: HTMLButtonElement;\n Args: {\n /** Optional text to appear in the button. */\n text?: string;\n /** Optional text that will appear for small screen widths. */\n responsiveText?: string;\n /** The button type. */\n type?: 'button' | 'submit' | 'reset';\n /** Optional button color. */\n buttonColor?: 'primary' | 'safe' | 'danger' | 'stealth' | 'dark';\n /** Optional button style. */\n buttonStyle?: 'link' | 'small' | 'inverted';\n /** A function called when the button is clicked (easier to use `{{on 'click'}}`). */\n buttonAction?: (e: MouseEvent | KeyboardEvent) => unknown;\n };\n Blocks: {\n default: [];\n };\n}\n\nfunction toArray(v?: string): string[] | undefined {\n return v?.trim().split(' ').filter(isPresent);\n}\n\nexport function getAnyButtonStyle(style?: string): string | undefined {\n return toArray(style)\n ?.map((v) => `btn-style-${v}`)\n .join(' ');\n}\n\n/**\n * Accepts another button style and removes anything not allowed in the simple button style.\n */\nexport function getSimpleButtonStyle(style?: string): SimpleButtonStyle | undefined {\n return toArray(style)\n ?.filter((v) => v === 'link' || v === 'small' || v === 'inverted')\n .join(' ') as SimpleButtonStyle;\n}\n\n/**\n * A simple button.\n */\nexport default class ButtonSimple extends Component<ButtonSimpleSignature> {\n /**\n * The computed CSS classes for this button based on the button color and style arguments. Since multiple `buttonColor` values would conflict only the last passed value will be used.\n */\n get buttonCss(): string {\n const { args } = this,\n lastColor = toArray(args.buttonColor)?.pop();\n\n return A([lastColor && `btn-color-${lastColor.trim()}`, getAnyButtonStyle(args.buttonStyle)])\n .compact()\n .join(' ')\n .trim();\n }\n\n /**\n * Event handler for template button click.\n */\n @action handleClick(e: MouseEvent): void {\n this.args.buttonAction?.(e);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if @item.icon}}\\n <SvgSymbol\\n @icon={{@item.icon}}\\n @title={{@item.iconTitle}}\\n @desc={{@item.iconDesc}}\\n @isHiddenForAccessibility={{@item.iconIsHiddenForAccessibility}}\\n />\\n{{/if}}\\n\\n<div class=\\\"text-info\\\">\\n <div class=\\\"primary-info\\\">\\n <p class=\\\"name\\\">{{@item.name}}</p>\\n\\n {{#if @item.description}}\\n <p class=\\\"description\\\">{{@item.description}}</p>\\n {{/if}}\\n </div>\\n\\n {{#if @item.secondaryDescription}}\\n <div class=\\\"secondary-info\\\">\\n <p class=\\\"secondary-description\\\">{{@item.secondaryDescription}}</p>\\n </div>\\n {{/if}}\\n</div>\")","import templateOnlyComponent from '@ember/component/template-only';\n\nimport type CheckboxTreeItem from '../../../utils/dropdown-select-item';\n\nexport interface DetailedCheckboxContentSignature {\n Args: {\n item: CheckboxTreeItem;\n };\n}\nconst DetailedCheckboxContent = templateOnlyComponent<DetailedCheckboxContentSignature>();\nexport default DetailedCheckboxContent;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! NOTE: this wrapper is necessary because Firefox does not support flex on button elements\\n http://stackoverflow.com/questions/24289251/flexbox-not-working-in-buttons-in-firefox }}\\n<div responsive-text={{@responsiveText}} aria-live=\\\"polite\\\">\\n {{#if @icon}}\\n <SvgSymbol\\n @icon={{@icon}}\\n @title={{this.svgTitle}}\\n @desc={{@iconDesc}}\\n @isHiddenForAccessibility={{or this.promiseStateClass @iconIsHiddenForAccessibility}}\\n />\\n {{/if}}\\n\\n {{! Asynchronous Button }}\\n {{#if this.isPromisePending}}\\n <SpinnerSvg @spinning={{true}} class=\\\"btn-async-icon\\\" aria-label=\\\"\\\" />\\n {{else if this.isPromiseFulfilled}}\\n <Button::AsyncButtonIcon @icon=\\\"success\\\" />\\n {{else if this.isPromiseRejected}}\\n <Button::AsyncButtonIcon @icon=\\\"warning\\\" />\\n {{/if}}\\n\\n {{! Only add text if this is NOT an iconOnly button }}\\n {{#unless @iconOnly}}\\n {{! Normal Button: add span tags inside of if/else (otherwise this messes up btn-icon styling }}\\n {{#if @text}}\\n <span aria-hidden={{if this.promiseStateClass \\\"true\\\" \\\"false\\\"}}>\\n {{~@text}}\\n </span>\\n {{else}}\\n <span aria-hidden={{if this.promiseStateClass \\\"true\\\" \\\"false\\\"}}>\\n {{~yield}}\\n </span>\\n {{/if}}\\n {{/unless}}\\n\\n {{#if @dropdownIcon}}\\n <SvgSymbol\\n @icon={{@dropdownIcon}}\\n @title={{@dropdownIconTitle}}\\n @desc={{@dropdownIconDesc}}\\n @isHiddenForAccessibility={{@dropdownIconIsHiddenForAccessibility}}\\n />\\n {{/if}}\\n\\n {{#if this.hasVisibleCheckmark}}\\n <Button::AsyncButtonIcon\\n @icon=\\\"success\\\"\\n @title={{t \\\"@adc/ui-components.selected\\\"}}\\n @iconCss=\\\"btn-selected-icon\\\"\\n />\\n {{/if}}\\n</div>\\n<ErrorTooltip\\n @text={{@errorMessage}}\\n @placement={{coalesce @errorTooltipPlace \\\"bottom\\\"}}\\n @duration={{this.errorDuration}}\\n @selector=\\\"button.btn\\\"\\n @selectorDirection=\\\"up\\\"\\n/>\")","// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\nimport Component from '@ember/component';\nimport { Promise as EmberPromise } from 'rsvp';\nimport { equal } from '@ember/object/computed';\nimport { computed } from '@ember/object';\nimport { later } from '@ember/runloop';\nimport { isEnterOrSpaceCode } from '@adc/ember-utils/utils/a11y';\nimport { inject as service } from '@ember/service';\nimport { convertAutoDestroyToDuration } from './error-tooltip.ts';\nimport { isTestEnvironment } from '../utils/general.ts';\n\n// region Variables\n\n/**\n * Mapping of input sizes to partial class names.\n *\n * @private\n * @type {Object<String, String>}\n * @memberof components.Button\n */\nconst sizeMap = {\n 'x-small': 'x-sm',\n small: 'sm',\n large: 'lg',\n 'x-large': 'x-lg'\n};\n\nconst ON_CLICK = 'on-click';\n\n/**\n * Possible defined promise states.\n *\n * @type {string}\n * @ignore\n */\nconst SUCCESS = 'success',\n PENDING = 'pending',\n ERROR = 'error';\n\n/**\n * Classes used for asynchronous button states.\n *\n * @type {String}\n * @private\n * @ignore\n */\nconst BUTTON_STATE_CLASSES = {\n [SUCCESS]: 'btn-safe',\n [PENDING]: 'btn-default',\n [ERROR]: 'btn-danger'\n};\n\n/**\n * The duration between when the on-click promise is resolved and the success callback method is called.\n *\n * @note This is also the length of time before the button changes from success back to its normal state.\n *\n * @private\n * @instance\n * @memberof components.Button\n *\n * @returns {number}\n */\nfunction getSuccessCallbackDelay() {\n return this.noCallbackDelay ? 0 : 700;\n}\n\n/**\n * Duration of time before the buttons changes from error state back to its normal state.\n *\n * @private\n * @instance\n * @memberof components.Button\n *\n * @returns {number}\n */\nfunction getFailureCallbackDelay() {\n return this.noCallbackDelay ? 0 : 3000;\n}\n\n/**\n * Observes the passed promise to animate the button.\n *\n * @param {Promise} promise The promise to observe.\n *\n * @private\n * @instance\n * @memberof components.Button\n */\nfunction observePromise(promise) {\n let animationDelay = getSuccessCallbackDelay.call(this),\n fnUpdateStateClass = (state) => {\n // Is the button still active?\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-is-destroyed\n if (!this.isDestroyed) {\n // Update promise state class.\n this.set('promiseStateClass', state);\n }\n };\n\n // Update CSS class to pending.\n fnUpdateStateClass(PENDING);\n\n promise\n .then(() => {\n // Promise fulfilled.\n fnUpdateStateClass(SUCCESS);\n })\n .catch(() => {\n if (!this.showFailureAnimation) {\n fnUpdateStateClass(PENDING);\n return;\n }\n\n // Promise rejected.\n fnUpdateStateClass(ERROR);\n\n // Set button animation length to be longer for errors because they are likely staying on the same page.\n animationDelay = getFailureCallbackDelay.call(this);\n })\n .finally(() => {\n // Reset button to original state (undefined) after a certain time period.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(() => {\n fnUpdateStateClass(undefined);\n }, animationDelay);\n });\n}\n\n/**\n * Checks the attributes to see if there is an on-click method that should be called. If there is an on-click method, it calls that\n * method with a callback helper as an argument (linkPromise) to allow our button to know when the promise has been settled.\n * The on-click method (if asynchronous) should define a promise and call the helper method passed to link the promise to the button.\n *\n * @param {Object} args\n *\n * @private\n * @instance\n * @memberof components.Button\n */\n\nfunction executeAction(args) {\n // Is there no on-click handler?\n const onClickMethod = this.getAttr(ON_CLICK);\n\n if (!onClickMethod) {\n // Nothing to do, but allow bubbling.\n return true;\n }\n\n const { disabled, readonly, promiseStateClass } = this;\n\n // Is the button disabled, readonly or in the middle of an async task?\n if (disabled || readonly || promiseStateClass !== undefined) {\n // Do nothing, but return false to stop action bubbling.\n return false;\n }\n\n // Was an on-click method defined in the handlebars?\n if (typeof onClickMethod === 'function') {\n let delayedResolver;\n\n // This resolves the delayed promise after the animation finishes.\n const delayedHandler = new EmberPromise((resolve) => {\n delayedResolver = resolve;\n });\n\n // The button's action should return a promise, so we can animate the button's state.\n const promise = onClickMethod(delayedHandler, args);\n\n // Is the returned value a promise?\n if (promise && promise.then) {\n // Observe the promise in order to animate the button.\n observePromise.call(this, promise);\n\n // Animation finished.\n promise\n .then(() => {\n // Resolve the delayed promise, in case the developer defined their own actions to be taken.\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n later(() => {\n delayedResolver();\n }, getSuccessCallbackDelay.call(this));\n })\n .catch(() => {});\n }\n }\n}\n\n// endregion\n\n/**\n * Button component for use in all ADC applications.\n *\n * @class Button\n * @extends Ember.Component\n * @memberof components\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes\nconst Button = Component.extend(\n /** @lends components.Button# **/ {\n intl: service(),\n\n // region Ember Properties\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/require-tagless-components\n tagName: 'button',\n\n classNames: ['btn'],\n classNameBindings: [\n 'sizeClass',\n 'primary:btn-primary',\n 'safe:btn-safe',\n 'danger:btn-danger',\n 'link:btn-link',\n 'icon:btn-icon',\n 'noBackground:no-bg',\n 'iconOnly',\n 'promiseStateClass',\n 'selected',\n 'hideSelectedCheckmark',\n 'asyncButtonClass'\n ],\n attributeBindings: [\n 'ariaLabel:aria-label',\n 'disabled',\n 'type',\n 'ariaSelected:aria-selected',\n 'tabindex',\n 'ariaHasPopup:aria-haspopup',\n 'dataId:data-id'\n ],\n\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-component-lifecycle-hooks\n didReceiveAttrs() {\n this._super();\n\n const iconOnly = this.getAttr('iconOnly'),\n text = this.getAttr('text');\n\n // Text should always be defined for an iconOnly button because it is used for accessibility purposes.\n if (iconOnly && !(text && text.length)) {\n console.warn('An \"iconOnly\" button should have the text property defined.');\n }\n },\n\n // endregion\n\n // region Custom Properties\n\n /**\n * Data ID attribute of the element.\n *\n * @type {String|undefined}\n */\n dataId: undefined,\n\n /**\n * Text to be shown inside the button.\n *\n * <strong>Note:</strong> If both text and responsiveText are defined, the responsiveText takes precedence on smaller responsive screens.\n *\n * @type {String|undefined}\n */\n text: undefined,\n\n /**\n * Is the button disabled?\n *\n * @type {boolean}\n */\n disabled: false,\n\n /**\n * Is the button a popover enu trigger?\n *\n * @type {boolean}\n */\n isPopoverTrigger: false,\n\n /**\n * Determines the aria-haspopup attribute value.\n *\n * @function\n * @returns {String|undefined}\n */\n ariaHasPopup: computed('isPopoverTrigger', function () {\n return this.isPopoverTrigger ? 'true' : undefined;\n }),\n\n /**\n * Should the btn-primary class be applied?\n *\n * @type {boolean}\n */\n primary: false,\n\n /**\n * Should the btn-safe class be applied?\n *\n * @type {boolean}\n */\n safe: false,\n\n /**\n * Should the btn-danger class be applied?\n *\n * @type {boolean}\n */\n danger: false,\n\n /**\n * Should the btn-link class be applied?\n *\n * @type {boolean}\n */\n link: false,\n\n /**\n * Button size\n *\n * @type {String|undefined}\n */\n size: undefined,\n\n /**\n * Determines if the button is selected (i.e. its state is \"on\").\n *\n * @type {boolean}\n */\n selected: false,\n\n /**\n * Determines the aria-selected attribute of the button.\n *\n * @function\n * @returns {Boolean|undefined}\n */\n ariaSelected: computed('selected', function () {\n return this.selected || undefined;\n }),\n\n /**\n * Hides the checkmark displayed by default when the button is selected.\n *\n * @type {boolean}\n */\n hideSelectedCheckmark: false,\n\n /**\n * Whether or not to show the checkmark when the button is selected.\n *\n * @function\n * @returns {boolean}\n */\n hasVisibleCheckmark: computed('selected', 'hideSelectedCheckmark', function () {\n return this.selected && !this.hideSelectedCheckmark;\n }),\n\n // region Error Handling\n\n /**\n * The error message to display inside the tooltip.\n *\n * @type {String}\n */\n errorMessage: undefined,\n\n /**\n * The number of seconds to wait before closing the error tooltip.\n *\n * @type {number}\n */\n autoDestroy: undefined,\n\n /**\n * Calculated error tooltip duration.\n */\n errorDuration: computed('autoDestroy', function () {\n return convertAutoDestroyToDuration(this.autoDestroy);\n }),\n\n // endregion\n\n /**\n * Returns the class size to be applied based on the passed in size.\n *\n * @function\n * @returns {String}\n */\n sizeClass: computed('size', function () {\n const classSize = sizeMap[this.size];\n return (classSize && `btn-${classSize}`) || '';\n }).readOnly(),\n\n // endregion\n\n // region Icon Button\n\n /**\n * More descriptive button text to be displayed when responsive buttons take up the full width of the screen.\n *\n * @type {String|undefined}\n */\n responsiveText: undefined,\n\n /**\n * Screen reader text.\n *\n * @function\n * @returns {String}\n */\n screenReaderText: computed('isPopoverTrigger', function () {\n const { isPopoverTrigger } = this;\n\n return isPopoverTrigger ? this.intl.t('@adc/ui-components.triggerDropdown') : '';\n }),\n\n /**\n * Determines the ARIA label to use for accessibility purposes.\n *\n * @function\n * @returns {String}\n */\n ariaLabel: computed('iconOnly', 'text', 'responsiveText', 'screenReaderText', function () {\n const { iconOnly, text, responsiveText, screenReaderText } = this;\n\n return screenReaderText ? screenReaderText : iconOnly ? text : responsiveText;\n }),\n\n /**\n * Name of the icon to be displayed within the button.\n *\n * @type {String|undefined}\n */\n icon: undefined,\n\n /**\n * Determines if only an icon should be displayed or if text can accompany the icon in the button.\n *\n * Note: This allows developers to specify text for accessibility purposes without having it appear in the button.\n *\n * @type {boolean}\n */\n iconOnly: false,\n\n /**\n * Icon is accompanied by a tooltip that contains its title.\n *\n * @type {string}\n */\n svgTitle: computed('text', 'iconTitle', function () {\n const { text, iconTitle } = this;\n\n return iconTitle ? iconTitle : text;\n }),\n\n /**\n * Should the background of the button be transparent?\n *\n * Note: this is ignored if there is text specified for the button.\n *\n * @type {boolean}\n */\n noBackground: false,\n\n /**\n * Should the click event bubble up?\n *\n * @type {boolean}\n */\n bubbleClickEvent: false,\n\n /**\n * Should the keydown event bubble up?\n *\n * @type {boolean}\n */\n bubbleKeydownEvent: true,\n\n /**\n * Should this button end with a failure animation?\n *\n * @type {boolean}\n */\n showFailureAnimation: true,\n\n // endregion\n\n // region Asynchronous Button\n\n /**\n * String representation of the state of the promise in an async task.\n *\n * The promise can be in one of the following states:\n *\n * <ul>\n * <li><strong>Settled</strong>: not waiting for async task (i.e. undefined)</li>\n * <li><strong>Pending</strong>: waiting for fulfilled or rejected status</li>\n * <li><strong>Fulfilled</strong>: the async task succeeded</li>\n * <li><strong>Rejected</strong>: the async task failed</li>\n * </ul>\n *\n * @type {String|undefined}\n */\n promiseStateClass: undefined,\n\n /**\n * Is the promise in pending state?\n *\n * <strong>Note:</strong> This property is used in the handlebars to show the spinning svg icon.\n *\n * @function\n * @returns {boolean}\n */\n isPromisePending: equal('promiseStateClass', PENDING),\n\n /**\n * Is the promise in a fulfilled/success state?\n *\n * <strong>Note:</strong> This property is used in the handlebars to show the check svg icon.\n *\n * @function\n * @returns {boolean}\n */\n isPromiseFulfilled: equal('promiseStateClass', SUCCESS),\n\n /**\n * Is the promise in a rejected/error state?\n *\n * <strong>Note:</strong> This property is used in the handlebars to show the exclamation svg icon.\n *\n * @function\n * @returns {boolean}\n */\n isPromiseRejected: equal('promiseStateClass', ERROR),\n\n /**\n * Returns the button color based on promise state.\n *\n * @function\n * @returns {String}\n */\n asyncButtonClass: computed('link', 'noBackground', 'promiseStateClass', function () {\n if (this.noBackground || this.link) {\n return undefined;\n }\n\n return BUTTON_STATE_CLASSES[this.promiseStateClass];\n }),\n\n /**\n * Should there be no delay between promise being fulfilled and delayed handler being triggered?\n *\n * @type {Boolean}\n */\n noCallbackDelay: computed(function () {\n return isTestEnvironment.call(this);\n }),\n\n // endregion\n\n // region Actions\n\n /**\n * Listener for keyDown events.\n *\n * @param {KeyboardEvent} e\n */\n keyDown(e) {\n if (isEnterOrSpaceCode(e.code)) {\n e.preventDefault();\n executeAction.call(this, ...arguments);\n\n return this.bubbleKeydownEvent;\n }\n },\n\n /**\n * Called when the button component is clicked.\n */\n click(...args) {\n executeAction.call(this, args);\n\n return this.bubbleClickEvent;\n }\n\n // endregion\n }\n);\n\nexport default Button;\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div\\n class=\\\"detailed-checkbox\\n {{if @item.isFullySelected \\'selected\\'}}\\n {{if @item.isPartiallySelected \\'partially-selected\\'}}\\n {{unless @item.isSelectable \\'not-selectable\\'}}\\\"\\n data-value={{@item.value}}\\n data-test-checkbox-id=\\\"{{guid-for @item}}-checkbox\\\"\\n ...attributes\\n>\\n {{#if @item.isSelectable}}\\n <SimpleBinary\\n @checked={{if @item.isPartiallySelected \\\"mixed\\\" @item.isFullySelected}}\\n disabled={{@item.disabled}}\\n tabindex={{if (and (not @item.disabled) @isFocusable (not @item.parent.isCollapsed)) 0 -1}}\\n {{on \\\"change\\\" (fn this.itemClicked @item)}}\\n @css=\\\"checkbox-line\\\"\\n >\\n <CheckboxTree::DetailedCheckbox::Content @item={{@item}} />\\n </SimpleBinary>\\n\\n {{#unless @hideSubitems}}\\n {{#if @item.isCollapsible}}\\n <ButtonAdc\\n @icon=\\\"chevron-up\\\"\\n @iconTitle={{t (concat \\\"@adc/ui-components.\\\" (if @item.isCollapsed \\\"expand\\\" \\\"collapse\\\"))}}\\n @bubbleKeydownEvent={{false}}\\n @noBackground={{true}}\\n @on-click={{fn @toggle-subitems-visibility @item}}\\n aria-controls=\\\"{{guid-for @item}}-subitems\\\"\\n aria-expanded={{if @item.isCollapsed \\\"false\\\" \\\"true\\\"}}\\n class=\\\"btn-chevron {{if @item.isCollapsed \\'collapsed\\'}}\\\"\\n dataId=\\\"chevron{{@index}}\\\"\\n />\\n {{/if}}\\n {{/unless}}\\n {{else}}\\n <CheckboxTree::DetailedCheckbox::Content @item={{@item}} />\\n\\n {{#unless @hideSubitems}}\\n {{#if @item.showAllNoneSelectors}}\\n <CheckboxTree::AllNoneSelector\\n @index={{@index}}\\n @selectAll={{fn this.selectAll @item}}\\n @selectNone={{fn this.selectNone @item}}\\n />\\n {{/if}}\\n {{/unless}}\\n {{/if}}\\n</div>\")","import Component from '@glimmer/component';\nimport { set, action } from '@ember/object';\nimport { SELECTED, UNSELECTED } from '../../../utils/checkbox-tree-item.js';\n\nimport type CheckboxTreeItem from '../../../utils/dropdown-select-item';\n\nexport interface DetailCheckboxSignature {\n Element: HTMLDivElement;\n Args: {\n item: CheckboxTreeItem;\n idPrefix?: string;\n 'on-action-execute'?: VoidFunction;\n 'items-changed'?: (items: CheckboxTreeItem[]) => void;\n 'toggle-subitems-visibility': (item: CheckboxTreeItem) => void;\n isFocusable?: boolean;\n maxItemCount?: number;\n showGroupSeparator?: boolean;\n hideSubitems?: boolean;\n index: number | string;\n };\n}\n\n/**\n * @classdesc\n * A wrapper component for rendering the checkbox associated with a {@link components.checkbox-tree.TreeItem}.\n */\nexport default class DetailedCheckboxInput extends Component<DetailCheckboxSignature> {\n private executeAction(): void {\n this.args['on-action-execute']?.();\n }\n\n /**\n * Toggles the {@link CheckboxTreeItem} object's state along with each subitem's state.\n */\n @action itemClicked(item: CheckboxTreeItem, evt: Event & { target: HTMLInputElement }): void {\n this.executeAction();\n\n set(item, 'internalState', evt.target.checked ? SELECTED : UNSELECTED);\n }\n\n /**\n * Selects all subitems within the {@link CheckboxTreeItem}.\n */\n @action selectAll(item: CheckboxTreeItem): void {\n this.executeAction();\n\n set(item, 'internalState', SELECTED);\n }\n\n /**\n * Deselects all subitems within the {@link CheckboxTreeItem}.\n */\n @action selectNone(item: CheckboxTreeItem): void {\n this.executeAction();\n\n set(item, 'internalState', UNSELECTED);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<li\\n class=\\\"tree-item {{if this.addGroupSeparator \\'separate-groups\\'}}\\\"\\n tabindex={{if (and this.canReceiveFocus (not @item.parent.isCollapsed)) 0 -1}}\\n data-test-tree-item-id=\\\"{{guid-for @item}}-li\\\"\\n ...attributes\\n>\\n <CheckboxTree::DetailedCheckbox::Checkbox\\n @item={{@item}}\\n @index={{@index}}\\n @on-action-execute={{@on-action-execute}}\\n @isFocusable={{this.isFocusable}}\\n @hideSubitems={{@hideSubitems}}\\n @toggle-subitems-visibility={{this.toggleSubitemsVisibility}}\\n />\\n\\n {{#unless @hideSubitems}}\\n {{#if (and this.hasSubItems (not @item.isCollapsed))}}\\n <CheckboxTree\\n @items={{this.subitems}}\\n @showGroupSeparator={{false}}\\n @on-action-execute={{@on-action-execute}}\\n @isFocusable={{and this.isFocusable (not @item.isCollapsed)}}\\n @hideSubitems={{@item.isCollapsed}}\\n id=\\\"{{guid-for @item}}-subitems\\\"\\n class=\\\"sub-tree {{if @item.isCollapsed \\'collapsed\\'}}\\\"\\n />\\n {{/if}}\\n {{/unless}}\\n</li>\")","import Component from '@glimmer/component';\nimport { action, set } from '@ember/object';\nimport { and, notEmpty, reads } from '@ember/object/computed';\n\nimport type CheckboxTreeItem from '../../utils/dropdown-select-item.ts';\n\nexport interface CheckboxTreeItemSignature {\n Element: HTMLLIElement;\n Args: {\n /** The item to render. */\n item: CheckboxTreeItem;\n /** Indicates the check box tree item should be focusable (defaults to true). */\n isFocusable?: boolean;\n /** The index of this check box tree item. */\n index: number | string;\n /** Triggered when an action is executed in the checkbox tree. */\n 'on-action-execute'?: VoidFunction;\n /** Indicates only root items will be rendered. */\n hideSubitems?: boolean;\n /** Indicates each item group should be visually separated. */\n showGroupSeparator?: boolean;\n /** Indicates the checkbox tree item parent (LI) element is focusable (not sure why this would ever be since it's not interactive). */\n isListItemFocusable?: boolean;\n /** Toggles an items collapses/expanded state. */\n 'toggle-subitems-visibility'?: VoidFunction;\n };\n}\n\n/**\n * @classdesc\n * Represents a row in the checkbox-tree component. Contains a\n * state, optional subitems, and multiple other properties.\n */\nexport default class CheckboxTreeItemComponent extends Component<CheckboxTreeItemSignature> {\n /**\n * Should the checkbox item be focusable?\n */\n get isFocusable(): boolean {\n return this.args.isFocusable ?? true;\n }\n\n /**\n * The subitems to render.\n */\n @reads('args.item.subitems')\n declare subitems: CheckboxTreeItem[];\n\n /**\n * Indicates there are subitems.\n */\n @notEmpty('args.item.subitems')\n declare hasSubItems: boolean;\n\n /**\n * Indicate this item should have a tabindex of zero.\n */\n @and('isFocusable', 'args.isListItemFocusable', 'hasSubItems')\n declare canReceiveFocus: boolean;\n\n /**\n * Should we use a border as group separator?\n */\n @and('args.showGroupSeparator', 'hasSubItems')\n declare addGroupSeparator: boolean;\n\n /**\n * Toggles the item's collapsed state.\n */\n @action toggleSubitemsVisibility(item: CheckboxTreeItem): void {\n this.args['on-action-execute']?.();\n\n set(item, 'isCollapsed', !item.isCollapsed);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<ul\\n class=\\\"checkbox-tree\\\"\\n tabindex={{if this.isFocusable 0 -1}}\\n {{on \\\"keyup\\\" this.handleKeyUp}}\\n {{did-insert this.updateItemAction}}\\n {{did-update this.updateItemAction @items}}\\n ...attributes\\n>\\n {{#each @items as |item index|}}\\n <CheckboxTree::TreeItem\\n @showGroupSeparator={{@showGroupSeparator}}\\n @isListItemFocusable={{this.areListItemsFocusable}}\\n @on-action-execute={{@on-action-execute}}\\n @item={{item}}\\n @index={{if @idPrefix (concat @idPrefix \\\"-\\\" index) index}}\\n @hideSubitems={{@hideSubitems}}\\n />\\n {{/each}}\\n\\n {{yield}}\\n</ul>\")","import Component from '@glimmer/component';\nimport { set, computed, action } from '@ember/object';\nimport { once } from '@ember/runloop';\nimport { A } from '@ember/array';\nimport { isEnterCode } from '@adc/ember-utils/utils/a11y';\n\nimport type { CheckboxTreeItemSignature } from './checkbox-tree/tree-item';\n\ntype CheckboxTreeItemSignatureArgs = CheckboxTreeItemSignature['Args'];\ntype CheckboxTreeItem = CheckboxTreeItemSignatureArgs['item'];\n\nexport interface CheckboxTreeSignature {\n Element: HTMLUListElement;\n Args: Pick<CheckboxTreeItemSignatureArgs, 'on-action-execute' | 'showGroupSeparator' | 'hideSubitems'> & {\n /** The items to render. */\n items: CheckboxTreeItem[];\n /** Optional prefix added to the `@index` argument of each checkbox tree item. */\n idPrefix?: string;\n /** Triggered when tree item selection state changes. */\n 'items-changed'?: (items: CheckboxTreeItem[]) => void;\n /** Indicates the UL element is focusable (key up enter will expand/collapse tree). */\n isFocusable?: boolean;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * A component for rendering a tree hierarchy of checkbox items.\n *\n * This component specifically acts as the middle man between the consumer and the rendering of the tree.\n *\n * @note There is no internal copy of \"items\", so this component actually manipulates the\n * data passed into it. This was the cleanest way to keep track of external changes,\n * while ensuring computed properties still fire correctly. Complications\n * can arise with computed-properties when you make deep copies of the objects\n * they observe, because the copy of the item changed, not the original item the observer\n * is bound to.\n */\nexport default class CheckboxTree extends Component<CheckboxTreeSignature> {\n /**\n * Should the element be focusable?\n */\n get isFocusable(): boolean {\n return this.args.isFocusable ?? true;\n }\n\n /**\n * Should the list items be focusable or not?\n */\n @computed('args.items.[]')\n get areListItemsFocusable(): boolean {\n return this.args.items?.length > 1;\n }\n\n // endregion\n\n // region Actions\n\n /**\n * Collapses items if user hits the enter key.\n */\n @action handleKeyUp(event: KeyboardEvent & { target: HTMLElement }): void {\n if (isEnterCode(event.code)) {\n const checkbox = event.target.closest('li.detailed-checkbox');\n if (!checkbox) {\n return;\n }\n\n const item = A(this.args.items).findBy('value', (checkbox as HTMLElement).dataset.value);\n if (item?.isCollapsible) {\n set(item, 'isCollapsed', !item.isCollapsed);\n }\n }\n }\n\n /**\n * Updates the \"items-changed\" action for passed items.\n */\n @action updateItemAction(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once<CheckboxTree, typeof storeActionOnRootItems>(this, storeActionOnRootItems);\n }\n\n // endregion\n}\n\n/**\n * The name of the action used for notifying the consuming code that the state of the items has changed.\n * @public\n */\nexport const ITEMS_CHANGED_ACTION = 'items-changed';\n\n/**\n * Stores the \"items-changed\" action that was provided by the consumer on the root items of the tree.\n *\n * @note When the items change state, the root items are the last to\n * update and they will trigger this action.\n *\n * @private\n */\nfunction storeActionOnRootItems(this: CheckboxTree) {\n const itemsChangedAction = this.args[ITEMS_CHANGED_ACTION];\n if (itemsChangedAction) {\n const { items } = this.args;\n A(items).setEach(ITEMS_CHANGED_ACTION, () => itemsChangedAction(items));\n }\n}\n","// https://gist.github.com/FezVrasta/075d228ffb855688c75a69c6d1d6afce\n\nexport default function parseGenerateConfig(config) {\n let defaultConfig = {\n tagName: 'div',\n classNames: ['popper'],\n attributes: [],\n parent: window.document.body,\n content: '',\n contentType: 'text',\n arrowTagName: 'div',\n arrowClassNames: ['popper__arrow'],\n arrowAttributes: ['x-arrow']\n };\n\n config = Object.assign({}, defaultConfig, config);\n\n let d = window.document;\n\n let popper = d.createElement(config.tagName);\n addClassNames(popper, config.classNames);\n addAttributes(popper, config.attributes);\n\n if (config.contentType === 'node') {\n popper.appendChild(config.content.jquery ? config.content[0] : config.content);\n } else if (config.contentType === 'html') {\n popper.innerHTML = config.content;\n } else {\n popper.textContent = config.content;\n }\n\n if (config.arrowTagName) {\n let arrow = d.createElement(config.arrowTagName);\n addClassNames(arrow, config.arrowClassNames);\n addAttributes(arrow, config.arrowAttributes);\n popper.appendChild(arrow);\n }\n\n let parent = config.parent.jquery ? config.parent[0] : config.parent;\n\n // if the given parent is a string, use it to match an element\n // if more than one element is matched, the first one will be used as parent\n // if no elements are matched, the script will throw an error\n if (typeof parent === 'string') {\n parent = d.querySelectorAll(config.parent);\n parent = parent[0];\n }\n\n // if the given parent is a DOM nodes list or an array of nodes with more than one element,\n // the first one will be used as parent\n if (parent.length > 1 && parent instanceof Element === false) {\n parent = parent[0];\n }\n\n // append the generated popper to its parent\n parent.appendChild(popper);\n\n return popper;\n}\n\nfunction addClassNames(element, classNames) {\n classNames.forEach(function (className) {\n element.classList.add(className);\n });\n}\n\nfunction addAttributes(element, attributes) {\n attributes.forEach(function (attribute) {\n element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');\n });\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div {{did-insert this.updateTooltip.perform}} {{did-update this.updateTooltip.perform @text}} ...attributes>\\n {{~yield~}}\\n</div>\")","import Component from '@glimmer/component';\nimport { isPresent, isEmpty } from '@ember/utils';\nimport { assert } from '@ember/debug';\nimport { timeout, task } from 'ember-concurrency';\nimport parseGenerateConfig from '../utils/generate-popper.js';\nimport Popper from 'popper.js';\n\nexport type ErrorTooltipDirection = 'up' | 'down' | 'sibling';\nimport type { Task } from 'ember-concurrency';\n\n/**\n * Converts the old HasErrorTooltip autoDestroy property value (seconds) to the new ErrorTooltip duration value (milliseconds).\n */\nexport function convertAutoDestroyToDuration(autoDestroy: unknown): number | undefined {\n if (isPresent(autoDestroy) && !isNaN(autoDestroy as number)) {\n return (autoDestroy as number) * 1000;\n }\n\n return undefined;\n}\n\ninterface ErrorTooltipArgs {\n /** The error text. */\n text?: string;\n /** The Popper.js placement of the tooltip. */\n placement?:\n | 'auto-start'\n | 'auto'\n | 'auto-end'\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n /** Optional CSS selector indicating which element to use for anchoring the tooltip. */\n selector?: string;\n /** The direction within the host element to look for the selector element: \"down\" uses `host.querySelector`, \"up\" uses `host.closest`, \"sibling\" uses `host.parentElement.querySelector` (defaults to \"down\"). */\n selectorDirection?: 'up' | 'down' | 'sibling';\n /** Optional number of milliseconds before closing tooltip (defaults to zero so tooltip won't close). */\n duration?: number;\n}\n\nexport interface ErrorTooltipSignature {\n Element: HTMLDivElement;\n Args: ErrorTooltipArgs;\n Blocks: {\n default: [];\n };\n}\n\nexport interface CommonInputErrorTooltipArgs {\n /** The text for the error tooltip. */\n errorMessage?: ErrorTooltipArgs['text'];\n /** The Popper.js placement of the tooltip. */\n errorTooltipPlace?: ErrorTooltipArgs['placement'];\n /** Optional number of milliseconds before closing tooltip (defaults to zero so tooltip won't close). */\n errorDuration?: ErrorTooltipArgs['duration'];\n}\n\n/**\n * A component for displaying a red error tooltip.\n */\nexport default class ErrorTooltip extends Component<ErrorTooltipSignature> {\n /**\n * The error tooltip instance.\n */\n tooltip: Popper | undefined;\n\n /**\n * Finds the element to use as the anchor for the error tooltip.\n */\n private getTooltipAnchor(el: HTMLDivElement): Element {\n const { selector = '', selectorDirection = 'down' } = this.args,\n defaultAnchor = (el.firstElementChild as Element) ?? el;\n\n if (isEmpty(selector)) {\n return defaultAnchor;\n }\n\n const anchor = (() => {\n if (selectorDirection === 'up') {\n return el.closest(selector);\n }\n\n return (selectorDirection === 'sibling' ? el.parentElement : el)?.querySelector(selector);\n })();\n\n assert(\n `[@adc/ui-components] ErrorTooltip target element not found for \"${selector}\" in direction \"${selectorDirection}\"`,\n anchor\n );\n\n return anchor ?? defaultAnchor;\n }\n\n /**\n * Creates (and caches) the error tooltip instance.\n */\n private createTooltip(el: HTMLDivElement): void {\n const { text, placement = 'auto' } = this.args;\n\n this.tooltip = new Popper(\n this.getTooltipAnchor(el),\n parseGenerateConfig({\n arrowClassNames: ['arrow'],\n classNames: ['tool-tip', 'tool-tip-error'],\n attributes: ['aria-live:assertive', 'role:alert', `aria-errormessage:${text}`],\n content: text,\n\n // If the reference element is within a modal, attach the tooltip to the modal.\n parent: el.closest('.modal') ?? window.document.body\n }),\n {\n placement,\n removeOnDestroy: true,\n modifiers: {\n preventOverflow: {\n escapeWithReference: false\n }\n }\n }\n );\n }\n\n /**\n * Destroys and clears the error tooltip instance.\n */\n private destroyTooltip(): void {\n const { tooltip } = this;\n if (tooltip) {\n tooltip.destroy();\n this.tooltip = undefined;\n }\n }\n\n /**\n * Called to create or update the error tooltip instance.\n */\n updateTooltip: Task<void, [HTMLDivElement]> = task({ restartable: true }, async (el: HTMLDivElement) => {\n // Schedule tooltip update so render is complete and positioning will be correct.\n await timeout(0);\n\n this.destroyTooltip();\n\n const { duration = 0, text } = this.args;\n\n if (isPresent(text)) {\n this.createTooltip(el);\n\n if (duration > 0) {\n // Close the popover after a short time.\n await timeout(duration);\n this.destroyTooltip();\n }\n }\n });\n\n /** @override */\n willDestroy(): void {\n super.willDestroy();\n\n this.destroyTooltip();\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div class=\\\"ui-modal-footer\\\" ...attributes>\\n {{yield}}\\n\\n {{#each this.buttonsToRender as |btn|}}\\n <Button::Async\\n class={{btn.css}}\\n disabled={{if btn.disabled \\\"true\\\"}}\\n @text={{btn.text}}\\n @buttonAction={{fn this.clickButton btn.action}}\\n />\\n {{/each}}\\n</div>\")","import Component from '@glimmer/component';\nimport { computed, action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { A } from '@ember/array';\n\nimport type ModalService from '../../../../services/modals';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { ButtonAsyncSignature } from '../../../button/async';\n\nexport interface ModalFooterSignature {\n Element: HTMLDivElement;\n Args: {\n /** Indicates the close button should not be added to the collection of footer buttons. */\n disableCloseButton?: boolean;\n /** The buttons to render in the modal footer. */\n buttons?: Array<ModalButtonConfig>;\n /** Optional text for the automatic close button. */\n closeButtonText?: string;\n };\n Blocks: {\n default: [];\n };\n}\n\ntype ModalFooterButtonAction = ButtonAsyncSignature['Args']['buttonAction'];\n\nexport interface ModalButtonConfig {\n css?: string;\n action?: ModalFooterButtonAction;\n disabled?: boolean;\n text?: string;\n}\n\n/**\n * Build a simple modal footer button\n */\nexport function getModalFooterButton(\n text: string,\n action: ModalFooterButtonAction = () => true,\n css?: string,\n disabled?: boolean,\n isPrimary = false\n): ModalButtonConfig {\n return {\n css: A([isPrimary ? 'btn-color-primary' : undefined, css])\n .compact()\n .join(' '),\n action,\n disabled: disabled ?? false,\n text\n };\n}\n\nexport { getModalFooterButton as modalFooterButton };\n\n/**\n * @classdesc\n * Footer for modal component, contains list of buttons\n */\nexport default class ModalFooter extends Component<ModalFooterSignature> {\n @service declare intl: ADCIntlService;\n @service declare modals: ModalService;\n\n /**\n * Get buttons to display as part of the footer\n */\n @computed('args.{buttons.@each.disabled,closeButtonText,disableCloseButton}')\n get buttonsToRender(): ModalButtonConfig[] {\n const { args } = this,\n buttons = A(args.buttons ?? []).compact();\n\n if (!(args.disableCloseButton === false)) {\n return buttons;\n }\n\n return [\n getModalFooterButton(\n args.closeButtonText ?? this.intl.t('@adc/ui-components.close'),\n () => true,\n 'close-btn'\n ),\n ...buttons\n ];\n }\n\n private handleActionResult(result: any): void {\n if (result !== false) {\n this.modals.closeModal();\n }\n }\n\n /**\n * Handle modal button actions.\n */\n @action\n clickButton(buttonAction: ModalFooterButtonAction, buttonAnimation?: Promise<boolean>): void | Promise<void> {\n const p = buttonAction(buttonAnimation);\n\n // Is the return value a promise?\n if (p !== undefined && typeof p.then === 'function') {\n return (async () => {\n const result = await p;\n this.handleActionResult(result);\n })();\n }\n\n this.handleActionResult(p);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<AsyncLoader @promise={{@items}} as |items|>\\n <ul\\n class=\\\"simple-binary-list o-{{coalesce @orientation \\'vertical\\'}}\\\"\\n id={{guid-for this}}\\n role={{if (eq @type \\\"radio\\\") \\\"radiogroup\\\"}}\\n ...attributes\\n >\\n {{#each items as |item idx|}}\\n <li data-test-binary-item={{idx}}>\\n {{#if (has-block \\\"label\\\")}}\\n <SimpleBinary\\n @type={{@type}}\\n @checked={{item.state}}\\n @label={{item.label}}\\n @icon={{item.icon}}\\n @iconFill={{item.color}}\\n @css={{item.css}}\\n @wrap={{@wrap}}\\n @reverse={{@reverse}}\\n disabled={{coalesce @disabled item.disabled}}\\n {{on \\\"change\\\" (fn this.listItemChanged item)}}\\n tabindex={{if @itemsAreNotFocusable -1 0}}\\n >\\n {{yield item to=\\\"label\\\"}}\\n </SimpleBinary>\\n {{else}}\\n <SimpleBinary\\n @type={{@type}}\\n @checked={{item.state}}\\n @label={{item.label}}\\n @icon={{item.icon}}\\n @iconFill={{item.color}}\\n @css={{item.css}}\\n @wrap={{@wrap}}\\n @reverse={{@reverse}}\\n disabled={{coalesce @disabled item.disabled}}\\n tabindex={{if @itemsAreNotFocusable -1 0}}\\n {{on \\\"change\\\" (fn this.listItemChanged item)}}\\n />\\n {{/if}}\\n\\n {{#if (has-block \\\"content\\\")}}\\n {{#if (or (not @hideUnselectedContent) item.state)}}\\n <div class=\\\"binary-list-item-content\\\">\\n {{yield item to=\\\"content\\\"}}\\n </div>\\n {{/if}}\\n {{/if}}\\n </li>\\n {{/each}}\\n </ul>\\n <ErrorTooltip\\n @text={{@errorMessage}}\\n @placement={{coalesce @errorTooltipPlace \\\"top-start\\\"}}\\n @duration={{@errorDuration}}\\n @selector=\\\"#{{guid-for this}}\\\"\\n @selectorDirection=\\\"sibling\\\"\\n />\\n</AsyncLoader>\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { A } from '@ember/array';\n\nimport type { CommonInputErrorTooltipArgs } from '../error-tooltip';\nimport type { SafeString } from 'handlebars';\n\ntype ITEM_STATE = boolean | 'mixed';\nexport type BinaryListOrientation = 'vertical' | 'horizontal';\n\nexport class BinaryListItem<T = object> {\n @tracked label: string | SafeString = '';\n @tracked state: ITEM_STATE = false;\n @tracked icon?: string;\n @tracked css?: string;\n @tracked disabled?: boolean;\n @tracked color?: string;\n props: T;\n\n constructor(args: Partial<BinaryListItem<T>>) {\n Object.assign(this, args ?? {});\n this.props = (args.props ?? {}) as T;\n }\n}\n\nexport interface SimpleBinaryListSignature<T extends BinaryListItem> {\n Element: HTMLUListElement;\n Args: CommonInputErrorTooltipArgs & {\n /** The `BinaryListItem` collection to render. */\n items: T[] | Promise<T[]>;\n /** The binary input type. */\n type?: 'checkbox' | 'radio';\n /** The orientation of the list (defaults to vertical). */\n orientation?: 'vertical' | 'horizontal';\n /** Triggered when the user changes the state of the binary list items. */\n onchange?: (items: T[]) => void;\n /** Triggered when the user changes the state of a binary list item. */\n onItemChange?: (item: BinaryListItem) => void;\n /** Indicates all binary inputs in list should be disabled. */\n disabled?: boolean;\n /** Indicates label text for each binary input should wrap to a new line. */\n wrap?: boolean;\n /** Indicates all binary inputs in list should be reversed. */\n reverse?: boolean;\n /** Indicates the `content` block should be hidden if the parent binary control state is not `checked`. */\n hideUnselectedContent?: boolean;\n /** Passed in if it should not be possible to tab and focus on the list items */\n itemsAreNotFocusable?: boolean;\n };\n Blocks: {\n /** Renders within the label element for the input element. */\n label: [T];\n /** Renders in it's own `<div />` element below the label/input elements. */\n content: [T];\n };\n}\n\nexport default class SimpleBinaryList<T extends BinaryListItem> extends Component<SimpleBinaryListSignature<T>> {\n @action async listItemChanged(item: BinaryListItem, evt: InputEvent): Promise<void> {\n const items = await this.args.items,\n { type } = this.args;\n\n // Is this a radio list?\n if (type === 'radio') {\n // Clear all other selections.\n A(items).setEach('state', false);\n }\n\n item.state = (evt.target as HTMLInputElement).checked;\n\n const { onchange, onItemChange } = this.args;\n if (onchange) {\n onchange(A(items));\n }\n if (onItemChange) {\n onItemChange(item);\n }\n }\n}\n","import { default as EmberObject, computed, setProperties } from '@ember/object';\nimport { notEmpty } from '@ember/object/computed';\nimport { once } from '@ember/runloop';\nimport { dasherize } from '@ember/string';\nimport { A } from '@ember/array';\nimport { isPresent } from '@ember/utils';\nimport { ITEMS_CHANGED_ACTION } from '../components/checkbox-tree.ts';\n\n// region Constants\n\n/**\n * The unselected state for an item.\n *\n * @type {number}\n *\n * @public\n * @memberof utils.CheckboxTreeItem\n */\nexport const UNSELECTED = 0;\n\n/**\n * The partially-selected state for an item.\n *\n * @type {number}\n *\n * @public\n * @memberof utils.CheckboxTreeItem\n */\nexport const PARTIALLY_SELECTED = 1;\n\n/**\n * The selected state for an item.\n *\n * @type {number}\n *\n * @public\n * @memberof utils.CheckboxTreeItem\n */\nexport const SELECTED = 2;\n\n// endregion\n\n// region CheckboxTreeItem Class\n\n/**\n * @classdesc\n *\n * An item to display in a checkbox tree component.\n *\n * @class utils.CheckboxTreeItem\n * @extends Ember.Object\n * @public\n *\n * @property {String} name - The main text for the item.\n * @property {String} [value] - A unique identifier and the corresponding string used as a \"value\" when used as a dropdown option.\n * @property {number} [state=UNSELECTED] - The current state of the item (e.g. selected, partially selected, etc.).\n * @property {boolean} [disabled=false] - Is the item disabled (unselectable)?\n * @property {String} [description] - Additional description text displayed along side the name.\n * @property {String} [icon] - The icon name to use for the item.\n * @property {String} [iconTitle] - The icon title.\n * @property {String} [iconDesc] - The icon description.\n * @property {boolean} [iconIsHiddenForAccessibility] - Should the icon be hidden for screen readers?\n * @property {String} [secondaryDescription] - A secondary description to display below the name and primary description.\n * @property {boolean} [isSelectable=true] - Should the item itself be selectable and display a checkbox?\n * @property {Array<CheckboxTreeItem>|undefined}} subitems - An optional array of subitems the items contains.\n * @property {boolean} [isCollapsible=false] - Should the subitems be collapsible?\n * @property {boolean} [isCollapsed=false] - Does the item currently have its subitems collapsed?\n * @property {boolean} [showAllNoneSelectors=false] - Should the item have an \"All | None\" selector for managing subitem states?\n *\n */\n// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-classes\nexport default EmberObject.extend(\n /** @lends utils.CheckboxTreeItem# */ {\n // region Hooks\n\n /** @override */\n init() {\n this._super(...arguments);\n\n ensureValueExists.call(this);\n validateSubitemReliantProperties.call(this);\n setSubitemsParent.call(this);\n },\n\n // endregion\n\n // region Default Properties\n\n /**\n * The current state of the item.\n *\n * @type {number}\n */\n state: UNSELECTED,\n\n /**\n * Is the item supposed to render a checkbox and be capable of being selected?\n *\n * @type {boolean}\n */\n isSelectable: true,\n\n // endregion\n\n // region Computed Properties\n\n /**\n * The state that determines how the item is displayed in the tree (e.g. selected, unselected, etc.).\n *\n * @function\n * @returns {number}\n */\n internalState: computed('state', {\n get() {\n return this.state;\n },\n set(key, newState) {\n if (this.hasSubitems) {\n // Only update the leaf items. The rest of the CheckboxTreeItems\n // will figure out their state based on the states of subitems.\n setLeafItemStates(this, newState);\n } else {\n // This is a leaf item, so update its state and trigger parent updates.\n setStateAndUpdateParent.call(this, newState);\n }\n\n return this.state;\n }\n }),\n\n /**\n * Does the item have subitems?\n *\n * @function\n * @returns {boolean}\n */\n hasSubitems: notEmpty('subitems'),\n\n /**\n * The selected items within this checklist. Will return array of just this item if all subitems are selected.\n *\n * @function\n * @returns {EmberArray<utils.CheckboxTreeItem>}\n */\n selectedItems: computed('hasSubitems', 'state', 'subitems.@each.state', function () {\n const { isFullySelected } = this;\n\n // Are there NO subitems OR are they all selected?\n if (!this.hasSubitems || isFullySelected) {\n // Return item if all subitems selected or this item is selected.\n return A([isFullySelected || this.state === SELECTED ? this : undefined]).compact();\n }\n\n // Return selected subitems.\n return A(this.subitems.filterBy('state', SELECTED));\n }),\n\n /**\n * Indicates this item or all it's sub items are selected.\n *\n * @function\n * @returns {boolean}\n */\n isFullySelected: computed('hasSubitems', 'state', 'subitems.@each.state', function () {\n if (!this.hasSubitems) {\n return this.state === SELECTED;\n }\n\n // Is there only one state AND is it selected?\n const uniqueStates = getAllUnitItemStates(this);\n return uniqueStates.length === 1 && uniqueStates.firstObject === SELECTED;\n }),\n\n /**\n * Indicates this item or all it's sub items are partially selected.\n *\n * @function\n * @returns {boolean}\n */\n isPartiallySelected: computed('hasSubitems', 'state', 'subitems.@each.state', function () {\n // If an item has no subitems, it cannot be partially selected.\n if (!this.hasSubitems) {\n return false;\n }\n\n // Is there more than one state?\n return getAllUnitItemStates(this).length > 1;\n }),\n\n /**\n * Indicates this item and all it's sub items are not selected.\n *\n * @function\n * @returns {boolean}\n */\n isNotSelected: computed('isFullySelected', 'isPartiallySelected', function () {\n return !this.isFullySelected && !this.isPartiallySelected;\n })\n\n // endregion\n }\n);\n\n// endregion\n\n// region Validation\n\n/**\n * Ensures an item has a value by setting it to a dasherized form of the name, if a value was not specified.\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n */\nfunction ensureValueExists() {\n const { name } = this;\n\n window.console.assert(name, `@adc/ui-components/checkbox-tree: Item name=\"${name}\" must have a name.`);\n\n if (!isPresent(this.value)) {\n this.set('value', dasherize(name));\n return;\n }\n\n // Ensure value is a string.\n if (typeof this.value !== 'string') {\n this.set('value', String(this.value));\n }\n}\n\n/**\n * Validates that properties that rely on the existence of subitems are correct.\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n */\nfunction validateSubitemReliantProperties() {\n if (!this.hasSubitems) {\n setProperties(this, {\n isCollapsed: false,\n isCollapsible: false,\n showAllNoneSelectors: false\n });\n\n return;\n }\n\n if (!this.isCollapsible) {\n this.set('isCollapsed', false);\n }\n}\n\n// endregion\n\n// region Linking Subitems with Parents\n\n/**\n * Stores a reference to \"this\" (i.e. the parent) on all of its subitems.\n *\n * @private\n * @instance\n * @memberof utils.CheckboxTreeItem\n */\nfunction setSubitemsParent() {\n if (this.hasSubitems) {\n A(this.subitems).setEach('parent', this);\n }\n}\n\n// endregion\n\n// region State Management\n\n/**\n * Sets all leaf items' visualState properties to the provided value.\n *\n * @note Setting the visualState will update the internalState and state properties and\n * then trigger the parent items to update their states.\n *\n * @param {utils.CheckboxTreeItem} item - The item we are updating the leaf item states for.\n * @param {number} newState - The new state to set for all leaf items.\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n */\nfunction setLeafItemStates(item, newState) {\n if (item.hasSubitems) {\n // NOTE: Only set the leaf items, then send the action to recalculate the rest of the parents' states.\n // We don't want to manually set the parent to selected, because a subitem might be unselected and disabled.\n item.subitems.forEach((subitem) => setLeafItemStates(subitem, newState));\n return;\n }\n\n if (isNotModifiable(item)) {\n return;\n }\n\n // Set the visual state so the computed property will trigger parent updates.\n item.set('internalState', newState);\n}\n\n/**\n * Updates the item's state to the provided state and then tells its parent to update itself.\n *\n * @param {number} newState - The state we should update the item to have.\n *\n * @private\n * @instance\n * @memberof utils.CheckboxTreeItem\n */\nfunction setStateAndUpdateParent(newState) {\n this.set('state', newState);\n\n updateParentState.call(this);\n}\n\n/**\n * If there is a parent item, this tells the parent to update its state,\n * as there was likely a change to the state of subitems in the tree.\n *\n * @private\n * @instance\n * @memberof utils.CheckboxTreeItem\n */\nfunction updateParentState() {\n const { parent } = this;\n if (parent) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n once(parent, setStateAndUpdateParent, getItemState(parent));\n }\n\n (this.get(ITEMS_CHANGED_ACTION) || (() => {}))();\n}\n\n// endregion\n\n// region Determining Item State\n\n/**\n * Gets the state of the current {@link CheckboxTreeItem} based on its state or the states of its subitems.\n *\n * @param {utils.CheckboxTreeItem} item - The item in the tree we are getting the state of.\n *\n * @returns {number}\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n * @static\n */\nfunction getItemState(item) {\n if (!item.hasSubitems) {\n // If there are no subitems, an item is either selected or unselected.\n return item.state === SELECTED ? SELECTED : UNSELECTED;\n }\n\n if (item.isPartiallySelected) {\n return PARTIALLY_SELECTED;\n }\n\n if (item.isFullySelected) {\n return SELECTED;\n }\n\n return UNSELECTED;\n}\n\n/**\n * Returns a flattened array containing the unique set of states for all descendant items (e.g. [ SELECTED, UNSELECTED, etc.]).\n *\n * @param item - The item we are getting subitems' states for.\n * @param isBaseItem - Is this the root item? Note: you should not need to use this parameter.\n *\n * @returns {EmberArray<number>}\n *\n * @private\n * @memberof utils.CheckboxTreeItem\n * @static\n */\nfunction getAllUnitItemStates(item, isBaseItem = true) {\n let subItemStates = A([]);\n\n if (!isBaseItem) {\n subItemStates.push(item.state);\n }\n\n if (!item.hasSubitems) {\n return subItemStates;\n }\n\n return A(\n item.subitems.reduce((states, subitem) => [...states, ...getAllUnitItemStates(subitem, false)], subItemStates)\n ).uniq();\n}\n\n/**\n * Is the item's state not capable of being changed?\n *\n * @param {utils.CheckboxTreeItem} item - The item we are checking the state of.\n *\n * @returns {boolean}\n *\n * @public\n * @static\n * @memberof utils.CheckboxTreeItem\n */\nexport function isNotModifiable(item) {\n return item.disabled || !item.isSelectable;\n}\n\n/**\n * Returns a flattened array of all items that are selected in the tree.\n *\n * @param {Array<utils.CheckboxTreeItem>} items - An array of root-level items to search through.\n * @param {boolean} useParentIfAllSubitemsSelected - When enabled, if all subitems are selected, this option will only add the parent item.\n *\n * @returns {EmberArray<utils.CheckboxTreeItem>}\n *\n * @private\n * @static\n * @memberof components.dropdown-select.MultiSelect\n */\nexport function getAllSelectedItems(items, useParentIfAllSubitemsSelected = true) {\n let selectedItems = [];\n\n (items || []).forEach((item) => {\n const subitems = item.subitems || [];\n\n if (useParentIfAllSubitemsSelected && item.isFullySelected) {\n // All the subitems are selected in this group, so use the parent item if specified.\n selectedItems.push(item);\n return;\n }\n\n if (item.state === SELECTED) {\n selectedItems.push(item);\n }\n\n selectedItems = selectedItems.concat(getAllSelectedItems(subitems, useParentIfAllSubitemsSelected));\n });\n\n return A(selectedItems);\n}\n\n// endregion\n","/* eslint-disable */\n/**\n * @fileoverview\n * - Using the 'QRCode for Javascript library'\n * - Fixed dataset of 'QRCode for Javascript library' for support full-spec.\n * - this library has no dependencies.\n *\n * @author davidshimjs\n * @see <a href=\"http://www.d-project.com/\" target=\"_blank\">http://www.d-project.com/</a>\n * @see <a href=\"http://jeromeetienne.github.com/jquery-qrcode/\" target=\"_blank\">http://jeromeetienne.github.com/jquery-qrcode/</a>\n */\nvar QRCode;\n\n(function () {\n //---------------------------------------------------------------------\n // QRCode for JavaScript\n //\n // Copyright (c) 2009 Kazuhiko Arase\n //\n // URL: http://www.d-project.com/\n //\n // Licensed under the MIT license:\n // http://www.opensource.org/licenses/mit-license.php\n //\n // The word \"QR Code\" is registered trademark of\n // DENSO WAVE INCORPORATED\n // http://www.denso-wave.com/qrcode/faqpatent-e.html\n //\n //---------------------------------------------------------------------\n function QR8bitByte(data) {\n this.mode = QRMode.MODE_8BIT_BYTE;\n this.data = data;\n this.parsedData = [];\n\n // Added to support UTF-8 Characters\n for (var i = 0, l = this.data.length; i < l; i++) {\n var byteArray = [];\n var code = this.data.charCodeAt(i);\n\n if (code > 0x10000) {\n byteArray[0] = 0xf0 | ((code & 0x1c0000) >>> 18);\n byteArray[1] = 0x80 | ((code & 0x3f000) >>> 12);\n byteArray[2] = 0x80 | ((code & 0xfc0) >>> 6);\n byteArray[3] = 0x80 | (code & 0x3f);\n } else if (code > 0x800) {\n byteArray[0] = 0xe0 | ((code & 0xf000) >>> 12);\n byteArray[1] = 0x80 | ((code & 0xfc0) >>> 6);\n byteArray[2] = 0x80 | (code & 0x3f);\n } else if (code > 0x80) {\n byteArray[0] = 0xc0 | ((code & 0x7c0) >>> 6);\n byteArray[1] = 0x80 | (code & 0x3f);\n } else {\n byteArray[0] = code;\n }\n\n this.parsedData.push(byteArray);\n }\n\n this.parsedData = Array.prototype.concat.apply([], this.parsedData);\n\n if (this.parsedData.length != this.data.length) {\n this.parsedData.unshift(191);\n this.parsedData.unshift(187);\n this.parsedData.unshift(239);\n }\n }\n\n QR8bitByte.prototype = {\n getLength: function (buffer) {\n return this.parsedData.length;\n },\n write: function (buffer) {\n for (var i = 0, l = this.parsedData.length; i < l; i++) {\n buffer.put(this.parsedData[i], 8);\n }\n }\n };\n\n function QRCodeModel(typeNumber, errorCorrectLevel) {\n this.typeNumber = typeNumber;\n this.errorCorrectLevel = errorCorrectLevel;\n this.modules = null;\n this.moduleCount = 0;\n this.dataCache = null;\n this.dataList = [];\n }\n\n QRCodeModel.prototype = {\n addData: function (data) {\n var newData = new QR8bitByte(data);\n this.dataList.push(newData);\n this.dataCache = null;\n },\n isDark: function (row, col) {\n if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {\n throw new Error(row + ',' + col);\n }\n return this.modules[row][col];\n },\n getModuleCount: function () {\n return this.moduleCount;\n },\n make: function () {\n this.makeImpl(false, this.getBestMaskPattern());\n },\n makeImpl: function (test, maskPattern) {\n this.moduleCount = this.typeNumber * 4 + 17;\n this.modules = new Array(this.moduleCount);\n for (var row = 0; row < this.moduleCount; row++) {\n this.modules[row] = new Array(this.moduleCount);\n for (var col = 0; col < this.moduleCount; col++) {\n this.modules[row][col] = null;\n }\n }\n this.setupPositionProbePattern(0, 0);\n this.setupPositionProbePattern(this.moduleCount - 7, 0);\n this.setupPositionProbePattern(0, this.moduleCount - 7);\n this.setupPositionAdjustPattern();\n this.setupTimingPattern();\n this.setupTypeInfo(test, maskPattern);\n if (this.typeNumber >= 7) {\n this.setupTypeNumber(test);\n }\n if (this.dataCache == null) {\n this.dataCache = QRCodeModel.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);\n }\n this.mapData(this.dataCache, maskPattern);\n },\n setupPositionProbePattern: function (row, col) {\n for (var r = -1; r <= 7; r++) {\n if (row + r <= -1 || this.moduleCount <= row + r) continue;\n for (var c = -1; c <= 7; c++) {\n if (col + c <= -1 || this.moduleCount <= col + c) continue;\n if (\n (0 <= r && r <= 6 && (c == 0 || c == 6)) ||\n (0 <= c && c <= 6 && (r == 0 || r == 6)) ||\n (2 <= r && r <= 4 && 2 <= c && c <= 4)\n ) {\n this.modules[row + r][col + c] = true;\n } else {\n this.modules[row + r][col + c] = false;\n }\n }\n }\n },\n getBestMaskPattern: function () {\n var minLostPoint = 0;\n var pattern = 0;\n for (var i = 0; i < 8; i++) {\n this.makeImpl(true, i);\n var lostPoint = QRUtil.getLostPoint(this);\n if (i == 0 || minLostPoint > lostPoint) {\n minLostPoint = lostPoint;\n pattern = i;\n }\n }\n return pattern;\n },\n createMovieClip: function (target_mc, instance_name, depth) {\n var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);\n var cs = 1;\n this.make();\n for (var row = 0; row < this.modules.length; row++) {\n var y = row * cs;\n for (var col = 0; col < this.modules[row].length; col++) {\n var x = col * cs;\n var dark = this.modules[row][col];\n if (dark) {\n qr_mc.beginFill(0, 100);\n qr_mc.moveTo(x, y);\n qr_mc.lineTo(x + cs, y);\n qr_mc.lineTo(x + cs, y + cs);\n qr_mc.lineTo(x, y + cs);\n qr_mc.endFill();\n }\n }\n }\n return qr_mc;\n },\n setupTimingPattern: function () {\n for (var r = 8; r < this.moduleCount - 8; r++) {\n if (this.modules[r][6] != null) {\n continue;\n }\n this.modules[r][6] = r % 2 == 0;\n }\n for (var c = 8; c < this.moduleCount - 8; c++) {\n if (this.modules[6][c] != null) {\n continue;\n }\n this.modules[6][c] = c % 2 == 0;\n }\n },\n setupPositionAdjustPattern: function () {\n var pos = QRUtil.getPatternPosition(this.typeNumber);\n for (var i = 0; i < pos.length; i++) {\n for (var j = 0; j < pos.length; j++) {\n var row = pos[i];\n var col = pos[j];\n if (this.modules[row][col] != null) {\n continue;\n }\n for (var r = -2; r <= 2; r++) {\n for (var c = -2; c <= 2; c++) {\n if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) {\n this.modules[row + r][col + c] = true;\n } else {\n this.modules[row + r][col + c] = false;\n }\n }\n }\n }\n }\n },\n setupTypeNumber: function (test) {\n var bits = QRUtil.getBCHTypeNumber(this.typeNumber);\n for (var i = 0; i < 18; i++) {\n var mod = !test && ((bits >> i) & 1) == 1;\n this.modules[Math.floor(i / 3)][(i % 3) + this.moduleCount - 8 - 3] = mod;\n }\n for (var i = 0; i < 18; i++) {\n var mod = !test && ((bits >> i) & 1) == 1;\n this.modules[(i % 3) + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;\n }\n },\n setupTypeInfo: function (test, maskPattern) {\n var data = (this.errorCorrectLevel << 3) | maskPattern;\n var bits = QRUtil.getBCHTypeInfo(data);\n for (var i = 0; i < 15; i++) {\n var mod = !test && ((bits >> i) & 1) == 1;\n if (i < 6) {\n this.modules[i][8] = mod;\n } else if (i < 8) {\n this.modules[i + 1][8] = mod;\n } else {\n this.modules[this.moduleCount - 15 + i][8] = mod;\n }\n }\n for (var i = 0; i < 15; i++) {\n var mod = !test && ((bits >> i) & 1) == 1;\n if (i < 8) {\n this.modules[8][this.moduleCount - i - 1] = mod;\n } else if (i < 9) {\n this.modules[8][15 - i - 1 + 1] = mod;\n } else {\n this.modules[8][15 - i - 1] = mod;\n }\n }\n this.modules[this.moduleCount - 8][8] = !test;\n },\n mapData: function (data, maskPattern) {\n var inc = -1;\n var row = this.moduleCount - 1;\n var bitIndex = 7;\n var byteIndex = 0;\n for (var col = this.moduleCount - 1; col > 0; col -= 2) {\n if (col == 6) col--;\n while (true) {\n for (var c = 0; c < 2; c++) {\n if (this.modules[row][col - c] == null) {\n var dark = false;\n if (byteIndex < data.length) {\n dark = ((data[byteIndex] >>> bitIndex) & 1) == 1;\n }\n var mask = QRUtil.getMask(maskPattern, row, col - c);\n if (mask) {\n dark = !dark;\n }\n this.modules[row][col - c] = dark;\n bitIndex--;\n if (bitIndex == -1) {\n byteIndex++;\n bitIndex = 7;\n }\n }\n }\n row += inc;\n if (row < 0 || this.moduleCount <= row) {\n row -= inc;\n inc = -inc;\n break;\n }\n }\n }\n }\n };\n QRCodeModel.PAD0 = 0xec;\n QRCodeModel.PAD1 = 0x11;\n QRCodeModel.createData = function (typeNumber, errorCorrectLevel, dataList) {\n var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);\n var buffer = new QRBitBuffer();\n for (var i = 0; i < dataList.length; i++) {\n var data = dataList[i];\n buffer.put(data.mode, 4);\n buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));\n data.write(buffer);\n }\n var totalDataCount = 0;\n for (var i = 0; i < rsBlocks.length; i++) {\n totalDataCount += rsBlocks[i].dataCount;\n }\n if (buffer.getLengthInBits() > totalDataCount * 8) {\n throw new Error('code length overflow. (' + buffer.getLengthInBits() + '>' + totalDataCount * 8 + ')');\n }\n if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {\n buffer.put(0, 4);\n }\n while (buffer.getLengthInBits() % 8 != 0) {\n buffer.putBit(false);\n }\n while (true) {\n if (buffer.getLengthInBits() >= totalDataCount * 8) {\n break;\n }\n buffer.put(QRCodeModel.PAD0, 8);\n if (buffer.getLengthInBits() >= totalDataCount * 8) {\n break;\n }\n buffer.put(QRCodeModel.PAD1, 8);\n }\n return QRCodeModel.createBytes(buffer, rsBlocks);\n };\n QRCodeModel.createBytes = function (buffer, rsBlocks) {\n var offset = 0;\n var maxDcCount = 0;\n var maxEcCount = 0;\n var dcdata = new Array(rsBlocks.length);\n var ecdata = new Array(rsBlocks.length);\n for (var r = 0; r < rsBlocks.length; r++) {\n var dcCount = rsBlocks[r].dataCount;\n var ecCount = rsBlocks[r].totalCount - dcCount;\n maxDcCount = Math.max(maxDcCount, dcCount);\n maxEcCount = Math.max(maxEcCount, ecCount);\n dcdata[r] = new Array(dcCount);\n for (var i = 0; i < dcdata[r].length; i++) {\n dcdata[r][i] = 0xff & buffer.buffer[i + offset];\n }\n offset += dcCount;\n var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);\n var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);\n var modPoly = rawPoly.mod(rsPoly);\n ecdata[r] = new Array(rsPoly.getLength() - 1);\n for (var i = 0; i < ecdata[r].length; i++) {\n var modIndex = i + modPoly.getLength() - ecdata[r].length;\n ecdata[r][i] = modIndex >= 0 ? modPoly.get(modIndex) : 0;\n }\n }\n var totalCodeCount = 0;\n for (var i = 0; i < rsBlocks.length; i++) {\n totalCodeCount += rsBlocks[i].totalCount;\n }\n var data = new Array(totalCodeCount);\n var index = 0;\n for (var i = 0; i < maxDcCount; i++) {\n for (var r = 0; r < rsBlocks.length; r++) {\n if (i < dcdata[r].length) {\n data[index++] = dcdata[r][i];\n }\n }\n }\n for (var i = 0; i < maxEcCount; i++) {\n for (var r = 0; r < rsBlocks.length; r++) {\n if (i < ecdata[r].length) {\n data[index++] = ecdata[r][i];\n }\n }\n }\n return data;\n };\n var QRMode = { MODE_NUMBER: 1 << 0, MODE_ALPHA_NUM: 1 << 1, MODE_8BIT_BYTE: 1 << 2, MODE_KANJI: 1 << 3 };\n var QRErrorCorrectLevel = { L: 1, M: 0, Q: 3, H: 2 };\n var QRMaskPattern = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n };\n var QRUtil = {\n PATTERN_POSITION_TABLE: [\n [],\n [6, 18],\n [6, 22],\n [6, 26],\n [6, 30],\n [6, 34],\n [6, 22, 38],\n [6, 24, 42],\n [6, 26, 46],\n [6, 28, 50],\n [6, 30, 54],\n [6, 32, 58],\n [6, 34, 62],\n [6, 26, 46, 66],\n [6, 26, 48, 70],\n [6, 26, 50, 74],\n [6, 30, 54, 78],\n [6, 30, 56, 82],\n [6, 30, 58, 86],\n [6, 34, 62, 90],\n [6, 28, 50, 72, 94],\n [6, 26, 50, 74, 98],\n [6, 30, 54, 78, 102],\n [6, 28, 54, 80, 106],\n [6, 32, 58, 84, 110],\n [6, 30, 58, 86, 114],\n [6, 34, 62, 90, 118],\n [6, 26, 50, 74, 98, 122],\n [6, 30, 54, 78, 102, 126],\n [6, 26, 52, 78, 104, 130],\n [6, 30, 56, 82, 108, 134],\n [6, 34, 60, 86, 112, 138],\n [6, 30, 58, 86, 114, 142],\n [6, 34, 62, 90, 118, 146],\n [6, 30, 54, 78, 102, 126, 150],\n [6, 24, 50, 76, 102, 128, 154],\n [6, 28, 54, 80, 106, 132, 158],\n [6, 32, 58, 84, 110, 136, 162],\n [6, 26, 54, 82, 110, 138, 166],\n [6, 30, 58, 86, 114, 142, 170]\n ],\n G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),\n G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),\n G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),\n getBCHTypeInfo: function (data) {\n var d = data << 10;\n while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {\n d ^= QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15));\n }\n return ((data << 10) | d) ^ QRUtil.G15_MASK;\n },\n getBCHTypeNumber: function (data) {\n var d = data << 12;\n while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {\n d ^= QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18));\n }\n return (data << 12) | d;\n },\n getBCHDigit: function (data) {\n var digit = 0;\n while (data != 0) {\n digit++;\n data >>>= 1;\n }\n return digit;\n },\n getPatternPosition: function (typeNumber) {\n return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];\n },\n getMask: function (maskPattern, i, j) {\n switch (maskPattern) {\n case QRMaskPattern.PATTERN000:\n return (i + j) % 2 == 0;\n case QRMaskPattern.PATTERN001:\n return i % 2 == 0;\n case QRMaskPattern.PATTERN010:\n return j % 3 == 0;\n case QRMaskPattern.PATTERN011:\n return (i + j) % 3 == 0;\n case QRMaskPattern.PATTERN100:\n return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;\n case QRMaskPattern.PATTERN101:\n return ((i * j) % 2) + ((i * j) % 3) == 0;\n case QRMaskPattern.PATTERN110:\n return (((i * j) % 2) + ((i * j) % 3)) % 2 == 0;\n case QRMaskPattern.PATTERN111:\n return (((i * j) % 3) + ((i + j) % 2)) % 2 == 0;\n default:\n throw new Error('bad maskPattern:' + maskPattern);\n }\n },\n getErrorCorrectPolynomial: function (errorCorrectLength) {\n var a = new QRPolynomial([1], 0);\n for (var i = 0; i < errorCorrectLength; i++) {\n a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));\n }\n return a;\n },\n getLengthInBits: function (mode, type) {\n if (1 <= type && type < 10) {\n switch (mode) {\n case QRMode.MODE_NUMBER:\n return 10;\n case QRMode.MODE_ALPHA_NUM:\n return 9;\n case QRMode.MODE_8BIT_BYTE:\n return 8;\n case QRMode.MODE_KANJI:\n return 8;\n default:\n throw new Error('mode:' + mode);\n }\n } else if (type < 27) {\n switch (mode) {\n case QRMode.MODE_NUMBER:\n return 12;\n case QRMode.MODE_ALPHA_NUM:\n return 11;\n case QRMode.MODE_8BIT_BYTE:\n return 16;\n case QRMode.MODE_KANJI:\n return 10;\n default:\n throw new Error('mode:' + mode);\n }\n } else if (type < 41) {\n switch (mode) {\n case QRMode.MODE_NUMBER:\n return 14;\n case QRMode.MODE_ALPHA_NUM:\n return 13;\n case QRMode.MODE_8BIT_BYTE:\n return 16;\n case QRMode.MODE_KANJI:\n return 12;\n default:\n throw new Error('mode:' + mode);\n }\n } else {\n throw new Error('type:' + type);\n }\n },\n getLostPoint: function (qrCode) {\n var moduleCount = qrCode.getModuleCount();\n var lostPoint = 0;\n for (var row = 0; row < moduleCount; row++) {\n for (var col = 0; col < moduleCount; col++) {\n var sameCount = 0;\n var dark = qrCode.isDark(row, col);\n for (var r = -1; r <= 1; r++) {\n if (row + r < 0 || moduleCount <= row + r) {\n continue;\n }\n for (var c = -1; c <= 1; c++) {\n if (col + c < 0 || moduleCount <= col + c) {\n continue;\n }\n if (r == 0 && c == 0) {\n continue;\n }\n if (dark == qrCode.isDark(row + r, col + c)) {\n sameCount++;\n }\n }\n }\n if (sameCount > 5) {\n lostPoint += 3 + sameCount - 5;\n }\n }\n }\n for (var row = 0; row < moduleCount - 1; row++) {\n for (var col = 0; col < moduleCount - 1; col++) {\n var count = 0;\n if (qrCode.isDark(row, col)) count++;\n if (qrCode.isDark(row + 1, col)) count++;\n if (qrCode.isDark(row, col + 1)) count++;\n if (qrCode.isDark(row + 1, col + 1)) count++;\n if (count == 0 || count == 4) {\n lostPoint += 3;\n }\n }\n }\n for (var row = 0; row < moduleCount; row++) {\n for (var col = 0; col < moduleCount - 6; col++) {\n if (\n qrCode.isDark(row, col) &&\n !qrCode.isDark(row, col + 1) &&\n qrCode.isDark(row, col + 2) &&\n qrCode.isDark(row, col + 3) &&\n qrCode.isDark(row, col + 4) &&\n !qrCode.isDark(row, col + 5) &&\n qrCode.isDark(row, col + 6)\n ) {\n lostPoint += 40;\n }\n }\n }\n for (var col = 0; col < moduleCount; col++) {\n for (var row = 0; row < moduleCount - 6; row++) {\n if (\n qrCode.isDark(row, col) &&\n !qrCode.isDark(row + 1, col) &&\n qrCode.isDark(row + 2, col) &&\n qrCode.isDark(row + 3, col) &&\n qrCode.isDark(row + 4, col) &&\n !qrCode.isDark(row + 5, col) &&\n qrCode.isDark(row + 6, col)\n ) {\n lostPoint += 40;\n }\n }\n }\n var darkCount = 0;\n for (var col = 0; col < moduleCount; col++) {\n for (var row = 0; row < moduleCount; row++) {\n if (qrCode.isDark(row, col)) {\n darkCount++;\n }\n }\n }\n var ratio = Math.abs((100 * darkCount) / moduleCount / moduleCount - 50) / 5;\n lostPoint += ratio * 10;\n return lostPoint;\n }\n };\n var QRMath = {\n glog: function (n) {\n if (n < 1) {\n throw new Error('glog(' + n + ')');\n }\n return QRMath.LOG_TABLE[n];\n },\n gexp: function (n) {\n while (n < 0) {\n n += 255;\n }\n while (n >= 256) {\n n -= 255;\n }\n return QRMath.EXP_TABLE[n];\n },\n EXP_TABLE: new Array(256),\n LOG_TABLE: new Array(256)\n };\n for (var i = 0; i < 8; i++) {\n QRMath.EXP_TABLE[i] = 1 << i;\n }\n for (var i = 8; i < 256; i++) {\n QRMath.EXP_TABLE[i] =\n QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8];\n }\n for (var i = 0; i < 255; i++) {\n QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;\n }\n function QRPolynomial(num, shift) {\n if (num.length == undefined) {\n throw new Error(num.length + '/' + shift);\n }\n var offset = 0;\n while (offset < num.length && num[offset] == 0) {\n offset++;\n }\n this.num = new Array(num.length - offset + shift);\n for (var i = 0; i < num.length - offset; i++) {\n this.num[i] = num[i + offset];\n }\n }\n QRPolynomial.prototype = {\n get: function (index) {\n return this.num[index];\n },\n getLength: function () {\n return this.num.length;\n },\n multiply: function (e) {\n var num = new Array(this.getLength() + e.getLength() - 1);\n for (var i = 0; i < this.getLength(); i++) {\n for (var j = 0; j < e.getLength(); j++) {\n num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));\n }\n }\n return new QRPolynomial(num, 0);\n },\n mod: function (e) {\n if (this.getLength() - e.getLength() < 0) {\n return this;\n }\n var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0));\n var num = new Array(this.getLength());\n for (var i = 0; i < this.getLength(); i++) {\n num[i] = this.get(i);\n }\n for (var i = 0; i < e.getLength(); i++) {\n num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);\n }\n return new QRPolynomial(num, 0).mod(e);\n }\n };\n function QRRSBlock(totalCount, dataCount) {\n this.totalCount = totalCount;\n this.dataCount = dataCount;\n }\n QRRSBlock.RS_BLOCK_TABLE = [\n [1, 26, 19],\n [1, 26, 16],\n [1, 26, 13],\n [1, 26, 9],\n [1, 44, 34],\n [1, 44, 28],\n [1, 44, 22],\n [1, 44, 16],\n [1, 70, 55],\n [1, 70, 44],\n [2, 35, 17],\n [2, 35, 13],\n [1, 100, 80],\n [2, 50, 32],\n [2, 50, 24],\n [4, 25, 9],\n [1, 134, 108],\n [2, 67, 43],\n [2, 33, 15, 2, 34, 16],\n [2, 33, 11, 2, 34, 12],\n [2, 86, 68],\n [4, 43, 27],\n [4, 43, 19],\n [4, 43, 15],\n [2, 98, 78],\n [4, 49, 31],\n [2, 32, 14, 4, 33, 15],\n [4, 39, 13, 1, 40, 14],\n [2, 121, 97],\n [2, 60, 38, 2, 61, 39],\n [4, 40, 18, 2, 41, 19],\n [4, 40, 14, 2, 41, 15],\n [2, 146, 116],\n [3, 58, 36, 2, 59, 37],\n [4, 36, 16, 4, 37, 17],\n [4, 36, 12, 4, 37, 13],\n [2, 86, 68, 2, 87, 69],\n [4, 69, 43, 1, 70, 44],\n [6, 43, 19, 2, 44, 20],\n [6, 43, 15, 2, 44, 16],\n [4, 101, 81],\n [1, 80, 50, 4, 81, 51],\n [4, 50, 22, 4, 51, 23],\n [3, 36, 12, 8, 37, 13],\n [2, 116, 92, 2, 117, 93],\n [6, 58, 36, 2, 59, 37],\n [4, 46, 20, 6, 47, 21],\n [7, 42, 14, 4, 43, 15],\n [4, 133, 107],\n [8, 59, 37, 1, 60, 38],\n [8, 44, 20, 4, 45, 21],\n [12, 33, 11, 4, 34, 12],\n [3, 145, 115, 1, 146, 116],\n [4, 64, 40, 5, 65, 41],\n [11, 36, 16, 5, 37, 17],\n [11, 36, 12, 5, 37, 13],\n [5, 109, 87, 1, 110, 88],\n [5, 65, 41, 5, 66, 42],\n [5, 54, 24, 7, 55, 25],\n [11, 36, 12],\n [5, 122, 98, 1, 123, 99],\n [7, 73, 45, 3, 74, 46],\n [15, 43, 19, 2, 44, 20],\n [3, 45, 15, 13, 46, 16],\n [1, 135, 107, 5, 136, 108],\n [10, 74, 46, 1, 75, 47],\n [1, 50, 22, 15, 51, 23],\n [2, 42, 14, 17, 43, 15],\n [5, 150, 120, 1, 151, 121],\n [9, 69, 43, 4, 70, 44],\n [17, 50, 22, 1, 51, 23],\n [2, 42, 14, 19, 43, 15],\n [3, 141, 113, 4, 142, 114],\n [3, 70, 44, 11, 71, 45],\n [17, 47, 21, 4, 48, 22],\n [9, 39, 13, 16, 40, 14],\n [3, 135, 107, 5, 136, 108],\n [3, 67, 41, 13, 68, 42],\n [15, 54, 24, 5, 55, 25],\n [15, 43, 15, 10, 44, 16],\n [4, 144, 116, 4, 145, 117],\n [17, 68, 42],\n [17, 50, 22, 6, 51, 23],\n [19, 46, 16, 6, 47, 17],\n [2, 139, 111, 7, 140, 112],\n [17, 74, 46],\n [7, 54, 24, 16, 55, 25],\n [34, 37, 13],\n [4, 151, 121, 5, 152, 122],\n [4, 75, 47, 14, 76, 48],\n [11, 54, 24, 14, 55, 25],\n [16, 45, 15, 14, 46, 16],\n [6, 147, 117, 4, 148, 118],\n [6, 73, 45, 14, 74, 46],\n [11, 54, 24, 16, 55, 25],\n [30, 46, 16, 2, 47, 17],\n [8, 132, 106, 4, 133, 107],\n [8, 75, 47, 13, 76, 48],\n [7, 54, 24, 22, 55, 25],\n [22, 45, 15, 13, 46, 16],\n [10, 142, 114, 2, 143, 115],\n [19, 74, 46, 4, 75, 47],\n [28, 50, 22, 6, 51, 23],\n [33, 46, 16, 4, 47, 17],\n [8, 152, 122, 4, 153, 123],\n [22, 73, 45, 3, 74, 46],\n [8, 53, 23, 26, 54, 24],\n [12, 45, 15, 28, 46, 16],\n [3, 147, 117, 10, 148, 118],\n [3, 73, 45, 23, 74, 46],\n [4, 54, 24, 31, 55, 25],\n [11, 45, 15, 31, 46, 16],\n [7, 146, 116, 7, 147, 117],\n [21, 73, 45, 7, 74, 46],\n [1, 53, 23, 37, 54, 24],\n [19, 45, 15, 26, 46, 16],\n [5, 145, 115, 10, 146, 116],\n [19, 75, 47, 10, 76, 48],\n [15, 54, 24, 25, 55, 25],\n [23, 45, 15, 25, 46, 16],\n [13, 145, 115, 3, 146, 116],\n [2, 74, 46, 29, 75, 47],\n [42, 54, 24, 1, 55, 25],\n [23, 45, 15, 28, 46, 16],\n [17, 145, 115],\n [10, 74, 46, 23, 75, 47],\n [10, 54, 24, 35, 55, 25],\n [19, 45, 15, 35, 46, 16],\n [17, 145, 115, 1, 146, 116],\n [14, 74, 46, 21, 75, 47],\n [29, 54, 24, 19, 55, 25],\n [11, 45, 15, 46, 46, 16],\n [13, 145, 115, 6, 146, 116],\n [14, 74, 46, 23, 75, 47],\n [44, 54, 24, 7, 55, 25],\n [59, 46, 16, 1, 47, 17],\n [12, 151, 121, 7, 152, 122],\n [12, 75, 47, 26, 76, 48],\n [39, 54, 24, 14, 55, 25],\n [22, 45, 15, 41, 46, 16],\n [6, 151, 121, 14, 152, 122],\n [6, 75, 47, 34, 76, 48],\n [46, 54, 24, 10, 55, 25],\n [2, 45, 15, 64, 46, 16],\n [17, 152, 122, 4, 153, 123],\n [29, 74, 46, 14, 75, 47],\n [49, 54, 24, 10, 55, 25],\n [24, 45, 15, 46, 46, 16],\n [4, 152, 122, 18, 153, 123],\n [13, 74, 46, 32, 75, 47],\n [48, 54, 24, 14, 55, 25],\n [42, 45, 15, 32, 46, 16],\n [20, 147, 117, 4, 148, 118],\n [40, 75, 47, 7, 76, 48],\n [43, 54, 24, 22, 55, 25],\n [10, 45, 15, 67, 46, 16],\n [19, 148, 118, 6, 149, 119],\n [18, 75, 47, 31, 76, 48],\n [34, 54, 24, 34, 55, 25],\n [20, 45, 15, 61, 46, 16]\n ];\n QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) {\n var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);\n if (rsBlock == undefined) {\n throw new Error('bad rs block @ typeNumber:' + typeNumber + '/errorCorrectLevel:' + errorCorrectLevel);\n }\n var length = rsBlock.length / 3;\n var list = [];\n for (var i = 0; i < length; i++) {\n var count = rsBlock[i * 3 + 0];\n var totalCount = rsBlock[i * 3 + 1];\n var dataCount = rsBlock[i * 3 + 2];\n for (var j = 0; j < count; j++) {\n list.push(new QRRSBlock(totalCount, dataCount));\n }\n }\n return list;\n };\n QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) {\n switch (errorCorrectLevel) {\n case QRErrorCorrectLevel.L:\n return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];\n case QRErrorCorrectLevel.M:\n return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];\n case QRErrorCorrectLevel.Q:\n return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];\n case QRErrorCorrectLevel.H:\n return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];\n default:\n return undefined;\n }\n };\n function QRBitBuffer() {\n this.buffer = [];\n this.length = 0;\n }\n QRBitBuffer.prototype = {\n get: function (index) {\n var bufIndex = Math.floor(index / 8);\n return ((this.buffer[bufIndex] >>> (7 - (index % 8))) & 1) == 1;\n },\n put: function (num, length) {\n for (var i = 0; i < length; i++) {\n this.putBit(((num >>> (length - i - 1)) & 1) == 1);\n }\n },\n getLengthInBits: function () {\n return this.length;\n },\n putBit: function (bit) {\n var bufIndex = Math.floor(this.length / 8);\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0);\n }\n if (bit) {\n this.buffer[bufIndex] |= 0x80 >>> this.length % 8;\n }\n this.length++;\n }\n };\n var QRCodeLimitLength = [\n [17, 14, 11, 7],\n [32, 26, 20, 14],\n [53, 42, 32, 24],\n [78, 62, 46, 34],\n [106, 84, 60, 44],\n [134, 106, 74, 58],\n [154, 122, 86, 64],\n [192, 152, 108, 84],\n [230, 180, 130, 98],\n [271, 213, 151, 119],\n [321, 251, 177, 137],\n [367, 287, 203, 155],\n [425, 331, 241, 177],\n [458, 362, 258, 194],\n [520, 412, 292, 220],\n [586, 450, 322, 250],\n [644, 504, 364, 280],\n [718, 560, 394, 310],\n [792, 624, 442, 338],\n [858, 666, 482, 382],\n [929, 711, 509, 403],\n [1003, 779, 565, 439],\n [1091, 857, 611, 461],\n [1171, 911, 661, 511],\n [1273, 997, 715, 535],\n [1367, 1059, 751, 593],\n [1465, 1125, 805, 625],\n [1528, 1190, 868, 658],\n [1628, 1264, 908, 698],\n [1732, 1370, 982, 742],\n [1840, 1452, 1030, 790],\n [1952, 1538, 1112, 842],\n [2068, 1628, 1168, 898],\n [2188, 1722, 1228, 958],\n [2303, 1809, 1283, 983],\n [2431, 1911, 1351, 1051],\n [2563, 1989, 1423, 1093],\n [2699, 2099, 1499, 1139],\n [2809, 2213, 1579, 1219],\n [2953, 2331, 1663, 1273]\n ];\n\n function _isSupportCanvas() {\n return typeof CanvasRenderingContext2D != 'undefined';\n }\n\n // android 2.x doesn't support Data-URI spec\n function _getAndroid() {\n var android = false;\n var sAgent = navigator.userAgent;\n\n if (/android/i.test(sAgent)) {\n // android\n android = true;\n var aMat = sAgent.toString().match(/android ([0-9]\\.[0-9])/i);\n\n if (aMat && aMat[1]) {\n android = parseFloat(aMat[1]);\n }\n }\n\n return android;\n }\n\n var svgDrawer = (function () {\n var Drawing = function (el, htOption) {\n this._el = el;\n this._htOption = htOption;\n };\n\n Drawing.prototype.draw = function (oQRCode) {\n var _htOption = this._htOption;\n var _el = this._el;\n var nCount = oQRCode.getModuleCount();\n var nWidth = Math.floor(_htOption.width / nCount);\n var nHeight = Math.floor(_htOption.height / nCount);\n\n this.clear();\n\n function makeSVG(tag, attrs) {\n var el = document.createElementNS('http://www.w3.org/2000/svg', tag);\n for (var k in attrs) if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]);\n return el;\n }\n\n var svg = makeSVG('svg', {\n viewBox: '0 0 ' + String(nCount) + ' ' + String(nCount),\n width: '100%',\n height: '100%',\n fill: _htOption.colorLight\n });\n svg.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', 'http://www.w3.org/1999/xlink');\n _el.appendChild(svg);\n\n svg.appendChild(makeSVG('rect', { fill: _htOption.colorLight, width: '100%', height: '100%' }));\n svg.appendChild(makeSVG('rect', { fill: _htOption.colorDark, width: '1', height: '1', id: 'template' }));\n\n for (var row = 0; row < nCount; row++) {\n for (var col = 0; col < nCount; col++) {\n if (oQRCode.isDark(row, col)) {\n var child = makeSVG('use', { x: String(col), y: String(row) });\n child.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#template');\n svg.appendChild(child);\n }\n }\n }\n };\n Drawing.prototype.clear = function () {\n while (this._el.hasChildNodes()) this._el.removeChild(this._el.lastChild);\n };\n return Drawing;\n })();\n\n var useSVG = document.documentElement.tagName.toLowerCase() === 'svg';\n\n // Drawing in DOM by using Table tag\n var Drawing = useSVG\n ? svgDrawer\n : !_isSupportCanvas()\n ? (function () {\n var Drawing = function (el, htOption) {\n this._el = el;\n this._htOption = htOption;\n };\n\n /**\n * Draw the QRCode\n *\n * @param {QRCode} oQRCode\n */\n Drawing.prototype.draw = function (oQRCode) {\n var _htOption = this._htOption;\n var _el = this._el;\n var nCount = oQRCode.getModuleCount();\n var nWidth = Math.floor(_htOption.width / nCount);\n var nHeight = Math.floor(_htOption.height / nCount);\n var aHTML = ['<table style=\"border:0;border-collapse:collapse;\">'];\n\n for (var row = 0; row < nCount; row++) {\n aHTML.push('<tr>');\n\n for (var col = 0; col < nCount; col++) {\n aHTML.push(\n '<td style=\"border:0;border-collapse:collapse;padding:0;margin:0;width:' +\n nWidth +\n 'px;height:' +\n nHeight +\n 'px;background-color:' +\n (oQRCode.isDark(row, col) ? _htOption.colorDark : _htOption.colorLight) +\n ';\"></td>'\n );\n }\n\n aHTML.push('</tr>');\n }\n\n aHTML.push('</table>');\n _el.innerHTML = aHTML.join('');\n\n // Fix the margin values as real size.\n var elTable = _el.childNodes[0];\n var nLeftMarginTable = (_htOption.width - elTable.offsetWidth) / 2;\n var nTopMarginTable = (_htOption.height - elTable.offsetHeight) / 2;\n\n if (nLeftMarginTable > 0 && nTopMarginTable > 0) {\n elTable.style.margin = nTopMarginTable + 'px ' + nLeftMarginTable + 'px';\n }\n };\n\n /**\n * Clear the QRCode\n */\n Drawing.prototype.clear = function () {\n this._el.innerHTML = '';\n };\n\n return Drawing;\n })()\n : (function () {\n // Drawing in Canvas\n function _onMakeImage() {\n this._elImage.src = this._elCanvas.toDataURL('image/png');\n this._elImage.style.display = 'block';\n this._elCanvas.style.display = 'none';\n }\n\n // Android 2.1 bug workaround\n // http://code.google.com/p/android/issues/detail?id=5141\n if (this._android && this._android <= 2.1) {\n var factor = 1 / window.devicePixelRatio;\n var drawImage = CanvasRenderingContext2D.prototype.drawImage;\n CanvasRenderingContext2D.prototype.drawImage = function (image, sx, sy, sw, sh, dx, dy, dw, dh) {\n if ('nodeName' in image && /img/i.test(image.nodeName)) {\n for (var i = arguments.length - 1; i >= 1; i--) {\n arguments[i] = arguments[i] * factor;\n }\n } else if (typeof dw == 'undefined') {\n arguments[1] *= factor;\n arguments[2] *= factor;\n arguments[3] *= factor;\n arguments[4] *= factor;\n }\n\n drawImage.apply(this, arguments);\n };\n }\n\n /**\n * Check whether the user's browser supports Data URI or not\n *\n * @private\n * @param {Function} fSuccess Occurs if it supports Data URI\n * @param {Function} fFail Occurs if it doesn't support Data URI\n */\n function _safeSetDataURI(fSuccess, fFail) {\n var self = this;\n self._fFail = fFail;\n self._fSuccess = fSuccess;\n\n // Check it just once\n if (self._bSupportDataURI === null) {\n var el = document.createElement('img');\n var fOnError = function () {\n self._bSupportDataURI = false;\n\n if (self._fFail) {\n self._fFail.call(self);\n }\n };\n var fOnSuccess = function () {\n self._bSupportDataURI = true;\n\n if (self._fSuccess) {\n self._fSuccess.call(self);\n }\n };\n\n el.onabort = fOnError;\n el.onerror = fOnError;\n el.onload = fOnSuccess;\n el.src =\n 'data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='; // the Image contains 1px data.\n return;\n } else if (self._bSupportDataURI === true && self._fSuccess) {\n self._fSuccess.call(self);\n } else if (self._bSupportDataURI === false && self._fFail) {\n self._fFail.call(self);\n }\n }\n\n /**\n * Drawing QRCode by using canvas\n *\n * @constructor\n * @param {HTMLElement} el\n * @param {Object} htOption QRCode Options\n */\n var Drawing = function (el, htOption) {\n this._bIsPainted = false;\n this._android = _getAndroid();\n\n this._htOption = htOption;\n this._elCanvas = document.createElement('canvas');\n this._elCanvas.width = htOption.width;\n this._elCanvas.height = htOption.height;\n el.appendChild(this._elCanvas);\n this._el = el;\n this._oContext = this._elCanvas.getContext('2d');\n this._bIsPainted = false;\n this._elImage = document.createElement('img');\n this._elImage.alt = 'Scan me!';\n this._elImage.style.display = 'none';\n this._el.appendChild(this._elImage);\n this._bSupportDataURI = null;\n };\n\n /**\n * Draw the QRCode\n *\n * @param {QRCode} oQRCode\n */\n Drawing.prototype.draw = function (oQRCode) {\n var _elImage = this._elImage;\n var _oContext = this._oContext;\n var _htOption = this._htOption;\n\n var nCount = oQRCode.getModuleCount();\n var nWidth = _htOption.width / nCount;\n var nHeight = _htOption.height / nCount;\n var nRoundedWidth = Math.round(nWidth);\n var nRoundedHeight = Math.round(nHeight);\n\n _elImage.style.display = 'none';\n this.clear();\n\n for (var row = 0; row < nCount; row++) {\n for (var col = 0; col < nCount; col++) {\n var bIsDark = oQRCode.isDark(row, col);\n var nLeft = col * nWidth;\n var nTop = row * nHeight;\n _oContext.strokeStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;\n _oContext.lineWidth = 1;\n _oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;\n _oContext.fillRect(nLeft, nTop, nWidth, nHeight);\n\n // 안티 앨리어싱 방지 처리\n _oContext.strokeRect(\n Math.floor(nLeft) + 0.5,\n Math.floor(nTop) + 0.5,\n nRoundedWidth,\n nRoundedHeight\n );\n\n _oContext.strokeRect(\n Math.ceil(nLeft) - 0.5,\n Math.ceil(nTop) - 0.5,\n nRoundedWidth,\n nRoundedHeight\n );\n }\n }\n\n this._bIsPainted = true;\n };\n\n /**\n * Make the image from Canvas if the browser supports Data URI.\n */\n Drawing.prototype.makeImage = function () {\n if (this._bIsPainted) {\n _safeSetDataURI.call(this, _onMakeImage);\n }\n };\n\n /**\n * Return whether the QRCode is painted or not\n *\n * @return {Boolean}\n */\n Drawing.prototype.isPainted = function () {\n return this._bIsPainted;\n };\n\n /**\n * Clear the QRCode\n */\n Drawing.prototype.clear = function () {\n this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height);\n this._bIsPainted = false;\n };\n\n /**\n * @private\n * @param {Number} nNumber\n */\n Drawing.prototype.round = function (nNumber) {\n if (!nNumber) {\n return nNumber;\n }\n\n return Math.floor(nNumber * 1000) / 1000;\n };\n\n return Drawing;\n })();\n\n /**\n * Get the type by string length\n *\n * @private\n * @param {String} sText\n * @param {Number} nCorrectLevel\n * @return {Number} type\n */\n function _getTypeNumber(sText, nCorrectLevel) {\n var nType = 1;\n var length = _getUTF8Length(sText);\n\n for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {\n var nLimit = 0;\n\n switch (nCorrectLevel) {\n case QRErrorCorrectLevel.L:\n nLimit = QRCodeLimitLength[i][0];\n break;\n case QRErrorCorrectLevel.M:\n nLimit = QRCodeLimitLength[i][1];\n break;\n case QRErrorCorrectLevel.Q:\n nLimit = QRCodeLimitLength[i][2];\n break;\n case QRErrorCorrectLevel.H:\n nLimit = QRCodeLimitLength[i][3];\n break;\n }\n\n if (length <= nLimit) {\n break;\n } else {\n nType++;\n }\n }\n\n if (nType > QRCodeLimitLength.length) {\n throw new Error('Too long data');\n }\n\n return nType;\n }\n\n function _getUTF8Length(sText) {\n var replacedText = encodeURI(sText)\n .toString()\n .replace(/\\%[0-9a-fA-F]{2}/g, 'a');\n return replacedText.length + (replacedText.length != sText ? 3 : 0);\n }\n\n /**\n * @class QRCode\n * @constructor\n * @example\n * new QRCode(document.getElementById(\"test\"), \"http://jindo.dev.naver.com/collie\");\n *\n * @example\n * var oQRCode = new QRCode(\"test\", {\n * text : \"http://naver.com\",\n * width : 128,\n * height : 128\n * });\n *\n * oQRCode.clear(); // Clear the QRCode.\n * oQRCode.makeCode(\"http://map.naver.com\"); // Re-create the QRCode.\n *\n * @param {HTMLElement|String} el target element or 'id' attribute of element.\n * @param {Object|String} vOption\n * @param {String} vOption.text QRCode link data\n * @param {Number} [vOption.width=256]\n * @param {Number} [vOption.height=256]\n * @param {String} [vOption.colorDark=\"#000000\"]\n * @param {String} [vOption.colorLight=\"#ffffff\"]\n * @param {QRCode.CorrectLevel} [vOption.correctLevel=QRCode.CorrectLevel.H] [L|M|Q|H]\n */\n QRCode = function (el, vOption) {\n this._htOption = {\n width: 256,\n height: 256,\n typeNumber: 4,\n colorDark: '#000000',\n colorLight: '#ffffff',\n correctLevel: QRErrorCorrectLevel.H\n };\n\n if (typeof vOption === 'string') {\n vOption = {\n text: vOption\n };\n }\n\n // Overwrites options\n if (vOption) {\n for (var i in vOption) {\n this._htOption[i] = vOption[i];\n }\n }\n\n if (typeof el == 'string') {\n el = document.getElementById(el);\n }\n\n if (this._htOption.useSVG) {\n Drawing = svgDrawer;\n }\n\n this._android = _getAndroid();\n this._el = el;\n this._oQRCode = null;\n this._oDrawing = new Drawing(this._el, this._htOption);\n\n if (this._htOption.text) {\n this.makeCode(this._htOption.text);\n }\n };\n\n /**\n * Make the QRCode\n *\n * @param {String} sText link data\n */\n QRCode.prototype.makeCode = function (sText) {\n this._oQRCode = new QRCodeModel(\n _getTypeNumber(sText, this._htOption.correctLevel),\n this._htOption.correctLevel\n );\n this._oQRCode.addData(sText);\n this._oQRCode.make();\n this._el.title = sText;\n this._oDrawing.draw(this._oQRCode);\n this.makeImage();\n };\n\n /**\n * Make the Image from Canvas element\n * - It occurs automatically\n * - Android below 3 doesn't support Data-URI spec.\n *\n * @private\n */\n QRCode.prototype.makeImage = function () {\n if (typeof this._oDrawing.makeImage == 'function' && (!this._android || this._android >= 3)) {\n this._oDrawing.makeImage();\n }\n };\n\n /**\n * Clear the QRCode\n */\n QRCode.prototype.clear = function () {\n this._oDrawing.clear();\n };\n\n /**\n * @name QRCode.CorrectLevel\n */\n QRCode.CorrectLevel = QRErrorCorrectLevel;\n})();\n\n(function () {\n /* globals define, qrcode */\n\n function generateModule(name, values) {\n define(name, [], function () {\n 'use strict';\n\n return values;\n });\n }\n\n generateModule('qrcode', { default: QRCode });\n})();\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t146: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkunattended_showing\"] = self[\"webpackChunkunattended_showing\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [297], () => (__webpack_require__(1411)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","m","window","require","default","__esModule","module","exports","requirejs","define","d","esc","NotLoggedIn","InvalidAntiForgeryToken","NoPermissionForEmber","TwoFactorAuthenticationRequired","ValidationError","ProcessingError","ServerProcessingError","ServiceUnavailable","GET","JSONAPI_REQUEST","headers","accept","CONTENT_TYPE_PLAIN","EmberAjaxError","Error","constructor","message","code","type","errors","super","_defineProperty","this","name","AdcAjaxService","Service","arguments","environmentConfig","owner","getOwner","resolveRegistration","defaultHeaders","envAntiForgeryCookieName","antiForgeryCookieName","undefined","_objectSpread","ajaxrequestuniquekey","getCookie","apiBaseUrl","_this$environmentConf","apiRequest","apiEndpoint","_this$environmentConf2","data","length","httpVerb","useJsonApiFormat","newOptions","envUseJsonApi","requestJsonApiResponse","joinChar","request","concat","microApiRequest","microApiEnum","_this$microApiData","_this$microApiData$da","_this$microApiData2","microApiData","microApiDataRaw","endpointData","included","find","item","Number","id","attributes","now","Date","isBefore","jwtExpirationDate","setSeconds","getSeconds","pathname","search","location","Accept","Authorization","encodedJwtToken","SourcePath","SourceQueryParams","TokenVersion","microApiTokenVer","subEndpoint","baseApiEndpoint","finalEndpoint","startsWith","serializeBody","serialize","JSON","stringify","url","optionsOrType","includeHeaders","method","body","response","fetch","status","result","async","text","parse","error","SyntaxError","ok","parseResponse","errorData","getErrorWithStatusCode","title","decodeURIComponent","e","processNoNetworkError","simpleRequest","isNoNetworkError","noInternetConnection","_AdcAjaxService","n","prototype","computed","NotFound","AjaxError","shouldBeLogged","isUnauthorizedAccess","isValidationError","isProcessingError","isIncorrectSite","statusCode","args","navigator","onLine","_contextManager","WeakMap","_store","_endpointData","_tokenVer","BaseMicroApiAdapter","BaseJsonApiContentAdapter","_classPrivateFieldInitSpec","i","_this$endpointData$en","_this$endpointData","buildHeaderProps","findAll","store","sinceToken","snapshot","RSVP","resolve","reject","ensureEndpointAndToken","then","catch","findRecord","query","queryRecord","updateRecord","createRecord","deleteRecord","submitCustomApiCall","model","verb","rawData","value","pathForType","_modelName","microApiEndpointPath","tokenVer","_this$store$peekAll$f","_endpointData$namespa","_endpointData$baseApi","peekAll","firstObject","microApiEndpoints","endpoint","String","Object","assign","namespace","buildNamespace","host","buildHost","reload","token","_this$tokenVer","namespaceData","hostData","_BaseMicroApiAdapter","g","inject","tracked","_microApiEndpoints","_microApiTokenVer","MicroApiDataItem","BaseModel","_MicroApiDataItem","hasMany","inverse","attr","MicroApiEndpoint","_baseApiEndpoint","_namespace","_encodedJwtToken","_jwtExpirationDate","_MicroApiEndpoint","defaultValue","updateRouteInfo","queryParams","routeItem","routeName","fullRouteName","contextManager","setCurrentRouteData","route","pageTitle","getRouteItemTitle","wasReplaceTransition","baseRoute","EmberRoute","performanceMonitor","intl","routeId","_this$_routeItem","_routeItem","getRouteItem","_this$routeItem","tc","sendRouteInfoToApp","once","serializeQueryParam","urlKey","defaultValueType","toISOString","_super","deserializeQueryParam","pageMaxWidth","isMediumWidthPage","beforeModel","transition","markRouteInitialized","targetName","setUseKpiThresholdMetrics","actions","didTransition","IsMediumWidthPage","Mixin","polymorphicSerializer","CommonSerializer","extend","EmbeddedRecordsMixin","isEmbeddedRecordsMixinCompatible","payloadKeyFromModelName","modelName","singularize","options","includeId","json","relationships","eachRelationship","key","BaseEngineConfig","twoFactorAuthenticationTypes","TWO_FACTOR_AUTHENTICATION_TYPES","recognizedDeviceTypes","RECOGNIZED_DEVICE_TYPES","getRouteIdFromRouteName","customerPageUrlEnums","BrowserService","_nativeBridge","copyToClipboard","textArea","document","createElement","style","visibility","appendChild","select","clipboard","writeText","removeChild","_unused","universalCopyToClipboard","subject","anchorElement","nativeBridge","doesSupportLaunchShareActionDialog","launchShareActionDialog","_unused2","_BrowserService","_router","_envSettings","ContextManager","_routeData","_wasReplaceTransition","logMissingAbstractMember","setIsLoading","_isLoading","logout","_useReturnUrl","_routeId","transitionToUrl","_url","resetVisitedRoutesStack","transitionToPreviousRoute","_defaultPageIfStackIsEmpty","getVisitedRoutesStackLength","isSystemInstall","envSettings","isTestEnvironment","router","currentURL","includes","rootURL","_ContextManager","SameSite","Cookie","isSecure","sameSite","None","namePrefix","expirationDate","domain","trim","Strict","EssentialCookie","isAllowed","setCookie","cookieName","cookie","toUTCString","validateCookie","_a","console","warn","getCookieInvalidationDate","setTime","getTime","getNonPrefixedCookieName","substring","getCookieValue","split","reduce","cookieValue","join","CookieService","trimmedCookie","call","consentCookieValue","deleteCookie","hasTruthyCookieValue","getCookieDomain","hostname","CookieManager","cookieService","getEssentialCookie","hasEssentialCookieTruthyValue","deleteEssentialCookie","setEssentialCookie","EnvSettingsService","setEnvironment","env","getEnvironment","isEnvironmentOfType","_ref","_this$envSettings","environment","isDevelopmentEnvironment","isProductionEnvironment","MONTHS","Array","from","_","idx","startOfHour","setHours","setMonth","getTranslations","cultureId","translations","Promise","language","ajax","_ajax","_intl","_timeZone","LocaleService","isRtl","refreshCulture","changeLocale","locale","cache","app","_app$translations","isoCode","weekStartsOnSunday","defaultIsoCode","all","Intl","loadScript","addTranslations","setLocale","timeZone","set","uiComponents","lookup","defaults","props","firstDay","WEEKDAYS","setDay","i18n","previousMonth","t","nextMonth","months","map","formatDate","month","weekdays","weekday","weekdaysShort","setProperties","_LocaleService","alias","RSVPReject","Promise$1","BluetoothPermissionEnum","RUN_TOOLBAR_BUTTON_ACTION_NAME","RUN_MODAL_BUTTON_ACTION_NAME","RUN_RESOLVE_PROMISE_ACTION","runMethod","featureEnum","isEnabled","doesSupportFeature","promise","fn","fnResolve","fnReject","RSVPPromise","returnPromiseId","guidFor","promiseCache","content","feature","later","_this$bridge","bridge","postMessage","getButtonCollectionWithId","getCollectionWithId","collectionName","get","findBy","getBridge","_bridge","bridgeName","webkit","messageHandlers","NativeBridge","supportedNativeBridgeFeatures","doesSupportNativeView","viewEnum","supportedNativeViews","getObjectWithoutId","object","_objectWithoutProperties","_excluded","setupActionsOnBridge","_this","toolbarId","buttonPath","index","toolbar","buttons","button","action","buttonIndex","modalButtons","objectAt","promiseId","previouslyResolvedPromiseIds","_this$previouslyResol","wasPreviouslyResolved","sentryExtras","latestResolvedTime","extras","tags","isError","withScope","scope","setExtras","setTags","sendTitleToApp","_this$titleStack","titleStack","lastObject","transformButtonObject","buttonObject","bridgeMethodKey","description","icon","isPromisePending","paramsString","_len","params","_key","isEmpty","toString","actionPath","wrapJsInTryCatch","translateToolbarButtons","backButtons","contextButtons","forEach","push","sendToolbarButtonsToApp","_this$toolbarsStack","toolbarsStack","processCollectionUpdate","stackType","newCollection","updateAction","existingCollection","stack","indexOfExisting","indexOf","popObject","pushObject","processCollectionDispose","needsUpdate","removeObject","initializeBridge","promiseResolveDataReplaceTemplate","startTime","initializationFailSafe","promiseResolvePath","cancel","duration","log","initialize","addWeakListener","resetToolbarButtons","doesSupportTitle","doesSupportToolbarButtons","doesSupportConfirmationDialog","doesSupportGoBack","doesSupportRefreshWebView","doesSupportReloadAssociatedSystems","doesSupportTransitionToNativeView","doesSupportTransitionToNativeViewWithId","doesSupportCloseWebView","doesSupportLaunchImportContact","doesSupportLaunchBrowser","doesSupportCloseWebViewV2","doesSupportTerminateAppSession","doesSupportLaunchNewContext","doesSupportPersistAppSession","doesSupportEnablePushNotifications","doesSupportEnableBluetooth","doesSupportCheckBluetoothPermissions","doesSupportStartBleAdvertising","doesSupportStopBleAdvertising","A","setTitle","titleCollection","removeTitle","setToolbarButtons","removeToolbarButtons","clear","getButtonTypeBack","getButtonTypeCancel","getButtonTypeConfirm","getButtonTypeAdd","showConfirmationDialog","rect","getBoundingClientRect","buttonWidth","right","left","xCoordinate","yCoordinate","top","launchImportContact","goBack","handleError","refreshWebView","reloadAssociatedSystems","transitionToNativeView","nativeViewId","transitionData","shouldAvoidReloadingWebView","deviceID","macAddress","showBackArrow","returnToWebView","contextSwitchType","customerId","groupId","closeWebView","launchBrowser","isForSso","closeWebViewV2","terminateAppSession","launchNewContext","emberId","persistAppSession","enablePushNotifications","notificationTypes","enableBluetooth","checkBluetoothPermissions","permissionToCheck","values","startBleAdvertising","stopBleAdvertising","willDestroy","jsString","JS_PARSE_END","TTI_END","ROUTE_INITIALIZED","LAST_RENDER_MARK_RENDERED","CONTEXT_SWITCH_INITIALIZED","CONTEXT_SWITCH_RESOLVED","TIME_TO_INTERACTIVE","CSS_PARSE_TIME","JS_PARSE_TIME","ROUTE_VIEW_RENDERED","MODEL_RESOLVED","CONTEXT_SWITCH_TIME","createMeasurement","measurementName","startMark","endMark","doAllMarksExist","performance","measure","info","markNames","browserReadOnlyTimes","keys","timing","allRecordedMarkNames","getEntriesByType","mapBy","allPossibleMarks","every","markName","createMark","mark","clearContextSwitchMarks","clearMarks","filtered","filter","filteredMarkNamesByCreated","getMeasurements","_len2","measurementNames","_key2","resultDictionary","performanceEntry","clearMeasures","convertRouteNameToPath","replace","PerformanceMonitorService","buildTask","context","generator","kpiThreshold","exceededThreshold","thresholdIncrement","Math","floor","threshold","timeout","useKpiThresholdMetrics","currentRouteName","routePath","restartable","on","startKpiThresholdTask","registerDestructor","off","enabled","isDisabled","sendInitialMetricsToServer","source","sendRouteViewMetricsToServer","validMetrics","metricName","routeViewMetricPathDictionary","clearRouteViewMarks","err","markJSEnd","markTTIEnd","routeMarkedAsInitialized","markRouteViewRendered","markModelResolved","markLastRender","markContextSwitchInitialized","contextId","contextSwitchPreviousId","markContextSwitchResolved","originalContextId","newContextId","getKpiThreshold","kpiThresholdParam","URL","origin","searchParams","isNaN","kpiThresholdTask","perform","_PerformanceMonitorService","service","keepAliveFailures","triggerLogoutTimeout","forceLogoutOnNextTransition","routeIgnoresSessionTimeout","baseLogout","triggerInactivityWarningTimeout","inactive","triggerInactivityWarning","cancelTimers","timers","compact","cancelLogoutTimeouts","logoutTimeoutEvent","inactivityWarningTimeoutEvent","keepAlive","enableKeepAlive","stillAlive","keepSessionActive","keepAliveTimeout","debounce","keepAliveFrequencyMs","handleUserActivityEvent","doNotTimeoutSession","logoutTimeoutMs","inactivityWarningTimeoutMs","removeAllListeners","listenerIds","listenerId","removeListener","_inactive","_routeIgnoresSessionTimeout","_enableKeepAlive","_keepAliveUrl","_forceLogoutOnNextTransition","SessionActivity","applicationSessionProperties","shouldTimeout","keepAliveUrl","event","bind","getInactivityWarningDuration","clearInactiveStatus","refreshApplication","updateSessionTimeout","doNotTimeOut","forceLogout","apply","_SessionActivity","WebsocketMessageType","BaseWebsocketMessage","unitId","deviceId","EventWebsocketMessage","eventType","eventValue","qStringForExtraData","eventDateUtc","subtype","subvalue","MonitoringEventWebsocketMessage","correlatedEventId","monitoringEvent","PropertyChangeWebsocketMessage","property","propertyValue","propertyChange","GeofenceCrossingWebsocketMessage","fenceId","isInsideNow","geofenceCrossing","StatusUpdateWebsocketMessage","newState","flagMask","statusUpdate","isDefined","variable","WebsocketService","getReconnectionTimeout","attempts","range","min","pow","max","random","start","WebSocket","C","establishConnection","eventCode","socket","close","authToken","socketConnect","retrieveToken","addEventListener","reconnectionAttempts","delay","handleMessage","_this$authToken","_this$endpoint","tokenResponse","metaData","UnitId","DeviceId","_unused3","isPresent","EventType","EventValue","EventDateUtc","QstringForExtraData","CorrelatedEventId","Property","PropertyValue","FenceId","IsInsideNow","NewState","FlagMask","getWebsocketMessage","handler","willHandle","invoke","_WebsocketService","ArrayTransform","Transform","deserialized","toArray","deserialize","array","NullableBoolean","DS","BooleanTransform","serialized","BaseAdapter","RESTAdapter","AjaxRequestUniqueKey","handleResponse","payload","requestData","jsonPayload","typeOf","ex","isAdapterError","InvalidError","statusData","number","AdapterError","buildURL","Model","shouldRollbackRelationships","canBeRolledBack","isDestroyed","isDestroying","rollback","rollbackAttributes","getModelName","_String$match$","_String$match","match","apiMethod","adapterFor","rollbackRelationships","getRelationshipRecords","_this$hasMany$value","kind","belongsTo","rollbackRelationship","relDescriptor","record","_displayName","_isoCode","_language","_weekStartsOnSunday","LocaleModel","_LocaleModel","BaseSerializer","fromEntries","entries","JSONAPISerializer","keyForAttribute","keyForRelationship","LEVEL_TO_CONSOLE_FN_MAP","fatal","warning","debug","DEFAULT_CONFIG","attachStacktrace","serverName","release","isRecognizedServerError","hint","getErrorCodeFromHint","some","errorCode","parseInt","fnLog","logMessage","originalException","isArray","shouldEventBeIgnored","errorsToIgnore","errorToIgnore","getExceptionStringValue","propertyType","toLowerCase","getConfiguration","errorReportingConfiguration","beforeSend","beforeBreadcrumb","integrations","CaptureConsole","levels","ignoreErrors","denyUrls","_this$configuration","configuration","showDebugInfo","BaseErrorReporting","evt","preventDefault","stopPropagation","stopImmediatePropagation","getETI","xhrRequestsToIgnoreInBreadcrumbs","configure","init","setContext","user","extra","fingerprint","configureScope","setLevel","setUser","setFingerprint","_this$configuration2","level","_this$console","breadcrumb","category","_breadcrumb$data$url","_breadcrumb$data","r","target","path","targetKey","tagName","CACHE_NAME","ON_CLOSE_CLICK_LISTENER_KEY","DomService","addListener","destroyable","element","isOnce","capture","passive","_destroyable$CACHE_NA","_destroyable$CACHE_NA2","domListeners","clearCloseClickListener","attachCloseHandler","fnClose","fnTestElement","verifyCloseTarget","selector","_parent$contains","parent","querySelector","contains","srcElement","SPACE_CODE","ENTER_CODE","NUMPAD_ENTER_CODE","ESCAPE_CODE","TAB_CODE","ARROW_DOWN_CODE","ARROW_UP_CODE","ARROW_LEFT_CODE","ARROW_RIGHT_CODE","isEnterOrSpaceCode","isArrowDownCode","isArrowUpCode","isEnterCode","addWeakTrapFocusListener","scopeSelector","escapeCallback","treatArrowsAsTabEvents","oldListenerId","functionToCheck","changeElementInFocus","shiftKey","trapFocus","isFirstTabPressInTrapFocusListener","removeTrapFocusListener","getFocusableElements","baseElement","querySelectorAll","getAttribute","el","width","height","isVisible","shouldFocusPreviousElement","focusElements","currentIndex","activeElement","elementCount","lastElementIndex","listContainer","listItems","newIndex","isArrowLeftCode","isArrowRightCode","isArrowCode","listItemsLastIndex","focus","scriptUrl","scriptEl","src","onload","_scriptEl$parentNode","parentNode","onerror","memberName","buildClassListString","classList","appliedClasses","shouldAddClass","className","listenerCache","getTimestamp","round","runGarbageCollection","setTimeout","requestIdleCallback","requestAnimationFrame","listeners","getEventListenersObject","count","timestamp","initialized","generateEventId","crypto","Uint32Array","getRandomValues","eventOptions","fnEvent","_data$element","removeEventListener","RTL_STRING","DIR_CHANGED_EVENT_KEY","_document$documentEle","documentElement","getNamedItem","directionChangedEvent","createEvent","initEvent","MutationObserver","mutations","mutation","attributeName","dispatchEvent","observe","CUSTOM_TRANSLATION_CONTEXT_REGEX","RegExp","TRANSLATION_CONTEXT_REGEX","GENERATED_CONTEXT_REGEX","TYPES_WITH_PREFIX","getTranslationPathFromContext","_getCustomPath","_context$getIntlPath2","_context$getIntlPath3","_context$toString2","contextPath","_context$getIntlPath","getIntlPath","concreteMatch","config","modulePrefix","getCustomPath","_context$toString","generatedMatch","fnCreateResponse","getStandardPath","unshift","getFormattingOptions","formatDateTz","isSameDayTz","date1","date2","computeDayKeyTz","date","day","year","ADCIntlService","IntlService","onIntlError","IntlErrorCode","MISSING_DATA","MISSING_TRANSLATION","formatTimeTz","formatTime","contextOrKey","keyOrReplaceTokens","replaceTokensOnly","replaceTokens","hasContext","getTranslationKeyAndTokens","optionKeys","k","v","isNone","formatMessage","getTranslation","isSameDay","isTomorrow","today","setDate","getDate","isToday","isYesterday","_ADCIntlService","TEMPLATE","createTemplateFactory","didInsert_","didUpdate_","SvgSymbol","Component","clickHandler","_this$args$onClick","iconPath","_config$adcSvgSyste","_config$adcSvgSyste2","ariaLabel","labelText","desc","hideForAccessibility","isHiddenForAccessibility","isInteractive","isFocusable","iconCss","fillColor","loadSvgDefs","defsElement","getSpriteSelector","replaceWith","cloneNode","hasSvgDefs","_SvgSymbol","setComponentTemplate","_spriteMarkup","SvgSpriteLoader","spriteRootPath","spritePaths","spritesData","spriteUrl","_text$replace","spriteMarkup","htmlSafe","drop","_SvgSpriteLoader","guidForFn","DidResizeModifier","Modifier","observer","handlers","ResizeObserver","entry","unobserve","modify","_ref2","domElement","addHandler","debounceId","removeHandler","delete","instance","coalesce","p","isPending_","spinnerSvg_","coalesce_","t_","await_","AsyncLoader","AsyncButtonIcon","buttonIcon_","guidFor_","noop_","buttonAsyncButtonIcon_","buttonSimple_","EnumAsyncState","_asyncState","_isPending","ButtonAsync","buttonAction","buttonAnimation","_isSuccess","isPromise","asyncState","pending","success","failure","isSuccess","noDelay","idle","simpleButtonStyle","getSimpleButtonStyle","buttonStyle","isFinished","isPending","asyncType","_ButtonAsync","equal","svgSymbol_","_media","ButtonIcon","reversedCss","_this$args$buttonStyl","getAnyButtonStyle","buttonText","responsiveText","media","isMobile","_ButtonIcon","CheckboxTreeAllNoneSelector","templateOnlyComponent","allNoneSelector","onClickOutside_","LEFT","RIGHT","DEFAULT_PLACEMENT","focusSet","getAnchorElement","anchorSelector","getPopperOptions","placement","boundariesElement","onCreate","onCreateAction","modifiers","flip","arrow","preventOverflow","escapeWithReference","createAndSetPopper","Popper","dom","updatePopper","cleanupAndRemovePopper","popper","destroy","scheduleUpdate","handleTogglePopper","isRenderedWithPopper","shouldRenderWithPopper","_dom","_isFocusable","_isRenderedWithPopper","PopoverWrapper","willClose","lastFocusedElement","rtlPlacement","check","replacement","domId","didUpdate","initPopup","trapFocusListener","didRender","focusOptions","preventScroll","focusSelector","elementToFocus","willDestroyElement","dasherize","directRenderOnMobile","togglePopper","extraPopperUpdate","keyDownOnElement","_event$target","clickOutsidePopup","composedPath","_PopoverWrapper","notEmpty","PopoverHeader","popoverHeader","PopoverBody","popoverBody","PopoverFooter","popoverFooter","popoverPopoverWrapper_","hash","popoverPopoverHeader_","popoverPopoverBody_","popoverPopoverFooter_","IN_MODAL_CLASS","ON_MOBILE_CLASS","handleOpenClose","_get","isOpen","_isMobile","_usesBackdrop","_enhancedCloseOnClick","PopoverMenu","schedule","inModal","modal","backdropDestinationElement","popoverDestinationElement","bodyEl","goodParent","overflowStyles","forbiddenStyleValue","getComputedStyle","offsetParent","position","openStateChanged","scheduleOnce","popoverBackdropClass","classForPopover","fullScreenOnMobile","popoverClass","hasBackdrop","useImprovedCloseOnClick","usesBackdrop","enhancedCloseOnClick","popoverBackdropClicked","togglePopover","closePopover","_this$onBackdropCli","closeOnBackdropClick","_PopoverMenu","reads","or","and","popoverMenu_","wrapper","classNames","classNameBindings","matchTriggerElementWidth","popoverIsFocusable","didInsertElement","setPopoverWidth","triggerSelector","triggerId","anchorSelectorForPopover","isDefaultAnchorSelector","matchTriggerElementWidthObserver","popoverAnchor","popoverClasses","popoverPlacement","boundariesPadding","popoverWidth","popoverMaxWidth","popoverMaxHeight","triggerElement","textInput_","SearchInput","searchInput","searchInput_","SearchToolbar","searchToolbar","media_","searchToolbar_","DropdownMultiSelectToolbar","checkboxTreeAllNoneSelector_","DropdownMultiSelectTreeWrapper","treeWrapper","guidFor_0","didResize_","baseDropdownWrapper_","dropdownSelectMultiSelectToolbar_","dropdownSelectMultiSelectTreeWrapper_","checkboxTree_","errorTooltip_","ChecklistTreeInfo","_props$title","_props$items","_props$maxItemCount","_props$additionalItem","_props$show","_props$noResults","_props$showHeader","_props$showAllNoneSel","items","maxItemCount","additionalItemCount","show","noResults","showHeader","showAllNoneSelectors","displayItems","slice","updateItemState","state","isSelectable","disabled","setEach","selectAll","SELECTED","selectNone","UNSELECTED","_ChecklistTreeInfo","VALUE_CHANGE_ACTION","setFocusSelector","elementId","fnUpdateFocusSelector","s","showSearch","setFocusBackToTrigger","_document$querySelect","hasCustomTrigger","firstElementChild","contentId","clearErrorMessageTrigger","cloneItems","flatten","subItems","subitems","DropdownSelectItem","create","getProperties","synchronizeItems","clones","clone","getFilteredItems","searchString","filteredItems","hasSubitems","doesItemMatchSearch","_isOpen","_resolvedItems","_isEmpty","_showSearch","_isFiltered","_isPlaceholderShown","MultiSelectComponent","resolvedItems","updateFocusSelector","isSimpleList","isEvery","limitItems","selectedItems","getAllSelectedItems","unselectedItems","rejectBy","itemCollections","selected","limit","unselected","selectedCount","unselectedCount","selectedMax","getCheckList","itemCollection","alwaysShowHeaders","selectedTree","itemsText","unselectedTree","triggerText","isFullySelected","placeholder","triggerTextHtml","hasSelectionChanged","currentSelections","previousSelections","previousItem","saveSelectionChange","currentValue","previousValue","valueChangeParameter","valueChangeAction","triggerResized","triggerTextChanged","label","innerText","setAttribute","updateFocusSelectorForElement","dataset","onDropdownOpen","cachedSelections","onDropdownClose","tree","clearErrorMessage","togglePopoverVisibility","_MultiSelectComponent","empty","bool","dropdownSelectSingleSelect_","eq_","dropdownSelectMultiSelect_","DropdownSelect","multiselect","convertToDropdownSelectItem","customItem","newItemObject","dropdownSelectKey","customKey","capitalize","transformItemsCollection","itemValueKey","itemNameKey","itemsInternal","transformedItems","valueString","_DropdownSelect","updateSelectedValue","shouldIgnoreAction","selectItem","toggleErrorMessageVisibility","errorMessage","hideErrorMessage","_hideErrorMessage","_selectedItems","_selectedItem","SingleSelectComponent","resolvedErrorMessage","selectedValue","_flattenedItems$findB","flattenedItems","acc","val","selectedItem","synchronizeSelectedItem","_this$args$value","_this$resolvedItems$f","x","itemClicked","onErrorMessageChange","updateOption","removeAttribute","_SingleSelectComponent","filterBy","and_","FormGroup","formGroup","InfoIcon","InfoIcon$1","SuccessIcon","SuccessIcon$1","WarningIcon","WarningIcon$1","DangerIcon","DangerIcon$1","TYPES","InlineAlert","focusTrap_","_modals","ModalsHost","escapeDeactivates","allowOutsideClick","initialFocus","modalKeyTrigger","_modals$lastObject","modals","modalsToRender","modalBackdropTrigger","_this$modals$modalsTo","disableBackdropClose","closeModal","_ModalsHost","addDelayedCssSignature","modifier","css","add","ModalHeader","_ModalHeader","addDelayedCss_","modalsBaseHeaderModalHeader_","modalsBaseFooterModalFooter_","BaseModal","ariaLabelledBy","modalsBaseBaseModal_","SimpleDialog","simpleDialog","buttonAsync_","AppNotificationComponent","autoCloseDuration","notification","isTesting","remove","closeNotification","restoreFocus","keyUpHandler","buttonClicked","returnValue","_AppNotificationComponent","notificationManagerAppNotification_","_notificationManager","NotificationManager","_notification$element","notificationManager","removeNotification","_NotificationManager","iconFill_","BinaryLabel","or_","simpleBinaryLabel_","SimpleBinary","reverse","wrap","updateIndeterminate","indeterminate","checked","_SimpleBinary","SimpleBinaryButton","asyncLoader_","simpleBinaryButton_","simpleBinary_","_isLongList","SimpleBinaryButtonList","isMultiSelect","_this$args$isMultiSel","listCss","_this$args$orientatio","orientation","isLongList","listItemChanged","_this$args$onchange","_this$args","onchange","allowDeselect","binaryToggled","_SimpleBinaryButtonList","gt","BaseTimezoneControl","zone","cfg","_cfg$timeZone","getZonedDate","utcToZonedTime","getUtcDateFromZone","zonedTimeToUtc","_BaseTimezoneControl","BaseTimeControl","zonedDate","testInputType","input","isNativeDateInputSupported","emitChangeEvent","isValid","SmartDateComponent","getIsTouchDevice","pattern","getFormattedDate","format","minDate","maxDate","displayDate","_this$getFormattedDat","inputChanged","hasTouchEvents","KeyboardEvent","changeDate","inputBlurred","setCustomValidity","reportValidity","allowNull","_SmartDateComponent","PATH_REG_EXP","ALLOWED_SIZES","SpinnerSvg","c","_SpinnerSvg","spinning","_this$args$spinning","size","iconTitle","EmberComponent","resolvePath","intlPath","Input","willDestroy_","valueChangeTrigger","internalValue","onValueChange","keyUpTrigger","onKeyUp","keyDownTrigger","onKeyDown","setInputFilter","textInput","inputFilter","oldValue","oldSelectionStart","selectionStart","oldSelectionEnd","selectionEnd","hasOwnProperty","setSelectionRange","_internalValue","_maxLength","TextInput","onExternalValueChange","errorDuration","convertAutoDestroyToDuration","autoDestroy","updateInternalValue","sendUpdate","maxLength","stringValue","onlyAllowNumbers","test","handleInputChange","onComponentInsert","onKeyDownNonDebounced","onKeyUpNonDebounced","clearInput","enter","_TextInput","handleBinaryChange","iconFill","color","setupPikaday","application","EmberObject","register","singleton","setupRouteView","AbstractNavigationApi","setupUiComponents","updateRootVariable","rootStyle","classify","setProperty","textColor","AccessibilityService","saveFocusedElement","_this$lastFocusedElem","focusElement","updateDealerColors","headerColor","navColor","highlightColor","activateDisplayMode","featuresList","displayModeClasses","list","getDisplayModeClasses","modalsDialogModalsSimpleSimpleDialog_","InfoDialog","updateScrollIndicator","dialog","closest","toggle","scrollHeight","offsetHeight","handleScroll","scrollTop","_InfoDialog","GetModalButton","Helper","compute","isPrimary","getModalFooterButton","getModalButton_","_errorMessage","EditConfirmationModal","confirmAction","editConfirmed","_EditConfirmationModal","modalsConfirmationsEditEditConfirmations_","RenameDialog","saveChanges","_this$cachedValue","rename","cachedValue","output","changeInputValue","_evt$target$value","keyInput","_evt$target$closest","closeBtn","click","_RenameDialog","coalesce_0","ConfirmDeleteDialog","_ConfirmDeleteDialog","LoadingDialog","LoadingDialog$1","State","_state","_showSpinner","PromiseDialog","displayIconType","Success","Failure","currentStateValues","Confirm","stepConfirm","stepPromise","stepSuccess","stepFailure","cancelOnClickFunction","showSuccess","showRetry","allowRetry","displayCancel","displayPromiseButton","_currentStateValues$b","_currentStateValues$b2","processPromise","successOnClickFunction","buttonCss","promiseFn","showError","_PromiseDialog","ConfirmationDialog","ConfirmationDialog$1","activeModals","_model","Modal","onClose","_Modal","_accessibility","ModalService","modalIsOpen","_modalsToRender","confirmButtonProperties","cancelButtonProperties","cssClass","nativeButtons","nativeButtonType","renderAsNative","isHTMLSafe","hasHTML","showModal","hideNotifications","accessibility","showInfoModal","showRenameModal","showDeleteModal","showLoadingModal","finally","showPromiseModal","keepNotificationsHidden","lastModal","showNotifications","closeAllModals","_ModalService","createNotificationType","persistent","camelize","_config$notificationM","addNotificationFromType","notificationType","autoCloseDurationOverride","Element","addNotification","hidden","returnDedupedNotifications","newNotification","notifications","appNotification","_appNotification$auto","isMuted","msg","_notifications","_isMuted","infoType","successType","warningType","errorType","sessionEndedType","addInfo","addSuccess","addWarning","addError","addSessionEnded","mute","iconDesc","iconIsHiddenForAccessibility","clearNonPersistentNotifications","clearNotifications","unMute","_toArray","_toArray2","ButtonSimple","_toArray3","lastColor","buttonColor","pop","handleClick","_this$args$buttonActi","_ButtonSimple","DetailedCheckboxContent","sizeMap","small","large","SUCCESS","PENDING","ERROR","BUTTON_STATE_CLASSES","getSuccessCallbackDelay","noCallbackDelay","getFailureCallbackDelay","observePromise","animationDelay","fnUpdateStateClass","showFailureAnimation","executeAction","onClickMethod","getAttr","readonly","promiseStateClass","delayedResolver","Button","attributeBindings","didReceiveAttrs","iconOnly","dataId","isPopoverTrigger","ariaHasPopup","primary","safe","danger","link","ariaSelected","hideSelectedCheckmark","hasVisibleCheckmark","sizeClass","classSize","readOnly","screenReaderText","svgTitle","noBackground","bubbleClickEvent","bubbleKeydownEvent","isPromiseFulfilled","isPromiseRejected","asyncButtonClass","keyDown","Button$1","not_","checkboxTreeDetailedCheckboxContent_","buttonAdc_","DetailedCheckboxInput","_this$args$onAction","_DetailedCheckboxInput","checkboxTreeDetailedCheckboxCheckbox_","_subitems","_hasSubItems","_canReceiveFocus","_addGroupSeparator","CheckboxTreeItemComponent","_this$args$isFocusabl","toggleSubitemsVisibility","isCollapsed","_CheckboxTreeItemComponent","checkboxTreeTreeItem_","CheckboxTree","areListItemsFocusable","_this$args$items","handleKeyUp","checkbox","isCollapsible","updateItemAction","storeActionOnRootItems","_CheckboxTree","ITEMS_CHANGED_ACTION","itemsChangedAction","addClassNames","addAttributes","attribute","ErrorTooltip","destroyTooltip","createTooltip","getTooltipAnchor","_el$firstElementChild","selectorDirection","defaultAnchor","anchor","parentElement","_el$closest","tooltip","defaultConfig","contentType","arrowTagName","arrowClassNames","arrowAttributes","jquery","innerHTML","textContent","parseGenerateConfig","removeOnDestroy","ModalFooter","buttonsToRender","_args$buttons","_args$closeButtonText","disableCloseButton","closeButtonText","handleActionResult","clickButton","_ModalFooter","_label","_icon","_css","_disabled","_color","BinaryListItem","_args$props","_BinaryListItem","SimpleBinaryList","onItemChange","_SimpleBinaryList","PARTIALLY_SELECTED","ensureValueExists","validateSubitemReliantProperties","setSubitemsParent","internalState","setLeafItemStates","setStateAndUpdateParent","uniqueStates","getAllUnitItemStates","isPartiallySelected","isNotSelected","assert","subitem","isNotModifiable","updateParentState","isBaseItem","subItemStates","states","uniq","useParentIfAllSubitemsSelected","touchValue","fnUpdate","QRCode","QR8bitByte","mode","QRMode","MODE_8BIT_BYTE","parsedData","l","byteArray","charCodeAt","QRCodeModel","typeNumber","errorCorrectLevel","modules","moduleCount","dataCache","dataList","getLength","buffer","write","put","addData","newData","isDark","row","col","getModuleCount","make","makeImpl","getBestMaskPattern","maskPattern","setupPositionProbePattern","setupPositionAdjustPattern","setupTimingPattern","setupTypeInfo","setupTypeNumber","createData","mapData","minLostPoint","lostPoint","QRUtil","getLostPoint","createMovieClip","target_mc","instance_name","depth","qr_mc","createEmptyMovieClip","y","beginFill","moveTo","lineTo","endFill","pos","getPatternPosition","j","bits","getBCHTypeNumber","mod","getBCHTypeInfo","inc","bitIndex","byteIndex","dark","getMask","PAD0","PAD1","rsBlocks","QRRSBlock","getRSBlocks","QRBitBuffer","getLengthInBits","totalDataCount","dataCount","putBit","createBytes","offset","maxDcCount","maxEcCount","dcdata","ecdata","dcCount","ecCount","totalCount","rsPoly","getErrorCorrectPolynomial","modPoly","QRPolynomial","modIndex","totalCodeCount","MODE_NUMBER","MODE_ALPHA_NUM","MODE_KANJI","QRErrorCorrectLevel","L","M","Q","H","PATTERN_POSITION_TABLE","G15","G18","G15_MASK","getBCHDigit","digit","errorCorrectLength","a","multiply","QRMath","gexp","qrCode","sameCount","darkCount","abs","glog","LOG_TABLE","EXP_TABLE","num","shift","ratio","RS_BLOCK_TABLE","rsBlock","getRsBlockTable","bufIndex","bit","QRCodeLimitLength","_getAndroid","android","sAgent","userAgent","aMat","parseFloat","svgDrawer","Drawing","htOption","_el","_htOption","draw","oQRCode","nCount","makeSVG","tag","attrs","createElementNS","svg","viewBox","fill","colorLight","setAttributeNS","colorDark","child","hasChildNodes","lastChild","CanvasRenderingContext2D","nWidth","nHeight","aHTML","elTable","childNodes","nLeftMarginTable","offsetWidth","nTopMarginTable","margin","_onMakeImage","_elImage","_elCanvas","toDataURL","display","_android","factor","devicePixelRatio","drawImage","image","sx","sy","sw","sh","dx","dy","dw","dh","nodeName","_safeSetDataURI","fSuccess","fFail","self","_fFail","_fSuccess","_bSupportDataURI","fOnError","onabort","_bIsPainted","_oContext","getContext","alt","nRoundedWidth","nRoundedHeight","bIsDark","nLeft","nTop","strokeStyle","lineWidth","fillStyle","fillRect","strokeRect","ceil","makeImage","isPainted","clearRect","nNumber","vOption","correctLevel","getElementById","useSVG","_oQRCode","_oDrawing","makeCode","sText","nCorrectLevel","nType","replacedText","encodeURI","_getUTF8Length","len","nLimit","_getTypeNumber","CorrectLevel","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","splice","getter","definition","o","defineProperty","enumerable","obj","prop","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}